CN115269779A - Recommendation model training method, recommendation method and device, electronic device and medium - Google Patents

Recommendation model training method, recommendation method and device, electronic device and medium Download PDF

Info

Publication number
CN115269779A
CN115269779A CN202210908823.9A CN202210908823A CN115269779A CN 115269779 A CN115269779 A CN 115269779A CN 202210908823 A CN202210908823 A CN 202210908823A CN 115269779 A CN115269779 A CN 115269779A
Authority
CN
China
Prior art keywords
data
recommendation
user
graph
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210908823.9A
Other languages
Chinese (zh)
Inventor
王健宗
李泽远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210908823.9A priority Critical patent/CN115269779A/en
Publication of CN115269779A publication Critical patent/CN115269779A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a training method, a recommendation method and device, electronic equipment and a medium for a recommendation model, and belongs to the technical field of artificial intelligence. The method comprises the following steps: acquiring target recommendation data and original user data of a target user, wherein the original user data comprises user basic data and first user rating data; screening the first user rating data to obtain second user rating data corresponding to the target recommendation data; performing Gaussian distribution generation processing on the second user rating data to obtain rating probability distribution data; constructing an initial disturbing graph according to the user basic data, the target recommendation data and the second user evaluation data; enhancing the initial disturbance graph according to the scoring probability distribution data to obtain a first disturbance graph and a second disturbance graph; and training the preset neural network model according to the initial disturbance diagram, the first disturbance diagram and the second disturbance diagram to obtain a recommendation model. According to the method and the device, the prediction effect of the model can be improved, and the recommendation accuracy is improved.

Description

Recommendation model training method, recommendation method and device, electronic device and medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a training method, a recommendation method and apparatus, an electronic device, and a medium for a recommendation model.
Background
The neural network model depended on by the current recommendation method during recommendation is limited by the type and the number of training samples, the model trained on the limited label sample data is often recommended according to the current popularity of an object to be recommended, the prediction effect of the model is poor, and the recommendation accuracy is affected, so that how to improve the prediction effect of the model becomes a technical problem to be solved urgently.
Disclosure of Invention
The embodiment of the application mainly aims to provide a training method, a recommendation method and device, electronic equipment and a medium for recommending a model, and aims to improve the prediction effect of the model and the recommendation accuracy.
In order to achieve the above object, a first aspect of an embodiment of the present application provides a method for training a recommendation model, where the method includes:
acquiring target recommendation data and original user data of a target user, wherein the original user data comprises user basic data and first user rating data;
screening the first user rating data to obtain second user rating data corresponding to the target recommendation data;
performing Gaussian distribution generation processing on the second user rating data to obtain rating probability distribution data;
constructing an initial disturbance diagram according to the user basic data, the target recommendation data and the second user evaluation data;
enhancing the initial disturbance map according to the scoring probability distribution data to obtain a first disturbance map and a second disturbance map;
and training a preset neural network model according to the initial disturbance diagram, the first disturbance diagram and the second disturbance diagram to obtain a recommendation model.
In some embodiments, the step of performing gaussian distribution generation processing on the second user rating data to obtain rating probability distribution data includes:
carrying out average value calculation on the second user rating data to obtain a rating average value;
calculating the difference between the grading mean value and the second user grading data to obtain a target score;
and performing Gaussian distribution calculation on the scoring mean value and the target score through a Gaussian distribution generation method and a preset normalization factor to obtain scoring probability distribution data.
In some embodiments, the step of performing enhancement processing on the initial perturbation map according to the score probability distribution data to obtain a first perturbation map and a second perturbation map includes:
calculating the intensity of the initial disturbing image through a preset function to obtain the edge intensity of the initial disturbing image;
performing data replacement on the edge strength through the scoring probability distribution data to obtain an edge probability value;
and splitting the initial disturbance graph according to the edge probability value to obtain the first disturbance graph and the second disturbance graph.
In some embodiments, the step of training a preset neural network model according to the initial perturbation graph, the first perturbation graph, and the second perturbation graph to obtain a recommendation model includes:
coding the initial disturbance graph to obtain an initial graph feature vector, coding the first disturbance graph to obtain a first graph feature vector, and coding the second disturbance graph to obtain a second graph feature vector;
performing loss calculation on the initial graph characterization vector through a preset first loss function to obtain a recommended loss value;
comparing and learning the first graph characteristic vector and the second graph characteristic vector through a preset second loss function to obtain a comparison loss value;
and performing parameter optimization on the neural network model according to the comparison loss value and the recommendation loss value to train the neural network model to obtain the recommendation model.
In some embodiments, the step of performing parameter optimization on the neural network model according to the comparison loss value and the recommended loss value to train the neural network model to obtain the recommended model includes:
performing weighted calculation on the comparison loss value and the recommendation loss value according to a preset weight parameter to obtain a target loss value;
and performing parameter optimization on the loss function of the neural network model through a random gradient descent method and the target loss value to train the neural network model to obtain the recommendation model.
In order to achieve the above object, a second aspect of an embodiment of the present application provides a recommendation method, including:
acquiring target user data of a target user;
inputting the target user data into a recommendation model for prediction processing to obtain a recommendation list, wherein the recommendation model is obtained by training according to the training method of the first aspect;
and pushing the recommendation list to the target user.
In order to achieve the above object, a third aspect of the embodiments of the present application provides a training apparatus for recommending a model, the training apparatus including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring target recommendation data and original user data of a target user, and the original user data comprises user basic data and first user rating data;
the screening module is used for screening the first user rating data to obtain second user rating data corresponding to the target recommendation data;
the probability distribution generation module is used for carrying out Gaussian distribution generation processing on the second user rating data to obtain rating probability distribution data;
the graph building module is used for building an initial disturbing graph according to the user basic data, the target recommendation data and the second user rating data;
the enhancement module is used for enhancing the initial disturbance graph according to the scoring probability distribution data to obtain a first disturbance graph and a second disturbance graph;
and the training module is used for training a preset neural network model according to the initial disturbance diagram, the first disturbance diagram and the second disturbance diagram to obtain a recommendation model.
In order to achieve the above object, a fourth aspect of the embodiments of the present application provides a recommendation apparatus, including:
the second data acquisition module is used for acquiring target user data of a target user;
the prediction module is used for inputting the target user data into a recommendation model for prediction processing to obtain a recommendation list, wherein the recommendation model is obtained by training according to the training device in the third aspect;
and the recommending module is used for pushing the recommending list to the target user.
To achieve the above object, a fifth aspect of embodiments of the present application provides an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, wherein the program, when executed by the processor, implements the method of the first aspect or the method of the second aspect.
To achieve the above object, a sixth aspect of the embodiments of the present application proposes a storage medium, which is a computer-readable storage medium for computer-readable storage, and stores one or more programs, which are executable by one or more processors to implement the method of the first aspect or the method of the second aspect.
According to the training method, the recommendation method and device, the electronic device and the medium of the recommendation model, the target recommendation data and the original user data of the target user are obtained, wherein the original user data comprise the user basic data and the first user rating data, so that the first user rating data are screened, the second user rating data corresponding to the target recommendation data are obtained, and the rating condition of the target user on the target recommendation data can be conveniently determined. Furthermore, gaussian distribution generation processing is carried out on the second user rating data to obtain rating probability distribution data, the second user rating data can be effectively converted into a probability distribution form from a numerical value form through the method, data deviation is reduced, and data stability is improved. Further, an initial disturbing graph is constructed according to the user basic data, the target recommendation data and the second user evaluation data; and enhancing the initial disturbance map according to the scoring probability distribution data to obtain a first disturbance map and a second disturbance map, and training a preset neural network model according to the initial disturbance map, the first disturbance map and the second disturbance map to obtain a recommendation model.
Drawings
FIG. 1 is a flowchart of a training method of a recommendation model provided in an embodiment of the present application;
fig. 2 is a flowchart of step S103 in fig. 1;
fig. 3 is a flowchart of step S105 in fig. 1;
FIG. 4 is a flowchart of step S106 in FIG. 1;
fig. 5 is a flowchart of step S404 in fig. 4;
FIG. 6 is a flowchart of a recommendation method provided by an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a training apparatus for a recommendation model provided in an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a recommendation device provided in an embodiment of the present application;
fig. 9 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms first, second and the like in the description and in the claims, as well as in the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
First, several terms referred to in the present application are resolved:
artificial Intelligence (AI): is a new technical science for researching and developing theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produces a new intelligent machine that can react in a manner similar to human intelligence, and research in this field includes robotics, language recognition, image recognition, natural language processing, and expert systems, among others. The artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results.
Natural Language Processing (NLP): NLP uses computer to process, understand and use human language (such as chinese, english, etc.), and it belongs to a branch of artificial intelligence, which is a cross discipline of computer science and linguistics, also commonly called computational linguistics. Natural language processing includes parsing, semantic analysis, discourse understanding, and the like. Natural language processing is commonly used in the technical fields of machine translation, character recognition of handwriting and print, speech recognition and text-to-speech conversion, information intention recognition, information extraction and filtering, text classification and clustering, public opinion analysis and viewpoint mining, and relates to data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, linguistic research related to language calculation and the like related to language processing.
Information Extraction (Information Extraction): and extracting entity, relation, event and other factual information of specified types from the natural language text, and forming a text processing technology for outputting structured data. Information extraction is a technique for extracting specific information from text data. The text data is composed of specific units, such as sentences, paragraphs and chapters, and the text information is composed of small specific units, such as words, phrases, sentences and paragraphs or combinations of these specific units. The extraction of noun phrases, names of people, names of places, etc. in the text data is text information extraction, and of course, the information extracted by the text information extraction technology can be various types of information.
Normal distribution (Normal distribution): also called "normal distribution", also known as Gaussian distribution (Gaussian distribution), the normal curve is bell-shaped, with low ends and high middle, and is symmetrical left and right, so people are often called bell-shaped curve. If the random variable X follows a normal distribution with mathematical expectation of μ and variance σ 2, it is noted as N (μ, σ 2). The probability density function determines its position for the expected value μ of a normal distribution and its standard deviation σ determines the amplitude of the distribution. The normal distribution when μ =0 and σ =1 is a standard normal distribution.
Encoding (encoder): the input sequence is converted into a vector of fixed length.
Data enhancement: data enhancement is mainly used for preventing overfitting and optimizing a data set when dataset is small, and through data enhancement, the data amount of training can be increased, the generalization capability of a model is improved, noise data is increased, and the robustness of the model is improved. Data enhancement can be divided into two categories, off-line enhancement and on-line enhancement; the off-line enhancement is to directly process the data set, the number of the data can be changed into the number of the enhancement factor x original data set, and the off-line enhancement is often used when the data set is very small; after obtaining the batch data, the online enhancement is mainly used for enhancing the batch data, such as corresponding changes of rotation, translation, turnover and the like, and because some data sets cannot accept the increase of linear level, the online enhancement is often used for larger data sets, and many machine learning frameworks already support the online enhancement mode and can use the GPU for optimizing calculation.
Contrast Learning (contrast Learning) is a kind of self-supervised Learning, and does not need to rely on manually labeled class label information, and directly utilizes data itself as supervision information. Contrast learning is a method of task that describes similar and different things for a deep learning model. Using a contrast learning approach, a machine learning model may be trained to distinguish between similar and different images. The self-supervised learning in the image field is classified into two types: generative self-monitoring learning and discriminant self-monitoring learning. The comparative learning is typically discriminant self-supervised learning. The core key points of comparative learning are as follows: through automatically constructing similar examples and dissimilar examples, namely positive samples and negative samples, learning is carried out to compare the positive samples and the negative samples in a feature space, so that the distances of the similar examples in the feature space are reduced, the distances of the dissimilar examples in the feature space are reduced, the differences are increased, model representations obtained through the learning process can be used for executing downstream tasks, fine adjustment is carried out on a small labeled data set, and therefore the unsupervised model learning process is achieved. The guiding principle of comparative learning is as follows: by automatically constructing similar examples and dissimilar examples, a learning model is obtained through learning, and by means of the model, similar examples are close to each other in projection space, and dissimilar examples are far away from each other in projection space.
Random Gradient Descent (SGD): the stochastic gradient descent method is to randomly extract one group from samples, update the group according to the gradient after training, extract the group again, update the group again, under the condition that the sample size is extremely large, a model with a loss value within an acceptable range can be obtained without training all the samples. The stochastic gradient descent is a simple but very effective method, and is mainly used for learning of linear classifiers under loss functions such as support vector machines and logistic regression. And the stochastic gradient descent method has been successfully applied to the large-scale and sparse machine learning problems often encountered in text classification and natural language processing. The stochastic gradient descent method can be used for classification calculation and regression calculation.
The neural network model that the current recommendation method depends on when recommending is limited by the type and number of training samples, and the model trained based on limited tag sample data is often recommended according to the current popularity of the object to be recommended, so that the prediction effect of the model is poor, and the recommendation accuracy is affected, therefore, how to improve the prediction effect of the model becomes a technical problem to be solved urgently.
Based on this, the embodiment of the application provides a training method, a recommendation method and device, an electronic device and a medium for recommending a model, and aims to improve the prediction effect of the model and the recommendation accuracy.
The training method, the recommendation method and apparatus, the electronic device and the medium of the recommendation model provided in the embodiments of the present application are specifically described in the following embodiments, and first, the training method of the recommendation model in the embodiments of the present application is described.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The embodiment of the application provides a training method of a recommendation model, and relates to the technical field of artificial intelligence. The training method of the recommendation model provided by the embodiment of the application can be applied to a terminal, a server side and software running in the terminal or the server side. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, or the like; the server side can be configured into an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and cloud servers for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (content delivery network) and big data and artificial intelligence platforms; the software may be an application of a training method or the like that implements a recommendation model, but is not limited to the above form.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Fig. 1 is an optional flowchart of a training method of a recommendation model provided in an embodiment of the present application, and the method in fig. 1 may include, but is not limited to, steps S101 to S106.
Step S101, obtaining target recommendation data and original user data of a target user, wherein the original user data comprises user basic data and first user rating data;
step S102, screening the first user rating data to obtain second user rating data corresponding to the target recommendation data;
step S103, gaussian distribution generation processing is carried out on the second user rating data to obtain rating probability distribution data;
step S104, constructing an initial disturbance diagram according to the user basic data, the target recommendation data and the second user evaluation data;
step S105, enhancing the initial disturbance map according to the scoring probability distribution data to obtain a first disturbance map and a second disturbance map;
and S106, training a preset neural network model according to the initial disturbance diagram, the first disturbance diagram and the second disturbance diagram to obtain a recommendation model.
In steps S101 to S106 illustrated in the embodiment of the application, by obtaining the target recommendation data and the original user data of the target user, where the original user data includes the user basic data and the first user rating data, the first user rating data is filtered to obtain the second user rating data corresponding to the target recommendation data, so that the rating condition of the target user on the target recommendation data can be determined more conveniently. Furthermore, gaussian distribution generation processing is carried out on the second user rating data to obtain rating probability distribution data, the second user rating data can be effectively converted into a probability distribution form from a numerical value form through the method, data deviation is reduced, and data stability is improved. Further, an initial disturbing graph is constructed according to the user basic data, the target recommendation data and the second user evaluation data; and enhancing the initial disturbance map according to the scoring probability distribution data to obtain a first disturbance map and a second disturbance map, and training a preset neural network model according to the initial disturbance map, the first disturbance map and the second disturbance map to obtain a recommendation model.
In step S101 of some embodiments, target recommendation data and original user data of a target user may be obtained by writing a web crawler, and performing targeted crawling on a data source after the data source is set. Target recommendation data and original user data can also be obtained in other manners, without limitation, the data source may be a network platform, a software program, or a database on a client such as a mobile phone, a tablet, or a computer terminal, and the target object may be a social group of various industries and various ages, without limitation. The original user data comprises historical behavior data of a target user and user basic data, the historical behavior data comprises historical click rate of the target user, historical browsing duration, first user rating data of some recommended data and the like, the user basic data comprises basic data of the user such as name, sex, age, occupation and the like, and the target recommended data comprises text content to be recommended and news information. Notification announcements, science popularization knowledge, and the like.
In each embodiment of the present application, when data related to the identity or characteristics of a user, such as user information, user behavior data, user history data, and user location information, is processed, permission or consent of the user is obtained, and the collection, use, and processing of the data comply with relevant laws and regulations and standards of relevant countries and regions. In addition, when the embodiment of the present application needs to acquire sensitive personal information of a user, individual permission or individual consent of the user is obtained through a pop-up window or a jump to a confirmation page, and after the individual permission or individual consent of the user is definitely obtained, necessary user-related data for enabling the embodiment of the present application to operate normally is acquired.
In step S102 in some embodiments, first, a Jieba word splitter or a TF-IF algorithm is used to extract recommended keywords of target recommended data to obtain recommended keywords of each target recommended data, then first user rating data is traversed according to the recommended keywords, text matching is performed on the first user rating data of the recommended keywords, and rating data including the recommended keywords in the first user rating data is screened to obtain second user rating data.
Because the current recommendation model is usually trained by directly adopting a data set label, and semantic representation information of the data set label cannot be suitable for user preferences of different degrees, the scoring condition of target recommendation data is greatly deviated, and therefore, the neural network model can learn the label distribution of each sample data by introducing label distribution learning, and the labeling deviation of user scoring can be well reduced by converting deterministic scoring data into the scoring probability of probability space.
Referring to fig. 2, in some embodiments, step S103 may include, but is not limited to, step S201 to step S203:
step S201, carrying out mean value calculation on the second user rating data to obtain a rating mean value;
step S202, calculating a difference value between the grading mean value and the second user grading data to obtain a target value;
step S203, carrying out Gaussian distribution calculation on the score mean value and the target score through a Gaussian distribution generation method and a preset normalization factor to obtain score probability distribution data.
In step S201 of some embodiments, since different target users have different score segments and scoring habits when scoring the target recommendation data, for example, some target users tend to assign high scores to all target recommendation data, and some target users tend to assign less high scores to target recommendation data, it is necessary to filter the second scoring data of the target recommendation data, that is, sum the second scoring data of all target users and then perform averaging to obtain a scoring average. For example, if the scores of a certain target user on the target recommendation data a, B, and C are 4, 3, and 1, respectively, the score mean is (4 +3+ 1)/3 =3.
In step S202 of some embodiments, a difference between the score average and the second user score data is calculated, the score average of each target user is subtracted from the second user data of each target user to obtain a target score, and the target score is used as a score tag.
In step S203 of some embodiments, by using a gaussian distribution generation method, assuming that a score of a target user for a target recommendation data (e.g., an item) obeys a gaussian distribution, a gaussian distribution centered on a real score label may be constructed by applying a priori knowledge, that is, a sample d is formed between a target user u and a target recommendation data iu,iEach sample comprises a label containing a user id (user id) and a target recommendation data id (item id), and gaussian distribution calculation is performed on the sample by using a gaussian distribution generation method and a preset normalization factor to obtain a corresponding score mean value and a corresponding target score, wherein the process can be expressed as shown in formula (1):
Figure BDA0003773399960000091
where k is the scoring label (i.e., target score), tu,iThe true score (i.e. the second score data) of the target recommendation data i for the target user u,
Figure BDA0003773399960000092
mean value, sigma, of scores for target user u for all target recommendation data generating interactionuIs tu,iStandard deviation of (A), Cu,iTo make a
Figure BDA0003773399960000093
May be preset. By the method, the scoring label which is originally a certain fixed value can be converted into a group of normalized probability distribution generated by Gaussian distribution, and the probability distribution is scoring probability distribution data.
For example, through the above steps S201 to S203, the probability distribution of the scoring label of a certain target user may be represented as: probability of score tag 0 is q0Score tag of 1 with probability of q1The probability of score tag 2 is q2The probability of score tag being 3 is q3The probability of score tag 4 is q4
It should be noted that, in the embodiment of the present application, an explicit feedback tag is taken as an example, and a value range of each score tag label is an integer between 0 and x. That is, the score value for each target recommendation data in the second score data is an integer between 0 and x, and x may be an integer greater than zero, for example, x =4.
Through the steps S201 to S203, the scoring data influenced by the scoring habit difference of different target users can be converted into the label distribution data, so that the influence of the absolute scoring on model training is reduced, the scoring condition of the target recommendation data is more reasonable, and the data stability is improved.
In step S104 in some embodiments, when an initial perturbation graph is constructed according to the user basic data, the target recommendation data, and the second user rating data, if a value range of the second rating data is from 0 to M, where M is an integer greater than zero, and a score average of a target user on the target recommendation data is a, regarding sample data with a score of more than a-1 as meeting requirements, performing nodularization on the user basic data (e.g., user id) and the target recommendation data (e.g., item id) of the target user, generating a user node and a target recommendation data node, and establishing an edge between the target recommendation data node and the user node meeting the requirements, thereby constructing edge relationships between all the target recommendation data nodes and the user node meeting the requirements, and obtaining the initial perturbation graph.
Referring to fig. 3, in some embodiments, step S105 may include, but is not limited to, step S301 to step S303:
step S301, calculating the intensity of the initial disturbing image through a preset function to obtain the edge intensity of the initial disturbing image;
step S302, carrying out data replacement on the edge strength through the score probability distribution data to obtain an edge probability value;
and step S303, splitting the initial disturbance graph according to the edge probability value to obtain a first disturbance graph and a second disturbance graph.
In step S301 of some embodiments, the preset function may be a softmax function with temperature, and the intensity of the initial spoiler is calculated by the softmax function and a preset calculation formula, so as to obtain the reliability of each edge of the initial spoiler, i.e. the edge intensity, where the calculation formula may be represented as follows:
Figure BDA0003773399960000101
the value of the second scoring data is the maximum value, the value of the second scoring data is an integer larger than zero, the value of the second scoring data is the scoring average value of the target user and is the probability value of a scoring label 0, the value of the second scoring data is j target recommendation data, and the value of the second scoring data is a preset temperature parameter.
In step S302 of some embodiments, the strength of each edge of the initial perturbation graph is characterized by an edge probability value by data replacement of the scored probability distribution data for the edge strength and replacing the value of the edge strength of each edge with the value of the scored probability distribution data. For example, if the edge strength between the node P and the node Q in a certain initial perturbative graph is 1, and the score probability value of this edge is 0.76, the edge probability value of this edge is 0.76, and the value "1" in the initial perturbative graph is replaced with "0.76".
In step S303 of some embodiments, the initial perturbation graph is split into pair perturbation graphs for comparison and learning according to the edge probability value, each pair perturbation graph includes a first perturbation graph and a second perturbation graph, where the first perturbation graph and the second perturbation graph both have edge deletion compared with the initial perturbation graph, and the missing edge may be determined according to the edge probability value and a preset threshold or a preset selection adjustment, without limitation, it is to be noted that the missing edge in the first perturbation graph needs to be retained in the second perturbation graph, and similarly, the missing edge in the second perturbation graph needs to be retained in the first perturbation graph, in this way, a semantic deviation caused by complete random edge perturbation can be prevented, so that the model training has good stability.
In the above steps S301 to S303, the edge strength is adjusted by the scoring probability distribution data, the idea of label distribution learning is introduced, reliability information (i.e. scoring probability distribution data) of the scoring condition of the target recommended belonging to the chicken by the target user is brought into the data enhancement process, and the difference between different edges is considered, so that the phenomenon that a key node is lost or semantic deviation occurs in a perturbation graph generated according to a certain fixed probability or random walk in the conventional technology can be effectively avoided, and the stability and accuracy of the perturbation graph can be better improved.
Referring to fig. 4, in some embodiments, step S106 may include, but is not limited to, step S401 to step S404:
step S401, encoding the initial disturbance graph to obtain an initial graph eigenvector, encoding the first disturbance graph to obtain a first graph eigenvector, and encoding the second disturbance graph to obtain a second graph eigenvector;
step S402, performing loss calculation on the initial graph characterization vector through a preset first loss function to obtain a recommended loss value;
step S403, comparing and learning the first graph characteristic vector and the second graph characteristic vector through a preset second loss function to obtain a comparison loss value;
and S404, performing parameter optimization on the neural network model according to the comparison loss value and the recommendation loss value to train the neural network model to obtain the recommendation model.
In step S401 of some embodiments, a preset map encoder performs encoding processing on the initial perturbation map, and captures map characteristic information of the initial perturbation map to obtain an initial map characteristic vector. Similarly, the first perturbation graph is encoded by the graph encoder, graph characteristic information of the first perturbation graph is captured, and a first graph characteristic vector is obtained, the second perturbation graph is encoded by the graph encoder, and graph characteristic information of the second perturbation graph is captured, and a second graph characteristic vector is obtained, wherein the graph encoder can adopt a BERT encoder and the like without limitation.
In step S402 of some embodiments, the preset first penalty function may select a BER function, and the procedure of performing penalty calculation on the initial graph characterization vector through the BER function may be represented as shown in formula (2).
Figure BDA0003773399960000111
Wherein, in the above formula (2), eu、ei、ejA set of triples on a certain graph node of the initial perturbative graph, i.e. initial graph feature vectors of user name-target recommendation data a-target recommendation data b, (u, i, j), respectively, wherein the target recommendation data may be goods, articles, news information, etc.
In step S403 of some embodiments, the preset second loss function is an InfoNCE function. The process of learning the first chart feature vector and the second chart feature vector by comparison through the inodence function can be expressed as shown in equation (3).
Figure BDA0003773399960000112
Wherein, in the above formula (3), i, j are the corresponding first chart feature vectors z from the same sampling batch B1A second graph feature vector z2The target recommendation data of (2) is,
Figure BDA0003773399960000113
characterizing the vector z for the first graph1τ is a temperature hyperparameter, which is a constant set in advance. Through the process, the distance between the representations of different enhanced samples of the same node can be reduced, and the distance between the representations of disturbance samples of different nodes is increased, so that the representations of the nodes learned by the model are more uniform, namely the nodes without correlation are far away from each other in high-dimensional space representation, thereby effectively avoiding that the target recommendation data belonging to the same type are too concentrated in the high-dimensional representation space, better solving the problem of data imbalance and improving the training effect of the model.
In step S404 of some embodiments, the comparison loss value and the recommended loss value are weighted according to a preset weight parameter to obtain a target loss value, where the preset weight parameter may be set according to an actual service requirement. Further, the target loss value is fed back to the neural network model through a random gradient descent method or a back propagation method, and parameter optimization is performed on a loss function of the neural network model to train the neural network model to obtain a recommendation model.
The user scoring conditions can be better integrated into the model training in the steps from the step S401 to the step S404, so that the neural network model can more evenly learn the graph node representation information of the initial perturbation graph, the first perturbation graph and the second perturbation graph, the target recommendation data belonging to the same type can be effectively prevented from being excessively concentrated in a high-dimensional representation space, the popularity deviation phenomenon can be better prevented, meanwhile, loss values in the aspects of graph comparison learning and recommendation prediction are integrated during the model training, the prediction effect of the model can be effectively improved, and the recommendation accuracy is improved.
It should be explained that the popularity bias in the embodiment of the present application is a fairness problem for the goods side (items), which is embodied in that the non-popular goods have less chance to be recommended (displayed), and accordingly, the recommendation system prefers to recommend popular goods. In the long run, popular items have become more popular and unpopular items have become less popular, which is the "horse-dog" effect in recommendation systems. If all items are divided into three groups: the method comprises the following steps that non-popular items (80% after interaction number ranking), popular items (5% before interaction number ranking), common items (the interaction number is centered), if obvious clustering phenomenon appears on a representation space, model parameters are biased to popular items, and if representation vectors of the three items are distributed more uniformly, the models recommend popular items and more items which are more interesting to target users.
Referring to fig. 5, in some embodiments, step S404 may include, but is not limited to, step S501 to step S502:
step S501, carrying out weighted calculation on the comparison loss value and the recommended loss value according to preset weight parameters to obtain a target loss value;
and S502, performing parameter optimization on a loss function of the neural network model through a random gradient descent method and a target loss value to train the neural network model to obtain a recommendation model.
In step S501 of some embodiments, the preset weight parameter may be set according to the actual service requirement, for example, the weight parameter of the comparison loss value is 0.4, and the weight parameter of the recommended loss value is 0.6. According to the preset weight parameter to the contrast loss value lossrecAnd a recommended loss value lossrecAnd performing weighted calculation to obtain a target Loss value Loss, which can be expressed as shown in formula (4):
Loss=α*lossrec+β*lossclformula (4)
Wherein α, β are weight parameters.
In step S502 of some embodiments, a random gradient descent method is used to update a model parameter, so as to minimize a target loss value, so that a comparison loss value and a recommended loss value can be simultaneously minimized, and an early-stop method is used to control the progress of model training, for example, when a verification error of a model continuously rises in more than k iterations, the model training is stopped to obtain a recommended model, where k is an integer greater than zero, and may be set according to an actual business requirement without limitation.
According to the training method of the recommendation model, the target recommendation data and the original user data of the target user are obtained, wherein the original user data comprise the user basic data and the first user rating data, the first user rating data are screened, the second user rating data corresponding to the target recommendation data are obtained, and therefore the rating condition of the target user on the target recommendation data can be conveniently determined. Furthermore, the second user rating data is subjected to Gaussian distribution generation processing to obtain rating probability distribution data, and the second user rating data can be effectively converted from a numerical value form to a probability distribution form through the method, so that the absolute rating is reduced, the data deviation is reduced, and the data stability is improved. Further, an initial disturbing graph is constructed according to the user basic data, the target recommendation data and the second user evaluation data; and the initial disturbance map is enhanced according to the score probability distribution data to obtain a first disturbance map and a second disturbance map, the disturbance map can be generated based on a data enhancement mode of edge disturbance, and the image quality of the generated disturbance maps is improved. And finally, training a preset neural network model according to the initial disturbing graph, the first disturbing graph and the second disturbing graph to obtain a recommendation model, wherein the method can better integrate the user scoring condition into model training, so that the neural network model can more uniformly learn the graph node representation information of the initial disturbing graph, the first disturbing graph and the second disturbing graph, and meanwhile, loss values of graph comparison learning and recommendation prediction are integrated during model training, thereby effectively improving the prediction effect of the model and improving the recommendation accuracy.
Referring to fig. 6, an embodiment of the present application further provides a recommendation method, which may include, but is not limited to, steps S601 to S603:
step S601, acquiring target user data of a target user;
step S602, inputting target user data into a recommendation model for prediction processing to obtain a recommendation list, wherein the recommendation model is obtained by training according to the training method of the embodiment of the first aspect;
step S603, pushing the recommendation list to the target user.
In step S601 in some embodiments, the data source may be crawled in a targeted manner after the data source is set by writing a web crawler, so as to obtain target user data of a target user. The target user data of the target user may also be obtained in other manners, which is not limited to this, where the data source may be a network platform, a software program, or a database on a client such as a mobile phone, a tablet, or a computer terminal, and the like, the target user data includes current behavior data of the target user and user basic data, the current behavior data includes data such as a click rate and a browsing duration of the target user, and the user basic data includes basic data such as a name, a gender, an age, and an occupation of the user.
In step S602 in some embodiments, target user data is input into a recommendation model, and the target user data is encoded by the recommendation model to obtain current behavior characteristics; furthermore, similarity calculation is carried out on the current behavior characteristics through a comparison learning mechanism of the recommendation model, so that recommendation scoring of the current behavior characteristics is achieved, recommendation scores corresponding to each preset target recommendation data are obtained, and the target recommendation data are arranged in a descending order according to the recommendation scores to obtain a recommendation list. For example, when similarity calculation is performed on the current behavior characteristics through a comparison learning mechanism of a recommendation model, the current behavior characteristics are mainly compared with historical behavior characteristics of a target user, cosine similarity of the current behavior characteristics and the historical behavior characteristics is calculated, the cosine similarity is used as a basis for recommendation scoring, the cosine similarity is subjected to descending order arrangement to form a recommendation scoring sequence, and correspondingly, target recommendation data corresponding to each historical behavior characteristic are also subjected to descending order arrangement according to the recommendation scoring sequence to obtain a recommendation list.
In step S603 in some embodiments, the recommendation list may be directly pushed to the target user, or the content closer to the front in the recommendation list may be selected and pushed to the target user, so that the communication cost is reduced while realizing personalized recommendation.
According to the recommendation method, the target user data of the target user are obtained, the target user data are coded through the recommendation model, the current behavior characteristics are obtained, and the more complex behavior data of the target user can be extracted in a deep learning mode, so that diversified heterogeneous data such as images, videos, audios and texts can be blended in the recommendation process. Furthermore, similarity calculation is carried out on the current behavior characteristics through a comparison learning mechanism of the recommendation model, so that recommendation scoring of the current behavior characteristics is achieved, and recommendation scores corresponding to each preset target recommendation datum are obtained. And finally, performing descending order arrangement on preset target recommendation data according to the recommendation score to obtain a recommendation list, and pushing the recommendation list to a target user, so that a recommendation result which better accords with the preference of the user can be obtained in the prediction process, and the recommendation accuracy and the recommendation performance of a recommendation system are improved.
Referring to fig. 7, an embodiment of the present application further provides a training apparatus for a recommendation model, which can implement the training method for the recommendation model, and the apparatus includes:
a first obtaining module 701, configured to obtain target recommendation data and original user data of a target user, where the original user data includes user basic data and first user rating data;
the screening module 702 is configured to perform screening processing on the first user rating data to obtain second user rating data corresponding to the target recommendation data;
a probability distribution generating module 703, configured to perform gaussian distribution generation processing on the second user rating data to obtain rating probability distribution data;
the graph building module 704 is used for building an initial disturbing graph according to the user basic data, the target recommendation data and the second user evaluation data;
an enhancing module 705, configured to perform enhancement processing on the initial perturbation map according to the score probability distribution data to obtain a first perturbation map and a second perturbation map;
the training module 706 is configured to train a preset neural network model according to the initial perturbation graph, the first perturbation graph, and the second perturbation graph, so as to obtain a recommendation model.
In some embodiments, the probability distribution generation module 703 comprises:
the mean value calculating unit is used for carrying out mean value calculation on the second user rating data to obtain a rating mean value;
the difference calculation unit is used for carrying out difference calculation on the grading mean value and the second user grading data to obtain a target value;
and the Gaussian distribution calculating unit is used for carrying out Gaussian distribution calculation on the scoring mean value and the target score through a Gaussian distribution generating method and a preset normalization factor to obtain scoring probability distribution data.
In some embodiments, the boost module 705 includes:
the intensity calculation unit is used for carrying out intensity calculation on the initial disturbing image through a preset function to obtain the edge intensity of the initial disturbing image;
the data replacement unit is used for performing data replacement on the edge strength through the score probability distribution data to obtain an edge probability value;
and the splitting unit is used for splitting the initial disturbance graph according to the edge probability value to obtain a first disturbance graph and a second disturbance graph.
In some embodiments, training module 706 includes:
the encoding unit is used for encoding the initial disturbance diagram to obtain an initial diagram eigenvector, encoding the first disturbance diagram to obtain a first diagram eigenvector, and encoding the second disturbance diagram to obtain a second diagram eigenvector;
the loss calculation unit is used for performing loss calculation on the initial graph characterization vector through a preset first loss function to obtain a recommended loss value;
the comparison learning unit is used for performing comparison learning on the first graph characteristic vector and the second graph characteristic vector through a preset second loss function to obtain a comparison loss value;
and the parameter optimization unit is used for carrying out parameter optimization on the neural network model according to the comparison loss value and the recommendation loss value so as to train the neural network model and obtain the recommendation model.
In some embodiments, the parameter optimization unit comprises:
the weighted calculation subunit is used for carrying out weighted calculation on the comparison loss value and the recommended loss value according to a preset weight parameter to obtain a target loss value;
and the optimization subunit is used for carrying out parameter optimization on the loss function of the neural network model through a random gradient descent method and a target loss value so as to train the neural network model and obtain a recommendation model.
The specific implementation of the training apparatus of the recommendation model is substantially the same as the specific implementation of the training method of the recommendation model, and is not described herein again.
Referring to fig. 8, an embodiment of the present application further provides a recommendation apparatus, which can implement the recommendation method described above, and the apparatus includes:
a second data obtaining module 801, configured to obtain target user data of a target user;
the prediction module 802 is configured to input target user data into a recommendation model for prediction processing to obtain a recommendation list, where the recommendation model is obtained by training according to the training apparatus in the embodiment of the third aspect;
and the recommending module 803 is configured to push the recommendation list to the target user.
The specific implementation of the recommendation apparatus is substantially the same as the specific implementation of the recommendation method, and is not described herein again.
An embodiment of the present application further provides an electronic device, where the electronic device includes: the device comprises a memory, a processor, a program stored on the memory and capable of running on the processor, and a data bus for realizing connection communication between the processor and the memory, wherein the program realizes the training method or the recommendation method of the recommendation model when being executed by the processor. The electronic equipment can be any intelligent terminal including a tablet computer, a vehicle-mounted computer and the like.
Referring to fig. 9, fig. 9 illustrates a hardware structure of an electronic device according to another embodiment, where the electronic device includes:
the processor 901 may be implemented by a general-purpose CPU (central processing unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, and is configured to execute a relevant program to implement the technical solution provided in the embodiment of the present application;
the memory 902 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a Random Access Memory (RAM). The memory 902 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present disclosure is implemented by software or firmware, the related program codes are stored in the memory 902 and the processor 901 calls the training method or the recommendation method for executing the recommendation model of the embodiments of the present disclosure;
an input/output interface 903 for implementing information input and output;
a communication interface 904, configured to implement communication interaction between the device and another device, where communication may be implemented in a wired manner (e.g., USB, network cable, etc.), or in a wireless manner (e.g., mobile network, WIFI, bluetooth, etc.);
a bus 905 that transfers information between various components of the device (e.g., the processor 901, the memory 902, the input/output interface 903, and the communication interface 904);
wherein the processor 901, the memory 902, the input/output interface 903 and the communication interface 904 are communicatively connected to each other within the device via a bus 905.
The embodiment of the present application further provides a storage medium, which is a computer-readable storage medium for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the training method or the recommendation method of the recommendation model.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
According to the training method, the recommendation method and device, the electronic device and the medium of the recommendation model, the target recommendation data and the original user data of the target user are obtained, wherein the original user data comprise the user basic data and the first user rating data, so that the first user rating data are screened, the second user rating data corresponding to the target recommendation data are obtained, and the rating condition of the target user on the target recommendation data can be conveniently determined. Furthermore, the second user rating data is subjected to Gaussian distribution generation processing to obtain rating probability distribution data, and the second user rating data can be effectively converted from a numerical value form to a probability distribution form through the method, so that the rating absolute is reduced, the data deviation is reduced, and the data stability is improved. Further, an initial disturbing graph is constructed according to the user basic data, the target recommendation data and the second user evaluation data; and the initial disturbance map is enhanced according to the score probability distribution data to obtain a first disturbance map and a second disturbance map, the disturbance map can be generated based on a data enhancement mode of edge disturbance, and the image quality of the generated disturbance maps is improved. And finally, training a preset neural network model according to the initial disturbing graph, the first disturbing graph and the second disturbing graph to obtain a recommendation model, wherein the method can better integrate the user scoring condition into model training, so that the neural network model can more uniformly learn the graph node representation information of the initial disturbing graph, the first disturbing graph and the second disturbing graph, and meanwhile, loss values of graph comparison learning and recommendation prediction are integrated during model training, thereby effectively improving the prediction effect of the model and improving the recommendation accuracy.
The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided in the embodiments of the present application, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems with the evolution of technology and the emergence of new application scenarios.
It will be appreciated by those skilled in the art that the solutions shown in fig. 1-6 are not intended to limit the embodiments of the present application and may include more or fewer steps than those shown, or some of the steps may be combined, or different steps may be included.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b and c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the above-described division of units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product stored in a storage medium, which includes multiple instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and the scope of the claims of the embodiments of the present application is not limited thereto. Any modifications, equivalents and improvements that may occur to those skilled in the art without departing from the scope and spirit of the embodiments of the present application are intended to be within the scope of the claims of the embodiments of the present application.

Claims (10)

1. A training method for a recommendation model, the training method comprising:
acquiring target recommendation data and original user data of a target user, wherein the original user data comprises user basic data and first user rating data;
screening the first user rating data to obtain second user rating data corresponding to the target recommendation data;
performing Gaussian distribution generation processing on the second user rating data to obtain rating probability distribution data;
constructing an initial disturbing graph according to the user basic data, the target recommendation data and the second user evaluation data;
enhancing the initial disturbance map according to the scoring probability distribution data to obtain a first disturbance map and a second disturbance map;
and training a preset neural network model according to the initial disturbance diagram, the first disturbance diagram and the second disturbance diagram to obtain a recommendation model.
2. The training method according to claim 1, wherein the step of performing gaussian distribution generation processing on the second user score data to obtain score probability distribution data comprises:
carrying out average value calculation on the second user rating data to obtain a rating average value;
calculating the difference between the grading mean value and the second user grading data to obtain a target score;
and performing Gaussian distribution calculation on the scoring mean value and the target score through a Gaussian distribution generation method and a preset normalization factor to obtain scoring probability distribution data.
3. The training method according to claim 1, wherein the step of enhancing the initial perturbation map according to the score probability distribution data to obtain a first perturbation map and a second perturbation map comprises:
calculating the strength of the initial disturbing image through a preset function to obtain the edge strength of the initial disturbing image;
performing data replacement on the edge strength through the scoring probability distribution data to obtain an edge probability value;
and splitting the initial disturbance graph according to the edge probability value to obtain the first disturbance graph and the second disturbance graph.
4. A training method according to any one of claims 1 to 3, wherein the step of training a preset neural network model according to the initial perturbation graph, the first perturbation graph and the second perturbation graph to obtain a recommendation model comprises:
coding the initial disturbance graph to obtain an initial graph feature vector, coding the first disturbance graph to obtain a first graph feature vector, and coding the second disturbance graph to obtain a second graph feature vector;
performing loss calculation on the initial graph characterization vector through a preset first loss function to obtain a recommended loss value;
comparing and learning the first graph characteristic vector and the second graph characteristic vector through a preset second loss function to obtain a comparison loss value;
and performing parameter optimization on the neural network model according to the comparison loss value and the recommendation loss value to train the neural network model to obtain the recommendation model.
5. The recommendation method according to claim 4, wherein the step of performing parameter optimization on the neural network model according to the comparison loss value and the recommendation loss value to train the neural network model to obtain the recommendation model comprises:
performing weighted calculation on the comparison loss value and the recommendation loss value according to a preset weight parameter to obtain a target loss value;
and performing parameter optimization on the loss function of the neural network model through a random gradient descent method and the target loss value to train the neural network model to obtain the recommendation model.
6. A recommendation method, characterized in that the recommendation method comprises:
acquiring target user data of a target user;
inputting the target user data into a recommendation model for prediction processing to obtain a recommendation list, wherein the recommendation model is obtained by training according to the training method of any one of claims 1 to 5;
and pushing the recommendation list to the target user.
7. An apparatus for training a recommendation model, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring target recommendation data and original user data of a target user, and the original user data comprises user basic data and first user rating data;
the screening module is used for screening the first user rating data to obtain second user rating data corresponding to the target recommendation data;
the probability distribution generation module is used for carrying out Gaussian distribution generation processing on the second user rating data to obtain rating probability distribution data;
the graph building module is used for building an initial disturbing graph according to the user basic data, the target recommendation data and the second user rating data;
the enhancement module is used for enhancing the initial disturbance graph according to the scoring probability distribution data to obtain a first disturbance graph and a second disturbance graph;
and the training module is used for training a preset neural network model according to the initial disturbance diagram, the first disturbance diagram and the second disturbance diagram to obtain a recommendation model.
8. A recommendation device, characterized in that the recommendation device comprises:
the second data acquisition module is used for acquiring target user data of a target user;
the prediction module is used for inputting the target user data into a recommendation model for prediction processing to obtain a recommendation list, wherein the recommendation model is obtained by training according to the training device of claim 7;
and the recommending module is used for pushing the recommending list to the target user.
9. An electronic device, characterized in that the electronic device comprises a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for enabling a connection communication between the processor and the memory, the program, when executed by the processor, implementing the training method of any one of claims 1 to 5, or the steps of the recommendation method of claim 6.
10. A storage medium, which is a computer-readable storage medium, for computer-readable storage, characterized in that the storage medium stores one or more programs, which are executable by one or more processors, to implement the training method of any one of claims 1 to 5, or the steps of the recommendation method of claim 6.
CN202210908823.9A 2022-07-29 2022-07-29 Recommendation model training method, recommendation method and device, electronic device and medium Pending CN115269779A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210908823.9A CN115269779A (en) 2022-07-29 2022-07-29 Recommendation model training method, recommendation method and device, electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210908823.9A CN115269779A (en) 2022-07-29 2022-07-29 Recommendation model training method, recommendation method and device, electronic device and medium

Publications (1)

Publication Number Publication Date
CN115269779A true CN115269779A (en) 2022-11-01

Family

ID=83747608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210908823.9A Pending CN115269779A (en) 2022-07-29 2022-07-29 Recommendation model training method, recommendation method and device, electronic device and medium

Country Status (1)

Country Link
CN (1) CN115269779A (en)

Similar Documents

Publication Publication Date Title
CN113792818B (en) Intention classification method and device, electronic equipment and computer readable storage medium
CN109376222B (en) Question-answer matching degree calculation method, question-answer automatic matching method and device
CN111753060A (en) Information retrieval method, device, equipment and computer readable storage medium
US20220405481A1 (en) Content generation using target content derived modeling and unsupervised language modeling
CN110162594B (en) Viewpoint generation method and device for text data and electronic equipment
CN110309114B (en) Method and device for processing media information, storage medium and electronic device
CN111897934B (en) Question-answer pair generation method and device
WO2023108993A1 (en) Product recommendation method, apparatus and device based on deep clustering algorithm, and medium
CN114626097A (en) Desensitization method, desensitization device, electronic apparatus, and storage medium
CN115222066A (en) Model training method and device, behavior prediction method and device, and storage medium
CN116258137A (en) Text error correction method, device, equipment and storage medium
CN115640394A (en) Text classification method, text classification device, computer equipment and storage medium
CN114926039A (en) Risk assessment method, risk assessment device, electronic device, and storage medium
CN113961666A (en) Keyword recognition method, apparatus, device, medium, and computer program product
CN112632377A (en) Recommendation method based on user comment emotion analysis and matrix decomposition
CN114722174A (en) Word extraction method and device, electronic equipment and storage medium
CN112926341A (en) Text data processing method and device
CN115796141A (en) Text data enhancement method and device, electronic equipment and storage medium
CN115828153A (en) Task prediction method, device, equipment and medium based on artificial intelligence
CN116127066A (en) Text clustering method, text clustering device, electronic equipment and storage medium
CN115017263A (en) Article recommendation method, article recommendation device, electronic device, and storage medium
CN114090778A (en) Retrieval method and device based on knowledge anchor point, electronic equipment and storage medium
CN115269779A (en) Recommendation model training method, recommendation method and device, electronic device and medium
CN115186085A (en) Reply content processing method and interaction method of media content interaction content
CN114996458A (en) Text processing method and device, equipment and medium

Legal Events

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