Information recommendation method and device, equipment and storage medium
By dividing and weighting samples in the recommended model, the problem of model training difficulties under sparse targets is solved, and higher recommendation accuracy and effect are achieved.
Patent Information
- Application Number
- CN202311227420.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2025-03-21
AI Technical Summary
When dealing with classification targets with a positive sample number far less than the negative sample number, model training is difficult, resulting in an increase in false positive and false negative cases and reducing the accuracy of recommendations.
The recommended model is constructed using a circular iterative method. By dividing ordinary samples and difficult samples and giving them different target weights, the parameters are adjusted to improve the model's learning ability to the positive and negative sample interface.
Effectively reduce false positives and false negatives, improve the model's fitting accuracy to sparse targets, and thus improve the accuracy and effectiveness of information recommendation.
Smart Images

Figure CN119669551A_ABST
Abstract
Description
Background Art
[0002] In recent years, with the rapid development of Internet technology, the amount of information on the Internet has grown exponentially. Recommendation models based on artificial intelligence (AI) are often used to push information that meets the needs of people in this vast information world.
[0003] In the model training phase, a training sample set is constructed for each classification target, and then the model is trained based on each training sample set. However, for classification targets where the number of positive samples is far less than the number of negative samples (i.e., sparse targets), the number of positive and negative samples in the training sample set is very different, resulting in a fuzzy interface between positive and negative samples. Therefore, when using this type of training sample set to train the model, the model fitting is difficult, and it is more likely to produce negative samples predicted as positive samples (referred to as "false positives") and positive samples predicted as negative samples (referred to as "false negatives"), reducing the recommendation accuracy of the model.
[0004] In order to solve the problem of model learning difficulties caused by too few positive samples, the balanced binary cross entropy method was initially used to optimize the weights of positive and negative samples. However, this method applies the same weight to each positive sample, and the model still does not learn the difficult samples distributed near the interface between positive and negative samples, resulting in a decrease in false negatives and an increase in false positives in the prediction results output by the model, which makes it easy to push information that does not meet the needs of the object, affecting the recommendation effect.
[0005] Therefore, it is proposed to use the focal loss function to optimize the weights of positive and negative samples. According to the difficulty of classifying the training samples, the weights of difficult samples are increased and the weights of easy samples are reduced, so as to reduce both false positives and false negatives.
[0006] However, for the positive and negative samples of interactive sparse targets, the sample estimates output by the model are very small, resulting in the weights of positive samples approaching 1 and the weights of negative samples approaching 0 when the weights of positive and negative samples are optimized using the above method. Difficult samples that are difficult for the model to learn are distributed near the interface between positive and negative samples. Difficult samples can be positive samples or negative samples. Therefore, the weights set for difficult samples are either close to 1 or close to 0, and reasonable weighting of difficult samples is still not achieved. As a result, the model cannot correctly learn the difficult samples distributed near the interface between positive and negative samples during the training phase, making it difficult to improve the fitting accuracy for sparse targets. Furthermore, when using this type of model to make recommendation predictions for information containing sparse targets, the recommendation accuracy is not high, and it is easy to push information that does not meet the needs of the object, affecting the recommendation effect.
[0007] Therefore, in order to solve the above problems, this application proposes a new information recommendation method. Summary of the invention
[0008] The embodiments of the present application provide an information recommendation method, apparatus, device and storage medium to solve the problem of low recommendation accuracy when information containing sparse targets is recommended and predicted.
[0009] In a first aspect, an embodiment of the present application provides an information recommendation method, which is implemented by a recommendation model and includes:
[0010] Obtaining an information retrieval request triggered by a target object, and retrieving multiple candidate recommendation information;
[0011] Performing recommendation estimation on the plurality of candidate recommendation information to obtain respective information recommendation estimation values, and pushing candidate recommendation information whose information recommendation estimation value is not less than a set threshold as target recommendation information to the target object;
[0012] Wherein, the recommendation model is obtained by adopting a cyclic iteration method, based on each first training sample constructed for a classification target with a large difference in the number of positive and negative samples; wherein, in each round of iterative training, the corresponding first training samples are divided into ordinary samples or difficult samples based on the comparison results between the first recommended estimated values of each first training sample and the preset reference estimated values, the target weight of each ordinary sample is set to a preset first weight value, and the target weight of each difficult sample is set to a preset second weight value, the second weight value is positively correlated with the degree of deviation of the first recommended estimated value of the corresponding difficult sample from the reference estimated value, and the second weight value is greater than the first weight value; based on the first recommended estimated value and the corresponding target weight of each ordinary sample, combined with the first recommended estimated value and the corresponding target weight of each difficult sample, the recommendation model is adjusted.
[0013] In a second aspect, an embodiment of the present application further provides an information recommendation device, which is implemented by a recommendation model and includes:
[0014] A receiving module, used to obtain an information retrieval request triggered by a target object and retrieve multiple candidate recommendation information;
[0015] A recommendation module is used to perform recommendation estimation on the multiple candidate recommendation information, obtain respective information recommendation estimation values, and push the candidate recommendation information whose information recommendation estimation value is not less than a set threshold as target recommendation information to the target object;
[0016] Wherein, the recommendation model is obtained by adopting a cyclic iteration method, based on each first training sample constructed for a classification target with a large difference in the number of positive and negative samples; wherein, in each round of iterative training, the corresponding first training samples are divided into ordinary samples or difficult samples based on the comparison results between the first recommended estimated values of each first training sample and the preset reference estimated values, the target weight of each ordinary sample is set to a preset first weight value, and the target weight of each difficult sample is set to a preset second weight value, the second weight value is positively correlated with the degree of deviation of the first recommended estimated value of the corresponding difficult sample from the reference estimated value, and the second weight value is greater than the first weight value; based on the first recommended estimated value and the corresponding target weight of each ordinary sample, combined with the first recommended estimated value and the corresponding target weight of each difficult sample, the recommendation model is adjusted.
[0017] Optionally, the classification module obtains the reference estimated value in the following manner:
[0018] Obtaining second training samples constructed for the same classification target with a large difference in the number of positive and negative samples, wherein the target weight of each second training sample is the first weight value;
[0019] Using the second training samples to train the recommendation model and obtain corresponding second recommendation estimates;
[0020] Arrange the second recommended estimated values in descending order to obtain an estimated value sequence set;
[0021] Based on the obtained estimate sequence set, a reference estimate for the sparse target is generated.
[0022] Optionally, the classification module is used to:
[0023] Based on the total number of estimates in the estimate sequence set and the quantile of the classification target score distribution, the nth second recommended estimate in the estimate sequence set is determined as a reference estimate for the sparse target, where n is a positive integer not less than 1.
[0024] In a third aspect, an embodiment of the present application further provides a computer device, comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of any one of the above-mentioned information recommendation methods.
[0025] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of any one of the above-mentioned information recommendation methods.
[0026] In a fifth aspect, an embodiment of the present application further provides a computer program product, including computer instructions, which are executed by a processor to perform the steps of any one of the above-mentioned information recommendation methods.
[0027] The beneficial effects of this application are as follows:
[0028] The embodiment of the present application provides an information recommendation method, device, equipment and storage medium, which is implemented through a recommendation model, including: the recommendation model performs recommendation estimation on multiple candidate recommendation information retrieved, and determines the target recommendation information recommended to the target object based on the corresponding information recommendation estimation value, wherein the recommendation model is obtained by adopting a cyclic iteration method based on each first training sample of a classification target with a large difference in the number of positive and negative samples, and in each round of iterative training, each first training sample is divided into a common sample or a difficult sample, and the target weight of the common sample is assigned a first weight value with a lower weight value, and the target weight of the difficult sample is assigned a first weight value with a lower weight value. A second weight value with a higher weight value is given, and the second weight value is positively correlated with the learning difficulty of the corresponding difficult sample; then based on the first recommended estimated value and the corresponding target weight of each ordinary sample, combined with the first recommended estimated value and the corresponding target weight of each difficult sample, the recommendation model parameters are adjusted to enable the model to more efficiently learn the difficult samples at the boundary of positive and negative samples during the training process, obtain a more accurate positive and negative sample interface, reduce false positives and false negatives, and use a model that can correctly distinguish the interface between positive and negative samples to improve the model's recommendation accuracy for information containing sparse targets, thereby improving the model's recommendation effect.
[0029] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0031] Figure 1 This is an optional schematic diagram of an application scenario in an embodiment of the present application;
[0032] Figure 2 A schematic diagram of a process for performing recommendation estimation using a recommendation model provided in an embodiment of the present application;
[0033] Figure 3A A flowchart of a training recommendation model provided in an embodiment of the present application;
[0034] Figure 3B A logical diagram of a training recommendation model provided in an embodiment of the present application;
[0035] Figure 3C A schematic diagram of a process for generating a reference estimate value provided in an embodiment of the present application;
[0036] Figure 3D A schematic diagram of a process for obtaining a second weight value of a difficult sample provided in an embodiment of the present application;
[0037] Figure 4A A schematic diagram of a process for training a recommendation model for social software provided in an embodiment of the present application;
[0038] Figure 4B A schematic diagram of a process for recommending short videos to target objects of social software provided in an embodiment of the present application;
[0039] Figure 4C A logical schematic diagram of recommending short videos to target objects of social software provided in an embodiment of the present application;
[0040] Figure 5A A schematic diagram of a process for training a browser recommendation model provided in an embodiment of the present application;
[0041] Figure 5B A schematic diagram of a process for recommending emoticon images to a target object of a browser provided in an embodiment of the present application;
[0042] Figure 5C A logical schematic diagram of recommending emoticon images to a target object of a browser provided in an embodiment of the present application;
[0043] Figure 6 A schematic diagram of the structure of a model training device provided in an embodiment of the present application;
[0044] Figure 7 A schematic diagram of a hardware structure of a computer device to which an embodiment of the present application is applied;
[0045] Figure 8 A schematic diagram of the hardware composition structure of another computer device to which the embodiment of the present application is applied. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.
[0047] Some of the terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0048] 1. Artificial Intelligence:
[0049] Artificial intelligence 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.
[0050] 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 technologies mainly include computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0051] With the research and advancement of artificial intelligence technology, artificial intelligence has been studied and applied in many fields, such as common smart homes, smart customer service, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, robots, smart medical care, etc. I believe that with the development of technology, artificial intelligence will be applied in more fields and play an increasingly important role.
[0052] 2. Machine Learning:
[0053] Machine learning is a multi-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. 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.
[0054] 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, including deep learning, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0055] 3. Binary Cross Entropy: In machine learning, a binary classification loss function that assumes that the dependent variable follows a Bernoulli distribution.
[0056] 4. Balanced binary cross entropy: Based on the binary cross entropy, by weighting the positive and negative samples, the sum of the weights of the positive and negative samples is made equal. This is a binary classification loss function that is more suitable for fitting sparse targets.
[0057] 5. Focus loss function: Based on the binary cross entropy, the training weight of each sample is adaptively adjusted to achieve the purpose of focusing on difficult samples. It is a binary classification loss function that emphasizes difficult samples.
[0058] The following is a brief introduction to the design concept of the embodiment of the present application:
[0059] In recent years, with the rapid development of Internet technology, the amount of information on the Internet has grown exponentially. Artificial intelligence-based recommendation models are often used to push information that meets the needs of people in this vast information world.
[0060] In the model training phase, a training sample set is constructed for each classification target, and then the model is trained based on each training sample set. However, for classification targets where the number of positive samples is far less than the number of negative samples (i.e., sparse targets), the number of positive and negative samples in the training sample set is very different, resulting in a fuzzy interface between positive and negative samples. Therefore, when using this type of training sample set to train the model, the model fitting is difficult, and it is more likely to produce negative samples predicted as positive samples (referred to as "false positives") and positive samples predicted as negative samples (referred to as "false negatives"), reducing the recommendation accuracy of the model.
[0061] In order to solve the problem of model learning difficulties caused by too few positive samples, the balanced binary cross entropy method was initially used to optimize the weights of positive and negative samples. However, this method applies the same weight to each positive sample, and the model still does not learn the difficult samples distributed near the interface between positive and negative samples, resulting in a decrease in false negatives and an increase in false positives in the prediction results output by the model.
[0062] Since the recommendation model recommends the top n recommended information for the target object according to the ranking results from high to low, it is crucial for the recommendation model to reduce false positives during the training process. However, training the model by balanced binary cross entropy reduces false negatives and increases false positives, which not only has no effect on improving the model fitting accuracy, but also has a negative impact on model training. As a result, the model trained by this method is prone to push information that does not meet the needs of the object during actual use, affecting the recommendation effect.
[0063] Therefore, it is proposed to use the focal loss function to optimize the weights of positive and negative samples. According to the difficulty of classifying the training samples, the weights of difficult samples are increased and the weights of easy samples are reduced, so as to reduce both false positives and false negatives.
[0064] However, for positive and negative samples of interactive sparse targets, the sample estimates output by the model are very small, resulting in the weights of positive samples approaching 1 and the weights of negative samples approaching 0 when the above method is used to optimize the weights of positive and negative samples.
[0065] During the training process, difficult samples with high model learning difficulty are distributed near the interface between positive and negative samples. Difficult samples can be positive samples or negative samples. Therefore, the weights set for difficult samples are either close to 1 or close to 0, and reasonable weighting of difficult samples is still not achieved. As a result, the model cannot correctly learn the difficult samples distributed near the interface between positive and negative samples during the training phase, and it is difficult to improve the fitting accuracy for sparse targets. Furthermore, when using this type of model to make recommendation predictions for information containing sparse targets, the recommendation accuracy is not high, and it is easy to push information that does not meet the needs of the object, affecting the recommendation effect.
[0066] In response to the above problems, this application proposes a new information recommendation method. The method is implemented through a recommendation model, including: the recommendation model performs recommendation estimation on multiple candidate recommendation information obtained by retrieval, and determines the target recommendation information recommended to the target object based on the corresponding information recommendation estimation value, wherein the recommendation model is obtained by adopting a cyclic iteration method based on each first training sample of the classification target with a large difference in the number of positive and negative samples. In each round of iterative training, each first training sample is divided into a common sample or a difficult sample, and a first weight value with a lower weight value is assigned to the target weight of the common sample, and a second weight value with a higher weight value is assigned to the target weight of the difficult sample, and the second weight value is positively correlated with the learning difficulty of the corresponding difficult sample; then, based on the first recommendation estimation value and the corresponding target weight of each common sample, combined with the first recommendation estimation value and the corresponding target weight of each difficult sample, the recommendation model is adjusted to enable the model to more efficiently learn the difficult samples at the boundary of positive and negative samples during the training process, obtain a more accurate positive and negative sample interface, and reduce false positives and false negatives at the same time. A model that can correctly distinguish the positive and negative sample interface is adopted to improve the recommendation accuracy of the model for information containing sparse targets, thereby improving the recommendation effect of the model.
[0067] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0068] The information recommendation method provided in the embodiment of the present application can be applied to various scenarios such as social applications, browsers, multimedia applications, etc., to push relevant information that better meets the usage needs of the users in the corresponding scenarios.
[0069] Figure 1 One application scenario is shown, which includes two terminal devices 110 and a server 130. The terminal device 110 establishes a communication connection with the server 30 via a wired network or a wireless network.
[0070] Among them, the terminal device 110 includes but is not limited to: mobile phones, computers (such as tablets, laptops, desktop computers, etc.), smart home appliances, smart voice interaction devices (such as smart watches, smart speakers, etc.), vehicle-mounted terminals, aircraft, etc.
[0071] The server 130 of the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. This application does not make any restrictions here.
[0072] The terminal device 110 responds to the application startup operation triggered by the target object, runs the corresponding application installed on the terminal device 110, and displays the main interface 120 of the application on the display screen of the terminal device 110. The terminal device 110 obtains the original search content in the form of pictures, videos, texts, etc. input by the target object through the search control of the main interface 120; the terminal device 110 then encapsulates the original search content with the object identifier of the target object to obtain an information search request, and sends the request to the server 130.
[0073] Based on the search keyword carried in the information search request, the server 130 obtains multiple candidate recommendation information associated with the search keyword, and then inputs each candidate recommendation information into the trained recommendation model, which makes a recommendation estimate for each candidate recommendation information, and pushes the candidate recommendation information with an information recommendation estimate not less than a set threshold as the target recommendation information to the terminal device 110. Finally, the terminal device 110 renders the thumbnail information of each target recommendation information to the main interface 120 of the application, and displays the corresponding information content to the target object.
[0074] Among them, the recommendation model, as a machine learning model, can be deployed in the server 130 to realize the function of calling the local model, or it can be deployed in other independent servers in the network to realize the function of calling the model remotely, and it can also be deployed in the server cluster or distributed system of the network to realize the function of calling the distributed model. This application is not limited here.
[0075] This application adopts a recommendation model to make recommendations and estimates on the information in the application scenario to obtain the corresponding target recommendation information. It should be noted that the information here is not limited to text information, but can also be other forms of carrier information such as pictures, audio, and video. Figure 2 As shown, the specific process is as follows:
[0076] S201: Obtain an information retrieval request triggered by a target object, and retrieve multiple candidate recommendation information.
[0077] S202: performing recommendation estimation on multiple candidate recommendation information to obtain respective information recommendation estimation values, and pushing candidate recommendation information whose information recommendation estimation value is not less than a set threshold as target recommendation information to the target object;
[0078] Among them, the recommendation model is obtained by adopting a cyclic iteration method, based on each first training sample constructed for a classification target with a large difference in the number of positive and negative samples; wherein, in each round of iterative training, based on the comparison result between the first recommended estimated value of each first training sample and the preset reference estimated value, the corresponding first training sample is divided into an ordinary sample or a difficult sample, the target weight of each ordinary sample is set to a preset first weight value, and the target weight of each difficult sample is set to a preset second weight value, the second weight value is positively correlated with the degree of deviation of the first recommended estimated value of the corresponding difficult sample relative to the reference estimated value, and the second weight value is greater than the first weight value; based on the first recommended estimated value and the corresponding target weight of each ordinary sample, combined with the first recommended estimated value and the corresponding target weight of each difficult sample, the recommendation model is adjusted.
[0079] In related technologies, since difficult samples are not properly weighted during the training phase, the recommendation model fails to correctly learn the difficult samples near the interface between positive and negative samples, making it difficult to improve the model fitting accuracy. Furthermore, when using such models to make recommendation predictions for information containing sparse targets, the recommendation accuracy is not high, and it is easy to push information that does not meet the needs of the object, affecting the recommendation effect.
[0080] Figure 3A-3B The process of training the model of the present application is shown, in which the target weight of each common sample is set to a first weight value with a lower weight value, and the target weight of each difficult sample is set to a second weight value with a higher weight value. Then, based on the first recommended estimated value and the corresponding target weight of each common sample, combined with the second recommended estimated value and the corresponding target weight of each difficult sample, the recommendation model is adjusted.
[0081] S301: Obtain first training samples constructed for classification targets with a large difference in the number of positive and negative samples.
[0082] Interactive classification targets such as like targets, share targets, popularity boost targets, comment targets, and follow targets are all classification targets with a large difference in the number of positive and negative samples. Among them, each positive sample is a training sample that contains the corresponding category behavior of the classification target, and each negative sample is a training sample that does not contain the corresponding category behavior.
[0083] Before formal training, separate training sets are constructed for each classification target with a large difference in the number of positive and negative samples, and then the recommendation model is trained using the training sets of each classification target. When the number of samples in the training set is small, the first training sample of one or more training sets can be input into the recommendation model as a batch of training data; when the number of samples in the training set is large, the same training set can be divided into multiple batches of training data and input into the recommendation model in sequence.
[0084] Taking the like target as an example, the process of constructing its training sample set is: using crawlers, information capture and other methods to collect object data of multiple users of the short video application within a set collection period, and each object data includes: an interactive behavior of a user on a short video; then, the obtained multiple copies of object data are filtered, sorted and other data preprocessed, and short videos containing like behaviors are classified as positive samples, and short videos that are not liked or disliked are classified as negative samples. Multiple positive and negative samples together constitute the first training sample set of the like target. At this time, both positive and negative samples are called "the first training samples of the like target."
[0085] However, it should be noted that in the specific implementation of the present application, it involves the collection of object data of the user and the use of object data to construct training samples. Therefore, when the embodiment of the present application is applied to a specific product or a specific technology, it is necessary to first obtain the permission or consent of the user, and the collection, use and processing of relevant data must also comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0086] S302: Classify the corresponding first training samples into common samples or difficult samples based on the comparison results between the first recommended estimated values of the first training samples and the preset reference estimated values.
[0087] A recommendation model is used to make a recommendation estimate on the sample content contained in each first training sample to obtain a corresponding first recommendation estimate value; each first recommendation estimate value is then compared with a reference estimate value, and based on the respective comparison results, the corresponding first training sample is divided into a common sample or a difficult sample.
[0088] In this application, no matter it is a positive sample or a negative sample, as long as it is determined to be a difficult sample, it will be weighted, and the higher the learning difficulty of the training sample, the greater the weight value configured for it. Therefore, a reasonable and appropriate way is adopted to distinguish between ordinary samples and difficult samples in the first training sample set, laying a solid foundation for the subsequent reasonable weighting of difficult samples.
[0089] In the related art, different fixed thresholds are set to distinguish between common samples and difficult samples in positive and negative samples. For example, a fixed threshold of 1.0 is set to determine positive samples whose recommended estimated values are close to 1.0 as common samples, and positive samples whose recommended estimated values deviate from 1.0 as difficult samples; and a fixed threshold of 0.0 is set to determine negative samples whose recommended estimated values are close to 0.0 as common samples, and negative samples whose recommended estimated values deviate from 0.0 as difficult samples.
[0090] However, this sample division method is prone to omit difficult samples with low deviation, resulting in the model not fully learning such difficult samples, resulting in problems such as low model fitting accuracy and poor model recommendation accuracy. Therefore, this application proposes a new sample division method, which generates a reference estimate for the sparse target based on the quantile of the score distribution of the sparse target, unifies the distinction criteria between normal samples and difficult samples for positive and negative samples, and expands the generation range of difficult samples. This not only overcomes the problems existing in the relevant technology, but also can dynamically adjust the corresponding reference estimate according to the score range of different sparse targets.
[0091] See also Figure 3C The process of generating a reference estimate is as follows:
[0092] S3021: Obtain second training samples constructed for the same classification target with a large difference in the number of positive and negative samples, where the target weight of each second training sample is the first weight value.
[0093] The second training sample of the same classification target is constructed by adopting the method of step 301. Since the specific construction method has been introduced above, it will not be repeated here.
[0094] S3022: Use each second training sample to train a recommendation model and obtain a corresponding second recommendation estimate.
[0095] The target weight of each second training sample is set to the first weight value. When all target weights are the first weight value, the recommendation model is trained until the model converges, and the second recommendation estimate value of each second training sample output by the recommendation model during the training process is collected.
[0096] S3023: Arrange the second recommended estimated values in descending order to obtain an estimated value sequence set.
[0097] S3024: Generate a reference estimate for the classification target based on the obtained estimate sequence set.
[0098] Based on the total number of estimates in the estimate sequence set and the quantile of the classification target score distribution, the nth second recommended estimate in the estimate sequence set is determined as a reference estimate for the classification target, where n is a positive integer not less than 1.
[0099] For example, the estimate sequence set contains a total of 100 second recommended estimates. The quantile 10% of the sparse target score distribution is taken as the threshold, and n is the product of the quantile and the total number of the estimate sequence set. At this time, the value of n is 10. Therefore, the 10th second recommended estimate of 0.75 in the estimate sequence set is determined as the reference estimate for the like target.
[0100] After obtaining the reference estimated value, the following operations are performed for each first training sample. Since the operation steps are the same, in order to clearly describe the step operation process and facilitate understanding of the solution, a first training sample will be used as an example for introduction.
[0101] The recommendation model performs the following operations for each first training sample: reads a first training sample, estimates the possibility of the user performing the corresponding category of behavior on the sample content contained in the first training sample, and obtains the corresponding first recommendation estimated value; then compares the first recommendation estimated value of the first training sample with the reference estimated value to determine the learning difficulty of the first training sample.
[0102] For a positive sample, when its first recommended estimated value is too small, it can be considered a difficult sample; for a negative sample, when its first recommended estimated value is too large, it can be considered a difficult sample. Therefore, when a first training sample is a positive sample and the first recommended estimated value is less than the reference estimated value, or when a first training sample is a negative sample and the first recommended estimated value is not less than the reference estimated value, the first training sample is classified as a difficult sample with a higher learning difficulty; when a first training sample is a positive sample and the first recommended estimated value is not less than the reference estimated value, or when a first training sample is a negative sample and the first recommended estimated value is less than the reference estimated value, the first training sample is classified as a common sample with a lower learning difficulty.
[0103] S303: Set the target weight of each common sample to a preset first weight value, and perform the following operations for each difficult sample: set the target weight of a difficult sample to a corresponding second weight value, the second weight value is positively correlated with the degree of deviation of the first recommended estimated value of the corresponding difficult sample relative to the reference estimated value, and the second weight value is greater than the first weight value.
[0104] In the present application, only difficult samples are weighted. Therefore, the target weight of each ordinary sample is set to a first weight value with a lower weight value, and the target weight of each difficult sample is set to a second weight value with a higher weight value. The higher the learning difficulty of the training sample, the larger the weight value configured for it.
[0105] Among them, see Figure 3D As shown, the process of obtaining the second weight value is as follows:
[0106] S2031: Based on a first recommended estimated value and a reference estimated value of a difficult sample, obtaining an estimated deviation value of the difficult sample, where the estimated deviation value represents a deviation between the first recommended estimated value and the reference estimated value.
[0107] This application designs different dynamic weight allocation formulas for positive and negative samples, which are:
[0108] (1) When a difficult sample is a positive sample, the first estimated value of the difficult sample is corrected based on a preset deviation correction parameter to obtain a corresponding deviation correction value, and the ratio between the reference estimated value and the deviation correction value is used as the estimated deviation value of the difficult sample.
[0109] For positive samples, when the first recommended estimated value is less than the reference estimated value, the positive sample is weighted, and the greater the difference between the positive sample and the reference estimated value, the greater the second weight value set for it; when the first recommended estimated value is not less than the reference estimated value, it is not weighted, and its target weight is directly set to the first weight value with a lower weight value. In order to achieve this purpose, the present application designs the following dynamic weight allocation formula for positive samples:
[0110]
[0111] Among them, w i is the second weight value of the i-th first training sample, is the first recommended estimated value of the i-th first training sample, b is a positive number, and in order to ensure the stability of the division calculation, this application also adds a very small deviation correction parameter ε (e.g., 1e-30). The min operation ensures that the maximum value of the second weight cannot exceed a certain value to avoid abnormally large values after the division operation to ensure the stability of the training, and the max operation ensures that the target weight of the normal sample remains at 1.0.
[0112] According to the boundary conditions: hour, The solution is b = 4p', where p' is the reference estimated value. Therefore, the above dynamic weight allocation formula can be further rewritten as:
[0113]
[0114] (2) When a difficult sample is a negative sample, the ratio between the first estimated value of the difficult sample and the reference estimated value is used as the estimated deviation value of the difficult sample.
[0115] For negative samples, when the first recommended estimated value is not less than the reference estimated value, the negative sample is weighted, and the greater the difference between the negative sample and the reference estimated value, the greater the second weight value set for it; when the first recommended estimated value is less than the reference estimated value, it is not weighted, and its target weight is directly set to the first weight value with a lower weight value. To achieve this purpose, the present application designs the following dynamic weight allocation formula for negative samples:
[0116]
[0117] Among them, w i is the second weight value of the i-th first training sample, is the first recommended estimated value of the i-th first training sample, and a is a positive number. The min operation ensures that the maximum value of the second weight cannot exceed a certain value to avoid abnormally large values after the division operation to ensure the stability of training. The max operation ensures that the target weight of ordinary samples remains at 1.0.
[0118] According to the boundary conditions: hour, Solved Therefore, the above dynamic weight allocation formula can be further rewritten as:
[0119]
[0120] Based on the above dynamic weight allocation formulas for positive and negative samples, the following dynamic weight allocation formula can be obtained:
[0121]
[0122] Among them, y i is the sample label of the first training sample of the i-th order, y i =1 means that the first training sample of the i-th is a positive sample, y i = 0 means that the i-th first training sample is a negative sample. The second weight value depends on the first recommended estimated value. Since the first recommended estimated value is constantly changing during the training process, and the first recommended estimated values of different training samples are also different, the second weight value is a dynamic weight, which is related to both the sample itself and the training process.
[0123] One thing that needs to be explained is that the dynamic weight allocation formula of the present application adopts two operation methods: division comparison and power function scaling. Among them, the power of the power function is 1 / 2, and the scaling factor is 1 / 2. For the use of other powers and scaling factors, as long as the division comparison and power function scaling are still used, it is still feasible.
[0124] S3032: Obtain a second weight value based on a comparison result between an estimated deviation value of a difficult sample and a preset weight limit value.
[0125] As shown in Formula 5, the estimated deviation value of a difficult sample is first compared with the upper limit of the weight, and then the minimum value between the estimated deviation value of the difficult sample and the upper limit of the weight is compared with the lower limit of the weight, and finally the maximum value between the minimum value and the lower limit of the weight is taken as the second weight value.
[0126] When the first recommended estimate of the positive sample The smaller the weight The larger the value of is, the larger the second weight value obtained by substituting it into the formula; when the first recommended estimate of the negative sample The larger the weight The larger the value of is, the larger the second weight value obtained by substituting it into the formula. Therefore, the second weight value is positively correlated with the degree of deviation of the first recommended estimated value of a difficult sample relative to the reference estimated value. The higher the learning difficulty of the first training sample, the larger the second weight value configured for it.
[0127] S304: Adjust the parameters of the recommendation model based on the first recommended estimated value and the corresponding target weight of each common sample and the first recommended estimated value and the corresponding target weight of each difficult sample.
[0128] By applying the dynamic weight function shown in Formula 5 to the binary cross entropy loss function, we can obtain a dynamic weight-based loss function applied to sparse targets. Based on the loss value obtained by the loss function, we adjust the model parameters so that the recommendation model can automatically focus on difficult samples with higher learning difficulty during training, thereby improving the fitting effect of sparse targets.
[0129]
[0130] Among them, θ is the model parameter to be learned by the model, L(θ) is the loss value generated by this round of training, and N is the total number of training samples in this round. is the first recommended estimate of the i-th first training sample, y i is the sample label of the first training sample of the i-th order, w i is the second weight value of the i-th first training sample.
[0131] S305: Determine whether the recommendation model reaches the preset iteration stop condition. If so, output the model after the current round of parameter adjustment as the trained recommendation model; otherwise, jump to step 301.
[0132] The preset iteration stopping conditions include the following: (1) The difference between the loss value generated by this iteration and the loss value generated by the previous iteration does not exceed the preset threshold value; (2) The loss value generated by this iteration does not exceed the preset threshold value; (3) The round of this iteration has reached the preset round threshold.
[0133] When any of the above iteration stop conditions is met, it means that after multiple rounds of iterations, the internal parameters of the model have become stable. Therefore, the model after this round of parameter adjustment is output as the recommended model after training. If all the iteration stop conditions are not met, the first training samples of the next batch are read to continue training the model.
[0134] This application introduces a new dynamic weight allocation formula, which sets the target weight of each common sample to a first weight value with a lower weight value, and sets the target weight of each difficult sample to a second weight value with a higher weight value. The more difficult the training sample is to learn, the larger the weight value is configured for it. This allows the model to more efficiently learn difficult samples near the interface between positive and negative samples during training, obtain a more accurate interface between positive and negative samples, and reduce false positives and false negatives, thereby improving the estimation accuracy of information containing sparse targets and the recommendation effect of the model.
[0135] The above method can be used to train recommendation models for various scenarios such as social applications, browsers, and multimedia applications, and then the trained recommendation model can be used to perform information recommendation and feedback the recommendation results to the target. Next, several specific embodiments will be used as examples to introduce the application process of this method in corresponding scenarios.
[0136] Specific embodiment 1: recommending short videos of social software to target objects.
[0137] like Figure 4A As shown in the figure, the process of training the recommendation model of social software is as follows:
[0138] S401: Acquire first training samples constructed for a heat boosting target;
[0139] S402: The recommendation model reads each first training sample in sequence, and each time a first training sample is read, predicts the possibility that the user clicks the popularity boosting control to increase the popularity of the short video in the first training sample, and obtains a corresponding first recommendation estimate;
[0140] S403: Classifying the corresponding first training samples into common samples or difficult samples according to the comparison result between each first recommended estimated value and the reference estimated value;
[0141] S404: setting the target weight of each common sample to 1.0, and, for each difficult sample, performing the following operations respectively: obtaining an estimated deviation value of the difficult sample based on a first recommended estimated value and a reference estimated value, and then setting the target weight of the difficult sample to a second weight value based on a comparison result between the estimated deviation value and a weight limit value, and the second weight value is greater than 1.0;
[0142] S405: adjusting the parameters of the recommendation model based on the first recommendation estimated value and the corresponding target weight of each common sample and the first recommendation estimated value and the corresponding target weight of each difficult sample;
[0143] S406: Determine whether the recommendation model has reached the convergence condition. If so, use the recommendation model obtained from the last round of iterative training as the trained recommendation model; otherwise, return to step 401.
[0144] like Figures 4B to 4C As shown in the figure, the process of using the recommendation model of social software to recommend short videos that meet the needs of the target object is as follows:
[0145] S401': The social software jumps from the social main interface to the short video main interface in response to the target object's click operation on the short video control, and the short video main interface includes at least a search box;
[0146] S402': The social software responds to the input operation of the target object on the search box, automatically reads the original search content input by the target object according to the set scanning cycle, and sends each original search content read to the backend server for video related search;
[0147] S403': The server calls the search model, controls the model to search the video library according to the original search text "a ship sailing on the sea", obtains multiple candidate short videos, and then calls the recommendation model to obtain a target short video that the target object may prefer from the multiple candidate short videos;
[0148] S404': The server sends the multiple target short videos output by the model to the social software, so that the social software displays the target short videos in sequence in the search sub-interface, and automatically plays a target short video currently displayed in the search sub-interface when it detects that the interface dwell time reaches a set threshold.
[0149] Specific embodiment 2: recommending emoticon pictures to a target object.
[0150] like Figure 5AAs shown in the figure, the process of training the recommendation model of the browser is as follows:
[0151] S501: Obtain each first training sample constructed for the sharing target;
[0152] S502: The recommendation model sequentially reads each first training sample. For each first training sample read, it predicts the possibility that the user shares the emoji picture in the first training sample to obtain the corresponding first recommendation prediction value;
[0153] S503: According to the comparison results between each first recommendation prediction value and the reference prediction value, divide the corresponding first training sample into a normal sample or a difficult sample;
[0154] S504: Set the target weight of each normal sample to 1.0, and for each difficult sample, perform the following operations respectively: Based on the first recommendation prediction value and the reference prediction value of a difficult sample, obtain the prediction deviation value of this difficult sample, and then based on the comparison result between the prediction deviation value and the weight limit value, set the target weight of the difficult sample to the second weight value, and the second weight value is greater than 1.0;
[0155] S505: Based on the first recommendation prediction value and the corresponding target weight of each normal sample, combined with the first recommendation prediction value and the corresponding target weight of each difficult sample, adjust the parameters of the recommendation model;
[0156] S506: Determine whether the recommendation model meets the convergence condition. If so, use the recommendation model obtained from the last round of iterative training as the trained recommendation model; otherwise, return to step 501.
[0157] As Figures 5B to 5C shown in the figure, the process of using the recommendation model of the browser to recommend emoji pictures that meet the needs of the target object is as follows:
[0158] S501': The browser responds to the input operation of the target object for the search box, obtains the original search text "hahaha emoji", and sends it to the server in the background for image association search;
[0159] S502': The server calls the search model, controls the model to perform image search in the emoji library according to the obtained original search content "hahaha", obtains multiple candidate emoji pictures, and then calls the recommendation model to obtain the target emoji pictures that better meet the needs of the target object from the multiple candidate emoji pictures;
[0160] S503': The server sends the multiple target emoji pictures output by the model to the browser so that the browser can display each target emoji picture in the search sub-interface.
[0161] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides an information recommendation device. The information recommendation device is implemented by a recommendation model, such as Figure 6 As shown, the information recommendation device 600 may include:
[0162] A receiving module 601 is used to obtain an information retrieval request triggered by a target object and retrieve multiple candidate recommendation information;
[0163] The recommendation module 602 is used to perform recommendation estimation on multiple candidate recommendation information, obtain respective information recommendation estimation values, and push candidate recommendation information whose information recommendation estimation value is not less than a set threshold as target recommendation information to the target object;
[0164] Among them, the recommendation model is obtained by adopting a cyclic iteration method, based on each first training sample constructed for a classification target with a large difference in the number of positive and negative samples; wherein, in each round of iterative training, based on the comparison result between the first recommended estimated value of each first training sample and the preset reference estimated value, the corresponding first training sample is divided into an ordinary sample or a difficult sample, the target weight of each ordinary sample is set to a preset first weight value, and the target weight of each difficult sample is set to a preset second weight value, the second weight value is positively correlated with the degree of deviation of the first recommended estimated value of the corresponding difficult sample relative to the reference estimated value, and the second weight value is greater than the first weight value; based on the first recommended estimated value and the corresponding target weight of each ordinary sample, combined with the first recommended estimated value and the corresponding target weight of each difficult sample, the recommendation model is adjusted.
[0165] Optionally, the information recommendation device 600 further includes a weight allocation module 603, and the weight allocation module 603 obtains the second weight value in the following manner, including:
[0166] Based on a first recommended estimated value and a reference estimated value of a difficult sample, obtaining an estimated deviation value of the difficult sample, the estimated deviation value representing the deviation between the first recommended estimated value and the reference estimated value;
[0167] Based on a comparison result between an estimated deviation value of a difficult sample and a preset weight limit value, a second weight value is obtained.
[0168] Optionally, the weight allocation module 603 is used to:
[0169] When a difficult sample is a positive sample, a first estimated value of the difficult sample is corrected based on a preset deviation correction parameter to obtain a corresponding deviation correction value, and a ratio between the reference estimated value and the deviation correction value is used as an estimated deviation value of the difficult sample;
[0170] When a difficult sample is a negative sample, a ratio between a first estimated value of the difficult sample and a reference estimated value is used as an estimated deviation value of the difficult sample.
[0171] Optionally, the weight allocation module 603 is used to:
[0172] Compare the estimated deviation value of a difficult sample with the weight upper limit value;
[0173] Compare the minimum value between the estimated deviation value of a difficult sample and the upper weight limit value with the lower weight limit value;
[0174] The maximum value between the minimum value and the weight lower limit is used as the second weight value.
[0175] Optionally, the information recommendation device 600 further includes a classification module 604, and the classification module 604 is used to:
[0176] For each first training sample, perform the following operations respectively:
[0177] comparing a first recommended estimate of a first training sample with a reference estimate;
[0178] When a first training sample is a positive sample and the first recommended estimated value is less than the reference estimated value, or when a first training sample is a negative sample and the first recommended estimated value is not less than the reference estimated value, classifying the first training sample as a difficult sample;
[0179] When a first training sample is a positive sample and the first recommended estimated value is not less than the reference estimated value, or when a first training sample is a negative sample and the first recommended estimated value is less than the reference estimated value, the first training sample is classified as a common sample.
[0180] Optionally, the classification module 604 obtains the reference estimated value in the following manner:
[0181] Obtaining second training samples constructed for the same classification target with a large difference in the number of positive and negative samples, wherein the target weight of each second training sample is the first weight value;
[0182] Using each second training sample to train a recommendation model and obtain a corresponding second recommendation estimate;
[0183] Arrange the second recommended estimated values in descending order to obtain an estimated value sequence set;
[0184] Based on the obtained estimate sequence set, a reference estimate for the sparse target is generated.
[0185] Optionally, the classification module 604 is used to:
[0186] Based on the total number of estimates in the estimate sequence set and the quantile of the classification target score distribution, the nth second recommended estimate in the estimate sequence set is determined as a reference estimate for the sparse target, where n is a positive integer not less than 1.
[0187] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0188] After introducing the information recommendation method and apparatus according to the exemplary embodiment of the present application, next, a computer device according to another exemplary embodiment of the present application is introduced.
[0189] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.
[0190] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a computer device. In one embodiment, the computer device may be a server, such as Figure 1 In this embodiment, the structure of the computer device 700 is as follows: Figure 7 As shown, it may include at least a memory 701 , a communication module 703 , and at least one processor 702 .
[0191] The memory 701 is used to store computer programs executed by the processor 702. The memory 701 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0192] The memory 701 may be a volatile memory, such as a random-access memory (RAM); the memory 701 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 701 may be any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 701 may be a combination of the above memories.
[0193] The processor 702 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 702 is configured to implement the above information recommendation method when calling the computer program stored in the memory 701 .
[0194] The communication module 703 is used to communicate with terminal devices and other servers.
[0195] The specific connection medium between the memory 701, the communication module 703 and the processor 702 is not limited in the embodiment of the present application. Figure 7 In the embodiment, the memory 701 and the processor 702 are connected via a bus 704. The bus 704 is connected to the processor 702 via a bus 704. Figure 7 The connections between the other components are only for illustration and are not intended to be limiting. The bus 704 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Figure 7 The diagram shows that only one thick line is used, but this does not mean that there is only one bus or only one type of bus.
[0196] The memory 701 stores a computer storage medium, and the computer storage medium stores computer executable instructions, and the computer executable instructions are used to implement the information recommendation method of the embodiment of the present application. The processor 702 is used to execute the above-mentioned information recommendation method, such as Figure 2 shown.
[0197] In another embodiment, the computer device may also be other computer devices, such as Figure 1 In this embodiment, the structure of the computer device 800 can be as follows: Figure 8 As shown, it includes: a communication component 810, a memory 820, a display unit 830, a camera 840, a sensor 850, an audio circuit 860, a Bluetooth module 870, a processor 880 and other components.
[0198] The communication component 810 is used to communicate with the server. In some embodiments, a wireless fidelity (WiFi) module may be included. The WiFi module belongs to a short-range wireless transmission technology. The electronic device can help the object to send and receive information through the WiFi module.
[0199] The memory 820 can be used to store software programs and data. The processor 880 executes various functions and data processing of the terminal device 110 by running the software programs or data stored in the memory 820. The memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 820 stores an operating system that enables the terminal device 110 to run. In the present application, the memory 820 can store an operating system and various application programs, and can also store a computer program for executing the information recommendation method of the embodiment of the present application.
[0200] The display unit 830 can also be used to display information input by the object or information provided to the object and a graphical user interface (GUI) of various menus of the terminal device 110. Specifically, the display unit 830 may include a display screen 832 disposed on the front of the terminal device 110. The display screen 832 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 830 may be used to display a recommendation search interface, a model training interface, etc. in the embodiment of the present application.
[0201] The display unit 830 can also be used to receive input digital or character information and generate signal input related to the object setting and function control of the terminal device 110. Specifically, the display unit 830 may include a touch screen 831 arranged on the front of the terminal device 110, which can collect touch operations of objects on or near it, such as clicking a button, dragging a scroll box, etc.
[0202] The touch screen 831 can be covered on the display screen 832, or the touch screen 831 and the display screen 832 can be integrated to realize the input and output functions of the terminal device 110, and the integrated display screen can be referred to as a touch display screen. In this application, the display unit 830 can display the application and the corresponding operation steps.
[0203] The camera 840 can be used to capture static images, and the subject can publish the images taken by the camera 840 through the application. The camera 840 can be one or more. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the processor 880 to convert it into a digital image signal.
[0204] The terminal device may further include at least one sensor 850, such as an acceleration sensor 851, a distance sensor 852, a fingerprint sensor 853, and a temperature sensor 854. The terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.
[0205] The audio circuit 860, the speaker 861, and the microphone 862 can provide an audio interface between the object and the terminal device 110. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, which is converted into a sound signal for output. The terminal device 110 can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and converted into audio data, and then the audio data is output to the communication component 810 to be sent to, for example, another terminal device 110, or the audio data is output to the memory 820 for further processing.
[0206] The Bluetooth module 870 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 870 to exchange data.
[0207] The processor 880 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal device and processes data by running or executing software programs stored in the memory 820 and calling data stored in the memory 820. In some embodiments, the processor 880 may include one or more processing units; the processor 880 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 880. In the present application, the processor 880 can run the operating system, application programs, user interface display and touch response, as well as the information recommendation method of the embodiment of the present application. In addition, the processor 880 is coupled to the display unit 830.
[0208] In some possible implementations, various aspects of the information recommendation method provided by the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on a computer device, the computer program is used to enable the computer device to execute the steps of the information recommendation method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the following steps: Figure 2 Follow the steps shown in .
[0209] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0210] The program product of the embodiment of the present application may adopt a portable compact disk read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, apparatus, or device.
[0211] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.
[0212] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0213] The computer program for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The computer program may be executed entirely on the user's computer device, partially on the user's computer device, as a separate software package, partially on the user's computer device and partially on a remote computer device, or entirely on the remote computer device. In the case of a remote computer device, the remote computer device may be connected to the user's computer device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer device (e.g., via the Internet using an Internet service provider).
[0214] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0215] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0216] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.
[0217] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the commands executed by the processor of the computer or other programmable data processing device generate commands for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0218] These computer program commands may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the commands stored in the computer readable memory produce an article of manufacture comprising a command device, the command device implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0219] These computer program commands can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the commands executed on the computer or other programmable device provide the instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0220] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0221] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An information recommendation method, characterized in that: The method is implemented by a recommendation model, comprising: Obtaining an information retrieval request triggered by a target object, and retrieving multiple candidate recommendation information; Performing recommendation estimation on the plurality of candidate recommendation information to obtain respective information recommendation estimation values, and pushing candidate recommendation information whose information recommendation estimation value is not less than a set threshold as target recommendation information to the target object; Wherein, the recommendation model is obtained by adopting a cyclic iteration method, based on each first training sample constructed for a classification target with a large difference in the number of positive and negative samples; wherein, in each round of iterative training, the corresponding first training samples are divided into ordinary samples or difficult samples based on the comparison results between the first recommended estimated values of each first training sample and the preset reference estimated values, the target weight of each ordinary sample is set to a preset first weight value, and the target weight of each difficult sample is set to a preset second weight value, the second weight value is positively correlated with the degree of deviation of the first recommended estimated value of the corresponding difficult sample from the reference estimated value, and the second weight value is greater than the first weight value; based on the first recommended estimated value and the corresponding target weight of each ordinary sample, combined with the first recommended estimated value and the corresponding target weight of each difficult sample, the recommendation model is adjusted.
2. The method according to claim 1, characterized in that The second weight value is obtained in the following manner, including: Based on a first recommended estimated value of a difficult sample and the reference estimated value, obtaining an estimated deviation value of the difficult sample, wherein the estimated deviation value represents a deviation between the first recommended estimated value and the reference estimated value; The second weight value is obtained based on a comparison result between the estimated deviation value of the one difficult sample and a preset weight limit value.
3. The method according to claim 2, characterized in that Determining an estimated deviation value of the difficult sample based on the first recommended estimated value of the difficult sample and the reference estimated value includes: When the one difficult sample is a positive sample, based on a preset deviation correction parameter, correcting the first estimated value of the one difficult sample to obtain a corresponding deviation correction value, and taking the ratio between the reference estimated value and the deviation correction value as the estimated deviation value of the one difficult sample; When the one difficult sample is a negative sample, a ratio between the first estimated value of the one difficult sample and the reference estimated value is used as the estimated deviation value of the one difficult sample.
4. The method according to claim 2, characterized in that The obtaining the second weight value based on a comparison result between the estimated deviation value of the one difficult sample and a preset weight limit value includes: Comparing the estimated deviation value of the difficult sample with the weight upper limit value; Compare the minimum value between the estimated deviation value of the difficult sample and the upper weight limit value with the lower weight limit value; The maximum value between the minimum value and the weight lower limit value is used as the second weight value.
5. The method according to any one of claims 1 to 4, characterized in that: Based on the comparison result between the first recommended estimated value of each first training sample and the preset reference estimated value, the corresponding first training sample is classified into a common sample or a difficult sample, including: For each of the first training samples, the following operations are performed respectively: comparing a first recommended estimated value of a first training sample with the reference estimated value; When the first training sample is a positive sample and the first recommended estimated value is less than the reference estimated value, or when the first training sample is a negative sample and the first recommended estimated value is not less than the reference estimated value, classifying the first training sample as a difficult sample; When the first training sample is a positive sample and the first recommended estimated value is not less than the reference estimated value, or when the first training sample is a negative sample and the first recommended estimated value is less than the reference estimated value, the first training sample is classified as a normal sample.
6. The method according to claim 5, characterized in that The reference estimated value is obtained in the following manner: Obtaining second training samples constructed for the same classification target with a large difference in the number of positive and negative samples, wherein the target weight of each second training sample is the first weight value; Using the second training samples to train the recommendation model and obtain corresponding second recommendation estimates; Arrange the second recommended estimated values in descending order to obtain an estimated value sequence set; Based on the obtained estimation sequence set, a reference estimation value for the classification target is generated.
7. The method according to claim 6, characterized in that The step of generating a reference estimated value for the sparse target based on the obtained estimated value sequence set comprises: Based on the total number of estimates in the estimate sequence set and the quantile of the classification target score distribution, the nth second recommended estimate in the estimate sequence set is determined as a reference estimate for the classification target, where n is a positive integer not less than 1.
8. An information recommendation device, characterized in that: The device is implemented by a recommended model, including: A receiving module, used to obtain an information retrieval request triggered by a target object and retrieve multiple candidate recommendation information; A recommendation module is used to perform recommendation estimation on the multiple candidate recommendation information, obtain respective information recommendation estimation values, and push the candidate recommendation information whose information recommendation estimation value is not less than a set threshold as target recommendation information to the target object; Wherein, the recommendation model is obtained by adopting a cyclic iteration method, based on each first training sample constructed for a classification target with a large difference in the number of positive and negative samples; wherein, in each round of iterative training, the corresponding first training samples are divided into ordinary samples or difficult samples based on the comparison results between the first recommended estimated values of each first training sample and the preset reference estimated values, the target weight of each ordinary sample is set to a preset first weight value, and the target weight of each difficult sample is set to a preset second weight value, the second weight value is positively correlated with the degree of deviation of the first recommended estimated value of the corresponding difficult sample from the reference estimated value, and the second weight value is greater than the first weight value; based on the first recommended estimated value and the corresponding target weight of each ordinary sample, combined with the first recommended estimated value and the corresponding target weight of each difficult sample, the recommendation model is adjusted.
9. The device according to claim 8, characterized in that The device further includes a weight allocation module, and the weight allocation module obtains the second weight value in the following manner, including: Based on a first recommended estimated value of a difficult sample and the reference estimated value, obtaining an estimated deviation value of the difficult sample, wherein the estimated deviation value represents a deviation between the first recommended estimated value and the reference estimated value; The second weight value is obtained based on a comparison result between the estimated deviation value of the one difficult sample and a preset weight limit value.
10. The device according to claim 9, characterized in that The weight allocation module is used for: When the one difficult sample is a positive sample, based on a preset deviation correction parameter, correcting the first estimated value of the one difficult sample to obtain a corresponding deviation correction value, and taking the ratio between the reference estimated value and the deviation correction value as the estimated deviation value of the one difficult sample; When the one difficult sample is a negative sample, a ratio between the first estimated value of the one difficult sample and the reference estimated value is used as the estimated deviation value of the one difficult sample.
11. The device according to claim 9, characterized in that The weight allocation module is used for: Comparing the estimated deviation value of the difficult sample with the weight upper limit value; Compare the minimum value between the estimated deviation value of the difficult sample and the upper weight limit value with the lower weight limit value; The maximum value between the minimum value and the weight lower limit value is used as the second weight value.
12. The device according to any one of claims 8 to 11, characterized in that: The device also includes a classification module, which is used to: For each of the first training samples, the following operations are performed respectively: comparing a first recommended estimated value of a first training sample with the reference estimated value; When the first training sample is a positive sample and the first recommended estimated value is less than the reference estimated value, or when the first training sample is a negative sample and the first recommended estimated value is not less than the reference estimated value, classifying the first training sample as a difficult sample; When the first training sample is a positive sample and the first recommended estimated value is not less than the reference estimated value, or when the first training sample is a negative sample and the first recommended estimated value is less than the reference estimated value, the first training sample is classified as a normal sample.
13. A computer device, characterized in that: It comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.
14. A computer-readable storage medium, characterized in that: It includes program codes. When the program codes are run on a computer device, the program codes are used to enable the computer device to execute the steps of the method according to any one of claims 1 to 7.
15. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Cited By
Lightweight man-post matching model training method and device
CN122198915A