CN110991476A - Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium - Google Patents

Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium Download PDF

Info

Publication number
CN110991476A
CN110991476A CN201910998534.0A CN201910998534A CN110991476A CN 110991476 A CN110991476 A CN 110991476A CN 201910998534 A CN201910998534 A CN 201910998534A CN 110991476 A CN110991476 A CN 110991476A
Authority
CN
China
Prior art keywords
models
training
operation data
model
historical operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910998534.0A
Other languages
Chinese (zh)
Inventor
梁壮
赵鸿楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910998534.0A priority Critical patent/CN110991476A/en
Publication of CN110991476A publication Critical patent/CN110991476A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • G06F16/435Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/45Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention relates to a method, a device and a storage medium for training a decision classifier and recommending audios and videos, wherein the method comprises the following steps: acquiring historical operation data of a user on the audio and video from a log file; performing model training on a plurality of different types of initial models simultaneously based on historical operation data to obtain a plurality of trained classification models; selecting a part of models from a plurality of classification models as candidate models according to a set rule; the method comprises the steps of updating the weight of historical operation data, training candidate models by adopting updated training samples, selecting a set number of target candidate models from the trained candidate models, generating a decision classifier according to the set number of target candidate models, integrating a plurality of target candidate models by the decision classifier, and predicting the type of a user more accurately compared with a single model.

Description

Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium
Technical Field
The embodiment of the invention relates to the field of audio and video processing, in particular to a method and a device for training a decision classifier and recommending audio and video and a storage medium.
Background
With the development of network technology, video digitization technology and hard disk storage technology, various network video systems are gradually emerging, and users usually adopt the internet video systems to watch audio and video.
The internet movie system is provided with a large amount of movie program libraries, and most users cannot spend a great deal of energy to traverse all movie programs on the movie system due to the fact that the internet movie system is provided with the large amount of movie program libraries, so that the recommendation of the movie programs of the internet movie system is very important.
In the related art, the recommendation of the movie program is usually performed for the user by using the historical viewing record of the user or the historical search record of the user, and the recommendation method cannot accurately infer the preference of the user and cannot realize accurate recommendation of the movie program.
Disclosure of Invention
In view of this, to solve the technical problem or some technical problems, embodiments of the present invention provide a method, an apparatus, and a storage medium for training a decision classifier and recommending an audio/video.
In a first aspect, an embodiment of the present invention provides a training method for a decision classifier, including:
acquiring historical operation data of a user on the audio and video from a log file;
performing model training on a plurality of different types of initial models simultaneously based on the historical operation data to obtain a plurality of trained classification models;
selecting a part of models from a plurality of classification models as candidate models according to a set rule;
updating the weight of the historical operation data, training the candidate models by adopting the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier according to the set number of target candidate models.
In one possible embodiment, the selecting, according to a set rule, a partial model from a plurality of classification models as a candidate model includes:
determining the accuracy and the operation time of the output result of each classification model;
sorting the classification models based on the accuracy and the computation time;
and selecting partial models from the sorted classification models as candidate models.
In one possible embodiment, the method further comprises:
according to the user type, taking part of data in a plurality of historical operation data in a set time period as a training sample, wherein the training sample comprises at least two pieces of historical operation data, and each piece of historical operation data is provided with a corresponding weight;
the model training of the plurality of initial models based on the historical operation data to obtain a plurality of trained classification models comprises:
inputting the training samples into a plurality of initial models and simultaneously carrying out model training;
if the similarity between the output result of the initial model and the user type is greater than a first threshold value, determining that the initial model is trained to be completed to obtain a trained classification model;
and if the similarity between the output result of the initial model and the user type is less than or equal to a first threshold value, continuing to execute the training step of the initial model.
In a possible embodiment, the updating the weights of the historical operation data, training the candidate models by using the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier according to the set number of target candidate models includes:
updating the weight of each historical operating data in the training sample;
training the candidate model by adopting the updated training sample based on a Boosting algorithm;
determining the accuracy and classification range of the output result of each candidate model;
ranking the candidate models based on the accuracy and the classification range;
selecting a partial model from the sorted candidate models as the target candidate model;
and if the number of the target candidate models reaches the set number, generating a decision classifier according to the set number of the target candidate models.
In one possible embodiment, the method further comprises:
taking the rest data in the plurality of historical operation data in a set time period as a test sample according to the type of the user;
inputting the test sample into the decision classifier so that the decision classifier outputs a prediction result;
if the similarity between the prediction result and the user type is larger than a second threshold, determining that the training of the decision classifier is finished;
and if the similarity between the prediction result and the user type is smaller than a second threshold value, continuing to execute the training step of the candidate model.
In one possible embodiment of the method according to the invention,
the inputting the test sample into the decision classifier to cause the decision classifier to output a prediction result comprises:
inputting the test sample into each of the target candidate models in the decision classifier;
the target candidate model determines an output result based on the test sample;
and taking the highest one of the output results as a prediction result output by the decision classifier.
In a second aspect, an embodiment of the present invention provides an audio and video recommendation method, including:
acquiring historical operation data of a user on the audio and video from a log file;
inputting the historical operation data into the decision classifier to cause the decision classifier to output the type of the user;
recommending the audio and video corresponding to the type to the user;
wherein the decision classifier is obtained by using any one of the methods of the first aspect.
In a third aspect, an embodiment of the present invention provides a training apparatus for a decision classifier, including:
the acquisition module is used for acquiring historical operation data of the user on the audio and video from the log file;
the first training module is used for carrying out model training on a plurality of initial models of different types simultaneously based on the historical operation data to obtain a plurality of trained classification models;
the determining module is used for selecting partial models from the plurality of classification models as candidate models according to a set rule;
and the second training module is used for updating the weight of the historical operation data, training the candidate models by adopting the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier according to the set number of the target candidate models.
In a fourth aspect, an embodiment of the present invention provides an audio and video recommendation apparatus, including:
the acquisition module is used for acquiring historical operation data of the user on the audio and video from the log file;
the classification module is used for inputting the historical operation data into the decision classifier so as to enable the decision classifier to output the type of the user;
and the recommending module is used for recommending the audio and video corresponding to the type to the user.
In a fifth aspect, an embodiment of the present invention provides a computer device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement, when executing a program stored in the memory, the steps of the training method for the decision classifier according to any one of the first aspect or the steps of the recommendation method for audio and video according to the second aspect.
In a sixth aspect, an embodiment of the present invention provides a storage medium, on which a computer program is stored, where the program, when executed by a processor, implements a training method for a decision classifier as described in any one of the above first aspects, or a recommendation method for audios and videos as described in the above second aspect.
In a seventh aspect, an embodiment of the present invention provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the training method for a decision classifier according to any one of the above first aspects, or the recommendation method for audios and videos according to the above second aspect.
According to the training method of the decision classifier, historical operation data of a user on audio and video are obtained from a log file; performing model training on a plurality of different types of initial models simultaneously based on the historical operation data to obtain a plurality of trained classification models; selecting a part of models from a plurality of classification models as candidate models according to a set rule; the method comprises the steps of updating the weight of historical operation data, training candidate models by adopting updated training samples, selecting a set number of target candidate models from the trained candidate models, generating a decision classifier according to the set number of target candidate models, integrating a plurality of target candidate models by the decision classifier, outputting classification results by adopting the plurality of target candidate models simultaneously when a user classifies, taking the highest one of the plurality of classification results as a prediction result of the decision classifier, predicting the type of the user more accurately compared with a single model, and utilizing the historical operation data of the user by the decision classifier, so that the user can be classified accurately, and the audio and video can be recommended to the user according to the type subsequently.
Drawings
Fig. 1 is a schematic flowchart illustrating a training method of a decision classifier according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating that a plurality of trained classification models are obtained by performing model training on a plurality of initial models simultaneously based on the historical operation data according to the embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating a process of selecting a partial model from a plurality of classification models as a candidate model according to a set rule according to an embodiment of the present invention;
fig. 4 is a schematic flow chart illustrating updating the weights of the historical operation data, training the candidate models by using the updated training samples to obtain a set number of target candidate models, and generating a decision classifier according to the set number of target candidate models according to the updated training samples according to the embodiment of the present invention;
FIG. 5 is a flowchart illustrating another training method for a decision classifier according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of an audio and video recommendation method according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a training apparatus for a decision classifier according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an audio and video recommendation device according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a schematic flowchart of a training method for a decision classifier according to an embodiment of the present invention, and as shown in fig. 1, the method specifically includes:
and S11, acquiring historical operation data of the user on the audio and video from the log file.
The decision classifier is applied to classification of users, the initial model is trained by using historical operation data of the users on audio and video to obtain a trained classification model, and then the decision classifier is generated based on the classification model.
When a user uses audio and video software to execute audio and video playing operation, historical operation data of the audio and video in the process of executing the audio and video playing operation is recorded in the form of log files, and the historical operation data can comprise: searching text data of the audio and video, playing time of the audio and video, evaluation data of the audio and video and the like.
The log file can be obtained according to the time sequence (the log file with the latest time can be obtained), the historical operation data can be obtained from the log file, and the log file in the time period contains the historical operation data of one user on a plurality of different audios and videos or the historical operation data of a plurality of users on a plurality of different audios and videos.
Further, the type of the user is defined according to the historical operation data, and the type can be used as a standard for initial model training.
And S12, performing model training on a plurality of different types of initial models simultaneously based on the historical operation data to obtain a plurality of trained classification models.
The decision classifier in the embodiment of the invention is composed of a plurality of models, the purpose of the multi-model is to overcome the problem that a single model is not suitable for all input data, and a convolutional neural network model, a Naive Bayes (NB) model, a Support Vector Machine (SVM) model and the like can be selected as initial models of the embodiment of the invention.
It should be noted that, the embodiment does not limit the initial model to be specifically limited, and the initial model may perform the classification of the user through training, and mainly adopts a multi-model form to perform the classification of the user.
In this embodiment, the type of the user is obtained through analysis according to the obtained historical operation data, the type may represent what type of audio and video the user usually watches, the type may also be considered as a label of the user, and the type may be used as a training standard for training a classification model and a target candidate model.
The training process may be:
taking historical operation data as input of different types of initial models, performing model training, comparing the output result of the initial models with the type of a user, and if the similarity of the output result and the type of the user reaches a set condition, considering that the initial model training is finished to obtain a plurality of trained classification models; and if the similarity between the output result and the type of the user does not reach the set condition, adjusting the operation parameters of the initial model until the similarity between the output result and the type of the user reaches the set condition.
And S13, selecting partial models from the classification models as candidate models according to set rules.
In this embodiment, the trained classification models include a plurality of classification models, and a part of the models that meet the set rule is matched from the plurality of classification models as candidate models, and the set rule may be determined according to the accuracy of the output result of the classification model, the operation time of the classification model, and other factors.
And S14, updating the weight of the historical operation data, training the candidate models by adopting the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier according to the set number of target candidate models.
In this embodiment, the types of the candidate models are different, which causes a difference in the output result of the candidate models, so that the candidate models (classification models) are secondarily trained, and in order to achieve the training effect, a new training sample is generated in a form of updating the weights of the historical operation data, and the candidate models are trained by using the new training sample.
The step of training the candidate models is similar to the step of training the initial models, the type of the user is used as the basis, after the training of the candidate models is completed, a set number of candidate models are selected from the trained candidate models to serve as target candidate models, and the selected criteria can be used for combining the set number of target candidate models to serve as a decision classifier according to factors such as the accuracy of the output results of the candidate models, the operation time of the candidate models and the like.
Fig. 2 is a schematic flow chart of performing model training on multiple initial models simultaneously based on the historical operation data to obtain multiple trained classification models according to the embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
and S121, taking part of data in the plurality of historical operation data in a set time period as training samples according to the user type.
In this embodiment, a plurality of pieces of historical operation data are acquired from the log file, and part of the plurality of pieces of historical operation data in a set time period may be used as training samples according to the type of the user, for example, 150 pieces of historical operation data in the set time period are acquired, wherein the historical operation data of 100 users a and the historical operation data of 50 users B are included.
Specifically, a K-fold cross validation mode can be adopted to divide historical operation data into training samples and testing samples, the training samples are used for training an initial model, the testing samples are used for testing a decision classifier, and the training samples and the testing samples comprise at least two pieces of historical operation data.
For example, the historical operation data of 100 users a are randomly divided into 5 parts, 4 parts of the historical operation data are used as training samples, 1 part of the training samples are used as test samples, each training sample comprises 20 pieces of historical operation data, and the weights corresponding to the 20 pieces of historical operation data in the initial model training process are all 5%.
In an alternative of the embodiment of the present invention, a plurality of historical operation data in each training sample may be converted into a corresponding data sequence, and the training sample is presented in the form of a data sequence.
And S122, inputting the training samples into a plurality of initial models and simultaneously carrying out model training.
Inputting training samples into a plurality of initial models, simultaneously carrying out model training on the plurality of initial models, and adjusting operation parameters in the initial models according to attributes of users as standards in the training process so as to adjust output results of the initial models.
S123, if the similarity between the output result of the initial model and the user type is larger than a first threshold value, determining that the training of the initial model is finished, and obtaining a trained classification model.
And S124, if the similarity between the output result of the initial model and the user type is less than or equal to a first threshold value, continuing to execute the training step of the initial model.
Continuously adjusting the form of operation parameters in the initial model to enable the output result of the initial model to be closer to the type of the user, and determining that the training of the initial model is finished when the similarity between the output result of the initial model and the type of the user is greater than a first threshold value to obtain a trained classification model; and if the similarity between the output result of the initial model and the user type is less than or equal to a first threshold value, continuously adjusting the operation parameters of the initial model, and continuously executing the training step of the initial model.
Fig. 3 is a schematic flow chart of selecting a partial model from the plurality of classification models as a candidate model according to a set rule according to an embodiment of the present invention, as shown in fig. 3, specifically including:
s131, determining the accuracy and the operation time of the output result of each classification model.
S132, sorting the classification models based on the accuracy and the operation time.
And S133, selecting partial models from the sorted classification models as candidate models.
In the embodiment of the invention, after the training of the classification models is finished, the accuracy of the output result of each classification model and the operation time of the output result of each classification model are counted.
The classification models are sorted according to the accuracy and the operation time, the specific sorting rule can be obtained by performing weighted calculation according to the accuracy and the operation time, for example, the weight of the accuracy is set to be 60%, the weight of the operation time is set to be 40%, the coefficient of each classification model is determined, and the classification models are sorted according to the height of the coefficient.
The coefficients may be calculated in the following manner:
K=R*a+H*b
wherein K is a coefficient, R is a correct rate, a is a weight of the correct rate, H is an operation time, and b is a weight of the operation time.
And selecting the classification model with the coefficient higher than the coefficient threshold value from the sorted results as a candidate model.
In an alternative of the embodiment of the present invention, if there is no subsequent model whose coefficient is higher than the coefficient threshold, a set number of classification models having higher coefficients may be selected as candidate models according to the height of the coefficient; alternatively, the initial model is retrained and the first threshold is increased in size (e.g., the first threshold is increased from 85% to 90%) so that there are classification models with coefficients above the coefficient threshold.
Fig. 4 is a schematic flowchart of a process of updating the weights of the historical operation data, training the candidate models by using the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier according to the set number of target candidate models, according to the updated training samples, which is shown in fig. 4, and specifically includes:
and S141, updating the weight of each historical operation data in the training sample.
In the training process of the classification model, the weight of each historical operation data in the training sample is updated in a random updating mode, or the weight of the historical operation data with high training difficulty in the training sample is increased, and the weight of the historical operation data with low training difficulty in the training sample is reduced.
Wherein the historical operating data includes at least one of:
the audio and video recommendation method comprises the following steps of obtaining the name of the audio and video, the time length data of the audio and video watched by a user, the evaluation data of the audio and video, the collection data of the audio and video or the recommendation data of the audio and video.
The training sample comprises at least two historical operation data, each historical operation data can be used as one dimension of the training sample, each training sample comprises at least two dimensions, the weight of each historical operation data in the training sample is updated for distinguishing the training samples of the initial model and the candidate model, and the dimension proportion in the training sample is adjusted to distinguish the training samples of the initial model on the premise that the basic data of the training sample is the same.
And S142, training the candidate model by adopting the updated training sample based on the Boosting algorithm.
And S143, determining the accuracy and the classification range of the output result of each candidate model.
S144, sorting the candidate models based on the accuracy and the classification range.
S145, selecting partial models from the sorted candidate models as the target candidate models.
And S146, if the number of the target candidate models reaches the set number, generating a decision classifier according to the set number of the target candidate models.
Training the candidate models by using a Boosting algorithm to take the training samples with updated weights as the output of the candidate models, training the candidate models in an iterative mode in the Boosting algorithm (the step of training the candidate models is similar to that of training the initial models), respectively determining the accuracy and the classification range of the output result of each candidate model in each iterative process, and sequencing the candidate models according to the accuracy and the classification range, wherein the classification range refers to the classification range corresponding to the output result of the candidate models and can represent the diversity of the classification of the candidate models.
The sorting form may be determined in a weighted form, a weight of the accuracy and a weight of the classification range are set, and then a coefficient of each candidate model is obtained by weighting, and sorting is performed according to the coefficient, and the correlation step may be described with reference to fig. 3.
Selecting a classification model with a coefficient higher than a coefficient threshold value as a target candidate model, and if the classification model with the coefficient higher than the coefficient threshold value does not exist, selecting a set number of candidate models with higher coefficients as the target candidate models according to the height of the coefficients; alternatively, the candidate models are retrained, and the first threshold is increased (e.g., from 85% to 90%) such that there are candidate models with coefficients above the coefficient threshold.
And integrating the target candidate models with the set number into a decision classifier when the number of the target candidate models reaches the set number through one or more iterations of the Boosting algorithm.
In the embodiment of the invention, the decision classifier comprises a plurality of target candidate models, when the user needs to be classified, historical operation data of the user on the audio and video is obtained from a log file and input into the decision classifier, the plurality of target candidate models in the decision classifier simultaneously take the historical operation data as input to obtain a plurality of output results, and the output result with the highest ratio is determined from the plurality of output results and is taken as the output result of the decision classifier.
In an alternative of the embodiment of the present invention, after the decision classifier is generated, the decision classifier is tested by using test data.
Fig. 5 is a schematic flow chart of another method for training a decision classifier according to an embodiment of the present invention, as shown in fig. 5, the method specifically includes:
and S11, acquiring historical operation data of the user on the audio and video from the log file.
And S12, performing model training on the plurality of initial models simultaneously based on the historical operation data to obtain a plurality of trained classification models.
And S13, selecting partial models from the classification models as candidate models according to set rules.
And S14, updating the weight of the historical operation data, training the candidate models by adopting the updated training samples to obtain a set number of target candidate models, and generating a decision classifier according to the set number of the target candidate models.
And S15, inputting the test sample into the decision classifier so that the decision classifier outputs a prediction result.
Specifically, the remaining data in the plurality of pieces of historical operation data in the set time period is used as the test sample according to the user type, for example, the historical operation data of 100 users a are randomly divided into 5 pieces, 4 pieces of the historical operation data are used as the training samples, 1 piece of the training samples are used as the test sample, and each training sample includes 20 pieces of historical operation data.
It should be noted that: in this embodiment, the training sample and the testing sample are in a plurality of historical operation data within the same set time period, so that the decision classifier conforms to the behavior habit of the user in a specific time period in both the training stage and the testing stage.
Further, inputting the test sample into each of the target candidate models in the decision classifier; the target candidate model determines an output result based on the test sample; and taking the highest one of the output results as a prediction result output by the decision classifier.
For example, the decision classifier includes T target candidate models, a test sample is input to the T target candidate models to obtain T output results, the types of the T output results are counted, and the one with the highest percentage of the types of the output results is used as the output result of the decision classifier.
S16, if the similarity between the prediction result and the user type is larger than a second threshold, the decision classifier is determined to be finished.
S17, if the similarity between the prediction result and the user type is smaller than a second threshold value, continuing to execute the training step of the candidate model.
It should be noted that the second threshold of this embodiment is greater than the first threshold, for example, the first threshold is: 85% and the second threshold is 95%.
According to the training method of the decision classifier, historical operation data of a user on audio and video are obtained from a log file; performing model training on a plurality of initial models simultaneously based on the historical operation data to obtain a plurality of trained classification models; selecting a part of models from a plurality of classification models as candidate models according to a set rule; the method comprises the steps of updating the weight of historical operation data, training candidate models by adopting updated training samples to obtain a set number of target candidate models, generating a decision classifier according to the set number of target candidate models, integrating a plurality of target candidate models by the decision classifier, outputting classification results by adopting the plurality of target candidate models simultaneously when a user is classified, taking the highest one of the plurality of classification results as a prediction result of the decision classifier, predicting the type of the user more accurately compared with a single model, and utilizing historical operation data of the user by the decision classifier to realize accurate classification of the user so as to be convenient for recommending audio and video for the user according to the type subsequently.
Fig. 6 is a schematic flow diagram of an audio and video recommendation method provided by an embodiment of the present invention, and as shown in fig. 6, the method specifically includes:
and S61, acquiring historical operation data of the user on the audio and video from the log file.
And S62, inputting the historical operation data into the decision classifier so that the decision classifier outputs the type of the user.
And S63, recommending the audio and video corresponding to the type to the user.
After the decision classifier outputs the type of the user, the type can represent the type of the audio and video watched by the user, namely the label of the user, and the server matches the audio and video corresponding to the type from the video program library according to the type and recommends the audio and video corresponding to the type to the user.
For example, if the type of the user is comedy type, the decision classifier matches the audios and videos of the comedy type from the movie and television program library from the server, and recommends the audios and videos of the comedy type to the user.
Fig. 7 is a schematic structural diagram of a training device of a decision classifier according to an embodiment of the present invention, and as shown in fig. 7, the training device specifically includes:
the acquisition module 71 is configured to acquire historical operation data of the user on the audio and video from the log file;
a first training module 72, configured to perform model training on multiple initial models simultaneously based on the historical operation data to obtain multiple trained classification models;
a determining module 73, configured to select a partial model from the classification models of different types as a candidate model according to a set rule;
a second training module 74, configured to update the weights of the historical operation data, train the candidate models using the updated training samples, select a set number of target candidate models from the trained candidate models, and generate a decision classifier according to the set number of target candidate models.
The training device of the decision classifier provided in this embodiment may be the training device of the decision classifier shown in fig. 7, and may perform all the steps of the training method of the decision classifier shown in fig. 1 to 5, so as to achieve the technical effect of the training method of the decision classifier shown in fig. 1 to 5, which is described with reference to fig. 1 to 5 for brevity, and is not described herein again.
Fig. 8 is a schematic structural diagram of an audio and video recommendation device provided in an embodiment of the present invention, and as shown in fig. 8, the audio and video recommendation device specifically includes:
the obtaining module 81 is configured to obtain historical operation data of the user on the audio and video from the log file;
a classification module 82, configured to input the historical operation data into the decision classifier, so that the decision classifier outputs the type of the user;
and the recommending module 83 is used for recommending the audio and video corresponding to the type to the user.
The audio/video recommendation device provided in this embodiment may be an audio/video recommendation device as shown in fig. 8, and may perform all the steps of the audio/video recommendation method as shown in fig. 6, so as to achieve the technical effect of the audio/video recommendation method shown in fig. 6.
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 are configured to communicate with each other through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the following steps when executing the program stored in the memory 903:
acquiring historical operation data of a user on the audio and video from a log file; performing model training on a plurality of different types of initial models simultaneously based on the historical operation data to obtain a plurality of trained classification models; selecting a part of models from a plurality of classification models as candidate models according to a set rule; updating the weight of the historical operation data, training the candidate models by adopting the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier according to the set number of target candidate models.
Optionally, determining the accuracy and the operation time of the output result of each classification model; sorting the classification models based on the accuracy and the computation time; and selecting partial models from the sorted classification models as candidate models.
Optionally, according to the type of a user, taking part of the plurality of historical operation data in a set time period as a training sample, wherein the training sample comprises at least two pieces of historical operation data, and each piece of historical operation data is provided with a corresponding weight; inputting the training samples into a plurality of initial models and simultaneously carrying out model training; if the similarity between the output result of the initial model and the user type is greater than a first threshold value, determining that the initial model is trained to be completed to obtain a trained classification model; and if the similarity between the output result of the initial model and the user type is less than or equal to a first threshold value, continuing to execute the training step of the initial model.
Optionally, updating the weight of each of the historical operating data in the training sample; training the candidate model by adopting the updated training sample based on a Boosting algorithm; determining the accuracy and classification range of the output result of each candidate model; ranking the candidate models based on the accuracy and the classification range; selecting a partial model from the sorted candidate models as the target candidate model; and if the number of the target candidate models reaches the set number, generating a decision classifier according to the set number of the target candidate models.
Optionally, the remaining data in the plurality of historical operation data within a set time period is used as a test sample according to the type of the user; inputting the test sample into the decision classifier so that the decision classifier outputs a prediction result; if the similarity between the prediction result and the user type is larger than a second threshold, determining that the training of the decision classifier is finished; and if the similarity between the prediction result and the user type is smaller than a second threshold value, continuing to execute the training step of the candidate model.
Optionally, inputting the test sample into each of the target candidate models in the decision classifier; the target candidate model determines an output result based on the test sample; and taking the highest one of the output results as a prediction result output by the decision classifier.
The communication bus mentioned in the above computer device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, which when run on a computer, cause the computer to perform the training method of the decision classifier described in any of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the training method of the decision classifier as described in any of the above embodiments.
Fig. 10 is a schematic structural diagram of another computer device according to an embodiment of the present invention, as shown in fig. 10, including a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004, where the processor 1001, the communication interface 1002, and the memory 1003 complete communication with each other through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the following steps when executing the program stored in the memory 1003:
acquiring historical operation data of a user on the audio and video from a log file; inputting the historical operation data into the decision classifier to cause the decision classifier to output the type of the user; and recommending the audio and video corresponding to the type to the user.
The communication bus mentioned in the above computer device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the method for recommending audios and videos in any one of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the recommendation method for audio and video as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A method for training a decision classifier, comprising:
acquiring historical operation data of a user on the audio and video from a log file;
performing model training on a plurality of different types of initial models simultaneously based on the historical operation data to obtain a plurality of trained classification models;
selecting a part of models from a plurality of classification models as candidate models according to a set rule;
updating the weight of the historical operation data, training the candidate models by adopting the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier according to the set number of target candidate models.
2. The method according to claim 1, wherein the selecting a partial model from the plurality of classification models as the candidate model according to a set rule comprises:
determining the accuracy and the operation time of the output result of each classification model;
sorting the classification models based on the accuracy and the computation time;
and selecting partial models from the sorted classification models as candidate models.
3. The method of claim 1, further comprising:
according to the user type, taking part of data in a plurality of historical operation data in a set time period as a training sample, wherein the training sample comprises at least two pieces of historical operation data, and each piece of historical operation data is provided with a corresponding weight;
the model training of the plurality of initial models based on the historical operation data to obtain a plurality of trained classification models comprises:
inputting the training samples into a plurality of initial models and simultaneously carrying out model training;
if the similarity between the output result of the initial model and the user type is greater than a first threshold value, determining that the initial model is trained to be completed to obtain a trained classification model;
and if the similarity between the output result of the initial model and the user type is less than or equal to a first threshold value, continuing to execute the training step of the initial model.
4. The method of claim 3, wherein the updating the weights of the historical operating data, training the candidate models using the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier based on the set number of target candidate models comprises:
updating the weight of each historical operating data in the training sample;
training the candidate model by adopting the updated training sample based on a Boosting algorithm;
determining the accuracy and classification range of the output result of each candidate model;
ranking the candidate models based on the accuracy and the classification range;
selecting a partial model from the sorted candidate models as the target candidate model;
and if the number of the target candidate models reaches the set number, generating a decision classifier according to the set number of the target candidate models.
5. The method of claim 4, further comprising:
taking the rest data in the plurality of historical operation data in a set time period as a test sample according to the type of the user;
inputting the test sample into the decision classifier so that the decision classifier outputs a prediction result;
if the similarity between the prediction result and the user type is larger than a second threshold, determining that the training of the decision classifier is finished;
and if the similarity between the prediction result and the user type is smaller than a second threshold value, continuing to execute the training step of the candidate model.
6. The method of claim 5, wherein inputting the test sample into the decision classifier to cause the decision classifier to output a prediction result comprises:
inputting the test sample into each of the target candidate models in the decision classifier;
the target candidate model determines an output result based on the test sample;
and taking the highest one of the output results as a prediction result output by the decision classifier.
7. A method for recommending audio/video, comprising:
acquiring historical operation data of a user on the audio and video from a log file;
inputting the historical operation data into the decision classifier to cause the decision classifier to output the type of the user;
recommending the audio and video corresponding to the type to the user;
wherein the decision classifier is obtained by using the method of any one of claims 1-6.
8. An apparatus for training a decision classifier, comprising:
the acquisition module is used for acquiring historical operation data of the user on the audio and video from the log file;
the first training module is used for carrying out model training on a plurality of initial models of different types simultaneously based on the historical operation data to obtain a plurality of trained classification models;
the determining module is used for selecting partial models from the plurality of classification models as candidate models according to a set rule;
and the second training module is used for updating the weight of the historical operation data, training the candidate models by adopting the updated training samples, selecting a set number of target candidate models from the trained candidate models, and generating a decision classifier according to the set number of the target candidate models.
9. An audio-video recommendation apparatus, comprising:
the acquisition module is used for acquiring historical operation data of the user on the audio and video from the log file;
the classification module is used for inputting the historical operation data into the decision classifier so as to enable the decision classifier to output the type of the user;
and the recommending module is used for recommending the audio and video corresponding to the type to the user.
10. The computer equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the training method of the decision classifier according to any one of claims 1 to 7 or the steps of the recommendation method of audio-video according to claim 8 when executing the program stored in the memory.
11. A storage medium on which a computer program is stored, wherein the program, when executed by a processor, implements a method of training a decision classifier according to any one of claims 1 to 7, or a method of recommending audios and videos according to claim 8.
CN201910998534.0A 2019-10-18 2019-10-18 Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium Pending CN110991476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910998534.0A CN110991476A (en) 2019-10-18 2019-10-18 Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910998534.0A CN110991476A (en) 2019-10-18 2019-10-18 Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium

Publications (1)

Publication Number Publication Date
CN110991476A true CN110991476A (en) 2020-04-10

Family

ID=70082210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910998534.0A Pending CN110991476A (en) 2019-10-18 2019-10-18 Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium

Country Status (1)

Country Link
CN (1) CN110991476A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184304A (en) * 2020-09-25 2021-01-05 中国建设银行股份有限公司 Method, system, server and storage medium for assisting decision
CN112990346A (en) * 2021-04-09 2021-06-18 北京有竹居网络技术有限公司 Writing quality evaluation method and device and electronic equipment
CN113673866A (en) * 2021-08-20 2021-11-19 上海寻梦信息技术有限公司 Crop decision method, model training method and related equipment
CN115359341A (en) * 2022-08-19 2022-11-18 无锡物联网创新中心有限公司 Model updating method, device, equipment and medium
CN116127067A (en) * 2022-12-28 2023-05-16 北京明朝万达科技股份有限公司 Text classification method, apparatus, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317098A1 (en) * 2013-04-23 2014-10-23 Google Inc. Determining media consumption preferences
CN106294783A (en) * 2016-08-12 2017-01-04 乐视控股(北京)有限公司 A kind of video recommendation method and device
CN107766561A (en) * 2017-11-06 2018-03-06 广东欧珀移动通信有限公司 Method, apparatus, storage medium and the terminal device that music is recommended
CN108171280A (en) * 2018-01-31 2018-06-15 国信优易数据有限公司 A kind of grader construction method and the method for prediction classification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317098A1 (en) * 2013-04-23 2014-10-23 Google Inc. Determining media consumption preferences
CN106294783A (en) * 2016-08-12 2017-01-04 乐视控股(北京)有限公司 A kind of video recommendation method and device
CN107766561A (en) * 2017-11-06 2018-03-06 广东欧珀移动通信有限公司 Method, apparatus, storage medium and the terminal device that music is recommended
CN108171280A (en) * 2018-01-31 2018-06-15 国信优易数据有限公司 A kind of grader construction method and the method for prediction classification

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
金亮等: "基于聚类层次模型的视频推荐算法", 《计算机应用》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184304A (en) * 2020-09-25 2021-01-05 中国建设银行股份有限公司 Method, system, server and storage medium for assisting decision
CN112990346A (en) * 2021-04-09 2021-06-18 北京有竹居网络技术有限公司 Writing quality evaluation method and device and electronic equipment
CN113673866A (en) * 2021-08-20 2021-11-19 上海寻梦信息技术有限公司 Crop decision method, model training method and related equipment
CN115359341A (en) * 2022-08-19 2022-11-18 无锡物联网创新中心有限公司 Model updating method, device, equipment and medium
CN115359341B (en) * 2022-08-19 2023-11-17 无锡物联网创新中心有限公司 Model updating method, device, equipment and medium
CN116127067A (en) * 2022-12-28 2023-05-16 北京明朝万达科技股份有限公司 Text classification method, apparatus, electronic device and storage medium
CN116127067B (en) * 2022-12-28 2023-10-20 北京明朝万达科技股份有限公司 Text classification method, apparatus, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN110991476A (en) Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium
CN108073568B (en) Keyword extraction method and device
CN108829808B (en) Page personalized sorting method and device and electronic equipment
JP5440394B2 (en) Evaluation prediction apparatus, evaluation prediction method, and program
CN113222700B (en) Session-based recommendation method and device
CN111242310B (en) Feature validity evaluation method and device, electronic equipment and storage medium
CN110717099B (en) Method and terminal for recommending film
US9864951B1 (en) Randomized latent feature learning
KR101804170B1 (en) Item recommendation method and apparatus thereof utilizing uninteresting item and apparatus
CN108335131B (en) Method and device for estimating age bracket of user and electronic equipment
CN110991187A (en) Entity linking method, device, electronic equipment and medium
CN106599047B (en) Information pushing method and device
CN110933492B (en) Method and device for predicting playing time
CN114780861B (en) Clustering technology-based user multi-interest recommendation method, device, equipment and medium
CN113672793A (en) Information recall method and device, electronic equipment and storage medium
CN108595526B (en) Resource recommendation method and device
CN111062527A (en) Video collection flow prediction method and device
US8688716B1 (en) Recommending pairwise video comparisons to improve ranking
CN115687690A (en) Video recommendation method and device, electronic equipment and storage medium
CN111209469A (en) Personalized recommendation method and device, computer equipment and storage medium
CN115618024A (en) Multimedia recommendation method and device and electronic equipment
CN114490786A (en) Data sorting method and device
JP5013161B2 (en) Information processing apparatus, information processing method, providing apparatus, providing method, and program
CN116611497B (en) Click rate estimation model training method and device
CN115794898B (en) Financial information recommendation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination