Method and device for training author recognition model, equipment and storage medium
By obtaining and processing labeled and unlabeled samples on video websites, using the probability calculation of classification models and author recognition models, the problem of low recognition accuracy of high-quality authors is solved, and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202310495352.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-04
- Publication Date
- 2024-11-05
AI Technical Summary
In the prior art, the recognition results of high-quality authors on video websites are relatively accurate, and it is impossible to effectively distinguish high-quality authors from neutral authors.
By obtaining a training sample set of labeled and unlabeled samples, the classification model is used to calculate the probability of the sample, combining the proportion of labeled samples in specific categories of author samples and the probability of author identification models, and adjusting model parameters to improve recognition accuracy.
It improves the accuracy of the recognition results of high-quality authors, avoids the inability to distinguish high-quality authors from neutral authors, and enhances the recognition ability of the model.
Smart Images

Figure CN118897906A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a training method, device, equipment and storage medium for an author recognition model. Background Art
[0002] Video websites provide videos posted by various video authors, and users can browse their favorite videos according to their personal preferences. However, there are some high-quality video authors whose browsing data is poor, so it is necessary to discover and support high-quality authors.
[0003] In the related art, a logistic regression model is used to identify whether the authors on the video website are high-quality authors. The feature information and label information of each author are input into the logistic regression model, and the probability of each author being a high-quality author is output, thereby obtaining the identification result of the high-quality author.
[0004] However, the accuracy of the recognition results obtained by the above method is low. Summary of the invention
[0005] The embodiment of the present application provides a method, apparatus, device and storage medium for training an author identification model. The technical solution is as follows:
[0006] According to one aspect of an embodiment of the present application, a method for training an author identification model is provided, the method comprising:
[0007] Obtaining a training sample set for the author identification model, the training sample set comprising at least one labeled sample and at least one unlabeled sample, the labeled sample being a sample labeled as an author of a specific category, and the unlabeled sample being a sample not labeled as to whether the author is of a specific category;
[0008] Using a classification model to obtain first probabilities corresponding to each sample in the training sample set, wherein the first probabilities are used to indicate the probability that the sample is an author of a specific category;
[0009] Selecting samples whose first probability satisfies a first condition from the training sample set as samples of authors of a specific category;
[0010] Obtaining a first ratio according to the proportion of the number of labeled samples to the number of author samples of the specific category;
[0011] Using the author identification model to obtain second probabilities corresponding to each of the samples, the second probabilities are used to indicate probabilities that the samples are the labeled samples;
[0012] Obtaining third probabilities corresponding to the samples according to the first ratio and the second probabilities corresponding to the samples, wherein the third probabilities are used to indicate probabilities that the samples are authors of a specific category;
[0013] Calculating an evaluation value of the author identification model according to the third probabilities corresponding to the samples, wherein the evaluation value is used to measure the accuracy of the author identification model;
[0014] The parameters of the author identification model are adjusted according to the evaluation value to obtain a trained author identification model.
[0015] According to one aspect of an embodiment of the present application, a training device for an author identification model is provided, the device comprising:
[0016] An acquisition module, used to acquire a training sample set for the author identification model, wherein the training sample set includes at least one labeled sample and at least one unlabeled sample, wherein the labeled sample refers to a sample labeled as an author of a specific category, and the unlabeled sample refers to a sample not labeled as an author of a specific category;
[0017] A classification module, used for obtaining a first probability corresponding to each sample in the training sample set by using a classification model, wherein the first probability is used to indicate a probability that the sample is an author of a specific category;
[0018] A selection module, configured to select samples whose first probability satisfies a first condition from the training sample set as samples of authors of a specific category;
[0019] A first determination module, configured to obtain a first ratio according to a proportion of the number of labeled samples to the number of author samples of the specific category;
[0020] A second determination module, configured to use the author identification model to obtain second probabilities corresponding to the samples, respectively, where the second probabilities are used to indicate probabilities that the samples are the labeled samples;
[0021] A third determination module, configured to obtain a third probability corresponding to each sample according to the first ratio and the second probability corresponding to each sample, wherein the third probability is used to indicate a probability that the sample is an author of a specific category;
[0022] A calculation module, used for calculating an evaluation value of the author identification model according to the third probabilities respectively corresponding to the samples, wherein the evaluation value is used to measure the accuracy of the author identification model;
[0023] The adjustment module is used to adjust the parameters of the author identification model according to the evaluation value to obtain a trained author identification model.
[0024] In some embodiments, the third determination module is used to divide the second probabilities corresponding to the respective samples by the first ratio to obtain the third probabilities corresponding to the respective samples.
[0025] In some embodiments, the first condition includes that the first probability corresponding to the sample is greater than a first threshold; the selection module is used to select samples whose first probability corresponding to the sample is greater than the first threshold from the training sample set as the specific category author samples.
[0026] In some embodiments, the sample includes characteristic information and an evaluation score of the author, wherein the characteristic information is used to indicate attribute characteristics of the author and attribute characteristics of the content published by the author, and the evaluation score of the author is used to indicate the overall quality of the content published by the author.
[0027] In some embodiments, the device also includes an iteration module, which is used to obtain the evaluation score of the author in the t-th iteration according to the author's initial score, the evaluation score of the viewer in the t-th iteration, and the first transfer matrix, wherein the first transfer matrix is used to characterize the viewer's willingness to browse the content published by the author in the t-th iteration; wherein t is a positive integer with an initial value of 1; the evaluation score of the viewer in the t+1-th iteration is obtained according to the viewer's initial score, the viewer's evaluation score in the t-th iteration, the author's evaluation score in the t-th iteration, the second transfer matrix, and the third transfer matrix; wherein the second transfer matrix is used to characterize the author's willingness to browse the content published by the viewer in the t-th iteration, and the third transfer matrix is used to characterize the viewer's willingness to forward the content published by the author to other viewers in the t-th iteration; when the number of iterations meets the stopping condition, the evaluation score of the author obtained in the last iteration is added to the sample.
[0028] In some embodiments, the device further comprises a filtering module for determining viewers who do not meet iteration requirements based on the browsing data of the viewers, and the viewers who do not meet the iteration requirements do not participate in the iteration process of the author's evaluation score.
[0029] In some embodiments, the device also includes a fourth determination module, which is used to determine the maximum number of edges allowed by the author based on the author's followers and the number of edges of the author; wherein the number of edges of the author is used to indicate the number of viewers associated with the author; based on the maximum number of edges allowed by the author, the browsing time of the viewers on the content published by the author and the browsing time of the author on the content published by the viewers are obtained; the first transfer matrix is generated based on the browsing time of the viewers on the content published by the author, and the second transfer matrix is generated based on the browsing time of the author on the content published by the viewers.
[0030] In some embodiments, the device also includes a cutting module, which is used to cut the first transfer matrix, the second transfer matrix and the third transfer matrix respectively to obtain multiple first transfer sub-matrices, multiple second transfer sub-matrices and multiple third transfer sub-matrices; wherein the sub-evaluation scores of the author in the t-th iteration obtained based on the multiple first transfer sub-matrices are superimposed to obtain the evaluation score of the author in the t-th iteration; the sub-evaluation scores of the viewer in the t+1-th iteration obtained based on the multiple second transfer sub-matrices and the multiple third transfer sub-matrices are superimposed to obtain the evaluation score of the viewer in the t+1-th iteration.
[0031] In some embodiments, the second determination module is used to generate at least one sample subset based on the training sample set, wherein the sample subset includes an equal number of labeled samples and unlabeled samples; use the author identification model to obtain the initial second probability corresponding to each sample included in the sample subset; and obtain the second probability corresponding to each sample based on the mean of the initial second probabilities corresponding to each sample.
[0032] In some embodiments, the calculation module is used to calculate the recall rate of the author identification model according to the third probabilities corresponding to the respective samples, and the recall rate is used to indicate the probability of samples corresponding to a specific category of authors in the at least one labeled sample; obtain the probability of samples of authors of a specific category in the training sample set according to the third probabilities corresponding to the respective samples; and calculate the evaluation value of the author identification model according to the probability of samples of authors of a specific category in the training sample set and the recall rate.
[0033] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned training method of the author identification model.
[0034] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned training method of the author identification model.
[0035] According to one aspect of an embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. The computer program is loaded and executed by a processor to implement the above-mentioned training method of the author identification model.
[0036] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:
[0037] By using the classification model to obtain the first probability corresponding to each sample in the training sample set, the proportion of the number of labeled samples in the number of samples of authors of a specific category is calculated, and then the probability of each sample being a labeled sample is obtained through the author identification model, the probability of each sample being an author of a specific category can be obtained. By converting the probability of determining the sample of a specific category of author in the training sample set into the probability of first determining the labeled sample, it is judged whether the sample in the unlabeled sample is an author of a specific category, avoiding the situation in the related technology where high-quality authors and neutral authors cannot be distinguished, and improving the accuracy of the high-quality author identification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of a logistic regression model provided by the related art;
[0039] Figure 2 It is a schematic diagram of the recognition result of the logistic regression model provided by the related art;
[0040] Figure 3 It is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;
[0041] Figure 4 is a flow chart of a method for training an author identification model provided by an embodiment of the present application;
[0042] Figure 5 is a flow chart of a method for training an author identification model provided by an embodiment of the present application;
[0043] Figure 6 is a flow chart of obtaining an evaluation score of a sample provided by an embodiment of the present application;
[0044] Figure 7 is a block diagram of a training device for an author identification model provided by an embodiment of the present application;
[0045] Figure 8 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0047] Before introducing the embodiments of the present application, in order to facilitate understanding of the present solution, the terms appearing in the present solution are explained as follows:
[0048] 1. Supervised learning: It is a machine learning task to infer a function from labeled training data, by adjusting the parameters of the classifier using a set of samples of known categories to achieve the required performance. The training data includes a set of training examples. In supervised learning, each instance consists of an input object (usually a vector) and a desired output value (also called a supervisory signal). The supervised learning algorithm analyzes the training data and generates an inferred function, which can be used to map new instances. Supervised learning mainly includes classification and regression. Classification algorithms are used when the output is limited to a limited set of values (discrete values), and regression algorithms are used when the output can have any value within a range (continuous values).
[0049] 2. Semi-Supervised Learning (SSL): It is a learning method that combines supervised learning with unsupervised learning. Semi-supervised learning uses a large amount of unlabeled data and labeled data to perform pattern recognition.
[0050] 3. Logistic Regression Model (LR): It is a widely used classification model commonly used for binary classification problems. Its essence is to assume that the data follows a logical distribution, and then use the maximum likelihood method to estimate parameters to predict the probability that the data belongs to a certain category.
[0051] 4. PU Learning (Positive-unlabeled Learning): The goal of PULearning is the same as that of the traditional binary classification problem, which is to train a classifier to distinguish between positive and negative samples. The difference is that PU Learning only has a few labeled positive samples (positive-only data) and some unlabeled samples (unlabeled data). For this part of unlabeled data, it is not clear whether it is a positive sample or a negative sample.
[0052] 5.Bagging algorithm (Bootstrap aggregating): It is a group learning algorithm in the field of machine learning. It can be combined with other classification or regression algorithms to improve its accuracy and stability while reducing the variance of the model results to avoid overfitting. The specific process is: given a training set of size n, the Bagging algorithm selects m subsets from it evenly and with replacement (i.e. using the bootstrap sampling method) as new training sets. Using classification, regression and other algorithms on these m training sets, m models can be obtained, and then the prediction results of the Bagging algorithm can be obtained by taking the average value, mode and other methods of the output results of the m models.
[0053] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0054] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0055] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0056] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0057] The technical solution of this application mainly relates to machine learning technology in artificial intelligence technology, mainly to machine learning technology of author identification model.
[0058] In related technologies, supervised learning is used to input author label information (high-quality authors are positive samples with label information recorded as 1, and low-quality authors are negative samples with label information recorded as 0), and train a classifier model based on the author's attribute characteristics, consumption data characteristics and other feature information to identify the main authors. Figure 1 As shown, by inputting the feature information and label information of the authors of the large market into the logistic regression model, the probability that each author is a high-quality author can be obtained, thereby obtaining the identification result of the high-quality authors.
[0059] The identification result of high-quality authors is a continuous probability distribution, and its distribution function and density function are:
[0060]
[0061]
[0062] Among them, F(x) represents the distribution function of the probability of high-quality authors, f(x) represents the distribution function of the probability density of high-quality authors, μ represents the location parameter, and γ>0 represents the shape parameter.
[0063] According to the above distribution function and density function, the probability that each author is a high-quality author can be expressed as:
[0064]
[0065] Among them, w and b are the fitting parameters of the logistic regression model.
[0066] The schematic diagram of the high-quality author recognition results obtained by the above method can be shown as follows: Figure 2 As shown in the figure, among the authors in the market, the hollow dots in the lower left corner represent some low-quality authors, the gray dots in the upper right corner represent some high-quality authors, and the black dots in the remaining areas represent neutral authors who are neither high-quality nor low-quality authors. After learning positive and negative samples through supervised learning methods, in order to minimize the loss of the model, the hyperplane will be drawn near the diagonal line, as shown in Figure 2The diagonal in the figure is used as a hyperplane to distinguish the positive and negative samples among the authors in the market, and the authors located in the upper right area of the diagonal are identified as high-quality authors, and the authors located in the lower left area of the diagonal are identified as low-quality authors.
[0067] In this way, the recall rate of the logistic regression model (the proportion of samples predicted to be positive among those actually positive) = the probability of the gray dots being predicted to be high-quality samples = the gray dots being located in the upper right area of the diagonal line is 100%, but its precision rate (the proportion of samples predicted to be positive that are actually positive) = the probability of the gray dots being located in the upper right area of the diagonal line is lower, and the logistic regression model cannot distinguish between high-quality authors and neutral authors.
[0068] Please refer to Figure 3 , which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application. The solution implementation environment can be implemented as a training system for an author identification model. The solution implementation environment may include: a server 10 and a terminal device 20.
[0069] The server 10 may be a single server, a server cluster consisting of multiple servers, a cloud computing service center, or a cloud server providing cloud computing services. The server 10 is used to train the author identification model.
[0070] The number of terminal devices 20 can be one or more. The terminal device 20 can be a terminal device such as a mobile phone, a tablet computer, a PC (Personal Computer), a smart TV, a multimedia player, a car terminal, etc. The terminal device 20 can be installed with a client of a target application. In the target application, the user account logged in by the client can publish various contents, so that other users can browse the contents published by each user account on the target application, and can also share the contents with other users. The contents published by the user account mentioned here can be video content, text content, picture content, etc. For example, the target application can be a social application, a video application, a news application, etc.
[0071] The server 10 and the terminal device 20 can communicate with each other through the network. In the embodiment of the present application, the server 10 can obtain the characteristic information of the user account logged in on the target application in the terminal device 20 through the network, including the data information of the user account publishing content, the data information of the user account browsing the content published by other user accounts, the attribute information of the user account, etc. The server 10 trains the author identification model based on the data information of each user account obtained, and the trained author identification model can be deployed in the server 10 for use.
[0072] In the embodiment of the present application, the user account may also be referred to as an author. The server 10 includes a classification model and an author identification model. The classification model is used to output the probability that each author is an author of a specific category based on the label information (positive sample or negative sample) of each author and the characteristic information of each author, so that the authors that meet the probability conditions can be selected as authors of a specific category according to the probability that each author is an author of a specific category, and the proportion of the number of authors marked as authors of a specific category in the number of authors of a specific category can be obtained. The author identification model is used to output the probability that each author is marked as an author of a specific category according to the characteristic information of each author and the evaluation score of each author, so that the probability that each author is an author of a specific category can be obtained according to the probability that each author is marked as an author of a specific category and the proportion of the number of authors marked as authors of a specific category in the number of authors of a specific category. Then, the evaluation value of the author identification model can be calculated according to the probability that each author is an author of a specific category, and the parameters of the author identification model can be adjusted.
[0073] Please refer to Figure 4 , which shows a flow chart of a method for training an author identification model provided by an embodiment of the present application. The execution subject of each step of the method may be a computer device. The method may include at least one of the following steps 410 to 480:
[0074] Step 410, obtaining a training sample set for the author identification model, the training sample set including at least one labeled sample and at least one unlabeled sample, the labeled sample refers to a sample marked as an author of a specific category, and the unlabeled sample refers to a sample that is not marked as an author of a specific category.
[0075] The training sample set refers to a collection of samples used to train the author identification model, and the training sample set includes at least one labeled sample and at least one unlabeled sample. One sample corresponds to one author, and a labeled sample refers to a sample that is marked as an author of a specific category, and an unlabeled sample refers to a sample that is not marked as an author of a specific category. Samples that are not marked as authors of a specific category may refer to samples that are actually authors of a specific category but are not marked as authors of a specific category, or samples that are not actually authors of a specific category and are therefore not marked as authors of a specific category. Therefore, labeled samples are all samples that are actually authors of a specific category, and unlabeled samples may include at least one sample that is actually an author of a specific category, or they may all be samples that are not actually authors of a specific category. This application does not limit this.
[0076] Authors refer to user accounts that publish content on the target application, viewers refer to user accounts that browse content published by other authors on the target application, and specific category authors refer to user accounts whose comprehensive quality of content published on the target application meets the requirements of high-quality content.
[0077] In some embodiments, authors of a specific category may also be referred to as high-quality authors. The evaluation and judgment of high-quality authors is based on the comprehensive quality of all content published by the author, and is not limited to identifying the author as a high-quality author based on the quality of one or two content published by the author meeting the high-quality content requirements.
[0078] The samples that are marked as authors of a specific category are manually marked according to whether the marking requirements are met. The marking requirements may include the number of views of the author's published content, the consumption data of the author's published content, the degree of processing and processing of the author's published content, the clarity of the author's published content, etc. The samples can be manually marked according to whether the samples meet one marking requirement, or they can be marked according to whether the samples meet multiple marking requirements. For example, the marking requirement can be to require that the samples with more than 10,000 views of the author's published content be marked, or it can be to require that the samples with more than 10,000 views of the author's published content, and more than 5,000 people forward, comment, like, and other consumption behaviors on the content be marked. The marking requirement can be to require that the average number of views of the author's published content exceed 10,000 views, or it can be to require that the average number of views of the author's published content exceed 10,000 views. This application does not specifically limit the marking requirements and the conditions for meeting the marking conditions for samples. Author published content refers to the content publicly published by the author on the target application. In the embodiment of the present application, the measurement and judgment of the attribute characteristics of the content published by the author by the human and computer device is based on the content publicly published on the target application. Optionally, when the computer device measures and judges the attribute characteristics of the content published by the author, it can send a request for permission to the author to request the author to grant the computer device access permission to the content published by the author.
[0079] The data collection and processing in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0080] In some embodiments, the sample includes feature information and an evaluation score of the author, the feature information is used to indicate the attribute characteristics of the author and the attribute characteristics of the content published by the author, and the evaluation score of the author is used to indicate the comprehensive quality of the content published by the author.
[0081] Each sample corresponds to an author, and each sample includes the author's feature information and evaluation score. The feature information is used to indicate the attribute characteristics of the author and the attribute characteristics of the author's published content. The attribute characteristics of the author include the author's identity characteristics and the data information of the author browsing the content published by other authors. The attribute characteristics of the author's published content include the feature data of the author's published content, the author's processing data on the published content, and the browsing data of the author's published content.
[0082] The identity characteristics of the author are characteristic information used to characterize the author's identity. The data information of the author browsing the content published by other authors includes the categories of other content browsed by the author, the length of time the author browses other content, the quality of the content browsed by the author, the consumption data of the author after browsing other content, and other data information related to the content browsed by the author. Among them, the consumption data after the author browses other content can be data other than browsing behavior such as the author's likes, forwarding, collections, and comments on the content after browsing other content. This application does not limit the classification of content categories, which can be divided into video categories, audio categories, picture categories, text categories, etc., and each of the above categories can be further divided, for example, it can be further divided into popular science categories, funny categories, emotional categories, etc.
[0083] The characteristic data of the content published by the author may include the category of the content published by the author, the size of the data volume of the content published by the author, the clarity of the content published by the author, and other data information related to the content published by the author. For example, if the author publishes video content, the characteristic data of the content published by the author may include the length of the video content, the text attached to the video content, the clarity of the video content, etc.
[0084] The author's processing data on the published content refers to the data of the processing operations performed by the author on the published content itself to enhance the content richness. For example, if the author publishes video content, the author's processing data on the published content includes data of the author's processing operations on the video content such as splicing, editing, special effects, sound, and stickers. If the author publishes text content, the author's processing data on the published content includes data of the author's processing operations on the text content such as typesetting, stickers, and text design.
[0085] The browsing data of the author's published content may include the browsing time of the author's published content, the consumption data of the profile of the content browsed by the author, and other data information related to the browsing of the author's published content. The consumption data of the profile refers to the data information of the viewer who browses the author's published content, which may include the attribute characteristics of the viewer, the consumption data of the viewer after browsing the content, and other information.
[0086] The author's evaluation score is used to indicate the comprehensive quality of the author's published content. The evaluation score of each author can be obtained based on the evaluation mechanism, the browsing data of the author's published content and the initial evaluation score of the author's published content. The higher the comprehensive quality of all the content published by the author, the higher the author's evaluation score, and the lower the comprehensive quality of all the content published by the author, the lower the author's evaluation score.
[0087] By adding the author's evaluation score to the sample, we can increase the consideration of the comprehensive quality of the content published by the author, and avoid the browsing data of the author's published content playing an excessive role in judging whether the author belongs to a specific category of author, thereby affecting the recognition results of the author identification model.
[0088] Step 420: Use the classification model to obtain first probabilities corresponding to each sample in the training sample set. The first probabilities are used to indicate the probability that the sample is an author of a specific category.
[0089] The classification model refers to a model that uses the idea of supervised learning to output the probability that each sample is a positive sample. For example, the classification model may be a logistic regression model.
[0090] It should be noted that the input of the classification model includes the label information of each sample. Therefore, the labeled samples mentioned above, that is, the samples determined to be authors of a specific category, are taken as positive samples, and the samples determined not to be authors of a specific category among the unlabeled samples are taken as negative samples. Then, the samples in the training sample set are input into the classification model to obtain the probability that each sample in the training sample set is an author of a specific category, that is, the first probability.
[0091] Optionally, the input of the classification model may include only the author's feature information, but not the author's evaluation score.
[0092] Step 430 : Select samples with a first probability that meet a first condition from the training sample set as samples of authors of a specific category.
[0093] According to the first probabilities corresponding to the samples in the training sample set, samples that meet the first condition are selected as samples of specific author categories. In some embodiments, samples of specific author categories refer to samples whose corresponding authors are high-quality authors.
[0094] Optionally, the first condition may mean that the first probability corresponding to the sample is greater than a first threshold, and then samples whose first probability corresponding to the sample is greater than the first threshold are selected from the training sample set as samples of authors of a specific category.
[0095] The first threshold can be set according to the need for judging high-quality authors in actual applications, and this application does not limit this. For example, the first threshold can be set to 50%, and when each sample has a probability of being a high-quality author of more than 50%, the sample is a sample of a specific category of author.
[0096] Optionally, the first condition may also mean that the proportion of the first probability corresponding to the sample in the first probabilities corresponding to all samples is greater than a second threshold, and samples that meet the second threshold number are selected from the training sample set as samples of authors of a specific category.
[0097] The second threshold can be set according to the need for judging high-quality authors in actual applications, and this application does not limit this. For example, the second threshold can be set to 50%, and samples with a first probability in the top 50% of all first probabilities are selected from the training sample set as samples of authors of a specific category.
[0098] If the first condition means that the proportion of the first probability corresponding to the sample in the first probabilities corresponding to all samples is greater than the second threshold, step 440 may not be performed, and the second threshold may be determined as the first ratio.
[0099] Step 440, obtaining a first ratio according to the proportion of the number of labeled samples in the number of samples of authors of a specific category.
[0100] When the first condition refers to that the first probability corresponding to the sample is greater than the first threshold, the number of samples of authors of a specific category in the training sample set can be obtained, and thus according to the known number of labeled samples, the proportion of the number of labeled samples in the number of samples of authors of a specific category, that is, the first ratio, can be determined.
[0101] Step 450: Use the author identification model to obtain the second probability corresponding to each sample, where the second probability is used to indicate the probability that the sample is a labeled sample.
[0102] The input of the author identification model is each sample in the training sample set, and the sample includes the author's feature information and evaluation score. The output of the author identification model is the probability that each sample in the training sample set is a labeled sample, that is, the second probability.
[0103] In some embodiments, at least one sample subset is generated based on the training sample set, and the sample subset includes an equal number of labeled samples and unlabeled samples; an author identification model is used to obtain initial second probabilities corresponding to each sample included in the sample subset; and the second probabilities corresponding to each sample are obtained based on the mean of the initial second probabilities corresponding to each sample.
[0104] Since the number of labeled samples in the training sample set is much larger than the number of unlabeled samples, and the ratio of the number of labeled samples to the number of unlabeled samples is seriously unbalanced, the Bagging algorithm is used to determine the probability that each sample in the training sample set is a labeled sample, so as to improve the accuracy and stability of the recognition results of the author's recognition model, reduce the variance of the model results, and avoid overfitting.
[0105] According to at least one labeled sample and at least one unlabeled sample included in the training sample set, an equal number of labeled samples and unlabeled samples are selected from the training sample set as a sample subset of the training sample set, and the sample subset is used as the input of the author identification model to obtain the probability that each sample in the sample subset is a labeled sample, that is, the initial second probability corresponding to each sample.
[0106] For example, each sample in at least one labeled sample and at least one unlabeled sample included in the training sample set is taken X times to generate X sample subsets corresponding to each sample, and then X initial second probabilities corresponding to each sample can be obtained, where X is an integer greater than or equal to 1. The second probability corresponding to each sample can be obtained by taking the average value of the X initial second probabilities, and the second probability corresponding to the average value is used as the output of the sample after the author identification model is passed.
[0107] Step 460: Obtain a third probability corresponding to each sample based on the first ratio and the second probability corresponding to each sample, where the third probability is used to indicate the probability that the sample is an author of a specific category.
[0108] According to the first ratio (the proportion of the number of labeled samples in the number of samples of authors of a specific category) and the second probability corresponding to each sample (the probability that the sample is a labeled sample), the third probability corresponding to each sample (the probability that the sample is an author of a specific category) is obtained.
[0109] In some embodiments, the second probabilities corresponding to the samples are divided by the first ratio to obtain the third probabilities corresponding to the samples.
[0110] The relationship between the first ratio, the second probability and the third probability can be expressed as:
[0111] Pr(s=1|x)=cPr(y=1|x)
[0112] Among them, Pr(s=1|x) is the probability that the sample is a labeled sample (i.e., the second probability), c is the proportion of the number of labeled samples in the number of samples of authors of a specific category (i.e., the first ratio), and Pr(y=1|x) is the probability that the sample is an author of a specific category (i.e., the third probability). Among them, s represents a labeled sample, x represents all samples, y represents a sample of an author of a specific category, and the value range of c is [0,1].
[0113] Then, by dividing the second probability corresponding to each sample by the first ratio, the third probability corresponding to each sample can be obtained.
[0114] In order to determine the probability of samples of authors of a specific category in the sample, based on the distribution probability of authors of a specific category and the distribution probability of labeled samples, by converting the probability of samples of authors of a specific category into the probability of labeled samples determined according to the author identification model, it is judged whether the samples in the unlabeled samples are authors of a specific category, thereby improving the accuracy of high-quality author identification results.
[0115] It should be noted that all probabilities involved in the embodiments of the present application, including the second probability, the third probability, etc., have a value range of [0, 1].
[0116] Step 470: Calculate the evaluation value of the author identification model according to the third probability corresponding to each sample. The evaluation value is used to measure the accuracy of the author identification model.
[0117] The evaluation value of the author identification model can be determined by the precision and recall of the author identification model. The evaluation value of the author identification model can be expressed as:
[0118]
[0119] in, represents the specific category of author samples identified by the author identification model (i.e., predicted to be samples of specific category of authors), y represents the specific category of author samples in the training sample set (i.e., actually the specific category of author samples), s represents the labeled samples, and p represents the precision of the author identification model. r represents the recall rate of the author identification model. Pr(y=1) represents the probability that the sample in the training sample set is actually a sample of a specific category of author. Indicates that the sample is predicted to be a sample of a specific category of author, and is also a sample that is actually a sample of a specific category of author. Represents the probability of predicting a sample of a specific category of author in the training sample set.
[0120] Therefore, referring to the expression of the evaluation value of the above author identification model, the evaluation value of the author identification model can be obtained based on the recall rate of the author identification model and the probability of predicting a sample of a specific category of author in the training sample set (ie, the third probability).
[0121] In some embodiments, the recall rate of the author identification model is calculated based on the third probabilities corresponding to each sample, and the recall rate is used to indicate the probability of samples corresponding to a specific category of authors in at least one labeled sample; the probability of samples of authors of a specific category in the training sample set is obtained based on the third probabilities corresponding to each sample; the evaluation value of the author identification model is calculated based on the probability and recall rate of samples of authors of a specific category in the training sample set.
[0122] According to the probability that at least one labeled sample in the training sample set and each sample is an author of a specific category, the recall rate of the author identification model can be calculated, and according to the probability that each sample is an author of a specific category, the probability of the author sample of the specific category in the training sample set can be obtained. Therefore, based on the expression of the evaluation value of the author identification model, the evaluation value of the author identification model can be calculated.
[0123] By calculating the evaluation value of the author identification model, the accuracy of the author identification model can be obtained, so that the parameters of the author identification model can be adjusted based on the evaluation value to improve the accuracy of the author identification model.
[0124] Step 480, adjusting the parameters of the author identification model according to the evaluation value to obtain a trained author identification model.
[0125] According to the evaluation value of the author identification model obtained above, the parameters of the author identification model are adjusted to obtain the adjusted author identification model. The third probability corresponding to each sample is obtained again using the adjusted author identification model, and the evaluation value of the adjusted author identification model is calculated. The difference between the two evaluation values is obtained. And according to The parameters of the author identification model are adjusted until By meeting the adjustment requirements of the author identification model, a trained author identification model can be obtained.
[0126] For example, the difference in the evaluation value of the trained author identification model is It can be any value close to 0, and can be set according to the recognition effect requirements of the author recognition model in actual applications. This application does not limit this.
[0127] The technical solution provided by the embodiment of the present application uses a classification model to obtain the first probability corresponding to each sample in the training sample set, so as to calculate the proportion of the number of labeled samples in the number of samples of authors of a specific category, and then obtains the probability of each sample being a labeled sample through an author identification model, so as to obtain the probability of each sample being an author of a specific category. By converting the probability of determining the sample of an author of a specific category in the training sample set into the probability of determining the labeled sample in advance, it is judged whether the sample in the unlabeled sample is an author of a specific category, avoiding the situation in the related technology where it is impossible to distinguish between high-quality authors and neutral authors, and improving the accuracy of the high-quality author identification results.
[0128] Figure 5 A flow chart of a method for training an author identification model is shown. In some embodiments, the author identification model training requires obtaining a first ratio (the number of labeled samples to the number of high-quality author samples) through a classification model in advance, and then obtaining the probability (third probability) of each sample being a high-quality author based on the probability (second probability) that each sample is a labeled sample. In the process of obtaining the first ratio through a classification model, the training sample set is first input into the classification model to obtain the probability (first probability) that each sample is a positive sample, and then the samples in the training sample set are screened based on the first probabilities corresponding to each sample, and the samples that meet the first condition with the first probability are taken as high-quality author samples, so that the first ratio can be obtained based on the proportion of the number of labeled samples in the number of high-quality author samples.
[0129] Input the training sample set into the author identification model to obtain the probability that each sample is a labeled sample (second probability). Divide the second probability by the first ratio obtained based on the classification model to obtain the third probability (the probability that each sample is a high-quality author). According to the third probability, calculate the evaluation value of the author identification model to measure the accuracy of the current author identification model, so as to adjust the parameters of the author identification model and calculate the evaluation value again. According to the difference between the two evaluation values, continue to adjust the parameters of the author identification model. After multiple iterations, obtain the trained author identification model.
[0130] The trained author identification model can identify high-quality authors of various categories among the authors in the market, so as to analyze the reasons for the low page views of high-quality authors and provide corresponding support measures. For example, the content published by the high-quality author can be placed at the forefront of the content recommendation pool, or the content published by the high-quality author can be placed at the forefront of the content recommendation pool for the target group, or the content published by the high-quality author can be placed at the forefront of the content recommendation pool of the homepage activity of the target application, etc.
[0131] Please refer to Figure 6, which shows a flow chart of obtaining the evaluation score of a sample provided by an embodiment of the present application. The sample includes the author's feature information and the evaluation score, and step 410 may include at least one of steps 411 to 413.
[0132] Step 411, obtain the author's evaluation score in the t-th iteration based on the author's initial score, the viewer's evaluation score in the t-th iteration, and the first transfer matrix, the first transfer matrix is used to characterize the viewer's willingness to browse the author's published content in the t-th iteration; wherein t is a positive integer with an initial value of 1.
[0133] The author's initial score is manually determined based on the comprehensive quality of the author's published content. The author's initial score can be obtained by scoring each dimension of the author's published content based on the scoring items of each dimension, wherein the dimensions of the author's published content may include the size of the data volume of the author's published content, the clarity of the author's published content, the author's processing operations on the published content, and other dimensions. Optionally, the scoring of each dimension of the author's published content can be based on the category of the author's published content.
[0134] The first transfer matrix represents the browsing intention of the browsers to the content published by the author in the tth iteration, wherein the elements in the first transfer matrix can represent the browsing probability of each browser to the content published by the author in the tth iteration. Exemplarily, the browsing probability of each browser to the content published by the author can be determined according to the proportion of the browsing time of each browser to the content published by the author in the total browsing time of the content published by the author.
[0135] According to the author's initial score, the browser's evaluation score in the t-th iteration, and the first transfer matrix, the author's evaluation score in the t-th iteration can be obtained. The author's evaluation score in the t-th iteration can be expressed as:
[0136] d t =βT pd p t +(1-β)d init
[0137] Among them, d t is the author's evaluation score in the tth iteration, β is the damping coefficient for calculating the author's evaluation score, and the value range of β is [0,1]. pd is the first transfer matrix, p t is the evaluation score of the viewer in the tth iteration, d init is the author's initial score.
[0138] By adjusting β, we can control the impact of the author's initial score on the author's evaluation score in the tth iteration, thereby avoiding ignoring authors whose published content meets the quality requirements due to their low page views, and making it possible to identify truly high-quality authors in the author identification model as much as possible, thereby improving the accuracy of the author identification model.
[0139] Step 412, obtain the evaluation score of the viewer in the t+1th iteration according to the initial score of the viewer, the evaluation score of the viewer in the tth iteration, the evaluation score of the author in the tth iteration, the second transfer matrix and the third transfer matrix; wherein the second transfer matrix is used to represent the author's willingness to browse the content published by the viewer in the tth iteration, and the third transfer matrix is used to represent the viewer's willingness to forward the author's content to other viewers in the tth iteration.
[0140] The initial score of the viewer is the initial score of the viewer manually determined based on the comprehensive quality of the content published by the viewer and the comprehensive quality of the content browsed by the viewer. The various dimensions of the content published by the viewer and the various dimensions of the content browsed by the viewer can be scored based on the scoring items of each dimension, so as to obtain the initial score of the viewer, wherein the various dimensions of the content published by the viewer can refer to the various dimensions of the content published by the author introduced above. In addition, the various dimensions of the content browsed by the viewer can include the size of the data volume of the content browsed by the viewer, the clarity of the content browsed by the viewer, the processing operation of the content browsed by the viewer, the consumption data after the viewer browsed the content, etc. Optionally, the scoring of the various dimensions of the content browsed by the viewer can be based on the category of the content browsed by the viewer, and the scoring of each dimension.
[0141] The second transfer matrix represents the author's willingness to browse the content published by the viewer in the tth iteration, wherein the elements in the second transfer matrix can represent the browsing probability of each author to the content published by the viewer in the tth iteration. Exemplarily, the browsing probability of each author to the content published by the viewer can be determined according to the proportion of the browsing time of the author to the content published by each viewer in the total browsing time of the author browsing the content.
[0142] The third transfer matrix represents the forwarding intention of the viewer to forward the author's published content to other viewers in the t-th iteration, wherein the elements in the third transfer matrix can represent the forwarding probability of each viewer forwarding the author's published content to other viewers in the t-th iteration. Exemplarily, the forwarding probability of each viewer forwarding the author's published content to other viewers can be determined based on the proportion of the number of times each viewer forwards the author's published content to other viewers in the total number of times the author's published content is forwarded.
[0143] According to the initial score of the viewer, the evaluation score of the viewer in the tth iteration, the evaluation score of the author in the tth iteration, the second transfer matrix and the third transfer matrix, the evaluation score of the viewer in the t+1th iteration can be obtained. The evaluation score of the viewer in the t+1th iteration can be expressed as:
[0144] p t+1 =αT pp p t +(1-α)(γT dp d t +(1-γ)p init )
[0145] Among them, p t+1 is the evaluation score of the viewer in the t+1th iteration, α is the damping coefficient for calculating the viewer's evaluation score, T pp is the third transfer matrix, p t is the evaluation score of the viewer in the tth iteration, γ is the weight of the author's evaluation score in calculating the viewer's evaluation score, T dp is the second transfer matrix, d t is the author’s evaluation score in the tth iteration, p init is the initial score of the viewer, and the value range of α and γ is [0,1].
[0146] By adjusting α, we can control the impact of the viewer's initial score on the viewer's evaluation score in the t+1th iteration, and by adjusting γ, we can control the impact of the author's evaluation score on the author's evaluation score in the tth iteration, thereby further avoiding ignoring authors whose published content meets the quality requirements due to their low page views, and making it possible to identify truly high-quality authors in the author identification model as much as possible, further improving the accuracy of the author identification model.
[0147] Step 413, when the number of iterations meets the stopping condition, the author's evaluation score obtained in the last iteration is added to the sample.
[0148] The stop condition mentioned here may refer to that the evaluation score of the author after iteration no longer changes. Specifically, when the difference between the evaluation score of the author in the t-1th iteration and the evaluation score of the author in the tth iteration is less than a set threshold, it can be determined that the evaluation score of the author after iteration no longer changes. The specific value of the set threshold can be set according to the specific iteration requirements in actual applications, and this application does not limit it.
[0149] When the number of iterations meets the stopping condition, the author's evaluation score obtained in the last iteration is added to the sample. That is, if the author's evaluation score after the tth iteration meets the stopping condition of the iteration, the author's evaluation score obtained in the tth iteration is added to the sample.
[0150] The following is a supplementary explanation of the above process of obtaining the evaluation score of the sample.
[0151] In some embodiments, viewers who do not meet the iteration requirements can be determined based on the viewers' browsing data, and viewers who do not meet the iteration requirements do not participate in the iteration process of the author's evaluation score.
[0152] Browsers who do not meet the iteration requirements may include browsers who have violated the rules, browsers whose browsing content does not meet the browsing requirements, browsers whose initial scores are less than a set threshold, etc. Among them, browsers who have violated the rules may include browsers who post malicious comments, browsers who maliciously report other authors or browsers, browsers who post content that does not meet the publishing requirements, etc. Browsers whose browsing content does not meet the browsing requirements may include browsers whose browsing content categories do not meet the browsing requirements, browsers whose browsing content comprehensive quality does not meet the browsing requirements, etc. For browsers whose initial scores are less than the set threshold, the set threshold can be set according to the specific iteration requirements in the actual application, and this application does not limit it.
[0153] By filtering out viewers who do not meet the iteration requirements during the iterative calculation of the author's evaluation score, the overall quality of viewers in the iterative process can be improved, and viewers with too low quality can be prevented from participating in the iterative process and affecting the accuracy and fairness of the author's evaluation score, thereby improving the accuracy of the author identification model.
[0154] In some embodiments, the maximum number of edges allowed by the author is determined based on the author's followers and the number of edges of the author; wherein the number of edges of the author is used to indicate the number of viewers associated with the author; based on the maximum number of edges allowed by the author, the length of time the viewers browse the content posted by the author and the length of time the author browses the content posted by the viewers are obtained; a first transfer matrix is generated based on the length of time the viewers browse the content posted by the author, and a second transfer matrix is generated based on the length of time the author browses the content posted by the viewers.
[0155] The number of followers of an author refers to the number of viewers who follow the author, and the number of edges of an author refers to the number of viewers who are associated with the author, which can include the number of viewers who have browsed, liked, forwarded, collected, and commented on the author's content. Therefore, the number of edges of an author is much larger than the number of followers of the author, and viewers who are associated with the author can include viewers who follow the author.
[0156] The maximum number of edges allowed by the author can be expressed as:
[0157] E′ i =min(fan i θ,E i )
[0158] Among them, E′ i Indicates the maximum number of edges allowed by the author, fan i represents the amount of attention paid to the author, θ represents the proportionality coefficient, θ is any value greater than 1, E i The number of edges representing the author.
[0159] The smaller value of the author's followers multiplied by the proportional coefficient and the number of edges of the author is used as the maximum number of edges allowed by the author, and based on the maximum number of edges allowed by the author, some viewers who are associated with the author in the number of edges of the author are filtered out, for example, some viewers with low initial scores can be filtered out. Thus, based on the browsing data of viewers associated with the author after filtering, the browsing time of the viewers on the content published by the author and the browsing time of the author on the content published by the viewers can be obtained.
[0160] According to the proportion of browsing time of each viewer on the content published by the author in the total browsing time of the content published by the author, a first transfer matrix can be generated, and according to the proportion of browsing time of the author on the content published by each viewer in the total browsing time of the author browsing the content, a second transfer matrix can be generated. Thus, the generated first transfer matrix and second transfer matrix can be used in the process of calculating the evaluation score of the sample in the above embodiment.
[0161] By setting an upper limit on the number of edges allowed by the author, we can avoid the situation where the number of views of a piece of content published by the author far exceeds the average number of views of the author's content, which will have a significant impact on the accuracy and fairness of the author's evaluation score. We can also avoid the situation where the recognition results output by the author recognition model are inaccurate due to a piece of content with a high number of views.
[0162] In some embodiments, the first transfer matrix, the second transfer matrix and the third transfer matrix are cut respectively to obtain multiple first transfer sub-matrices, multiple second transfer sub-matrices and multiple third transfer sub-matrices; wherein, the sub-evaluation scores of the author in the t-th iteration obtained based on the multiple first transfer sub-matrices are superimposed to obtain the author's evaluation score in the t-th iteration; the sub-evaluation scores of the viewer in the t+1-th iteration obtained based on the multiple second transfer sub-matrices and the multiple third transfer sub-matrices are superimposed to obtain the viewer's evaluation score in the t+1-th iteration.
[0163] The first transfer matrix, the second transfer matrix, and the third transfer matrix are cut respectively, and the transfer matrices can be cut equally or randomly. Therefore, the number of elements in the obtained multiple first transfer sub-matrices, multiple second transfer sub-matrices, and multiple third transfer sub-matrices can be the same or different.
[0164] The sub-evaluation scores of the author in the t-th iteration obtained based on multiple first transfer sub-matrices are superimposed to obtain the evaluation score of the author in the t-th iteration, which can be expressed as:
[0165] d t =∑(βT pd,i p t +(1-β)d init )
[0166] The sub-evaluation scores of the viewers in the t+1th iteration obtained based on the multiple second transfer sub-matrices and the multiple third transfer sub-matrices are superimposed to obtain the evaluation score of the viewers in the t+1th iteration, which can be expressed as:
[0167] p t+1 =αT pp P t +(1-α)Σ(βT pd,i T dp,i d t +(1-β)T dp,i d init,i +p init )
[0168] By cutting the transfer matrix, a transfer matrix with a large amount of data can be cut into multiple sub-transfer matrices with moderate data amounts, thereby avoiding the problem of low computational efficiency caused by the iterative process involving the calculation of transfer matrices with large amounts of data, and improving the computational efficiency of the iterative process.
[0169] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0170] Please refer to Figure 7 , which shows a block diagram of a training device for an author identification model provided by an embodiment of the present application. The device has the function of implementing the training method for the author identification model described above, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the computer device described above, or it can be set in a computer device. Figure 7As shown, the apparatus 700 may include: an acquisition module 710 , a classification module 720 , a selection module 730 , a first determination module 740 , a second determination module 750 , a third determination module 760 , a calculation module 770 and an adjustment module 780 .
[0171] The acquisition module 710 is used to obtain a training sample set for the author identification model, wherein the training sample set includes at least one labeled sample and at least one unlabeled sample, wherein the labeled sample refers to a sample marked as an author of a specific category, and the unlabeled sample refers to a sample that is not marked as an author of a specific category.
[0172] The classification module 720 is used to obtain a first probability corresponding to each sample in the training sample set by using a classification model, where the first probability is used to indicate the probability that the sample is an author of a specific category.
[0173] The selection module 730 is used to select samples whose first probability meets the first condition from the training sample set as samples of authors of a specific category.
[0174] The first determination module 740 is used to obtain a first ratio according to the proportion of the number of labeled samples in the number of author samples of the specific category.
[0175] The second determination module 750 is used to obtain the second probability corresponding to each of the samples by using the author identification model, where the second probability is used to indicate the probability that the sample is the labeled sample.
[0176] The third determination module 760 is used to obtain the third probability corresponding to each sample according to the first ratio and the second probability corresponding to each sample, wherein the third probability is used to indicate the probability that the sample is an author of a specific category.
[0177] The calculation module 770 is used to calculate the evaluation value of the author identification model according to the third probabilities corresponding to the samples, wherein the evaluation value is used to measure the accuracy of the author identification model.
[0178] The adjustment module 780 is used to adjust the parameters of the author identification model according to the evaluation value to obtain a trained author identification model.
[0179] In some embodiments, the third determination module 760 is used to:
[0180] The second probabilities corresponding to the samples are divided by the first ratio to obtain third probabilities corresponding to the samples.
[0181] In some embodiments, the first condition includes that the first probability corresponding to the sample is greater than a first threshold; the selection module 730 is used to:
[0182] Selecting samples whose first probabilities corresponding to the samples are greater than a first threshold from the training sample set as samples of authors of the specific category.
[0183] In some embodiments, the sample includes characteristic information and an evaluation score of the author, wherein the characteristic information is used to indicate attribute characteristics of the author and attribute characteristics of the content published by the author, and the evaluation score of the author is used to indicate the overall quality of the content published by the author.
[0184] In some embodiments, the apparatus 700 further includes an iteration module, configured to:
[0185] According to the initial score of the author, the evaluation score of the viewer in the t-th iteration and the first transfer matrix, the evaluation score of the author in the t-th iteration is obtained, and the first transfer matrix is used to represent the browsing intention of the viewer to the content published by the author in the t-th iteration; wherein t is a positive integer with an initial value of 1;
[0186] The evaluation score of the viewer in the t+1th iteration is obtained according to the initial score of the viewer, the evaluation score of the viewer in the tth iteration, the evaluation score of the author in the tth iteration, the second transfer matrix and the third transfer matrix; wherein the second transfer matrix is used to represent the author's willingness to browse the content published by the viewer in the tth iteration, and the third transfer matrix is used to represent the viewer's willingness to forward the content published by the author to other viewers in the tth iteration;
[0187] When the number of iteration rounds meets the stopping condition, the evaluation score of the author obtained in the last iteration round is added to the sample.
[0188] In some embodiments, the device 700 further includes a filtering module for:
[0189] According to the browsing data of the browsers, browsers that do not meet the iteration requirements are determined, and the browsers that do not meet the iteration requirements do not participate in the iteration process of the author's evaluation score.
[0190] In some embodiments, the apparatus 700 further includes a fourth determining module, configured to:
[0191] Determine the maximum number of edges allowed for the author according to the number of followers of the author and the number of edges of the author; wherein the number of edges of the author is used to indicate the number of viewers associated with the author;
[0192] According to the maximum number of edges allowed by the author, obtaining the browsing time of the content published by the author by the viewer and the browsing time of the content published by the viewer by the author;
[0193] The first transfer matrix is generated according to the browsing time of the content published by the author by the viewer, and the second transfer matrix is generated according to the browsing time of the content published by the viewer by the author.
[0194] In some embodiments, the device 700 further comprises a cutting module for:
[0195] The first transfer matrix, the second transfer matrix and the third transfer matrix are respectively cut to obtain a plurality of first transfer sub-matrices, a plurality of second transfer sub-matrices and a plurality of third transfer sub-matrices;
[0196] The sub-evaluation scores of the author in the t-th iteration respectively obtained based on the multiple first transfer sub-matrices are superimposed to obtain the evaluation score of the author in the t-th iteration;
[0197] The sub-evaluation scores of the viewer in the t+1th iteration round obtained based on the multiple second transfer sub-matrices and the multiple third transfer sub-matrices are superimposed to obtain the evaluation score of the viewer in the t+1th iteration round.
[0198] In some embodiments, the second determining module 750 is configured to:
[0199] Generate at least one sample subset according to the training sample set, wherein the sample subset includes an equal number of labeled samples and unlabeled samples;
[0200] Using the author identification model to obtain initial second probabilities corresponding to each sample included in the sample subset;
[0201] The second probabilities corresponding to the samples are obtained according to the averages of the initial second probabilities corresponding to the samples.
[0202] In some embodiments, the calculation module 770 is used to:
[0203] Calculating a recall rate of the author identification model according to the third probabilities corresponding to the samples, wherein the recall rate is used to indicate the probability of a sample corresponding to an author of a specific category in the at least one labeled sample;
[0204] Obtaining the probability of author samples of a specific category in the training sample set according to the third probabilities corresponding to the samples;
[0205] The evaluation value of the author identification model is calculated according to the probability of author samples of a specific category in the training sample set and the recall rate.
[0206] The technical solution provided by the embodiment of the present application uses a classification model to obtain the first probability corresponding to each sample in the training sample set, so as to calculate the proportion of the number of labeled samples in the number of samples of authors of a specific category, and then obtains the probability of each sample being a labeled sample through an author identification model, so as to obtain the probability of each sample being an author of a specific category. By converting the probability of determining the sample of an author of a specific category in the training sample set into the probability of determining the labeled sample in advance, it is judged whether the sample in the unlabeled sample is an author of a specific category, avoiding the situation in the related technology where it is impossible to distinguish between high-quality authors and neutral authors, and improving the accuracy of the high-quality author identification results.
[0207] It should be noted that the device provided in the above embodiment, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0208] Please refer to Figure 8 , which shows a block diagram of a computer device 800 provided in one embodiment of the present application. The computer device 800 may be any electronic device with data calculation, processing and storage functions. The computer device 800 may be used to implement the training method of the author identification model provided in the above embodiment.
[0209] Typically, the computer device 800 includes a processor 801 and a memory 802 .
[0210] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI processor for processing computing operations related to machine learning.
[0211] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store a computer program, which is configured to be executed by one or more processors to implement the above-mentioned author recognition model training method.
[0212] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the computer device 800, and the computer device 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.
[0213] In an exemplary embodiment, a computer-readable storage medium is also provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor of a computer device, the training method of the author identification model is implemented. Optionally, the computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0214] In an exemplary embodiment, a computer program product is also provided, the computer program product includes a computer program, the computer program is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned method for training the author identification model.
[0215] It should be noted that before collecting the user's relevant data and during the process of collecting the user's relevant data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application (including the characteristic information of the user account and the characteristic information of the content published by the user account) are processed strictly in accordance with the requirements of relevant national laws and regulations. The informed consent or separate consent of the subject of personal information is obtained only with the consent and authorization of the user. The subsequent data use and processing behavior is carried out within the scope of authorization of laws and regulations and the subject of personal information, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of relevant countries and regions.
[0216] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.
[0217] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for training an author identification model, characterized in that: The method comprises: Obtaining a training sample set for the author identification model, the training sample set comprising at least one labeled sample and at least one unlabeled sample, the labeled sample being a sample labeled as an author of a specific category, and the unlabeled sample being a sample not labeled as to whether the author is of a specific category; Using a classification model to obtain first probabilities corresponding to each sample in the training sample set, wherein the first probabilities are used to indicate the probability that the sample is an author of a specific category; Selecting samples whose first probability satisfies a first condition from the training sample set as samples of authors of a specific category; Obtaining a first ratio according to the proportion of the number of labeled samples to the number of author samples of the specific category; Using the author identification model to obtain second probabilities corresponding to each of the samples, the second probabilities are used to indicate probabilities that the samples are the labeled samples; Obtaining third probabilities corresponding to the samples according to the first ratio and the second probabilities corresponding to the samples, wherein the third probabilities are used to indicate probabilities that the samples are authors of a specific category; Calculating an evaluation value of the author identification model according to the third probabilities corresponding to the samples, wherein the evaluation value is used to measure the accuracy of the author identification model; The parameters of the author identification model are adjusted according to the evaluation value to obtain a trained author identification model.
2. The method according to claim 1, characterized in that The obtaining, according to the first ratio and the second probabilities corresponding to the samples, the third probabilities corresponding to the samples respectively, comprises: The second probabilities corresponding to the samples are divided by the first ratio to obtain third probabilities corresponding to the samples.
3. The method according to claim 1, characterized in that The first condition includes that a first probability corresponding to the sample is greater than a first threshold; The step of selecting, from the training sample set, samples whose first probability satisfies a first condition as samples of authors of a specific category includes: Selecting samples whose first probabilities corresponding to the samples are greater than a first threshold from the training sample set as samples of authors of the specific category.
4. The method according to claim 1, characterized in that The sample includes feature information and an evaluation score of the author, wherein the feature information is used to indicate attribute characteristics of the author and attribute characteristics of the content published by the author, and the evaluation score of the author is used to indicate the comprehensive quality of the content published by the author.
5. The method according to claim 4, characterized in that The method further comprises: According to the initial score of the author, the evaluation score of the viewer in the t-th iteration and the first transfer matrix, the evaluation score of the author in the t-th iteration is obtained, and the first transfer matrix is used to represent the browsing intention of the viewer to the content published by the author in the t-th iteration; wherein t is a positive integer with an initial value of 1; The evaluation score of the viewer in the t+1th iteration is obtained according to the initial score of the viewer, the evaluation score of the viewer in the tth iteration, the evaluation score of the author in the tth iteration, the second transfer matrix and the third transfer matrix; wherein the second transfer matrix is used to represent the author's willingness to browse the content published by the viewer in the tth iteration, and the third transfer matrix is used to represent the viewer's willingness to forward the content published by the author to other viewers in the tth iteration; When the number of iteration rounds meets the stopping condition, the evaluation score of the author obtained in the last iteration round is added to the sample.
6. The method according to claim 5, characterized in that The method further comprises: According to the browsing data of the browsers, browsers that do not meet the iteration requirements are determined, and the browsers that do not meet the iteration requirements do not participate in the iteration process of the author's evaluation score.
7. The method according to claim 5, characterized in that The method further comprises: Determine the maximum number of edges allowed for the author according to the number of followers of the author and the number of edges of the author; wherein the number of edges of the author is used to indicate the number of viewers associated with the author; According to the maximum number of edges allowed by the author, obtaining the browsing time of the content published by the author by the viewer and the browsing time of the content published by the viewer by the author; The first transfer matrix is generated according to the browsing time of the content published by the author by the viewer, and the second transfer matrix is generated according to the browsing time of the content published by the viewer by the author.
8. The method according to claim 5, characterized in that The method further comprises: The first transfer matrix, the second transfer matrix and the third transfer matrix are respectively cut to obtain a plurality of first transfer sub-matrices, a plurality of second transfer sub-matrices and a plurality of third transfer sub-matrices; The sub-evaluation scores of the author in the t-th iteration respectively obtained based on the multiple first transfer sub-matrices are superimposed to obtain the evaluation score of the author in the t-th iteration; The sub-evaluation scores of the viewer in the t+1th iteration round obtained based on the multiple second transfer sub-matrices and the multiple third transfer sub-matrices are superimposed to obtain the evaluation score of the viewer in the t+1th iteration round.
9. The method according to claim 1, characterized in that: The adopting the author identification model to obtain the second probabilities corresponding to the samples respectively includes: Generate at least one sample subset according to the training sample set, wherein the sample subset includes an equal number of labeled samples and unlabeled samples; Using the author identification model to obtain initial second probabilities corresponding to each sample included in the sample subset; The second probabilities corresponding to the samples are obtained according to the averages of the initial second probabilities corresponding to the samples.
10. The method according to claim 1, characterized in that The step of calculating the evaluation value of the author identification model according to the third probabilities respectively corresponding to the samples includes: Calculating a recall rate of the author identification model according to the third probabilities corresponding to the samples, wherein the recall rate is used to indicate the probability of a sample corresponding to an author of a specific category in the at least one labeled sample; Obtaining the probability of author samples of a specific category in the training sample set according to the third probabilities corresponding to the samples; The evaluation value of the author identification model is calculated according to the probability of author samples of a specific category in the training sample set and the recall rate.
11. A training device for an author identification model, characterized in that: The device comprises: An acquisition module, used to acquire a training sample set for the author identification model, wherein the training sample set includes at least one labeled sample and at least one unlabeled sample, wherein the labeled sample refers to a sample labeled as an author of a specific category, and the unlabeled sample refers to a sample not labeled as an author of a specific category; A classification module, used for obtaining a first probability corresponding to each sample in the training sample set by using a classification model, wherein the first probability is used to indicate a probability that the sample is an author of a specific category; A selection module, configured to select samples whose first probability satisfies a first condition from the training sample set as samples of authors of a specific category; A first determination module, configured to obtain a first ratio according to a proportion of the number of labeled samples to the number of author samples of the specific category; A second determination module, configured to use the author identification model to obtain second probabilities corresponding to the samples, respectively, where the second probabilities are used to indicate probabilities that the samples are the labeled samples; A third determination module, configured to obtain a third probability corresponding to each sample according to the first ratio and the second probability corresponding to each sample, wherein the third probability is used to indicate a probability that the sample is an author of a specific category; A calculation module, used for calculating an evaluation value of the author identification model according to the third probabilities respectively corresponding to the samples, wherein the evaluation value is used to measure the accuracy of the author identification model; The adjustment module is used to adjust the parameters of the author identification model according to the evaluation value to obtain a trained author identification model.
12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method for training the author identification model according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method for training an author identification model according to any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product comprises a computer program, which is loaded and executed by a processor to implement the method for training an author identification model according to any one of claims 1 to 10.
Citation Information
Cited By
Resource consumption abnormal object identification method and related device
CN114862488A
A method for identifying a resource consumption abnormal object and a related device
CN114862488B
