Model training method and device, information recommendation method and device, electronic equipment and storage medium

By calculating the edit distance and loss value training model for predicting recommended information, and combining graph neural networks and large language models, the problem of insufficient utilization of unlabeled data in existing technologies is solved, and more efficient information recommendation and user interaction are achieved.

CN120687787APending Publication Date: 2025-09-23MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510058674.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Existing technologies rely on labeled data and have difficulty obtaining effective information from unlabeled data, which affects the scalability of the model and results in low accuracy and interaction probability of information recommendation.

Method used

By calculating the edit distance between the predicted recommended information and the actual recommended information, calculating the loss value, and training the model based on these loss values, combining graph neural networks and large language models for feature extraction and character correction, the accuracy of information recommendation is improved.

Benefits of technology

It improves the accuracy and efficiency of information recommendation, enhances the model's adaptability to changes in user preferences, and improves the relevance and user acceptance of recommended information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687787A_ABST
    Figure CN120687787A_ABST
Patent Text Reader

Abstract

The invention provides a model training method and device, an information recommendation method and device, electronic equipment and a storage medium. The method comprises the following steps: selecting prediction recommendation information of a sample user from a sample information set; calculating a first loss value based on the predicted recommendation information and the actual recommendation information of the sample user; performing character correction processing on the predicted recommendation information to obtain the corrected predicted recommendation information; calculating a second loss value according to the corrected editing distance between the predicted recommendation information and the actual recommendation information; and training the model based on the first loss value and the second loss value. Through the method and the device, the data learning and calculation capability after model training can be improved, and the accuracy and the efficiency of information recommendation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a model training, information recommendation method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of the internet and the widespread adoption of mobile devices, users have access to more and more channels for information, generating massive amounts of data daily. It's difficult for users to quickly find the content they truly need or are interested in within this vast amount of information. By analyzing user behavior, preferences, and historical data, models can provide more accurate information recommendations to better meet user needs. However, user and information data come from diverse sources, user behavior changes over time, and the data features have different structures and high dimensionality, making effective integration difficult. Related technologies rely on labeled data and are unable to extract effective information from unlabeled data. They also struggle to adapt to the dynamic changes in user preferences, impacting model scalability and, in turn, affecting user acceptance of recommended information and the likelihood of interaction.

[0003] There is currently no better way to train models for information recommendation in related technologies to improve the accuracy and interaction probability of information recommendation. Summary of the Invention

[0004] The embodiments of the present application provide a model training, information recommendation method, device, electronic device and storage medium, which can improve the accuracy and efficiency of information recommendation by enhancing the learning and computing capabilities of the model after training.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present invention provides a method for training a model, which includes:

[0007] Selecting predicted recommendation information of sample users from the sample information set;

[0008] Calculating a first loss value based on the predicted recommendation information and the actual recommendation information of the sample user;

[0009] performing character correction processing on the predicted recommendation information to obtain corrected predicted recommendation information;

[0010] Calculating a second loss value according to the edit distance between the corrected predicted recommendation information and the actual recommendation information;

[0011] The model is trained based on the first loss value and the second loss value.

[0012] This embodiment of the present application provides an information recommendation method, the method comprising:

[0013] Performing feature extraction processing on the user data and the recommendation information set respectively to obtain a second object feature of the user and a second information feature of each recommendation information;

[0014] Determining a predicted click probability corresponding to each of the recommended information based on the second object feature and each of the second information features, and selecting a first recommended information from the recommended information set according to the predicted click probability;

[0015] determining a second similarity between the user and each piece of recommended information based on the second object feature and each piece of second information feature, and selecting second recommended information from the set of recommended information based on the second similarity;

[0016] performing character correction on the first recommendation information and the second recommendation information to obtain third recommendation information;

[0017] Recommend the third recommendation information to the user.

[0018] The present invention provides a model training device, comprising:

[0019] a loss determination module configured to select predicted recommendation information of a sample user from a sample information set; calculate a first loss value based on the predicted recommendation information and the actual recommendation information of the sample user; perform character correction processing on the predicted recommendation information to obtain corrected predicted recommendation information; and calculate a second loss value based on an edit distance between the corrected predicted recommendation information and the actual recommendation information;

[0020] A model training module is used to train the model based on the first loss value and the second loss value.

[0021] The present invention provides an information recommendation device, including:

[0022] An information recommendation module is used to perform feature extraction processing on user data and a set of recommended information respectively to obtain a second object feature of the user and a second information feature of each piece of recommended information; based on the second object feature and each of the second information features, determine a predicted click probability corresponding to each piece of recommended information, and select a first piece of recommended information from the set of recommended information according to the predicted click probability; based on the second object feature and each of the second information features, determine a second similarity between the user and each piece of recommended information, and select a second piece of recommended information from the set of recommended information according to the second similarity; perform character correction on the first and second recommended information to obtain a third piece of recommended information; and recommend the third piece of recommended information to the user.

[0023] An embodiment of the present application provides an electronic device, comprising:

[0024] a memory for storing computer-executable instructions or computer programs;

[0025] The processor is used to implement the model training method or information recommendation method provided in the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.

[0026] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the model training method or information recommendation method provided in the embodiment of the present application when executed by a processor.

[0027] An embodiment of the present application provides a computer program product, including a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, the model training method or information recommendation method provided in the embodiment of the present application is implemented.

[0028] The embodiments of the present application have the following beneficial effects:

[0029] By selecting predicted recommendation information for a sample user from a sample information set and calculating a first loss value based on the predicted recommendation information and the sample user's actual recommendation information, the model improves the relevance of the recommended information to the user to be recommended. By performing character correction processing on the predicted recommendation information to obtain the corrected predicted recommendation information, a second loss value is calculated based on the edit distance between the corrected predicted recommendation information and the actual recommendation information, thereby improving the accuracy of the information copy and user acceptance. The model is trained based on the first and second loss values. The trained model comprehensively considers the encoding characteristics of multiple functions to more accurately recommend relevant information to users, improving the accuracy and efficiency of recommended information. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 Schematic diagram of the application mode of the training method of the model provided in the embodiment of the present application;

[0031] Figure 2 This is a schematic diagram of the structure of the server provided in the embodiment of the present application;

[0032] Figure 3A This is a first flow chart of the model training method provided in the embodiment of the present application;

[0033] Figure 3B 2 is a schematic diagram of a second flow chart of the model training method provided in an embodiment of the present application;

[0034] Figure 3C This is a schematic diagram of the first flow chart of the information recommendation method provided in an embodiment of the present application;

[0035] Figure 3D This is a second flow chart of the information recommendation method provided in an embodiment of the present application;

[0036] Figure 4 This is a third flow chart of the model training method provided in the embodiment of the present application;

[0037] Figure 5A This is a schematic diagram of the adaptive hierarchical structure provided by an embodiment of the present application;

[0038] Figure 5B This is a schematic diagram of the model structure provided in the embodiment of the present application;

[0039] Figure 6 This is a third flow chart of the model training method provided in an embodiment of the present application.

[0040] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of distinction between the advantages and disadvantages of the solutions or the priority in the implementation process. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0042] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0043] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0044] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0045] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0046] The collection and processing of relevant data (for example, advertising copy and user data) in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0047] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0048] 1) Information recommendation: This is an intelligent service that leverages technology to proactively push relevant information to users based on their needs and preferences. This service analyzes potential user needs through algorithmic models based on factors such as user attributes, historical behavior data, interests, and real-time context, providing personalized content and intelligently suggesting content or services.

[0049] 2) Advertising recommendation: It is an automated system based on user data analysis and model prediction, which aims to recommend advertising content that matches users' interests and needs.

[0050] 3) Natural Language Processing (NLP): A branch of artificial intelligence focused on enabling computers to understand and process human language, whether in spoken or textual form. Natural language processing involves designing algorithms and systems that enable computers to perform language-related tasks such as text classification, sentiment analysis, speech recognition, machine translation, and information extraction.

[0051] 4) Graph Neural Networks (GNNs): A type of network architecture in deep learning, GNNs capture the structural information of a graph by learning relationships between nodes and updating their feature representations. In practical applications, GNNs are defined as machine learning models capable of processing and analyzing graph-structured data (such as social networks, knowledge graphs, and molecular graphs). They can learn complex relationships within graphs and make predictions and classifications for nodes or the entire graph.

[0052] 5) Large Language Models (LLMs): These are pre-trained language models with large parameter sizes that can understand and generate natural language. These models are usually based on deep learning technology and are trained on large amounts of text data to learn the statistical laws and patterns of language.

[0053] 6) Character-level language model: This is a pre-trained language model that understands and generates text by encoding and transforming individual characters. It can directly process raw text data without relying on a predefined vocabulary. Unlike traditional word- or subword-based models, character-level models process text characters directly, enabling them to capture the deeper structure and patterns of language, especially when dealing with unknown or rare words or complex phenomena within a language.

[0054] 7) Neighborhood Loss: It is a loss function used in the field of machine learning, especially in the k-nearest neighbor algorithm and related clustering algorithms, to measure the similarity between sample points. The core idea is to guide the model training process by measuring the distance between a sample point and its neighboring points.

[0055] 8) Mutual Information (MI): This is an important metric for measuring the correlation between two random variables. It not only quantifies the direct dependency between variables, but can also be used to assess indirect dependencies. Specifically, mutual information represents the reduction in uncertainty in one random variable due to information about another random variable.

[0056] 9) Contrastive Learning: This is an unsupervised or self-supervised learning method that learns effective representations of data by comparing pairs of data samples. In contrastive learning, positive pairs are usually similar samples, while negative pairs are dissimilar samples.

[0057] 10) Voting mechanism: This refers to a method used in ensemble learning that improves overall accuracy by combining the predictions of multiple models. Each model makes a prediction for a given data point, and the category that the majority of models agree on is selected as the final prediction. In this embodiment of the application, the voting mechanism combines the predictions of the first and second sub-models to determine the final list of recommended information.

[0058] Related technologies rely on labeled data and lack effective information from unlabeled data, which impacts model scalability. Model training for large-scale data is inefficient, requires high computing resources, and consumes large amounts of memory. They can only perform spell checking on word-level data within information, resulting in low accuracy of information copy, which impacts the accuracy of recommended information and the probability of interaction.

[0059] The embodiments of the present application provide a model training method, an information recommendation method, a model training device, an information recommendation device, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the accuracy and efficiency of information recommendation by enhancing the learning and computing capabilities of the model after training.

[0060] The following describes exemplary applications of the electronic devices provided in the embodiments of the present application. The devices provided in the embodiments of the present application can be implemented as various types of terminals, such as laptops, tablet computers, desktop computers, set-top boxes, smartphones, smart speakers, smart watches, smart TVs, and in-vehicle terminals. They can also be implemented as servers. The following describes exemplary applications when the devices are implemented as terminals or servers.

[0061] See also Figure 1 , Figure 1 This is a schematic diagram of the application mode of the training method of the model provided in the embodiment of the present application, which is an example of supporting the training application of a model. Figure 1 The server 200, network 300, terminal device 400 and database 500 are involved. The terminal device 400 is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0062] In some embodiments, the user may be a technical personnel in this field, the server 200 is a server for training the model, the terminal device 400 is a terminal operated by the user, the terminal device 400 is installed with an application capable of displaying an information recommendation information list, and the database 500 stores information recommendation data and an information recommendation information list.

[0063] For example, the technician's terminal device 400 issues a model training request, and sends the model training request to the server 200 through the network 300. The server 200 extracts information recommendation data for training the model from the database 500. The server 200 performs feature encoding on the information recommendation data, calls the sub-model in the model for processing based on the recommendation data feature, determines the loss value of each sub-model, jointly optimizes the loss values ​​of the three sub-models in the model, determines the joint loss value of the model, trains the model based on the joint loss value, and uses the trained model to determine an information recommendation information list. The information recommendation information list is used to recommend to the terminal device of the user to be recommended. The information recommendation data and the information recommendation information list are stored in the database 500. When the terminal device of the user to be recommended issues a recommendation request, the server 200 sends the recommendation information list to the terminal device through the network 300 to display it to the user to be recommended.

[0064] In some embodiments, the model training method and information recommendation method of the embodiments of the present application can also be applied in the following application scenarios:

[0065] 1. In the advertising recommendation scenario of the e-commerce platform, the model trained by the model training method provided in the embodiment of the present application can predict the products that the user is interested in or wants to buy based on the user's shopping history, browsing history and search behavior, recommend corresponding product advertisements to the user, and improve the user's purchase intention and conversion rate.

[0066] 2. In the information recommendation scenario of social media, the model trained by the model training method provided in the embodiment of the present application can predict the content that users are interested in based on their interests, interactive behaviors, and social networks, and push customized information content.

[0067] 3. In the information recommendation scenario of the video streaming platform, the model trained by the model training method provided in the embodiment of the present application can analyze the user's viewing habits and preferences and recommend relevant video information.

[0068] 4. In the information recommendation scenario of a search engine, the model trained by the model training method provided in the embodiment of the present application can predict the user's interactive information based on the user's search keywords and historical search records, and display highly relevant information.

[0069] The embodiments of the present application can be implemented using database technology. A database, in short, can be considered an electronic filing cabinet that stores electronic files, allowing users to add, query, update, and delete data in these files. A "database" is a collection of data that is stored together in a specific manner, can be shared by multiple users, has minimal redundancy, and is independent of applications.

[0070] A database management system (DBMS) is a computer software system designed for managing databases, typically providing basic functions such as storage, retrieval, security, and backup. DBMSs can be categorized by the database model they support, such as relational or XML (Extensible Markup Language); by the type of computer they support, such as server clusters or mobile phones; by the query language they use, such as SQL or XQuery; by performance priorities, such as maximum scale or maximum speed; or by other classification methods. Regardless of the classification method used, some DBMSs can cross categories, for example, supporting multiple query languages ​​simultaneously.

[0071] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the server provided in the embodiment of the present application, Figure 2 The server 200 shown includes: at least one processor 410, a memory 450 and at least one network interface 420. The various components in the server 200 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0072] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0073] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0074] The memory 450 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0075] In some embodiments, the memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.

[0076] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;

[0077] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420 . Exemplary network interfaces 420 include Bluetooth, Wireless LAN (WiFi), and Universal Serial Bus (USB).

[0078] In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in software. Figure 2 The training device 455 of the model stored in the memory 450 is shown, which can be software in the form of a program or plug-in, including the following software modules: a loss determination module 4551, a model training module 4552, and an information recommendation module 4553. These modules are logical and can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below. Figure 2 For the sake of convenience, all the above modules are shown at once, but it should not be considered that the implementation of the model training device 455 may exclude only the loss determination module 4551 and the model training module 4552. The functions of each module will be explained below.

[0079] In some embodiments, the terminal or server can implement the training method of the model provided by the embodiment of the present application by running various computer executable instructions or computer programs.For example, computer executable instructions can be commands, machine instructions or software instructions at a microprogram level. A computer program can be a native program or software module in an operating system; it can be a local (Native) application (APPlication, APP); it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0080] The training method of the model provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the electronic device provided in the embodiment of the present application.

[0081] Below, we will describe the training method for the model provided in the embodiments of the present application. As mentioned above, the electronic device that implements the device management method of the embodiments of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution entity of each step will not be repeated below.

[0082] See also Figure 3A , Figure 3A This is a first flow chart of the training method of the model provided in the embodiment of the present application, which will be combined with Figure 3A The steps shown are explained, Figure 3A The executive body is Figure 1 Server 200 in.

[0083] In step 301, predicted recommendation information of a sample user is selected from a sample information set.

[0084] For example, a sample information set for recommending information to a user to be recommended is obtained, the sample information set including user behavior data, recommendation information, user information and environment data, and predicted recommendation information of a sample user is selected from the sample information set.

[0085] In some embodiments, see Figure 3B , Figure 3B This is a second flow chart of the model training method provided in the embodiment of the present application. Figure 3A Step 301 in can be Figure 3B Steps 3011 to 3013 in are implemented as described below.

[0086] In step 3011, the sample user data of the sample user and the sample information set are coded to obtain a first coding feature of the sample user and a second coding feature of each sample information in the sample information set.

[0087] For example, the encoding process is implemented through a machine learning model, and the sample user data and the sample information set are feature encoded by the machine learning model. The feature encoding operation includes data cleaning and feature extraction. In an embodiment of the present application, the sample information set can be advertising recommendation data, and the advertising recommendation data includes user behavior data, advertising information, user information and environmental data. The sample user data of the sample user is the record data corresponding to the sample user's click, browse, favorite, forward, comment and purchase behaviors; the advertising information is the advertising content, category and delivery time; the user information is the user's personal information and interest tags; the environmental data is the current time, the geographic location and device information of the object to be recommended. The sample information set is cleaned, and the cleaned sample information set is subjected to feature extraction to obtain the second encoding feature of each sample information in the sample information set, and the sample user data is feature encoded to obtain the first encoding feature of the sample user.

[0088] For example, data cleaning of a sample information set can be achieved by any of the following methods: identifying and correcting errors in the data to improve data quality; processing missing values ​​in recommended data using methods such as mean filling and deletion of missing data; detecting and processing outliers in information recommendation data. Feature extraction is performed on the cleaned data to obtain the original data, features are extracted from the original data to obtain original data features, and feature encoding is performed on the original data features. Feature encoding can be achieved by the following methods: using one-hot encoding on the categorical features in the original data features, creating a binary column vector for each category, with the binary column vector corresponding to the category being 1 and the binary column vectors for the remaining categories being 0, and using standardization on the numerical features in the original data features to obtain the first encoded features of the sample users and the second encoded features of each sample information in the sample information set.

[0089] The embodiments of the present application obtain more accurate features by performing cleaning, feature extraction and encoding operations on sample user data and sample information sets, reduce the interference of noise and outliers, make model training more efficient, and standardize the processing so that features of different magnitudes are on the same scale, which helps the convergence and optimization of the model.

[0090] In step 3012, an interactive relationship network diagram corresponding to the sample users and the sample information is constructed using the first coding feature and the second coding feature as nodes.

[0091] For example, the model uses the first coding feature and the second coding feature as nodes, performs relationship extraction processing on the first coding feature and the second coding feature, and constructs an interactive relationship network diagram corresponding to the sample user and the sample information based on the relationship between the extracted nodes, including the first coding feature node, the second coding feature node, and the connection edges between the nodes. In the interactive relationship network diagram, the first coding feature node represents a specific user individual. Each first coding feature node can contain the user's feature information, and the first coding feature node represents the content or object that the user may interact with, such as: advertisements, products, articles, videos, music. Each second coding feature node can contain information features, such as: advertising features, content type, release date, category label. An edge is a line connecting two nodes, representing the interactive relationship between the nodes. The interactive relationship can be behaviors such as clicks, purchases, favorites, and reviews.

[0092] In some embodiments, the interaction relationship network graph in step 3012 can be obtained by: aggregating the first coding features and the second coding features having an interaction relationship through the first sub-model of the model to obtain the interaction relationship features; constructing the interaction relationship network graph based on the interaction relationship features, the first coding features, and the second coding features, wherein the interaction relationship network graph includes nodes and edges between nodes, and the nodes include the first coding features and the second coding features as nodes. That is, through the graph neural network of the first sub-model, the graph-level representation and substructure representation in the interaction relationship network graph are determined, and the substructure representation is the node representation, edge representation, and triangle structure representation generated in the graph-level representation.

[0093] In some embodiments, see Figure 5B , Figure 5BIt is a schematic diagram of the model structure provided in an embodiment of the present application. The model 502 of the present application is composed of a first sub-model 5021, a second sub-model 5022 and a third sub-model 5023. The first sub-model 5021 and the second sub-model 5022 are graph neural network models, which are used to predict recommendation information in different ways. The third sub-model 5023 is a large language model, which is used to correct the characters of the recommendation information results predicted by the first sub-model 5021 and the second sub-model 5022, and output a corrected recommendation information list for recommendation to users.

[0094] For example, the first sub-model is a graph neural network model. The first sub-model uses first-order proximity and second-order proximity to encode the first encoded feature node and the second encoded feature node in the interactive relationship network graph. The first-order proximity focuses on the direct neighbors of each node. Through neighbor aggregation and node degree scaling, information is aggregated from the direct neighbors of the node to generate a local representation of each node. Direct neighbors are nodes with direct edges connected to the node. The direct neighbor information is aggregated. The aggregation methods of neighbor aggregation can be mean aggregation, sum aggregation, and maximum aggregation. Sum aggregation is to take the sum of the neighbor node features, and maximum aggregation is to take the maximum value of the neighbor node features. Mean aggregation can be implemented by formula (1), which is explained in detail below.

[0095]

[0096] Among them, node v represents any node, which can be the first coding feature node (user node) or the second coding feature node (sample information node), hv(k+1) is the representation of node v in the k+1 layer, N(v) is the set of neighbor nodes of v, and W (k) is the weight matrix of the kth layer, is the node representation of node u in the kth layer, and σ is the activation function.

[0097] After aggregating neighbor information, the node degree is scaled. A node degree is the number of directly connected edges. Common degree scalers use the inverse or square root of the node degree. This scaler adjusts the scale of node features so that features of nodes with different degrees are aggregated at the same scale. A new node representation is generated using a nonlinear activation function, such as a multilayer perceptron (MLP). A multilayer perceptron (MLP) is a feedforward neural network consisting of at least three layers: an input layer, one or more hidden layers, and an output layer. Each layer consists of multiple neurons, each receiving input from all neurons in the previous layer and producing an output that is passed to the next layer. The aggregated and scaled features are fed into the MLP and forward propagated through it. The MLP multiplies the input features by a weight matrix, adds a bias term, and applies an activation function for a nonlinear transformation. The above steps are repeated for the MLP, and the output layer produces a new node representation. In graph data, a node representation maps each node to a vector in a high-dimensional space. These vectors typically contain rich information, such as node attributes, features, or learned implicit representations.

[0098] For example, the second-order proximity focuses on the neighbors of the direct neighbors of the first encoding feature node and the second encoding feature node, captures the global structure of the information interaction relationship network graph, and uses the information of the global structure through the random walk method to generate a global representation of each node. The structural information of the interaction relationship network graph is converted into a low-dimensional embedding of the node, and a node sequence is generated through a random walk. The random walk starts from a certain node and randomly walks along the edge. The generated node sequence is applied to the unsupervised learning method to generate node embeddings. The generated node embeddings reflect the position and relationship of the node in the global graph structure. The unsupervised learning method can be a word vector model (Word to Vector, Word2Vec), which is a model that calculates the vector representation of word meaning. By training a neural network to learn the vector representation of vocabulary, the semantic and syntactic relationships between words can be obtained.

[0099] For example, the node embedding representations of the first-order proximity and the second-order proximity are aggregated to generate the interaction relationship features, which can be achieved by formula (2), as described in detail below.

[0100] hv=[hv(1),hv(2)] (2)

[0101] Here, hv(1) is the embedding generated by the first-order proximity, and hv(2) is the embedding generated by the second-order proximity.

[0102] In some embodiments, when performing Figure 3ABefore step 301, the first sub-model in the model is also trained by the following method: encoding the sample user data and the sample information set to obtain the first encoding feature of the sample user and the second encoding feature of the sample information; constructing an interaction relationship network diagram between the sample user and the sample information with the first encoding feature and the second encoding feature as nodes; extracting the first feature set and the second feature set from the interaction relationship network diagram; combining every two features in the first feature set into a positive sample pair; combining two features respectively selected from the first feature set and the second feature set into a negative sample pair; calculating the contrastive learning loss of the first sub-model based on the positive sample pair and the negative sample pair, and updating the parameters of the first sub-model based on the contrastive learning loss.

[0103] For example, the sample user data and sample information are combined and encoded using an initial first sub-model. The encoded features obtained from the encoding process are used as nodes to construct an interactive relationship network graph. A first feature set and a second feature set are extracted from the interactive relationship network graph, where the first feature set is different from the second feature set. The first feature set includes a first information feature, a first to-be-recommended object feature, and a first interactive relationship feature. The first information feature is an information node feature, the first to-be-recommended object feature is a to-be-recommended object node feature, and the first interactive relationship feature includes an edge feature between two nodes having an interactive relationship, and a triangle feature between three nodes having an interactive relationship.

[0104] For example, the graph-level representation and substructure representation corresponding to the interaction relationship network graph are determined based on the node representation. The graph-level representation is generated by the graph neural network using a summation method for the nodes. The substructure representation includes node representation, edge representation, and triangle representation. The node representation of the first information feature and the first feature to be recommended is calculated using the graph neural network. By combining the above formula (2) with the first-order and second-order proximity, it can be achieved using formula (3), which is explained in detail below.

[0105] hv=GNN(X,A) (3)

[0106] Among them, X is the node feature of the first information feature and the first feature to be recommended in the interaction relationship network graph, A is the adjacency matrix of the node, and GNN(X,A) is the first sub-model (graph neural network model).

[0107] The edge representation in the first interaction feature is generated by the representation of the nodes at its two ends, which can be achieved by formula (4), which is described in detail below.

[0108] h(u,v)=f(hu,hv) (4)

[0109] Among them, f(hu,hv) is a connection merging function, and u and v are the two end nodes of the edge connection.

[0110] The triangle representation in the first interactive feature is generated by the three node representations that make up the triangle, which can be achieved by formula (5), as described in detail below.

[0111] h(u,v,w)=g(hu,hu,hw) (5)

[0112] Among them, g(hu,hv,hw) is a connection merging function, and u, v and w are the three nodes that make up the triangle.

[0113] For example, every two features in the first feature set are combined into a positive sample pair, where a positive sample pair is a sample pair that is similar in feature space or belongs to the same category. In the embodiment of the present application, the positive sample pair is composed of the first feature set and the first interactive feature representation of the first feature set, which can be achieved by formula (6), which is described in detail below.

[0114] Positive sample pair = (hG,hv), v∈G (6)

[0115] Wherein, hG is the first feature set, and hv is the first interactive feature representation in the first feature set.

[0116] For example, two features selected from the first feature set and the second feature set are combined into a negative sample pair. The features of the partial structure in the second feature set include: the second information feature, the second feature of the object to be recommended, and the second interactive relationship feature. A negative sample pair refers to a sample pair that is dissimilar or belongs to different categories in the feature space. The selection of a negative sample pair is based on the difference between samples. Based on the features outside the first feature set in the first feature set and the interactive relationship, that is, the features of the partial structure in the second feature set, a negative sample pair is determined. The features of the partial structure in the second feature set are random feature representations outside the first feature set. The negative sample pair can be implemented by formula (7), which is described in detail below.

[0117] Negative sample pair = (hG, hu), u∈ / G (7)

[0118] Among them, hG is the first feature set, and hu is a random feature representation outside the first feature set.

[0119] Based on the positive and negative sample pairs, the contrastive learning loss of the first sub-model is calculated. Contrastive learning is a technique in machine learning that learns effective feature representations by comparing the similarities and differences between data samples. The contrastive learning loss is determined by maximizing the mutual information between the first feature set and the first interaction feature. Mutual information is a measure of the interdependence between the graph-level representation and the substructure representation. The contrastive learning loss is determined based on the positive and negative sample pairs. The cosine similarity between the positive and negative sample pairs is determined. The contrastive learning loss function of the first sub-model is determined by minimizing the loss of the positive sample pair across all samples. This can be expressed by formula (8), which is described in detail below.

[0120]

[0121] Among them, sim is the cosine similarity, exp represents the xth power of e, x can be any real number, L 第一损失 is the contrastive learning loss of the first sub-model.

[0122] For example, the first sub-model also jointly optimizes the losses of the first-order proximity and the second-order proximity to achieve a joint update of the node representation in the interaction relationship network graph, which can be achieved by formula (9), as described in detail below.

[0123] L=L 一阶 +L 二阶 (9)

[0124] Among them, LL 一阶 is the first-order proximity loss, L 二阶 It is the loss of second-order proximity. The first-order proximity loss and the second-order proximity loss are determined based on the cosine similarity between nodes. By jointly optimizing the first-order and second-order proximity losses, it ensures that the interaction relationship network graph learns node representation while retaining local and global structures.

[0125] For example, the first sub-model is adjusted by comparing the learning loss function and the proximity joint loss function, and the recommended data features are predicted and processed by the adjusted first sub-model to obtain the predicted information interaction probability. In the embodiment of the present application, the information interaction probability can be the advertising click probability or the conversion probability, for example: purchase probability, order probability.

[0126] In an embodiment of the present application, a contrastive learning method is used to determine the positive sample pairs and negative sample pairs of the interaction relationship network diagram in the first sub-model, and the contrastive learning loss is calculated based on the positive sample pairs and the negative sample pairs. The contrastive learning loss function is determined to promote the model to learn more discriminative feature representations, so that the features of similar samples are closer and the features of different samples are more separated, without relying on label information, thereby increasing the flexibility of the learning method.

[0127] Continue to see Figure 3B In step 3013, based on the interactive relationship network diagram, the predicted recommendation information corresponding to the sample user in the sample information is predicted.

[0128] For example, the model includes a first sub-model and a second sub-model. According to the interactive relationship network graph, the first sub-model performs prediction processing on the predicted sample information to obtain the predicted recommendation information determined by the first sub-model prediction, and the second sub-model performs prediction processing on the predicted sample information to obtain the predicted recommendation information determined by the second sub-model prediction. The second sub-model can be a graph neural network model different from the first sub-model.

[0129] In some embodiments, step 3013 can be implemented by the following method: performing feature extraction processing on the interaction relationship network diagram to obtain the first object feature of the sample user and the first information feature of each sample information; performing prediction processing based on the first object feature and the first information feature to obtain the predicted click probability of each sample information, and the predicted click probability is the probability that the sample user triggers the sample information; selecting the first sample information from the sample information set as the predicted recommendation information based on the predicted click probability; determining the first similarity between the first object feature and each first information feature, and selecting the second sample information from the sample information set as the predicted recommendation information based on the first similarity.

[0130] For example, the prediction processing is implemented through a model, and the model includes a first sub-model and a second sub-model. The first sub-model is a graph neural network model. The first sub-model is used to perform feature extraction processing on the interactive relationship network graph to obtain the first object feature of the sample user and the first information feature of each sample information. The first sub-model is used to perform prediction processing based on the first object feature and the first information feature to obtain the predicted click probability of each sample information. The predicted click probability is the probability that the sample user triggers the sample information, which characterizes the probability that the recommended information feature is interacted. The first sample information is selected from the sample information set based on the predicted click probability, and the information with a predicted click probability greater than a preset threshold is selected, or at least one information with the largest predicted click probability is selected as the first sample information. In an embodiment of the present application, the predicted click probability can be an advertisement click probability or a conversion probability, for example: a purchase probability or an order probability.

[0131] The second sub-model may be a graph neural network model different from the first sub-model. The second sub-model determines the first similarity between the first object feature and each first information feature, selects second sample information from the sample information set based on the first similarity, selects information with a first similarity greater than a preset threshold, or selects at least one information with the greatest first similarity as the second sample information. The predicted first sample information and the second sample are combined as the predicted recommendation information for the sample user.

[0132] Continue to see Figure 3A In step 302, a first loss value is calculated based on the predicted recommendation information and the actual recommendation information of the sample user.

[0133] For example, the first loss value includes the loss of the first sub-model and the loss of the second sub-model. The loss of the first sub-model is determined based on the recommendation information predicted by the first sub-model and the actual recommendation information of the sample user, and the loss of the second sub-model is determined based on the recommendation information predicted by the second sub-model and the actual recommendation information of the sample user. The losses of the first sub-model and the second sub-model are used as the first loss value.

[0134] In some embodiments, step 302 can be implemented by the following method: calculating the cross-entropy loss value based on the predicted click probability of the first sample information and the label value of the actual recommended information; constructing a two-dimensional curve based on the first similarity of the second sample information and the label value of the actual recommended information, and calculating the curve area loss value based on the two-dimensional curve; obtaining the first loss value based on the cross-entropy loss value and the curve area loss value.

[0135] For example, the first loss value includes the cross entropy loss value of the first sub-model, and the supervised loss value and the unsupervised loss value of the second sub-model.

[0136] Obtain actual recommendation information. Actual recommendation information is data with interaction tags. Determine the actual click probability based on the tags of the actual recommendation information. For example, if the actual recommendation information is ad click information, a tag of 1 indicates that the ad was clicked by the user, and a tag of 0 indicates that the ad was not clicked by the user.

[0137] For example, the cross entropy loss value of the first sub-model is calculated based on the predicted click probability of the first sample information and the label value of the actual recommended information. This can be achieved by formula (10), which is described in detail below.

[0138]

[0139] Among them, L 第一交叉熵损失 is the cross entropy loss value of the first sub-model, y i is the predicted click probability, pi is the actual recommendation probability, N is the number of samples, log(p i ) is the logarithm operation of the actual recommendation probability, log(1-p i ) is the logarithm of the predicted probability of no click.

[0140] For example, a two-dimensional curve is constructed based on the first similarity of the second sample information and the label value of the actual recommended information. The two-dimensional curve evaluates the second sub-model by plotting the relationship between the true positive rate and the false positive rate under different thresholds. The true positive rate refers to the proportion of positive samples correctly predicted by the model, and the false positive rate refers to the proportion of positive samples incorrectly predicted by the model. The curve area loss value of the second sub-model is calculated based on the two-dimensional curve. The value of the area under the curve (Area Under the ROCCurve, AUC) ranges from 0.5 to 1. When the area under the curve value is 0.5, it means that the prediction ability of the second sub-model is the same as random guessing. When the area under the curve value is 1, it means that the second sub-model perfectly predicts positive and negative samples under all possible thresholds. It is used to evaluate the ability of the second sub-model to distinguish between user clicks and non-clicks. The loss value of the second sub-model can be achieved using formula (12), which is explained in detail below.

[0141]

[0142] in, is the calculation function of the area under the curve, L 点击率损失 is the loss value of the second sub-model, y is the actual click probability, It is the predicted click probability. There is some label data in the sample information. The supervised loss of the second sub-model is determined according to the curve area loss value between the predicted click probability and the actual click probability.

[0143] For example, the second sub-model is a recommendation model that combines unsupervised learning and supervised learning. The global graph representation is obtained by encoding the entire sample data set in the second sub-model, and the local graph representation is obtained by encoding a portion of the sample data set in the second sub-model. The second sub-model is used to predict the click probability based on the global graph representation and the local graph representation. The unsupervised learning loss of the second sub-model is determined based on the mutual information between the global graph representation and the local graph representation. The global graph representation and the local graph representation are obtained by inputting the interaction relationship network graph, node embedding representation, and edge embedding representation into the third sub-model. Based on the updated node representation and node degree information, a scaler is used for adjustment, and the degree of each node is counted to obtain the adjusted node degree result. The same aggregator and scaler as in the first sub-model are used to maximize the mutual information between the global graph representation and the local graph representation. Mutual information maximization is an unsupervised learning process, and the same optimized graph representation is obtained. The unsupervised learning loss of the unsupervised learning is determined (see Formula 8). The unsupervised and supervised losses of the second sub-model are weighted and combined to determine the loss value of the second sub-model. This can be achieved using Formula (13), which is explained in detail below.

[0144] L 第三损失 =λ·L 无监督 +(1-λ)·L 监督 (13)

[0145] Among them, λ is the weight coefficient of unsupervised loss and supervised learning loss, L 无监督 is the unsupervised learning loss of the second sub-model (i.e., L 第一交叉熵损失 ), L 监督 is the supervised learning loss of the second sub-model (i.e., L 点击率损失 ), L 第三损失 is the loss value of the second sub-model.

[0146] In an embodiment of the present application, by combining the losses of supervised learning and unsupervised learning, the loss value of the second sub-model of the model is determined, and while maintaining the interactive information network structure, a more accurate information feature relationship is obtained, and the labeled recommendation information features and the unlabeled recommendation information features are integrated, so that the basis for predicting the information interaction probability is more comprehensive, thereby improving the accuracy of the interaction probability prediction.

[0147] Continue to see Figure 3A In step 303, character correction processing is performed on the predicted recommendation information to obtain corrected predicted recommendation information.

[0148] Exemplarily, the character correction process is implemented by a model. The model includes a first sub-model and a second sub-model for determining predicted recommendation information. The character correction process is implemented by a third sub-model of the model. The third sub-model is a large language model, and the corrected predicted recommendation information is obtained through the large language model. The large language model is a pre-trained language model that understands and generates text by encoding and transforming individual characters, and can directly process raw text data without relying on a predefined vocabulary. Different from traditional word- or sub-word-based models, character-level models directly process the characters in the text and can capture deeper structures and patterns of the language.

[0149] In some embodiments, step 303 can be implemented by the following method: encoding the predicted recommendation information to obtain a second encoded feature; detecting the second encoded feature to obtain the character vacancy position of the predicted recommendation information; performing character prediction on the second encoded feature to obtain predicted characters; and filling the character vacancy position of the predicted recommendation information based on the predicted characters to obtain the corrected predicted recommendation information.

[0150] Exemplarily, the third sub-model encodes the predicted recommendation information, converts the characters of the information copy in the predicted civil engineering information into embedding vectors, obtains the context relationship of the character embedding vectors, and performs random masking to obtain the second encoded feature and the masked characters. Masking is a data preprocessing technique commonly used in natural language processing tasks. During the pre-training of the model, masking replaces or marks certain parts of the input data with specific symbols so that the model can learn how to predict these masked parts based on the context. Detecting the second encoded feature to obtain the position of the character vacancy, and performing character prediction on the second encoded feature through the third sub-model, and filling the character vacancy position based on the predicted characters to obtain the corrected predicted recommendation information. For example: the input copy is ["new", "model", "[MASK]", "machine", "release"], and "[MASK]" is the character masked by the mask.

[0151] In step 304, according to the edit distance between the corrected predicted recommendation information and the actual recommendation information, the second loss value is calculated.

[0152] Exemplarily, calculate the edit distance between the corrected predicted recommendation information and the actual recommendation information, and determine the cross-entropy loss of the second sub-model as the second loss value. It can be implemented by formula (11), which is specifically described below.

[0153]

[0154] where, L 第二损失 is the second loss value of the model, y ij is the masked character (i.e., the actual recommendation information), pij is the character prediction result (i.e. the corrected prediction recommendation information), log(p ij ) is the logarithmic operation of the character prediction results, N is the number of samples, and C is the number of characters.

[0155] In an embodiment of the present application, by randomly masking the recommended data features, a second information feature and the masked characters are obtained, and character prediction is performed on the second information feature through a second sub-model to obtain a character prediction result. The cross-entropy loss between the character prediction result and the masked characters is calculated to determine the second value. This allows for spelling checking of the characters in the text of the recommended data features, corrections to be made at the character level, providing more accurate recommendation information, and improving the degree of acceptance of the recommended information by the users to be recommended.

[0156] Continue to see Figure 3A , in step 305, the model is trained based on the first loss value and the second loss value.

[0157] For example, the first loss value includes the loss of the first sub-model and the loss of the second sub-model, the second loss value includes the loss of the third sub-model, the loss functions of the three sub-models are fused to determine the total loss of the model, and the model is trained based on the total loss.

[0158] In some embodiments, step 305 can be implemented by the following method: performing linear conversion processing on the cross entropy loss value, the curve area loss value and the second loss value to obtain a total loss value; based on the total loss value, updating the parameters of the model through back propagation processing to obtain a trained model.

[0159] For example, the first loss value includes: cross entropy loss value and curve area loss value, that is, the first loss value is L 第一损失 and L 第三损失 , the second loss value is L 第二损失 , the total loss function of the model can be implemented by formula (14), which is explained in detail below.

[0160] L 联合损失函数 =α·L 第一损失 +β·L 第二损失 +γ·L 第三损失 (14)

[0161] Among them, α, β and γ are the weights corresponding to the loss function of each sub-model, L 联合损失函数 It is the total loss function of the model. The model is trained by minimizing the total loss function.

[0162] In some embodiments, the present application also provides an information recommendation method, see Figure 3C , Figure 3CThis is a first flow chart of the information recommendation method provided by the embodiment of the present application, which will be combined with Figure 3C Steps 311 to 315 are shown for explanation. Figure 3C The executive body is Figure 1 Server 200 in.

[0163] In step 311 , feature extraction processing is performed on the user data and the recommendation information set respectively to obtain the second object feature of the user and the second information feature of each recommendation information.

[0164] In this example, feature extraction processing is implemented through a machine learning model. The machine learning model is used to perform feature extraction processing on user data and recommendation information sets respectively to obtain the user's second object feature and the second information feature of each recommendation information. The feature extraction principle is the same as step 3011 and will not be repeated here.

[0165] In step 312 , based on the second object feature and each second information feature, the predicted click probability corresponding to each recommended information is determined, and the first recommended information is selected from the recommended information set according to the predicted click probability.

[0166] For example, based on the second object feature and each second information feature, the first sub-model is called to perform click prediction to obtain the predicted click probability corresponding to each recommended information, and the first recommended information is selected from the recommended information set according to the predicted click probability. The principles of click prediction and selection of the first recommended information are the same as step 3013 and will not be repeated here.

[0167] In step 313 , based on the second object feature and each second information feature, a second similarity between the user and each recommended information is determined, and second recommended information is selected from the recommended information set according to the second similarity.

[0168] For example, based on the second object feature and each second information feature, the second sub-model is called to determine the second similarity between the recommended information. The similarity determination and the second recommended information selection principles are the same as step 3013 and will not be repeated here.

[0169] In step 314 , the first recommendation information and the second recommendation information are corrected to obtain third recommendation information.

[0170] For example, the third sub-model is called to perform character correction on the first recommendation information and the second recommendation information to obtain the third recommendation information. The principle of the third sub-model performing character correction is the same as that in step 303 and will not be repeated here.

[0171] In step 315 , the third recommendation information is recommended to the user.

[0172] For example, the third recommendation information is information obtained by integrating the first recommendation information and the second recommendation information, and the revised third recommendation information is recommended to the user.

[0173] In some embodiments, see Figure 3D , Figure 3D This is a second flow chart of the information recommendation method provided in an embodiment of the present application. Figure 3C Step 315 in the Figure 3D Steps 3151 to 3153 in the above embodiment implement the selection of the third recommended information, which will be described in detail below.

[0174] In step 3151, the third recommendation information is deduplicated to obtain fourth recommendation information.

[0175] For example, the first recommendation information and the second recommendation information are integrated to obtain the third recommendation information, the third recommendation information is deduplicated, the cosine similarity between the recommendation data features in the first recommendation information and the second recommendation information is calculated, and the fourth recommendation information that is most relevant is generated for each user to be recommended based on the similarity sorting. This can be achieved by formula (15), which is described in detail below.

[0176] Recommended ads = TopN similarity (h 用户 ,h 信息 ) (15)

[0177] Among them, h 用户 is the node feature representation of the user, h 信息 is the node feature representation of information, Top is the function with high similarity ranking, and N is the number of samples.

[0178] In step 3152, a linear operation is performed based on the predicted click probability, the second similarity, and the character correction label value of the fourth recommendation information to obtain a recommendation index for the fourth recommendation information.

[0179] Here, if the fourth recommended information is not the predicted first recommended information, the predicted click probability of the fourth recommended information is zero; if the fourth recommended information is not the predicted second recommended information, the second similarity of the fourth recommended information is zero; if the fourth recommended information does not contain the corrected characters, the character correction label value of the fourth recommended information is zero.

[0180] For example, linear operations are performed based on the predicted click probability, the second similarity and the character correction label value of the fourth recommended information, the prediction results of the three sub-models are combined, and the results of the recommended information list are summarized using weighted voting to obtain the recommendation index of the fourth recommended information.

[0181] In some embodiments, step 3152 can be implemented by the following method: determining the weight value corresponding to the character correction label value; performing linear operation processing based on the predicted click probability, the second similarity and the weight value corresponding to the character correction label value of the fourth recommendation information to obtain the recommendation index of the fourth recommendation information.

[0182] For example, the weight value corresponding to the character correction label value is determined, and the weighted sum of the results predicted by each sub-model is performed according to the weights corresponding to the three sub-models. This can be achieved by formula (17), which is described in detail below.

[0183] Final recommendation = Vote(prediction result 1, prediction result 2, ..., prediction result n) (17)

[0184] Among them, Vote is the weighted voting function, n is the number of samples of the prediction result, and different weights are assigned to the prediction results of each sub-model, and voting is performed based on the weighted sum result.

[0185] For example, assume that the predictions of models M1, M2, and M3 are 1, 0, and 1, with corresponding weights of 0.5, 0.3, and 0.2, respectively. The votes for each category are weighted and accumulated: Category 1's weighted score is M1(0.5) + M3(0.2) = 0.7, and Category 0's weighted score is M2(0.3). Category 1, with the highest weighted score, is selected as the final prediction, i.e., the recommendation indicator for the fourth recommendation information. The voting rules are adjusted based on the actual results.

[0186] In step 3153, at least one fourth recommendation information is selected according to the recommendation indicator, and the selected fourth recommendation information is recommended to the user.

[0187] For example, at least one fourth recommendation information is selected based on the recommendation index, the selected fourth recommendation information integrates the prediction results of the three sub-models, and the weight is adjusted according to the actual effect, and the selected fourth recommendation information is recommended to the user to improve the accuracy of the final recommendation information.

[0188] In some embodiments, after step 3153, the third loss value of the model is also determined based on the cross entropy loss between the fourth recommendation information and the actual recommendation information list. The total loss function of the model is determined based on the first loss value, the second loss value and the third loss value. This can be achieved by formula (18), which is described in detail below.

[0189] L 优化联合损失函数 =λ1L 联合损失函数 +λ2L 投票损失函数 (18)

[0190] Among them, λ1 and λ2 are preset weights, λ1 and λ2 can be set to 0.5, L 优化联合损失函数is the total loss function of the model, L 联合损失函数 It is the combination of the first loss value and the second loss value, L 投票损失函数 is the third loss value.

[0191] For example: the voting rule is {"Model 1": 0.4, "Model 2": 0.6}, the third loss value is determined according to the voting rule, and the final recommended interaction probability is [0.68, 0.32] according to the preset weights. The fourth recommendation information recommended to the user to be recommended is determined based on the final recommendation probability.

[0192] For example, based on the changes between the first and second encoding features during the training of the three sub-models, the model can adaptively adjust the model's hierarchical structure and adjust the number of layers based on the gradient size and loss changes of the real-time feedback of the sub-model training. For example, when the gradient change is small, the number of backpropagation layers is reduced, and the size of the gradient is checked to determine whether to skip backpropagation of some layers. For example, the number of layers of the input adaptive layer and the ad recommendation features are selected to dynamically determine the layers that need backpropagation. Through local backpropagation, only the parameters of the selected layers are updated. The adjustment of the number of layers can be achieved using formula (16), which is explained in detail below.

[0193]

[0194] Among them, ∈ is the preset parameter threshold, W i is the parameter of the i-th layer, L is the loss function of the i-th layer, is the operator for finding partial derivatives, Representation loss function L with respect to variable W i For example, if the initial number of layers is set to 5 (assuming the initial number of layers), and the layer adjustment strategy is defined as adjusting the number of layers based on the gradient size and rate of change, {"Initial number of layers": 5, "Layer adjustment strategy": {"Gradient threshold": 0.001, "Adjustment factor": 0.1}}, the number of defined layers is adjusted based on the adjustment factor and gradient threshold.

[0195] In some embodiments, see Figure 5A , Figure 5A This is a schematic diagram of the adaptive hierarchical structure provided in an embodiment of the present application. The adaptive layer structure 501 includes a feature selection and adjustment layer 5011, a feature fusion layer 5012, an adaptive adjustment layer 5013 and a voting mechanism layer 5014. The voting mechanism layer 5014 generates the final prediction result, i.e., the final recommendation information list, by voting and weighting the output results of different sub-models.

[0196] In the embodiment of the present application, by cleaning, feature extraction and encoding the information recommendation data, the recommended information features obtained are more accurate, the interference of noise and outliers is reduced, the model training is more efficient, and the standardization process helps the convergence and optimization of the model. The cross entropy loss of the first loss value of the first sub-model is determined by the contrast learning method, which promotes the first sub-model to learn a more discriminative feature representation, making the features of similar samples closer and the features of different samples more separated, independent of label information, and increasing the flexibility of the model learning features. By randomly masking the recommended data features and determining the second loss value through character prediction by the third sub-model, the characters in the text of the recommended data features can be spell-checked and corrected at the character level, providing more accurate recommendation information and improving the acceptance of the recommended information by the users to be recommended. By combining the losses of supervised learning and unsupervised learning, the curve area loss of the second sub-model of the model is determined. While maintaining the interactive information network structure, a more accurate information feature relationship is obtained, and the labeled recommendation information features and the unlabeled recommendation information features are integrated, so that the model has a more comprehensive basis for predicting the click probability, reducing the dependence on a large amount of labeled data and improving the generalization ability of the recommendation model. The total loss function of the model is determined by combining the loss functions of multiple sub-models to improve the accuracy of the model's predicted click probability. The information recommendation list results of multiple sub-models and the voting mechanism are combined to improve the accuracy of determining the final information recommendation list. The back propagation depth is reduced through adaptive layer adjustment and voting schemes, which reduces memory overhead, enabling the model to efficiently process large-scale data and optimize resource utilization.

[0197] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.

[0198] With the rapid development of the internet and the widespread adoption of mobile devices, users have access to more and more information channels, generating massive amounts of data daily. This makes it difficult for users to quickly find the content they truly need or are interested in. Information recommendation models analyze user behavior, preferences, and historical data to provide more precise information recommendations and better meet their needs. These models rely on large amounts of user and information data. With the surge in the number of internet users, information formats have become increasingly diverse. This diversity and extensive coverage require more accurate and efficient information recommendations. By analyzing the relationship between user and information data, information recommendation models can better understand user preferences and behavior patterns, thereby providing personalized information recommendations. However, user and information data come from diverse sources, user behavior changes over time, and the data features differ in structure and are highly dimensional, making effective integration difficult.

[0199] Related technologies rely on labeled data and are unable to extract valid information from unlabeled data. This makes it difficult to adapt to the dynamic changes in user preferences, impacting the scalability of information recommendation models and, in turn, user acceptance and interaction with recommended information. Training information recommendation models on large-scale data is computationally demanding, inefficient, and memory-intensive. Related technologies perform spellchecking on information data at the word level and are unable to address character-level errors. This results in inaccurate recommended text, impacting user acceptance and interaction with recommended information.

[0200] The embodiment of the present application constructs a multi-model information recommendation model, which includes three sub-models. The first sub-model establishes an interactive network between users and information based on the recommended data features, and determines the loss function of the first sub-model based on the interactive network by maintaining the structure of the interactive network. The recommended data features are then predicted by the second sub-model, and character errors are corrected. The loss function of the second sub-model is determined based on the character prediction results. The third sub-model predicts the recommended data features, obtains the recommendation probability, and determines the loss function of the third sub-model. The loss functions of the three sub-models are aggregated to obtain the joint loss function of the information recommendation model. The information recommendation model is trained based on the joint loss function, and information recommendation is performed through the trained information recommendation model to enhance the accuracy of information recommendation and the reliability of information copy, thereby improving the user interaction probability.

[0201] The embodiment of the present application uses an advertising recommendation scenario as an example to illustrate the training method of the information recommendation model. Advertising recommendation is one of the core technologies in the online advertising industry. It relies on large-scale user and advertising data. The information recommendation model is trained with user and advertising data, and advertising recommendations are made using the trained information recommendation model, thereby enhancing the accuracy of advertising recommendations and the reliability of advertising copy, and increasing the probability of user advertising interaction.

[0202] The following is a description with reference to the accompanying drawings. Figure 4 , Figure 4 This is a third flow chart of the training method of the model provided in the embodiment of the present application. The execution subject can be a terminal device, a server, or a combination of the two. The embodiment of the present application takes the server as the execution subject as an example. Figure 4 The steps shown are explained in detail.

[0203] In step 401, feature encoding is performed on information recommendation data to obtain recommendation data features.

[0204] For example, data for recommending information to the user to be recommended is obtained. In an embodiment of the present application, the information recommendation data may be advertising recommendation data, including user behavior data, advertising information, user information, and environmental data. User behavior data is the record data corresponding to the behaviors of the user to be recommended, such as clicks, browsing, and purchases; advertising information is the content, category, and delivery time of the advertisement; user information is the user's personal information and interest tags; and environmental data is the current time, geographic location, and device information. Data cleaning is performed on the advertising recommendation data. Data cleaning improves data quality by identifying and correcting errors in the data. Missing values ​​in the advertising recommendation data are processed using methods such as mean filling and deletion of missing data. Outliers in the advertising recommendation data are detected and processed. Feature extraction is performed on the cleaned data. Features are extracted from the original data. Unique hot encoding is used for the category features in the original data. A binary column vector is created for each category, where the value corresponding to the category is 1 and the rest are 0. The numerical features are processed using standardization to obtain the recommendation data features of the advertising information.

[0205] In step 402, an interaction network is constructed by calling a first sub-model of an information recommendation model based on the recommendation data features, and a first loss function is determined based on the interaction network.

[0206] In this example, the first sub-model of the information recommendation model is invoked based on the recommended data features to construct an interaction network. The first sub-model is a graph neural network model. The recommended data features include user features, ad features, and interaction features. The interaction relationship between users and ads is extracted from the recommended data features. The interaction network is constructed based on the relationship between user nodes and ad nodes. Based on the structure in the graph neural network, the graph-level representation and sub-structure representation corresponding to the interaction network are determined. The sub-structure representation is a representation of the generated node, edge, and triangle structure.

[0207] For example, the first sub-model uses first-order proximity and second-order proximity to encode representations of nodes in the interaction network. The first-order proximity focuses on the immediate neighbors of a node, and through neighbor aggregation and node degree scaling, it aggregates information from the immediate neighbors of a node to generate a local representation of each node.

[0208] Obtain the direct neighbors of each node. Direct neighbors are nodes with which the node has a direct edge. Aggregate the direct neighbor information. Neighbor aggregation can be performed using mean aggregation, sum aggregation, or maximum aggregation. Sum aggregation takes the sum of neighbor node features, while maximum aggregation takes the maximum value of neighbor node features. Mean aggregation can be implemented using formula (1), which is described in detail below.

[0209]

[0210] Among them, hv(k+1) is the representation of node v at the k+1th layer, N(v) is the set of neighbor nodes of v, and W (k) is the weight matrix of the kth layer, is the node representation of node u in the kth layer, and σ is the activation function.

[0211] After aggregating neighbor information, the node degree is scaled. The node degree is the number of edges directly connected to the node. Common degree scalers use the inverse of the node degree or the square root of the degree. The degree scaler adjusts the scale of node features so that the features of nodes of different degrees are aggregated on the same scale. A nonlinear activation function is then used to generate a new node representation. The nonlinear activation function can be a multilayer perceptron. A multilayer perceptron (MLP) is a feedforward neural network consisting of at least three layers: an input layer, one or more hidden layers, and an output layer. Each layer consists of multiple neurons. Each neuron receives input from all neurons in the previous layer and generates an output, which is passed to the next layer.

[0212] The aggregated and scaled features are used as the input to the multilayer perceptron, which then performs forward propagation. The multilayer perceptron multiplies the input features by the weight matrix, adds a bias term, and applies an activation function for nonlinear transformation. The above steps are repeated for the multilayer perceptron, and each layer may have a different weight matrix, bias term, and activation function. Finally, the output layer of the multilayer perceptron generates a new node representation for further graph analysis, classification, or regression tasks. Node representation maps each node in the graph to a vector in a high-dimensional space. These vectors typically contain rich information, which can be node attributes, features, or implicit representations learned through learning.

[0213] For example, the second-order proximity focuses on the neighbors of the node's direct neighbors, capturing the global structure of the interaction network. Through the deep walker learning method, the information of the global structure is utilized to generate a global representation of each node.

[0214] The structural information of the interaction network is converted into low-dimensional node embeddings. A node sequence is generated through random walks, which start from a node and randomly walk along edges. The generated node sequence is then applied to unsupervised learning methods to generate node embeddings. The generated node embeddings reflect the position and relationship of the nodes in the global graph structure. Unsupervised learning methods can include models that generate word vectors (such as the Word2Vec model). This model is a popular natural language processing technique that learns vector representations of words by training neural networks to capture the semantic and syntactic relationships between words.

[0215] For example, the node embedding representations of the first-order proximity and the second-order proximity are concatenated to generate a combined representation of the node, which can be achieved by formula (2), as described in detail below.

[0216] hv=[hv(1),hv(2)] (2)

[0217] Here, hv(1) is the embedding generated by the first-order proximity, and hv(2) is the embedding generated by the second-order proximity.

[0218] For example, the graph-level representation and substructure representation corresponding to the interaction network are determined based on the node representation. The graph-level representation is generated by the graph neural network by summing the nodes. The substructure representation includes node representation, edge representation, and triangle representation. The node representation uses the graph neural network to calculate the representation of each node. By combining the first-order and second-order proximity of the above formula (2), it can be achieved through formula (3), which is explained in detail below.

[0219] hv=GNN(X,A) (3)

[0220] Among them, X is the node feature, A is the node adjacency matrix, and GNN(X,A) is the graph neural network model.

[0221] The edge representation is generated by the representation of the nodes at its two ends, which can be achieved by formula (4), as described in detail below.

[0222] h(u,v)=f(hu,hv) (4)

[0223] Among them, f(hu,hv) is a connection merging function, and u and v are the two end nodes of the edge connection.

[0224] The triangle representation is generated by the three nodes that make up the triangle, which can be achieved by formula (5), as described in detail below.

[0225] h(u,v,w)=g(hu,hv,hw) (5)

[0226] Among them, g(hu,hv,hw) is a connection merging function, and u, v and w are the three nodes that make up the triangle.

[0227] For example, after determining the graph-level representation and substructure representation based on the interaction network, the contrastive learning method is used to maximize the mutual information between the graph-level representation and the substructure representation. Mutual information is a measure of the mutual dependence between the graph-level representation and the substructure representation. Contrastive learning is an unsupervised or self-supervised learning method that learns effective representations of data by comparing pairs of data samples. In contrastive learning, positive sample pairs are usually similar samples, while negative sample pairs are different samples. The goal is to optimize the representation by maximizing the similarity of positive sample pairs and minimizing the similarity of negative sample pairs, so that the representation can capture the key information and structure in the data. In the embodiment of the present application, the positive sample pair is composed of a graph representation and its corresponding substructure representation, which can be achieved by formula (6), which is described in detail below.

[0228] Positive sample pair = (hG,hv), v∈G (6)

[0229] Among them, hG is the graph-level representation and hv is the corresponding substructure representation.

[0230] In the embodiment of the present application, the negative sample pair is composed of a graph representation and a random substructure representation, which can be implemented by formula (7), which is described in detail below.

[0231] Negative sample pair = (hG, hu), u∈ / G (7)

[0232] Among them, hG is the graph-level representation and hu is the random substructure representation.

[0233] The mutual information loss function of the first sub-model is determined based on the positive sample pairs and the negative sample pairs. As the first loss function, it can be expressed by formula (8), which is described in detail below.

[0234]

[0235] Among them, sim is the cosine similarity, exp(x) represents e to the power of x, and x can be any real number.

[0236] The joint optimization of the first-order proximity and second-order proximity losses to achieve the joint update of node representation can be achieved through formula (9), which is explained in detail below.

[0237] L=L 一阶 +L 二阶 (9)

[0238] Among them, L 一阶 is the first-order proximity loss, L 二阶It is the loss of second-order proximity. The first-order proximity loss and the second-order proximity loss are determined based on the cosine similarity between nodes. By jointly optimizing the first-order and second-order proximity losses, it is ensured that the graph neural network model learns node representations while preserving the local and global structures.

[0239] Exemplarily, calculate the difference value between the predicted advertisement interaction probability and the actual interaction probability, and determine the first cross-entropy loss function of the first sub-model, which can be implemented by formula (10), and the following is a specific description.

[0240]

[0241] where, y i is the predicted advertisement interaction probability, p i is the actual advertisement interaction probability, N is the number of samples, log(p i ) is the logarithmic operation of the actual recommendation probability, log(1 - p i ) is the logarithmic operation of the non-click prediction probability. In the embodiments of the present application, the information interaction probability can be the advertisement click probability or the conversion probability, for example: the purchase probability, the order placement probability.

[0242] In step 403, based on the recommendation data features, call the second sub-model of the information recommendation model to perform character prediction, obtain the character prediction result, and determine the second loss function based on the character prediction result.

[0243] Exemplarily, based on the advertisement recommendation features, call the second sub-model of the information recommendation model to perform character prediction, obtain the character prediction result. The second sub-model is a character-level language model, predict the cross-entropy loss between the character prediction result and the actual character, and take the cross-entropy loss as the second loss function.

[0244] Exemplarily, based on the advertisement copy data in the recommendation data features, convert the characters in the advertisement copy data into embedding vectors by calling the embedding layer in the language model, capture the context relationship of the embedding vectors through the encoder layer, and output the per-character prediction result. Use the character prediction result and the actual character to train the language model, and train the second sub-model to infer the masked segment by randomly masking segments in the advertisement copy, and learn the expression features. Masking is a data preprocessing technique commonly used in natural language processing tasks. During the pre-training of the model, masking replaces or marks some parts of the input data with specific symbols so that the model can learn how to predict these masked parts according to the context. For example: the input copy ["new", "model", "[MASK]", "phone", "release"], and "[MASK]" is the character masked by the mask.

[0245] The character at the mask position is predicted based on the context, and the difference between the character-by-character prediction and the actual character is calculated using the cross entropy loss to determine the second loss function, which can be implemented by formula (11), as described in detail below.

[0246]

[0247] Among them, y ij is the actual character value, p ij is the predicted character value, N is the number of samples, C is the number of characters, log(p ij ) is the logarithm operation of the predicted character value.

[0248] In step 404, the third sub-model of the information recommendation model is called to perform prediction based on the recommendation data features to obtain the predicted information interaction probability, and the third loss function is determined based on the information interaction probability.

[0249] For example, based on the recommended data features, the third sub-model of the information recommendation model is called for prediction to obtain the predicted information interaction probability. The third sub-model is a recommendation model that combines unsupervised and supervised. In an embodiment of the present application, the information interaction probability can be an advertisement click probability or a conversion probability, such as a purchase probability or an order probability. The third loss function of the recommendation model is determined based on the predicted information interaction probability and the actual information interaction probability. The interaction network, node embedding representation, and edge embedding representation are input into the third sub-model. The node embedding representation is aggregated using multiple aggregators. Different types of neighbor information are combined to generate a new node representation. The new node representation integrates the features of neighbor nodes and edges. Based on the updated node representation and node degree information, a scaler is used for adjustment, and the degree of each node is counted to obtain the result after node degree adjustment. Using the same aggregator and scaler as in the first sub-model, the same graph-level representation and substructure representation mutual information maximization process is performed. Mutual information maximization is an unsupervised learning process. The same optimized graph representation is obtained, and the same unsupervised loss function as the graph neural network is determined (refer to Formula 8). The graph-level representation and substructure are used to predict the advertisements to be recommended.

[0250] For example, based on the optimized graph representation, the third sub-model is called for prediction processing, outputting the predicted information interaction probability. The interaction probability is evaluated using the area under the ROC Curve (AUC). The AUC evaluates the recommendation model by plotting the relationship between the true positive rate and the false positive rate at different thresholds. The true positive rate refers to the proportion of positive samples correctly predicted by the model, and the false positive rate refers to the proportion of positive samples incorrectly predicted by the model. The AUC value ranges from 0.5 to 1. When the AUC value is 0.5, it means that the model's prediction ability is the same as random guessing. When the AUC value is 1, it means that the third sub-model perfectly predicts positive and negative samples at all possible thresholds. This is used to evaluate the third sub-model's ability to distinguish between user clicks and non-clicks. The interaction probability loss function can be implemented using Formula (12), which is explained in detail below.

[0251]

[0252] in, is the calculation function of the area under the curve, y is the actual information interaction probability, It predicts the probability of information interaction. There are some label data in the recommended data features. For example, the label of the ad clicked by the user is 1, and the label of the ad not clicked by the user is 0. Classification processing is performed based on the label data. According to the difference between the predicted classification result and the actual label data, the click-through rate loss function is determined as supervised loss.

[0253] For example, optimizing the graph representation by maximizing mutual information is an unsupervised method, predicting the probability of advertising interaction is a supervised method, and the third sub-model jointly optimizes the supervised method and the unsupervised method to determine the third loss function of the third sub-model, which can be implemented by formula (13), which is explained in detail below.

[0254] L 第三损失 =λ·L 无监督 +(1-λ)·L 监督 (13)

[0255] Among them, λ is the weight coefficient of unsupervised and supervised learning loss, L 无监督 is the unsupervised learning loss (i.e. L 第一交叉熵损失 ), L 监督 is the supervised learning loss (i.e. L 点击率损失 ).

[0256] In step 405 , a joint loss function of the information recommendation model is determined based on the first loss function, the second loss function, and the third loss function.

[0257] For example, the three sub-models in the information recommendation model are independently trained based on the first loss function, the second loss function and the third loss function, the optimal weight of the loss function of each sub-model after training is maintained, the three loss functions are fused, and the joint loss function of the information recommendation model is determined. This can be achieved by formula (14), which is explained in detail below.

[0258] L 联合损失函数 =α·L 第一损失 +β·L 第二损失 +γ·L 第三损失 (14)

[0259] Among them, α, β, and γ are the weights corresponding to the loss function of each sub-model. The information recommendation model is trained by minimizing the joint loss function.

[0260] In step 406, the information recommendation model is trained based on the joint loss function to obtain a trained information recommendation model, and the trained information recommendation model is called to obtain an information recommendation information list.

[0261] For example, the information recommendation model is trained based on the joint loss function to obtain a trained information recommendation model. The trained information recommendation model is then called for model inference. The difference between the prediction results of the information recommendation model is calculated to obtain an advertising recommendation information list. The features of the user node and the advertising node are extracted, the cosine similarity between the features is calculated, and the features are sorted according to the similarity to generate the most relevant advertising recommendation information list for each user. This can be achieved using formula (15), as described below.

[0262] Recommended ads = TopN similarity (h 用户 ,h 信息 ) (15)

[0263] Among them, h 用户 is the node feature representation of the user, h 信息 is the node feature representation of information, Top is the function with high similarity ranking, and N is the number of samples.

[0264] For example, based on the changes between user features and the information features of the recommended information during sub-model training, the information recommendation model adaptively adjusts the model's hierarchical structure and adjusts the number of layers based on the gradient size and loss changes in real-time feedback from model training. During training, the number of layers is automatically adjusted based on model performance. For example, when the gradient change is small, the number of backpropagation layers is reduced. The size of the gradient is checked to determine whether to skip backpropagation for some layers. For example, the number of layers in the input adaptive layer and the ad recommendation features are selected, and the layers that require backpropagation are dynamically determined. Through local backpropagation, only the parameters of the selected layers are updated. {"Selected number of training layers": 3, "Updated parameter layers": ["Layer 1", "Layer 2", "Layer 3"]}.

[0265] The number of layers can be adjusted using formula (16), which is described in detail below.

[0266]

[0267] Among them, ∈ is the preset parameter threshold, W i is the parameter of the i-th layer, L is the loss function of the i-th layer, is the operator for finding partial derivatives, Representation loss function L with respect to variable W i For example, if the initial number of layers is set to 5 (assuming the initial number of layers), and the layer adjustment strategy is defined as adjusting the number of layers based on the gradient size and rate of change, {"Initial number of layers": 5, "Layer adjustment strategy": {"Gradient threshold": 0.001, "Adjustment factor": 0.1}}, the number of defined layers is adjusted based on the adjustment factor and gradient threshold.

[0268] In some embodiments, see Figure 5A , Figure 5A : This is a schematic diagram of the adaptive hierarchical structure provided by an embodiment of the present application. The adaptive layer structure 501 includes a feature selection and adjustment layer 5011, a feature fusion layer 5012, an adaptive adjustment layer 5013 and a voting mechanism layer 5014. The feature selection and adjustment layer 5011 is used to select information with high similarity from features input from different sources and adjust its dimensions so that these features adapt to the input requirements of subsequent models. The feature fusion layer 5012 fuses the feature vectors output from each model. The adaptive adjustment layer 5013 dynamically adjusts the weights of each model and adaptively learns the importance of the outputs of different models. The first sub-model outputs the relationship features between the user and the information, and passes them to the adaptive layer structure 501. The second sub-model generates corrected text features through character inspection and also passes them to the adaptive layer structure 501. The third sub-model can combine the features of other sub-models to predict the probability of information interaction.

[0269] The voting mechanism layer 5014 generates the final prediction results by voting and weighting the output results of different sub-models. After generating the relevant information recommendation list, the information recommendation model combines the prediction results of multiple sub-models and makes the final recommendation through the voting mechanism. The prediction results of multiple sub-models are combined and weighted voting is used to summarize the prediction results to generate the final recommendation information list. This can be achieved using formula (17), which is explained in detail below.

[0270] Final recommendation = Vote(prediction result 1, prediction result 2, ..., prediction result n) (17)

[0271] Among them, Vote is the weighted voting function, n is the number of samples of the prediction result, different weights are assigned to the prediction results of each model, and voting is performed based on the weighted sum result.

[0272] For example, assume that the predictions of models M1, M2, and M3 are 1, 0, and 1, with corresponding weights of 0.5, 0.3, and 0.2, respectively. The votes for each category are weighted and accumulated: Category 1's weighted score is M1(0.5) + M3(0.2) = 0.7, and Category 0's weighted score is M2(0.3). Category 1, with the highest weighted score, is selected as the final prediction. The voting rules are adjusted based on actual results to improve the accuracy of the final recommendation.

[0273] The following is an explanation based on the specific data in the advertising recommendation scenario. Figure 6 , Figure 6 This is a third flow chart of the training method of the model provided in the embodiment of the present application; the training method of the information recommendation model of the present application can also be performed by Figure 6 Steps 601 to 607 in the embodiment are implemented as described below.

[0274] In step 601, information recommendation data is obtained.

[0275] For example, data for information recommendation for the user to be recommended is obtained, including user behavior data, advertisement information, user information, and environment data, and the advertisement recommendation data is cleaned. The information recommendation data and data cleaning process are the same as those in step 401 and will not be repeated here.

[0276] For example, the cleaned user data can be [{"User ID":1,"Age":25,"Gender":"Male","Location":"Province B"},{"User ID":2,"Age":30,"Gender":"Female","Location":"Province S"}];

[0277] The cleaned advertising data can be [{"advertisement ID":101,"content":"new mobile phone","category":"electronic products"},{"advertisement ID":102,"content":"fashion clothing","category":"clothing"}];

[0278] The cleaned interaction data can be [{"user ID": 1, "advertisement ID": 101, "click": 1}, {"user ID": 2, "advertisement ID": 102, "click": 0}], where a click label of 1 indicates that the ad was clicked, and a click label of 0 indicates that the ad was not clicked.

[0279] In step 602, the information recommendation data is preprocessed.

[0280] For example, feature extraction is performed on the cleaned user, advertisement, and interaction data, a feature matrix of user features and advertisement features is output, and the feature matrix is ​​standardized to obtain a standardized feature matrix.

[0281] For example: user features after cleaning": [{"userID":1,"age":25,"gender_male":1,"gender_female":0,"location_Province_B":1,"location_Province_S":0},{"userID":2,"age":30,"gender_male":0,"gender_female":1,"location_Province_B":0,"location_Province_S":1}];

[0282] Cleaned ad features: [{"ad ID":101,"category_electronics":1,"category_clothing":0},{"ad ID":102,"category_electronics":0,"category_clothing":1}];

[0283] Cleaned interaction features: [{"user ID":1,"advertisement ID":101,"click":1},{"user ID":2,"advertisement ID":102,"click":0}].

[0284] The cleaned features are standardized to obtain the standardized feature matrix:

[0285] NormalizedUserFeatures": [{"user_id":1,"age":0.0,"gender_male":1.0,"gender_female":0.0,"location_Province_B":1.0,"location_Province_S":0.0},{"user_id":2,"age":1.0,"gender_male":0.0,"gender_female":1.0,"location_Province_B":0.0,"location_Province_S":1.0}];

[0286] Normalized Ad Features": [{"ad_id":101,"category_electronics":1.0,"category_clothing":0.0},{"ad_id":102,"category_electronics":0.0,"category_clothing":1.0}].

[0287] In step 603, feature encoding is performed on the information recommendation data.

[0288] For example, feature encoding is performed on the information recommendation data, and one-hot encoding is used for the category features. A binary column vector is created for each category, where the value corresponding to the category is 1 and the rest are 0. The numerical features are processed using standardization. The implementation principle is the same as step 401 and will not be repeated here.

[0289] In step 604, a sub-model of the information recommendation model is determined and the sub-model is trained.

[0290] For example, the sub-models of the information recommendation model are determined to be a graph neural network model, a character-level language model, and a recommendation model, and the sub-models are trained. The specific sub-model training process is the same as the implementation principle in steps 402 to 404, and will not be repeated here.

[0291] In step 605, the loss function of each sub-model is determined.

[0292] For example, corresponding loss functions are determined for the three sub-models respectively to obtain the first loss function, the second loss function and the third loss function. The process of determining the loss function is the same as the implementation principle in steps 402 to 404, and will not be repeated here.

[0293] In step 606 , inference verification is performed on each trained sub-model.

[0294] For example, reasoning verification is performed on each trained sub-model, advertising recommendation features are input into the trained sub-model, and the output results of the sub-model are verified.

[0295] For example, if standardized user and ad features are input into the graph neural network, the input user features are [0.0, 1.0, 0.0, 1.0], and the input ad features are [1.0, 0.0, 0.05]}, the output predicted ad interaction probability is 0.78.

[0296] Repeat the model inference and validation process for multiple batches of data to determine the loss function values ​​and weight parameters for different batches and adjust the model parameters. For example, the input for batch training is [{"batch": 1, "loss": 0.28, "parameters": {"weight": [0.12, -0.03, ...], "bias": [0.05, -0.02, ...]}}, {"batch": 2, "loss": 0.24, "parameters": {"weight": [0.11, -0.025, ...], "bias": [0.04, -0.015, ...]}}].

[0297] In step 607, the final information recommendation list is determined through adaptive layer adjustment and voting mechanism.

[0298] For example, the adaptive layer is adjusted according to the loss function training process of the sub-model, the loss functions of the trained sub-models are combined to determine the joint loss function (such as the above formula 14), and then the loss of the voting mechanism is combined to further optimize the joint loss function. This can be achieved through formula (18), which is explained in detail below.

[0299] L 优化联合损失函数 =λ1L 联合损失函数 +λ2L 投票损失函数 (18)

[0300] Among them, λ1 and λ2 are preset weights, and λ1 and λ2 can be set to 0.5.

[0301] For example: the voting rule is {"Model 1": 0.4, "Model 2": 0.6}. The voting loss function is determined according to the voting rule and integrated with the joint loss function to determine the optimized joint loss function. The final recommendation result obtained according to the preset weights is [0.68, 0.32]. The list of advertising recommendation information recommended to the user to be recommended is determined based on the final advertising interaction probability.

[0302] The training method of the information recommendation model provided in the embodiments of the present application has the following beneficial effects:

[0303] This application encodes the features of advertising recommendation data to obtain advertising recommendation features. It then constructs an interactive network of user and advertising features based on a graph neural network model. Nodes are represented and updated through first-order and second-order proximity, enabling the acquisition of local and global features in the interactive network. It also processes high-dimensional heterogeneous data. Node features are aggregated and scaled through aggregators and scalers, dynamically updating the interactive network to adapt to user behavior that changes over time. Advertisement copy is checked based on a character-level language model. By learning ad copy character by character, spelling errors are identified and corrected to ensure copy accuracy, thereby increasing user acceptance and interaction probability. The recommendation model combines unsupervised and supervised losses to enhance its learning ability on unlabeled data, reduce its reliance on large amounts of labeled data, and improve its generalization. The overall loss function of the information recommendation model is determined by combining sub-model loss functions. The prediction results of multiple models and a voting mechanism are combined to improve the accuracy of determining the final ad recommendation information list. Reducing the backpropagation depth through adaptive layer adjustment and voting schemes can reduce memory overhead, enabling the information recommendation model to efficiently process large-scale data and optimize resource utilization.

[0304] The following continues to describe the exemplary structure of the model training device 455 provided in the embodiment of the present application as a software module. In some embodiments, such as Figure 2 As shown, the software modules in the model training device 455 stored in the memory 450 may include: a loss determination module 4551, used to select the predicted recommendation information of the sample user from the sample information set; calculate the first loss value based on the predicted recommendation information and the actual recommendation information of the sample user; perform character correction processing on the predicted recommendation information to obtain the corrected predicted recommendation information; calculate the second loss value based on the editing distance between the corrected predicted recommendation information and the actual recommendation information; a model training module 4552, used to train the model based on the first loss value and the second loss value.

[0305] In some embodiments, the loss determination module 4551 is also used to encode the sample user data and the sample information set of the sample user to obtain the first encoding feature of the sample user and the second encoding feature of each sample information in the sample information set; using the first encoding feature and the second encoding feature as nodes, construct an interaction relationship network diagram corresponding to the sample user and the sample information; based on the interaction relationship network diagram, predict the predicted recommendation information corresponding to the sample user in the sample information.

[0306] In some embodiments, the loss determination module 4551 is also used to perform feature extraction processing on the interaction relationship network diagram to obtain the first object feature of the sample user and the first information feature of each sample information; perform prediction processing through the first sub-model based on the first object feature and the first information feature to obtain the predicted click probability of each sample information, and the predicted click probability is the probability that the sample user triggers the sample information; select the first sample information from the sample information set as the predicted recommendation information based on the predicted click probability; determine the first similarity between the first object feature and each first information feature, and select the second sample information from the sample information set as the predicted recommendation information based on the first similarity.

[0307] In some embodiments, the loss determination module 4551 is also used to calculate the cross-entropy loss value based on the predicted click probability of the first sample information and the label value of the actual recommendation information; construct a two-dimensional curve based on the first similarity of the second sample information and the label value of the actual recommendation information, and calculate the curve area loss value based on the two-dimensional curve; and obtain the first loss value based on the cross-entropy loss value and the curve area loss value.

[0308] In some embodiments, the loss determination module 4551 is also used to encode the predicted recommendation information to obtain a second encoding feature; detect the second encoding feature to obtain the missing character positions of the predicted recommendation information; perform character prediction on the second encoding feature to obtain predicted characters; and fill the missing character positions of the predicted recommendation information based on the predicted characters to obtain corrected predicted recommendation information.

[0309] In some embodiments, the first loss value includes: a cross entropy loss value and a curve area loss value; the model training module 4552 is also used to perform linear conversion processing on the cross entropy loss value, the curve area loss value and the second loss value to obtain a total loss value; based on the total loss value, the parameters of the model are updated through back propagation processing to obtain a trained model.

[0310] In some embodiments, before selecting the predicted recommendation information of the sample user from the sample information set, the model training module 4552 is also used to encode the sample user data and the sample information set to obtain the first encoding feature of the sample user and the second encoding feature of the sample information; using the first encoding feature and the second encoding feature as nodes, construct an interaction relationship network diagram between the sample user and the sample information; extract the first feature set and the second feature set from the interaction relationship network diagram; combine every two features in the first feature set into a positive sample pair; combine the two features selected from the first feature set and the second feature set into a negative sample pair; calculate the contrastive learning loss of the first sub-model based on the positive sample pair and the negative sample pair, and update the parameters of the first sub-model based on the contrastive learning loss.

[0311] In some embodiments, the information recommendation module 4553 is also used to perform feature extraction processing on user data and the recommended information set respectively to obtain the second object feature of the user and the second information feature of each recommended information; based on the second object feature and each second information feature, determine the predicted click probability corresponding to each recommended information, and select the first recommended information from the recommended information set according to the predicted click probability; based on the second object feature and each second information feature, determine the second similarity between the user and each recommended information, and select the second recommended information from the recommended information set according to the second similarity; perform character correction on the first recommended information and the second recommended information to obtain the third recommended information; and recommend the third recommended information to the user.

[0312] In some embodiments, the information recommendation module 4553 is also used to deduplicate the third recommended information to obtain the fourth recommended information; perform linear operation on the predicted click probability, the second similarity and the character correction label value of the fourth recommended information to obtain the recommendation index of the fourth recommended information; wherein, if the fourth recommended information is not the predicted first recommended information, the predicted click probability of the fourth recommended information is zero; if the fourth recommended information is not the predicted second recommended information, the second similarity of the fourth recommended information is zero; if the fourth recommended information does not contain the corrected character, the character correction label value of the fourth recommended information is zero; select at least one fourth recommended information according to the recommendation index, and recommend the selected fourth recommended information to the user.

[0313] In some embodiments, the information recommendation module 4553 is also used to determine the weight value corresponding to the character correction label value; linear operation is performed based on the predicted click probability, the second similarity and the weight value corresponding to the character correction label value of the fourth recommended information to obtain the recommendation index of the fourth recommended information.

[0314] The present invention provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the model training method or information recommendation method described in the present invention.

[0315] The embodiment of the present application provides a computer-readable storage medium in which computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the model training method or information recommendation method provided in the embodiment of the present application, for example, Figure 3A The model training method or information recommendation method shown.

[0316] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0317] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0318] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0319] By way of example, computer-executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.

[0320] In summary, through the embodiment of the present application, the model is trained based on the first loss value of the predicted recommendation information and the actual recommendation information, and the second loss value is calculated based on the editing distance between the predicted recommendation information after character correction and the implemented recommendation information. The trained model comprehensively considers multiple types of features and recommends relevant information to users more accurately. The voting mechanism is combined to determine the final recommendation information list, thereby improving the recommendation probability and user satisfaction.

[0321] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.

Claims

1. A model training method, characterized in that: The method comprises: Selecting predicted recommendation information of sample users from the sample information set; Calculating a first loss value based on the predicted recommendation information and the actual recommendation information of the sample user; performing character correction processing on the predicted recommendation information to obtain corrected predicted recommendation information; Calculating a second loss value according to the edit distance between the corrected predicted recommendation information and the actual recommendation information; The model is trained based on the first loss value and the second loss value.

2. The method according to claim 1, characterized in that The step of selecting the predicted recommendation information of the sample user from the sample information set includes: Encoding the sample user data of the sample user and the sample information set to obtain a first encoding feature of the sample user and a second encoding feature of each sample information in the sample information set; Using the first coding feature and the second coding feature as nodes, construct an interaction relationship network diagram corresponding to the sample user and the sample information; According to the interactive relationship network diagram, predicted recommendation information corresponding to the sample user in the sample information is predicted.

3. The method according to claim 2, characterized in that The predicting, based on the interactive relationship network diagram, the predicted recommendation information corresponding to the sample user in the sample information includes: Performing feature extraction processing on the interaction relationship network graph to obtain a first object feature of the sample user and a first information feature of each of the sample information; Performing prediction processing based on the first object feature and the first information feature to obtain a predicted click probability for each of the sample information, where the predicted click probability is a probability that the sample user will trigger the sample information; selecting first sample information from the sample information set as the predicted recommendation information according to the predicted click probability; A first similarity between the first object feature and each of the first information features is determined, and second sample information is selected from the sample information set as the predicted recommendation information based on the first similarity.

4. The method according to claim 3, characterized in that The calculating a first loss value based on the predicted recommendation information and the actual recommendation information of the sample user includes: Calculating a cross entropy loss value based on the predicted click probability of the first sample information and the label value of the actual recommendation information; constructing a two-dimensional curve based on the first similarity of the second sample information and the label value of the actual recommendation information, and calculating a curve area loss value based on the two-dimensional curve; The first loss value is obtained according to the cross entropy loss value and the curve area loss value.

5. The method according to claim 1, wherein The first loss value includes: a cross entropy loss value and a curve area loss value; The training of the model based on the first loss value and the second loss value includes: Performing linear conversion processing on the cross entropy loss value, the curve area loss value, and the second loss value to obtain a total loss value; Based on the total loss value, the parameters of the model are updated through back-propagation processing to obtain the trained model.

6. The method according to claim 1, wherein The performing character correction processing on the predicted recommendation information to obtain the corrected predicted recommendation information includes: Encoding the predicted recommendation information to obtain a second encoding feature; detecting the second coding feature to obtain a character vacancy position of the predicted recommendation information; Performing character prediction on the second coding feature to obtain a predicted character; The missing characters in the predicted recommendation information are filled based on the predicted characters to obtain the revised predicted recommendation information.

7. The method according to claim 1, characterized in that The model includes a first sub-model; before selecting the predicted recommendation information of the sample user from the sample information set, the method further includes: Encoding the sample user data and the sample information set to obtain a first encoding feature of the sample user and a second encoding feature of the sample information; Using the first coding feature and the second coding feature as nodes, constructing an interactive relationship network diagram between the sample user and the sample information; Extracting a first feature set and a second feature set from the interaction relationship network graph; Combining every two features in the first feature set into a positive sample pair; Combining two features selected from the first feature set and the second feature set into a negative sample pair; Based on the positive sample pairs and the negative sample pairs, a contrastive learning loss of the first sub-model is calculated, and parameters of the first sub-model are updated based on the contrastive learning loss.

8. An information recommendation method, characterized in that: The method comprises: Performing feature extraction processing on the user data and the recommendation information set respectively to obtain a second object feature of the user and a second information feature of each recommendation information; Determining a predicted click probability corresponding to each of the recommended information based on the second object feature and each of the second information features, and selecting a first recommended information from the recommended information set according to the predicted click probability; determining a second similarity between the user and each piece of recommended information based on the second object feature and each piece of second information feature, and selecting second recommended information from the set of recommended information based on the second similarity; performing character correction on the first recommendation information and the second recommendation information to obtain third recommendation information; Recommend the third recommendation information to the user.

9. The method according to claim 8, characterized in that The recommending the third recommendation information to the user includes: performing deduplication processing on the third recommendation information to obtain fourth recommendation information; performing linear operation processing based on the predicted click probability of the fourth recommendation information, the second similarity, and the character correction label value to obtain a recommendation index for the fourth recommendation information; If the fourth recommendation information is not the predicted first recommendation information, the predicted click probability of the fourth recommendation information is zero; if the fourth recommendation information is not the predicted second recommendation information, the second similarity of the fourth recommendation information is zero; if the fourth recommendation information does not include the corrected character, the character correction label value of the fourth recommendation information is zero; At least one fourth recommendation information is selected according to the recommendation indicator, and the selected fourth recommendation information is recommended to the user.

10. The method according to claim 9, characterized in that The performing of linear operation on the predicted click probability of the fourth recommendation information, the second similarity, and the character correction label value to obtain the recommendation index of the fourth recommendation information includes: Determining a weight value corresponding to the character correction label value; A linear operation is performed based on the predicted click probability of the fourth recommendation information, the second similarity, and the weight value corresponding to the character correction label value to obtain a recommendation index for the fourth recommendation information.

11. A model training device, characterized in that: The device comprises: a loss determination module configured to select predicted recommendation information of a sample user from a sample information set; calculate a first loss value based on the predicted recommendation information and the actual recommendation information of the sample user; perform character correction processing on the predicted recommendation information to obtain corrected predicted recommendation information; and calculate a second loss value based on an edit distance between the corrected predicted recommendation information and the actual recommendation information; A model training module is used to train the model based on the first loss value and the second loss value.

12. An information recommendation device, characterized in that: The device comprises: An information recommendation module is used to perform feature extraction processing on user data and a set of recommended information respectively to obtain a second object feature of the user and a second information feature of each piece of recommended information; based on the second object feature and each of the second information features, determine a predicted click probability corresponding to each piece of recommended information, and select a first piece of recommended information from the set of recommended information according to the predicted click probability; based on the second object feature and each of the second information features, determine a second similarity between the user and each piece of recommended information, and select a second piece of recommended information from the set of recommended information according to the second similarity; perform character correction on the first and second recommended information to obtain a third piece of recommended information; and recommend the third piece of recommended information to the user.

13. An electronic device, characterized in that: The electronic device comprises: a memory for storing computer-executable instructions or computer programs; A processor, configured to implement the model training method described in any one of claims 1 to 7 or the information recommendation method described in any one of claims 8 to 10 when executing the computer-executable instructions or computer program stored in the memory.

14. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the model training method described in any one of claims 1 to 7 or the information recommendation method described in any one of claims 8 to 10 is implemented.

15. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the model training method described in any one of claims 1 to 7 or the information recommendation method described in any one of claims 8 to 10 is implemented.