Distributed machine learning system, model training method, node device, and medium

By having parameter update nodes and executor nodes in a distributed machine learning system work together, the problem of low training efficiency in single-machine training is solved, achieving efficient training and model updates with complete information, thus improving the model learning effect.

CN112508067BActive Publication Date: 2026-02-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011344608.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-26
Publication Date
2026-02-10
Estimated Expiration
2040-11-26

AI Technical Summary

Technical Problem

Existing machine learning models suffer from low training efficiency, low single-machine CPU computation efficiency, long training time, and the possibility of missing important information when sampling training datasets, resulting in poor model learning performance.

Method used

A distributed machine learning system is adopted, in which parameter update nodes and at least two executor nodes work together. The executor nodes obtain a subset of training samples to make predictions and determine differences. The target parameters are sent by the executor nodes to the parameter update nodes to update the model parameters.

Benefits of technology

It improves the training efficiency of machine learning models, reduces hardware resource consumption, avoids information loss caused by sample sampling, and improves the model learning effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112508067B_ABST
    Figure CN112508067B_ABST
Patent Text Reader

Abstract

The application provides a distributed machine learning system, a model training method, a node device and a storage medium. The system comprises a parameter updating node and at least two executor nodes. The parameter updating node is configured to send a machine learning model to each executor node in response to a model acquisition request of the at least two executor nodes. Each executor node is configured to receive the machine learning model, acquire a corresponding training sample subset, predict a training sample in the training sample subset by using the machine learning model, obtain a prediction result, and determine a difference between the prediction result and a corresponding sample label. Each executor node is further configured to determine a target parameter based on the difference and send the target parameter to the parameter updating node. The parameter updating node is further configured to update a model parameter of the machine learning model based on the target parameters sent by the executor nodes to obtain a trained machine learning model. The application can improve the training efficiency of the machine learning model and reduce the consumption of hardware resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of cloud technology and artificial intelligence technology, and in particular to a distributed machine learning system, model training method, node device and storage medium. Background Technology

[0002] Artificial intelligence (AI) is the theory, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0003] In related technologies, machine learning model training typically involves sampling the training dataset to reduce its size to a level manageable by a single machine, then utilizing the single machine's memory and CPU computing power to complete the training. However, due to the low computing efficiency of a single-machine CPU, model training takes too long, and sampling the training dataset may miss important information, resulting in poor model learning performance. Summary of the Invention

[0004] This application provides a distributed machine learning system, a model training method, a node device, and a storage medium, which can improve the training efficiency of machine learning models and reduce the consumption of hardware resources.

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

[0006] This application provides a distributed machine learning system, which includes: a parameter update node and at least two executor nodes; wherein,

[0007] The parameter update node is used to send a machine learning model to each of the executor nodes in response to a model acquisition request from at least two of the executor nodes.

[0008] The executor node is used to receive the machine learning model and obtain the corresponding training sample subset, predict the training samples in the training sample subset through the machine learning model, obtain the prediction result, and determine the difference between the prediction result and the corresponding sample label.

[0009] Each of the executor nodes corresponds to a subset of training samples, which is obtained by splitting the training sample set used to train the machine learning model.

[0010] The actuator node is further configured to determine a target parameter based on the difference, and send the target parameter to the parameter update node;

[0011] The parameter update node is also used to update the model parameters of the machine learning model based on the target parameters sent by each of the executor nodes, so as to obtain the trained machine learning model.

[0012] This application also provides a model training method based on a distributed machine learning system, the system comprising: a parameter update node and at least two executor nodes; wherein each executor node corresponds to a subset of training samples, the subset of training samples being obtained by splitting the training sample set used to train the machine learning model; the method comprising:

[0013] The executor node acquires the machine learning model and the corresponding subset of training samples;

[0014] The machine learning model is used to predict the training samples in the corresponding training sample subset to obtain the prediction results.

[0015] Based on the difference between the prediction result and the corresponding sample label, the target parameters of the machine learning model are determined and sent to the parameter update node;

[0016] The target parameter is used by the parameter update node to update the model parameters of the machine learning model based on the target parameter, so as to obtain the trained machine learning model.

[0017] This application embodiment also provides a node device, including:

[0018] Memory, used to store executable instructions;

[0019] The processor, when executing executable instructions stored in the memory, implements the model training method based on a distributed machine learning system provided in the embodiments of this application.

[0020] This application also provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the model training method based on a distributed machine learning system provided in this application.

[0021] The embodiments of this application have the following beneficial effects:

[0022] Each executor node obtains the machine learning model from the parameter update node and the corresponding training sample subset. Then, it uses the machine learning model to predict the training sample subset and determines the target parameters for updating the model parameters based on the difference between the prediction results and the corresponding sample labels. These target parameters are then sent to the parameter update node to update the model parameters of the machine learning model.

[0023] Here, the distributed machine learning system contains at least two executor nodes. Each executor node independently calculates the target parameters used to update the model parameters, and the parameter update node updates the model parameters based on the target parameters of each executor node. This can improve the training efficiency of the machine learning model and reduce the consumption of hardware resources. At the same time, the training sample subset is obtained by splitting the training sample set used to train the machine learning model, avoiding the information loss problem caused by sample sampling and improving the model learning effect. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the architecture of the distributed machine learning system 10 provided in an embodiment of this application;

[0025] Figure 2 This is a schematic diagram of the structure of the node device 500 for the model training method based on a distributed machine learning system provided in this application embodiment;

[0026] Figure 3 This is a schematic diagram of the interaction process between node devices in a distributed machine learning system provided in an embodiment of this application;

[0027] Figure 4 This is a system architecture diagram of the distributed machine learning system provided in the embodiments of this application;

[0028] Figure 5 This is a schematic diagram of the interaction process between node devices in a distributed machine learning system provided in an embodiment of this application;

[0029] Figure 6 This is a system architecture diagram of the distributed machine learning system provided in the embodiments of this application;

[0030] Figure 7 This is a schematic diagram of the interaction process between node devices in a distributed machine learning system provided in an embodiment of this application;

[0031] Figure 8 This is a flowchart illustrating the model training method based on a distributed machine learning system provided in an embodiment of this application.

[0032] Figure 9A This is a flowchart illustrating the prediction task for a media information stream page provided in an embodiment of this application.

[0033] Figure 9B This is a flowchart illustrating the prediction task of media information to be recommended provided in an embodiment of this application;

[0034] Figure 10A This is a schematic diagram of the interface of the intelligent decision-making and operation platform for the information flow product provided in this application embodiment;

[0035] Figure 10B This is a schematic diagram illustrating the target user group provided in the embodiments of this application;

[0036] Figure 11 A flowchart illustrating the model training method based on a distributed machine learning system provided in this application embodiment;

[0037] Figure 12 This is a diagram showing the comparison of training time for machine learning models. Detailed Implementation

[0038] To make the objectives, 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 limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0039] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is 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.

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

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0042] In the implementation of this application, the collection and processing of relevant data should be strictly in accordance with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0043] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0044] 1) Client: An application that runs on a terminal and provides various services, such as an instant messaging client or a video playback client.

[0045] 2) In response, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0046] 3) Parameter update node, namely parameter server (PS), is a node (server or server cluster) in the distributed training architecture that is responsible for creating the cluster, summarizing, updating, distributing and storing model parameters.

[0047] 4) Machine learning model: A complex network system formed by extensive interconnection of a large number of simple processing units, reflecting many basic characteristics of human brain function, and is a highly complex nonlinear dynamic learning system. The machine learning model in the embodiments of this application is not limited to any structure, type, or application scenario.

[0048] 5) The Cox regression model, also known as the proportional hazards model (Cox model for short), is a semi-parametric regression model. This model uses survival outcome and survival time as dependent variables, and can simultaneously analyze the impact of many factors on survival. It can analyze data with truncated survival time and does not require estimation of the survival distribution type of the data.

[0049] 6) PyTorch is an open-source Python machine learning library based on Torch, used for applications such as natural language processing.

[0050] Based on the above explanation of the nouns and terms used in the embodiments of this application, the distributed machine learning system provided in the embodiments of this application is described below. See also Figure 1 , Figure 1This is a schematic diagram of the architecture of a distributed machine learning system 10 provided in an embodiment of this application. The distributed machine learning system includes: a parameter update node and at least two executor nodes. To support an exemplary application, a terminal (executor 400-1 is shown as an example) connects to at least two executor nodes (executor nodes 100-1, 100-2 and 100-3 are shown as an example) and a parameter update node 200 through a network 300. The network 300 can be a wide area network or a local area network, or a combination of both, and uses wireless or wired links to realize data transmission.

[0051] The terminal (e.g., terminal 400-1) is used to respond to user operations and send training instructions to the executor node (e.g., executor node 100-1).

[0052] The executor node (such as executor node 100-1) is used to send a model retrieval request for the machine learning model to the parameter update node 200 in response to the training instruction.

[0053] Parameter update node 200 is used to send machine learning models to each executor node (such as executor node 100-1) in response to model acquisition requests from at least two executor nodes.

[0054] The executor node (such as executor node 100-1) is used to receive the machine learning model and obtain the corresponding training sample subset. The machine learning model is used to predict the training samples in the training sample subset to obtain the prediction result. The difference between the prediction result and the corresponding sample label is determined, and the target parameter is determined based on the difference. The target parameter is then sent to the parameter update node 200.

[0055] Parameter update node 200 is used to update the model parameters of the machine learning model based on the target parameters sent by each executor node, so as to obtain the trained machine learning model.

[0056] In practical applications, each node device (such as actuator node 100-1 or parameter update node 200) can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminals can be smartphones, tablets, laptops, desktop computers, smart speakers, smart TVs, smartwatches, etc., but are not limited to these. Terminals and node devices can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this connection.

[0057] See Figure 2 , Figure 2This is a schematic diagram of the node device 500 for the model training method based on a distributed machine learning system provided in this application embodiment. In practical applications, the node device 500 can be... Figure 1 The actuator node or parameter update node shown is represented by node device 500. Figure 1 Taking the illustrated actuator node as an example, the node device implementing the model training method of the distributed machine learning system according to the embodiments of this application will be described. The node device 500 provided in the embodiments of this application includes: at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components in the node device 500 are coupled together through a bus system 540. It is understood that the bus system 540 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 2 The general labeled all buses as Bus System 540.

[0058] The processor 510 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. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0059] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0060] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices physically located away from the processor 510.

[0061] The memory 550 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.

[0062] In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0063] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0064] The network communication module 552 is used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.

[0065] Presentation module 553 is used to enable the presentation of information (e.g., user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 (e.g., display screen, speaker, etc.) associated with user interface 530.

[0066] The input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.

[0067] The distributed machine learning system provided in this application embodiment will now be described in detail. The distributed machine learning system provided in this application embodiment includes: a parameter update node and at least two executor nodes, see [link to relevant documentation]. Figure 3 , Figure 3 This is a schematic diagram of the interaction process between node devices in a distributed machine learning system provided in this application embodiment, including:

[0068] Step 101: The parameter update node responds to the model retrieval requests from at least two executor nodes by sending the machine learning model to each executor node.

[0069] Here, the distributed machine learning system includes parameter update nodes and at least two executor nodes. It should be noted that... Figure 3 Only one executor node is shown in the diagram. For the processing of the other executor nodes (at least two executor nodes), the process is different. Figure 3 The processing of the actuator nodes shown is similar.

[0070] In practical applications, parameter update nodes in distributed machine learning systems are responsible for tasks such as cluster creation, model parameter aggregation and updating, model distribution, and storage. Therefore, parameter update nodes store the initial machine learning model with its initial parameters. Executor nodes in distributed machine learning systems are responsible for the actual training of the model and parameter calculation.

[0071] When training a machine learning model based on this distributed machine learning system, a model training instruction for that machine learning model can be triggered. At this time, the executor node responds to the model training instruction by sending a model retrieval request for the machine learning model to the parameter update node; the parameter update node responds to the executor node's model retrieval request by distributing the machine learning model to each executor node.

[0072] Step 102: The executor node receives the machine learning model and obtains the corresponding training sample subset. It then uses the machine learning model to predict the training samples in the training sample subset, obtains the prediction results, and determines the difference between the prediction results and the corresponding sample labels.

[0073] Each executor node corresponds to a subset of training samples, which is obtained by splitting the training sample set used to train the machine learning model.

[0074] The executor node receives the machine learning model from the parameter update node and obtains a subset of training samples corresponding to that model. Specifically, the executor node can obtain these samples from a database or a proxy server. Each executor node corresponds to a unique subset of training samples. Training the machine learning model based on these different subsets enables differentiated training, avoids overfitting, and improves generalization. In practical applications, this subset can be obtained by splitting the full training sample set used to train the model. This avoids the need to sample from the entire training set, reducing the possibility of missing important samples and improving the model training effect.

[0075] After obtaining the training sample subset corresponding to the machine learning model, the executor node uses the training sample subset to train the machine learning model. Specifically, the machine learning model makes predictions on the training samples in the training sample subset to obtain the corresponding prediction results; then, it determines the difference between the prediction results and the corresponding sample labels.

[0076] In some embodiments, the executor node can predict the training samples in the training sample subset in the following manner to obtain the prediction result: by using the feature extraction layer of the machine learning model to extract features from the training samples in the training sample subset, to obtain the user profile features of the target user corresponding to the training sample, the page content features of the corresponding target page, and the user behavior features based on the target page; by using the feature prediction layer of the machine learning model to combine the user profile features, page content features, and user behavior features to make a prediction, to obtain the prediction result of the target user's behavior towards the target page.

[0077] Here, the machine learning model includes a feature extraction layer and a feature prediction layer. In practical applications, the training samples in this training sample subset consist of user profile data of the target user, page content data of the target page, and user behavior data based on the target page. For example, if user (ID: 123) used the news channel feed page on October 1, 2020, and the recommendation system exposed 3 entertainment articles and 2 political articles to them, and the user clicked on one entertainment article, and then user (ID: 123) used the news channel feed page again on October 5, 2020, then the entire process described above can form a training sample for the machine learning model, including: user profile data (such as the user's ID), page content data (such as the exposure of 3 entertainment articles, 2 political articles, and 1 entertainment article), and user behavior data based on the target page (such as the click behavior on the 1 entertainment article). In practical applications, the time interval (4 days) between two consecutive visits to the news channel feed page by this user can be used as the sample label for this training sample.

[0078] When training a machine learning model, the feature extraction layer of the machine learning model extracts features from the training samples to obtain the user profile features of the target user corresponding to the training sample, the page content features of the target page corresponding to the target page, and the user behavior features based on the target page. Then, the feature prediction layer of the machine learning model combines the user profile features, page content features, and user behavior features to make predictions and obtain the target user's behavior prediction results for the target page, such as when the target user will visit the target page again and the probability of the target user clicking on the target page.

[0079] In some embodiments, the executor node may make predictions through the feature prediction layer of a machine learning model in the following manner: by calling a first activation function through the feature prediction layer of the machine learning model, combining user profile features, page content features, and user behavior features to make predictions, thereby obtaining the target user's behavior prediction result for the target page; or

[0080] The feature prediction layer of the machine learning model calls the second activation function, combining user profile features, page content features, and user behavior features to make predictions and obtain the target user's behavior prediction results for the target page.

[0081] Here, the machine learning model can be either a regression model or a classification model. When the machine learning model is a regression model, the first activation function is called through the feature prediction layer for prediction, and this first activation function can be the Sigmoid function. When the machine learning model is a classification model, the second activation function is called through the feature prediction layer for prediction, and this second activation function can be the Softmax function.

[0082] In some embodiments, when the machine learning model is a proportional hazards regression model, the executor node can predict the training samples in the training sample subset in the following way to obtain the prediction result: extract features from the training samples in the training sample subset through the machine learning model to obtain the user profile features of the target user corresponding to the training sample, the page content features of the corresponding target page, and the user behavior features based on the target page; and make a prediction by combining the user profile features, page content features, and user behavior features through the feature prediction layer of the machine learning model to obtain the prediction result representing the time interval between two consecutive visits of the target page by the target user.

[0083] Here, taking the proportional hazards regression model (COX model) as an example, the corresponding training samples consist of user profile data of the target user, page content data of the target page, and user behavior data based on the target page. For example, if user (ID: 123) used the news channel feed page on October 1, 2020, and the recommendation system exposed 3 entertainment articles and 2 political articles to him / her, and the user clicked on one entertainment article, and then user (ID: 123) used the news channel feed page again on October 5, 2020, then the entire process can form a training sample for the machine learning model, including: user profile data (such as the user's ID), page content data (such as the exposure of 3 entertainment articles, 2 political articles, and 1 entertainment article), and user behavior data based on the target page (such as the click behavior on the 1 entertainment article).

[0084] Based on this, when training the machine learning model, the machine learning model extracts features from the training samples to obtain the user profile features of the target user corresponding to the training sample, the page content features of the corresponding target page, and the user behavior features based on the target page. Then, the machine learning model combines the user profile features, page content features, and user behavior features to make predictions and obtain the target user's behavior prediction results for the target page, such as when the target user will visit the target page again and the probability of the target user clicking on the target page.

[0085] Step 103: The actuator node determines the target parameter based on the difference and sends the target parameter to the parameter update node.

[0086] In some embodiments, the actuator node can determine the value of the loss function of the machine learning model based on the difference, and calculate the derivative of the value of the loss function to obtain the target parameters.

[0087] After determining the difference between the predicted result and the corresponding sample label, the executor node determines the target parameters based on this difference. These target parameters can be gradients, second derivatives, etc. Specifically, the executor node can determine the value of the loss function of the machine learning model based on this difference, and then perform derivative calculations on the loss function value, including first and second derivatives, to obtain the first and second derivatives of the loss function value. These obtained first and second derivatives of the loss function value are then used as the target parameters. At this point, the target parameters are uploaded to the parameter update node, which relies on its computational capabilities to update the model parameters of the machine learning model.

[0088] As an example, when the machine learning model is a Cox model, the loss function can be the likelihood function of the Cox model. After the executor node determines the difference between the prediction result and the corresponding sample label, it determines the value of the likelihood function of the Cox model based on the difference. Then, it calculates the derivative of the likelihood function of the Cox model, including the first derivative and the second derivative, to obtain the first and second derivatives of the likelihood function. The first and second derivatives of the obtained likelihood function are used as the target parameters.

[0089] It should be noted that when the executor node completes the aforementioned computational tasks (including training the machine learning model and calculating the target parameters), it needs to obtain the neural network framework corresponding to the machine learning model as the target neural network framework. Based on this, the executor node is also used to call the graphics processor to predict the training samples in the training sample subset based on the target neural network framework, obtain the prediction results, determine the difference between the prediction results and the corresponding sample labels, and determine the target parameters based on the difference. Here, the target neural network framework can be called from PyTorch.

[0090] Step 104: The parameter update node updates the model parameters of the machine learning model based on the target parameters sent by each executor node, so as to obtain the trained machine learning model.

[0091] The parameter update node receives the target parameters returned by each executor node, and updates the model parameters of the machine learning model based on the target parameters returned by each executor node, thereby realizing the training of the machine learning model.

[0092] In some embodiments, the model parameters of the machine learning model include first model parameters and second model parameters. The parameter update node is also used to update the first model parameters of the machine learning model based on the target parameters sent by each executor node.

[0093] Correspondingly, the executor node is also used to perform statistics on the training samples in the training sample subset based on multiple data statistical indicators, obtain the indicator values ​​of each data statistical indicator, and obtain the first model parameters of the machine learning model; determine the intermediate model parameters based on the indicator values ​​of each data statistical indicator and the first model parameters; and send the intermediate model parameters to the parameter update node.

[0094] Correspondingly, the parameter update node is also used to aggregate the intermediate model parameters sent by each executor node, and update the second model parameters of the machine learning model based on the aggregated intermediate model parameters.

[0095] In practical applications, the model parameters of a machine learning model include first model parameters and second model parameters. When a parameter update node receives the target parameters uploaded by each executor node, it updates the first model parameters of the machine learning model based on the target parameters. After updating the first model parameters, the second model parameters in the machine learning model also need to be updated. The second model parameters are related to the first model parameters. In practice, the calculation of these second model parameters can also be performed by the executor nodes.

[0096] Specifically, the executor node obtains the updated first model parameters from the parameter update node. Then, it performs statistical analysis on the training samples in the training sample subset. For example, multiple data statistical indicators can be pre-set. For instance, when the training samples consist of user profile data based on the target user, page content data of the target page, and user behavior data based on the target page, and the corresponding sample label is the time interval between two consecutive visits to the target page by the target user, the data statistical indicator could be a feature of the training sample, the number of target users who visited the target page within the time interval, or the number of target users who visited the target page within the time interval. This yields the indicator values ​​corresponding to each data statistical indicator. Finally, based on the indicator values ​​corresponding to each data statistical indicator and the obtained first model parameters, the executor node determines the intermediate model parameters corresponding to the calculated second model parameters and sends the intermediate model parameters to the parameter update node.

[0097] The parameter update node can receive intermediate model parameters uploaded by each executor node. Then, these intermediate model parameters can be aggregated, for example, by averaging them. Finally, the second model parameters of the machine learning model are updated based on the aggregated intermediate model parameters to obtain the trained machine learning model.

[0098] In some embodiments, the distributed machine learning system further includes a driver node, which, together with at least two executor nodes, constitutes the distributed computing framework of the system; the driver node is used to obtain a training sample set for training the machine learning model, and to split the training sample set based on the distributed computing framework to obtain a training sample subset corresponding to each executor node.

[0099] In practical applications, this can be implemented using the distributed computing framework Spark. Therefore, this distributed machine learning system also includes a driver node (Spark driver), which, along with at least two executor nodes, constitutes the system's distributed computing framework. The training sample set (i.e., the full training samples) used to train the machine learning model is stored in Hive. During machine model training, the driver node obtains the training sample set and, based on the distributed computing framework, partitions the training sample set to obtain the training sample subsets corresponding to each executor node.

[0100] In some embodiments, the driver node is further configured to generate computational tasks corresponding to each executor node and send the computational tasks to the corresponding executor node; wherein, the computational task is configured to instruct the prediction of training samples in a subset of training samples through a machine learning model, obtain prediction results, determine the difference between the prediction results and the corresponding sample labels, and determine target parameters based on the difference.

[0101] In practical applications, driver nodes are used for distributed task scheduling in distributed computing architectures. After dividing the training sample set, the driver node sends a subset of the training samples to each executor node and generates a computing task for each executor node. This task instructs each executor node to train the machine learning model based on the training samples in the subset of the training samples and to determine the target parameters based on the difference between the obtained prediction results and the corresponding sample labels.

[0102] The following is combined with Figure 4 See Figure 5 The distributed machine learning system provided in the embodiments of this application will be further described. Figure 4 This is a system architecture diagram of a distributed machine learning system provided in an embodiment of this application. The distributed machine learning system includes a parameter update node, a driver node, and at least two executor nodes. Figure 5 This is a schematic diagram of the interaction process between node devices in a distributed machine learning system provided in this application embodiment, including:

[0103] Step 201: The driver node obtains the training sample set for training the machine learning model, and splits the training sample set based on the distributed computing framework to obtain the training sample subsets corresponding to each executor node.

[0104] Here, the driver node can receive training instructions triggered by the user, and in response to the training instructions, obtain the training sample set for training the machine learning model, and split the training sample set based on the distributed computing framework to obtain the training sample subsets corresponding to each executor node.

[0105] Step 202: The driver node generates the computation tasks corresponding to each executor node and sends the computation tasks to the corresponding executor node.

[0106] The computational task is used to instruct the prediction of training samples in a subset of training samples through a machine learning model, obtain the prediction results, determine the difference between the prediction results and the corresponding sample labels, and determine the target parameters based on the difference.

[0107] Step 203: The executor node receives the computation task sent by the driver node and sends a model retrieval request for the machine learning model to the parameter update node.

[0108] Step 204: The parameter update node responds to the executor node's model acquisition request and distributes the machine learning model to each executor node.

[0109] Step 205: The executor node receives the machine learning model and obtains the corresponding training sample subset. It then uses the machine learning model to predict the training samples in the training sample subset, obtains the prediction results, and determines the difference between the prediction results and the corresponding sample labels.

[0110] Step 206: The executor node is used to determine the target parameters based on the differences and send the target parameters to the parameter update node.

[0111] Step 207: The parameter update node is used to update the model parameters of the machine learning model based on the target parameters sent by each executor node, so as to obtain the trained machine learning model.

[0112] In some embodiments, when there are at least three parameter update nodes, the at least three parameter update nodes include a primary parameter update node and at least two secondary parameter update nodes;

[0113] Correspondingly, the executor node is also used to split the target parameter into at least two sub-target parameters, and send each sub-target parameter to the corresponding slave parameter update node.

[0114] The parameter update node is used to update the model parameters of the machine learning model based on the sub-target parameters sent by each executor node, obtain the intermediate model parameters of the machine learning model, and send the intermediate model parameters to the main parameter update node.

[0115] The master parameter update node is used to aggregate the intermediate model parameters sent by at least two slave parameter update nodes, and update the model parameters of the machine learning model based on the aggregated intermediate model parameters to obtain the trained machine learning model.

[0116] In practical applications, to avoid the impact of large amounts of data on the parameter update nodes, there can be at least three parameter update nodes, including: a primary parameter update node and at least two secondary parameter update nodes. The primary parameter update node can be pre-configured or obtained through an election mechanism.

[0117] At this point, when the executor node uploads the calculated target parameters, it needs to divide the target parameters, for example, into three target parameter data blocks, and then upload these three target parameter data blocks to the corresponding slave parameter update nodes. It should be noted that the target parameter partitioning rules are consistent across all executor nodes, and the target parameter data blocks uploaded to the same slave parameter update node should also be in the same position within the target parameters. For example, if each executor node partitions the target parameters into target parameter data block 1, target parameter data block 2, and target parameter data block 3, then during the upload, each executor node will upload its respective target parameter data block 1 to slave parameter update node 1, its respective target parameter data block 2 to slave parameter update node 2, and its respective target parameter data block 3 to slave parameter update node 3.

[0118] Each slave parameter update node updates its model parameters based on its received target parameters, obtaining intermediate model parameters, and then sends these intermediate model parameters to the master parameter update node. The master parameter update node aggregates the intermediate model parameters sent by each slave parameter update node. For example, it may calculate the average of the intermediate model parameters and update the machine learning model parameters based on the aggregated intermediate model parameters to obtain the trained machine learning model.

[0119] The following is combined with Figure 6 See Figure 7 The distributed machine learning system provided in the embodiments of this application will be further described. Figure 6 This is a system architecture diagram of a distributed machine learning system provided in an embodiment of this application. The distributed machine learning system includes at least three parameter update nodes, driver nodes, and at least two executor nodes. Figure 7 This is a schematic diagram of the interaction process between node devices in a distributed machine learning system provided in this application embodiment, including:

[0120] Step 301: The driver node obtains the training sample set for training the machine learning model, and splits the training sample set based on the distributed computing framework to obtain the training sample subsets corresponding to each executor node.

[0121] Here, the driver node can receive training instructions triggered by the user, and in response to the training instructions, obtain the training sample set for training the machine learning model, and split the training sample set based on the distributed computing framework to obtain the training sample subsets corresponding to each executor node.

[0122] Step 302: The driver node generates the computation tasks corresponding to each executor node and sends the computation tasks to the corresponding executor node.

[0123] The computational task is used to instruct the prediction of training samples in a subset of training samples through a machine learning model, obtain the prediction results, determine the difference between the prediction results and the corresponding sample labels, and determine the target parameters based on the difference.

[0124] Step 303: The executor node receives the computation task sent by the driver node and sends a model retrieval request for the machine learning model to the master parameter update node.

[0125] Step 304: The master parameter update node responds to the executor node's model acquisition request and distributes the machine learning model to each executor node.

[0126] Step 305: The executor node is used to receive the machine learning model and obtain the corresponding training sample subset, predict the training samples in the training sample subset through the machine learning model, obtain the prediction result, and determine the difference between the prediction result and the corresponding sample label.

[0127] Step 306: The executor node determines the target parameter based on the difference, splits the target parameter into at least two sub-target parameters, and sends each sub-target parameter to the corresponding slave parameter update node.

[0128] Step 307: The parameter update node updates the model parameters of the machine learning model based on the sub-target parameters sent by each executor node, obtains the intermediate model parameters of the machine learning model, and sends the intermediate model parameters to the main parameter update node.

[0129] Step 308: The master parameter update node aggregates the intermediate model parameters sent by at least two slave parameter update nodes, and updates the model parameters of the machine learning model based on the aggregated intermediate model parameters to obtain the trained machine learning model.

[0130] See Figure 6 There are four parameter update nodes: primary parameter update node, secondary parameter update node 1, secondary parameter update node 2, and secondary parameter update node 3.

[0131] At this point, when the executor node uploads the calculated target parameters, it needs to divide the target parameters, for example, into three target parameter data blocks A1, B1, and C1, and then upload these three target parameter data blocks to the corresponding slave parameter update nodes respectively. Executor node 1 divides the target parameters into A1, B1, and C1; executor node 2 divides the target parameters into A2, B2, and C2; and executor node n divides the target parameters into A3, B3, and C3. Therefore, during the upload, the executor nodes will upload A1, A2, and A3 to slave parameter update node 1, B1, B2, and B3 to slave parameter update node 2, and C1, C2, and C3 to slave parameter update node 3.

[0132] Applying the above embodiments of this application, each actuator node obtains the machine learning model from the parameter update node and obtains the corresponding training sample subset. Then, it uses the machine learning model to predict the training sample subset and determines the target parameter for updating the model parameter based on the difference between the prediction result and the corresponding sample label. This target parameter is then sent to the parameter update node to update the model parameter of the machine learning model.

[0133] Here, the distributed machine learning system contains at least two executor nodes. Each executor node independently calculates the target parameters used to update the model parameters, and the parameter update node updates the model parameters based on the target parameters of each executor node. This can improve the training efficiency of the machine learning model and reduce the consumption of hardware resources. At the same time, the training sample subset is obtained by splitting the training sample set used to train the machine learning model, avoiding the information loss problem caused by sample sampling and improving the model learning effect.

[0134] Based on the foregoing description of the distributed machine learning system provided in the embodiments of this application, the model training method based on the distributed machine learning system provided in the embodiments of this application will be described next. See also Figure 8 , Figure 8 This is a flowchart illustrating a model training method based on a distributed machine learning system provided in this application embodiment. The distributed machine learning system provided in this application embodiment includes a parameter update node and at least two executor nodes. The model training method based on a distributed machine learning system provided in this application embodiment includes:

[0135] Step 401: The executor node obtains the machine learning model and the corresponding training sample subset.

[0136] Each executor node corresponds to a subset of training samples, which is obtained by splitting the training sample set used to train the machine learning model.

[0137] When training a machine learning model based on this distributed machine learning system, a model training instruction for that machine learning model can be triggered. At this time, the executor node responds to the model training instruction by sending a model retrieval request for the machine learning model to the parameter update node; the parameter update node responds to the executor node's model retrieval request by distributing the machine learning model to each executor node.

[0138] The executor node receives the machine learning model from the parameter update node and obtains a subset of training samples corresponding to that model. Specifically, the executor node can obtain these samples from a database. Here, each executor node corresponds to a unique subset of training samples. Training the machine learning model based on these different subsets allows for differentiated training, avoiding overfitting and improving generalization. In practical applications, this subset can be obtained by splitting the full training sample set used to train the model. This avoids the need to sample from the entire training set, reducing the possibility of missing important samples and improving the model training effect.

[0139] Step 402: Use a machine learning model to predict the training samples in the corresponding training sample subset and obtain the prediction results.

[0140] After obtaining the training sample subset corresponding to the machine learning model, the executor node uses the training sample subset to train the machine learning model. Specifically, the machine learning model makes predictions on the training samples in the training sample subset to obtain the corresponding prediction results; then, it determines the difference between the prediction results and the corresponding sample labels.

[0141] Step 403: Based on the difference between the prediction result and the corresponding sample label, determine the target parameters of the machine learning model and send them to the parameter update node so that the parameter update node updates the model parameters of the machine learning model based on the target parameters, resulting in the trained machine learning model.

[0142] The target parameter is used by the parameter update node to update the model parameters of the machine learning model based on the target parameter, so as to obtain the trained machine learning model.

[0143] After determining the difference between the predicted result and the corresponding sample label, the executor node determines the target parameters based on this difference. These target parameters can be gradients, second derivatives, etc. Specifically, the executor node can determine the value of the loss function of the machine learning model based on this difference, and then perform derivative calculations on the loss function value, including first and second derivatives, to obtain the first and second derivatives of the loss function value. These obtained first and second derivatives of the loss function value are then used as the target parameters. At this point, the target parameters are uploaded to the parameter update node, which relies on its computational capabilities to update the model parameters of the machine learning model.

[0144] The parameter update node updates the model parameters of the machine learning model based on the target parameters sent by each executor node, so as to obtain the trained machine learning model.

[0145] In some embodiments, when the input to the machine learning model includes user profile data, page content data of the media feed page, and user behavior data of the user on the media feed page, and the output of the machine learning model is the time interval between two consecutive visits to the media feed page by the user, the executor node obtains the trained machine learning model from the parameter update node; obtains user profile data of multiple users corresponding to the media feed page, page content data of the media feed page, and user behavior data of each user on the media feed page; uses the machine learning model, combined with the user profile data, page content data, and user behavior data corresponding to each user, to predict the time interval for each user, obtaining the corresponding target prediction result; based on the target prediction results for multiple users, the target user group corresponding to the media feed page is determined from the multiple users. The target prediction result is used to characterize the time interval between two consecutive visits to the media feed page by the corresponding user.

[0146] Here, once the machine learning model is trained, it can be used to perform prediction tasks. In the recommendation system for media feed pages, this machine learning model can be used to predict the target user group corresponding to the media feed page, thereby achieving accurate recommendations and improving the performance of the recommendation system.

[0147] Specifically, when a distributed machine learning system contains driver nodes, operators can send prediction tasks for media information stream pages to executor nodes through the driver nodes. The recipient of the prediction task is a target executor node in the distributed machine learning system. This target executor node can be configured when the prediction task is sent or it can be obtained through an election mechanism.

[0148] After receiving the prediction task for the media feed page, the executor node sends a model retrieval request to the parameter update node to pull the trained machine learning model. The parameter update node responds to the model retrieval request by distributing the trained machine learning model to the corresponding executor node. The executor node then receives the trained machine learning model and executes the prediction task.

[0149] See Figure 9A , Figure 9AThis is a flowchart illustrating the prediction task for a media feed page provided in this application embodiment. First, the executor node acquires user profile data of multiple users accessing the media feed page, page content data of the media feed page, and user behavior data of each user regarding the media feed page. Then, using a machine learning model, combining the user profile data, page content data, and user behavior data for each user, it predicts the access time interval for each user, obtaining a corresponding target prediction result. This target prediction result characterizes the access time interval between two consecutive accesses to the media feed page for the corresponding user. Finally, based on the target prediction results for multiple users, a target user group corresponding to the media feed page is determined from among the multiple users. In practical applications, the exposure of the media feed page can be increased for this target user group, for example, by increasing the recommendation of related media information for the media feed page.

[0150] In some embodiments, when the input of the machine learning model includes user profile data, content data of the media information to be recommended, and user behavior data of the user regarding the media information to be recommended, and the output of the machine learning model is the predicted click data of the user regarding the media information to be recommended, the executor node obtains the trained machine learning model from the parameter update node; obtains user profile data, content data of the media information to be recommended, and user behavior data of each user regarding the media information to be recommended for multiple users; uses the machine learning model, combined with the user profile data, content data, and user behavior data of each user, to predict the predicted click data of each user regarding the media information to be recommended, and obtains the corresponding target prediction results; based on the target prediction results corresponding to multiple users, the target user group corresponding to the media information to be recommended is determined from multiple users.

[0151] Here, once the machine learning model is trained, it can be used to perform prediction tasks. In a recommendation system for media information, this machine learning model can be used to identify the target user group corresponding to the media information, thereby achieving accurate recommendations and improving the performance of the recommendation system.

[0152] Specifically, when a distributed machine learning system contains driver nodes, operators can issue prediction tasks for the media information to be recommended to executor nodes through the driver nodes. The recipient of the prediction task is a target executor node in the distributed machine learning system. This target executor node can be configured when issuing the prediction task or it can be obtained through an election mechanism.

[0153] After receiving the prediction task for the media information to be recommended, the executor node sends a model retrieval request to the parameter update node to pull the trained machine learning model. The parameter update node responds to the model retrieval request by distributing the trained machine learning model to the corresponding executor node. The executor node, upon receiving the trained machine learning model, can then execute the prediction task.

[0154] See Figure 9B , Figure 9B This is a flowchart illustrating the prediction task for media information to be recommended, as provided in this embodiment. First, the executor node acquires user profile data of multiple users corresponding to the media information to be recommended, content data of the media information to be recommended, and user behavior data of each user regarding the media information to be recommended. Then, using a machine learning model, combining the user profile data, content data, and user behavior data of each user, it predicts the predicted click data of each user regarding the media information to be recommended, obtaining the corresponding target prediction results. Finally, based on the target prediction results for multiple users, the target user group corresponding to the media information to be recommended is determined from among the multiple users. In practical applications, the media information to be recommended can be recommended to this target user group.

[0155] In some embodiments, a first drop-down selection box corresponding to a media operation indicator and a second drop-down selection box corresponding to a media feed page may also be presented; in response to a selection operation of a media operation indicator triggered by the first drop-down selection box, the selected media operation indicator is used as the target media operation indicator; in response to a selection operation of a media feed page triggered by the first drop-down selection box, the selected media feed page is used as the target media feed page, and the target user group corresponding to the target media feed page is output. The target user group is selected from multiple users by predicting the corresponding target media operation indicator based on a machine learning model.

[0156] Here, the trained machine learning model can be applied to the intelligent decision-making and operation platform of information flow products. See also Figure 10A , Figure 10AThis is a schematic diagram of the interface of the intelligent decision-making operation platform for the information flow product provided in this application embodiment. Here, a first drop-down selection box corresponding to the media operation indicator (such as the next-day retention rate, the number of daily active users) and a second drop-down selection box corresponding to the media information flow page (such as the novel channel information flow page, the news channel information flow page) are presented; in response to the selection operation of the media operation indicator triggered by the first drop-down selection box, the selected media operation indicator is used as the target media operation indicator; in response to the selection operation of the media information flow page triggered by the first drop-down selection box, the selected media information flow page is used as the target media information flow page.

[0157] At this point, after the operators select the target media operation metrics and the target media information flow page, the executor node uses a machine learning model to predict the target media operation metrics for multiple users accessing the target media information flow page. The target prediction results are then used to determine the target user group corresponding to the media information flow page (such as users whose retention rate reaches the retention rate threshold the next day) from the multiple users accessing the page, and the target user group corresponding to the target media information flow page is output, for example, through text or charts.

[0158] In some embodiments, the target user group corresponding to the target media information flow page can be output in the following manner: the identifier of the target user group corresponding to the target media information flow page is presented in a coordinate system; wherein, the first coordinate axis of the coordinate system is used to characterize the exposure level of the target media information flow page, and the second coordinate axis of the coordinate system is used to characterize the magnitude of the target media operation indicator;

[0159] Correspondingly, in response to the adjustment of the exposure level of the target media information flow page, indicator change information generated by the identifier of the target user group is presented; wherein, the indicator change information is used to describe the changing trend of the target media operation indicators corresponding to the target user group during the adjustment of the exposure level.

[0160] See Figure 10B , Figure 10BThis is a schematic diagram illustrating the target user groups provided in this application embodiment. Different target user groups can be represented by different identifiers, such as squares representing female users and circles representing users aged 12-20. The identifiers of the target user groups corresponding to the target media feed page are presented in a coordinate system. The horizontal axis of the coordinate system represents the exposure level of the target media feed page, and the vertical axis represents the magnitude of the target media operation metric (next-day retention rate). In actual implementation, operators can drag the identifiers corresponding to the target user groups to adjust the exposure level, thereby generating corresponding change curves to describe the changing trend of the target media operation metric (next-day retention rate) corresponding to the target user groups during the exposure adjustment process. Based on the change area, reasonable operational suggestions can be generated, such as increasing the exposure to a certain target user group by 20%, which can ultimately increase the next-day retention rate or daily user activity by X%.

[0161] Applying the above embodiments of this application, each actuator node obtains the machine learning model from the parameter update node and obtains the corresponding training sample subset. Then, it uses the machine learning model to predict the training sample subset and determines the target parameter for updating the model parameter based on the difference between the prediction result and the corresponding sample label. This target parameter is then sent to the parameter update node to update the model parameter of the machine learning model.

[0162] Here, the distributed machine learning system contains at least two executor nodes. Each executor node independently calculates the target parameters used to update the model parameters, and the parameter update node updates the model parameters based on the target parameters of each executor node. This can improve the training efficiency of the machine learning model and reduce the consumption of hardware resources. At the same time, the training sample subset is obtained by splitting the training sample set used to train the machine learning model, avoiding the information loss problem caused by sample sampling and improving the model learning effect.

[0163] The following describes an exemplary application of the embodiments of this application in a real-world application scenario.

[0164] In the information flow field, historical user behavior data is massive in scale and contains numerous feature sets, far exceeding the storage and computing power of a single machine. Currently, the training process for COX models generally involves sampling historical user behavior data and feature sets, reducing the dataset and number of features to a level that a single machine can handle, and then using the memory and CPU computing power of a single machine to complete the learning process of the COX model. Currently, training COX models based on a single-machine CPU has three main drawbacks: First, computation and storage are separated. Historical user behavior data is generally stored in the distributed file system HDFS. Data sampled using Hive needs to be manually downloaded and transferred to the computing node, requiring manual intervention, which is time-consuming and inefficient. Second, single-machine CPU computing is inefficient, with model training times reaching days, resulting in excessively long parameter tuning iteration cycles. Third, after sampling, some important information may be missed from the historical user behavior data and feature sets, leading to poor model learning performance.

[0165] Based on this, this application adopts a training method using GPUs and a distributed machine learning system. The training data is partitioned using the distributed computing framework Spark-On-Angel, and the resulting training data partitions are sent to the computing machines in the distributed machine learning system. Each computing machine uses the computing framework PyTorch to call the GPU to calculate the gradient and Hessian matrix (i.e., the second derivative), and transmits the calculation results to the parameter server (i.e., the parameter update node mentioned above). The parameter server updates and stores the model parameters, thereby completing the learning process of the COX model on a large-scale training dataset.

[0166] Here, the Cox model uses survival outcome and survival time as dependent variables, allowing for the simultaneous analysis of the impact of numerous factors on survival period. Applied to a news feed user operation system, the survival probability of the survival model is mapped to the activity probability. User dimensions, content dimensions, and behavioral dimensions from the news feed are used as feature inputs to the model. The Cox model takes the following form:

[0167]

[0168] in, The input to the COX model represents the user, content, and behavioral features in the information flow. The feature parameters learned by the model represent each feature. The importance of Is when When the vector is 0, The baseline hazard rate is a quantity that needs to be estimated from the sample data. The prediction result of the model represents the time interval between two consecutive uses of the information flow product by a user.

[0169] In practical applications, due to the COX model's... The Cox model makes no assumptions, thus offering considerable flexibility in addressing problems; on the other hand, in many cases, only the parameters need to be estimated. (such as factor analysis, etc.), even in Even when the parameters are unknown, they can still be estimated. That is, the Cox model contains parameters. It is not a fully parametric model, but a semi-parametric model. Therefore, when training the Cox model, the parameters can be... and parameters Calculate and process separately.

[0170] The following describes the model training method based on a distributed machine learning system provided in this application. The distributed machine learning system provided in this application includes: a parameter update node, a driver node, and at least two executor nodes (such as...). Figure 4 and Figure 6 (As shown). See also Figure 11 , Figure 11 A flowchart illustrating the model training method based on a distributed machine learning system provided in this application embodiment includes:

[0171] Step 501: The driver node obtains the training sample set for training the machine learning model, and splits the training sample set based on the distributed computing framework to obtain the training sample subsets corresponding to each executor node.

[0172] Here, the machine learning model is the COX model. The distributed computing framework of this system consists of a driver node (Spark driver) and at least two executor nodes (Spark Executors). The training sample set (i.e., the full training samples) used to train the machine learning model is stored in Hive. During machine model training, the driver node obtains the training sample set and, based on the distributed computing framework, partitions the training sample set to obtain the corresponding training sample subsets for each executor node.

[0173] Here, in the information feed domain, the training samples in the training sample set can be composed of user characteristics, information feed page content characteristics, and user behavior characteristics related to the information feed page. For example, if user (ID: 123) used an information feed product on October 1, 2020, and the recommendation system exposed 3 entertainment articles and 2 current affairs articles to the user, and the user clicked on one entertainment article, and then user (ID: 123) used the information feed product again on October 5, 2020, then the entire process described above can form a training sample for a machine learning model, containing input features. The training data includes user characteristics (such as user ID), content characteristics (such as exposure to 3 entertainment articles, 2 political articles, and 1 entertainment article), and user behavior characteristics based on the target page (such as click behavior on the entertainment article). The time interval (4 days) between two consecutive visits to the news channel feed page by the user can be used as the sample label for this training sample, i.e., the output of the machine learning model. .

[0174] Step 502: The driver node generates the computation tasks corresponding to each executor node and sends the computation tasks to the corresponding executor node.

[0175] Here, the computational task is used to instruct the prediction of training samples in a subset of training samples through a machine learning model, obtain the prediction results, determine the difference between the prediction results and the corresponding sample labels, and determine the target parameters based on the difference.

[0176] In practical applications, driver nodes are used for distributed task scheduling in distributed computing architectures. After dividing the training sample set, they send the training sample subset to each executor node and generate computing tasks for each executor node to instruct each executor node to train the machine learning model based on the training samples in the training sample subset.

[0177] Step 503: The executor node receives the computation task sent by the driver node and sends a model retrieval request for the machine learning model to the parameter update node.

[0178] Here, after each executor node receives the computation task sent by the driver node, it obtains the corresponding training sample subset and pulls the machine learning model from the parameter server. For example, it can pull the machine learning model by sending a model retrieval request to the parameter update node.

[0179] Step 504: The parameter update node responds to the executor node's model acquisition request and distributes the machine learning model to each executor node.

[0180] Step 505: The executor node receives the machine learning model and obtains the corresponding training sample subset. It then uses the machine learning model to predict the training samples in the training sample subset, obtains the prediction results, and determines the difference between the prediction results and the corresponding sample labels.

[0181] Step 506: The actuator node determines the target parameter based on the difference and sends the target parameter to the parameter update node.

[0182] Here, the target parameter can be the gradient, second derivative, etc. When the machine learning model is a Cox model, the loss function can be the likelihood function of the Cox model. After the executor node determines the difference between the predicted result and the corresponding sample label, it determines the value of the likelihood function of the Cox model based on the difference. Then, it calculates the derivative of the likelihood function of the Cox model, including the first and second derivatives, to obtain the first derivative (i.e., gradient) and second derivative of the likelihood function value. The obtained first and second derivatives of the likelihood function value are used as the target parameter. The target parameter is uploaded to the parameter update node. Here, the upload of the target parameter between the executor nodes is asynchronous.

[0183] Specifically, the likelihood function of the Cox model is as follows:

[0184]

[0185] The first derivative of the likelihood function of the Cox model is obtained as follows:

[0186]

[0187] The second derivative of the likelihood function of the Cox model is obtained as follows:

[0188]

[0189] in, , , , This represents the number of users observed on day j. This represents the number of users who accessed the information flow product on day j. Indicates from The traversal.

[0190] Step 507: The parameter update node updates the model parameters of the machine learning model based on the target parameters sent by each executor node, so as to obtain the trained machine learning model.

[0191] Here, the parameter update node receives the target parameters sent by each executor node and updates the model parameters of the machine learning model based on the target parameters. Specifically, the parameter update node can update the model parameters based on the following formula:

[0192] ,

[0193] in, The second derivative of the model likelihood function , The gradient of the model likelihood function. , The number of iterations for model learning for the executor node.

[0194] The above steps are for updating the model parameters of the Cox model. The process of updating model parameters Next, the parameters of the Cox model also need to be adjusted. Update it. Specifically, It can be obtained through the following calculation formula:

[0195]

[0196] in, This represents different access time intervals in the training sample set. Indicates in The number of users accessing the site within this access interval. Indicates that the access time interval is greater than The number of users, For a training sample, This is obtained based on the steps described above.

[0197] When model parameters After the update, the executor node needs to pull the updated data. Proceed to the next iteration, which is based on the updated... The next round of calculations of the target parameters (gradient and second derivative of the model likelihood function) continues until the iteration ends.

[0198] In practical applications, to avoid the impact of excessive data volume on parameter update nodes, there can be multiple parameter update nodes. In this case, when the executor node uploads the calculated target parameters, it needs to divide the target parameters, for example, into three target parameter data blocks, and then upload these three target parameter data blocks to the corresponding parameter update nodes. It should be noted that the target parameters are divided according to the same rules across all executor nodes, and the target parameter data blocks uploaded to the same parameter update node should also be in the same position within the target parameters. For example, if each executor node divides the target parameters into target parameter data block 1, target parameter data block 2, and target parameter data block 3, then during the upload, each executor node will upload its own target parameter data block 1 to parameter update node 1, its own target parameter data block 2 to parameter update node 2, and its own target parameter data block 3 to parameter update node 3.

[0199] Each parameter update node updates its model parameters based on the target parameters it receives. When there are multiple parameter update nodes, a management node can be deployed to integrate the model parameters obtained from each node, resulting in the final trained machine learning model.

[0200] Step 508: The executor node obtains the trained machine learning model from the parameter update node.

[0201] Here, upon receiving a prediction instruction triggered by a user, the executor node needs to retrieve the trained machine learning model from the parameter server node. Specifically, the prediction instruction can also be triggered by a driver node, thereby enabling the driver node to schedule the task for the corresponding executor node, i.e., to issue the prediction task corresponding to the prediction instruction.

[0202] Step 509: Obtain user profile data of multiple users visiting the media feed page, page content data of the media feed page, and user behavior data of each user visiting the media feed page.

[0203] Here, the prediction task is for media feed pages.

[0204] Step 510: Using a machine learning model, combined with user profile data, page content data, and user behavior data for each accessing user, predict the access time interval for each accessing user to obtain the corresponding target prediction results; based on the target prediction results for multiple accessing users, determine the target user group corresponding to the media information flow page from among the multiple accessing users.

[0205] Step 511: Obtain user profile data of multiple users corresponding to the media information to be recommended, content data of the media information to be recommended, and user behavior data of each user regarding the media information to be recommended.

[0206] Here, the prediction task is for the media information to be recommended.

[0207] Step 512: Using a machine learning model, combined with user profile data, content data, and user behavior data, predict the predicted click data for each user regarding the media information to be recommended, and obtain the corresponding target prediction results; based on the target prediction results for multiple users, determine the target user group corresponding to the media information to be recommended from multiple users.

[0208] Here, the trained machine learning model can be applied to the intelligent decision-making and operation platform of information flow products. See also Figure 10AHere, a first drop-down selection box for the corresponding media operation metric (such as the next-day retention rate and the number of daily active users) and a second drop-down selection box for the corresponding media information flow page (such as the novel channel information flow page and the news channel information flow page) are presented; in response to the selection operation of the media operation metric triggered by the first drop-down selection box, the selected media operation metric is used as the target media operation metric; in response to the selection operation of the media information flow page triggered by the first drop-down selection box, the selected media information flow page is used as the target media information flow page.

[0209] At this point, user profile data of multiple users accessing the media feed page, page content data of the media feed page, and user behavior data of each user accessing the media feed page are obtained. Using a machine learning model, combined with the user profile data, page content data, and user behavior data of each user, the access time interval of each user is predicted to obtain the corresponding target prediction results. Based on the target prediction results of multiple users, the target user group corresponding to the media feed page (such as users whose retention rate reaches the retention rate threshold on the next day) is determined from the multiple users, and the target user group corresponding to the target media feed page is output.

[0210] Specifically, such as Figure 10B As shown, different identifiers can be used to represent different target user groups. For example, squares represent female users, and circles represent users aged 12-20. Here, the identifiers of the target user groups corresponding to the target media feed page are presented using a coordinate system. The horizontal axis of the coordinate system represents the exposure level of the target media feed page, and the vertical axis represents the magnitude of the target media operation metric (next-day retention rate). In actual implementation, operators can click on the identifier corresponding to the target user group to view the corresponding historical data. Operators can drag the identifier corresponding to the target user group to adjust the exposure level, thereby generating a corresponding change curve to describe the changing trend of the target media operation metric (next-day retention rate) for the target user group during the exposure adjustment process. Based on the change area, reasonable operational suggestions can be generated, such as increasing the exposure to a certain target user group by 20%, which can ultimately increase the next-day retention rate or daily user activity by X%.

[0211] By applying the above embodiments of this application, a training method based on GPUs and a distributed machine learning system is employed. The training data is partitioned using the distributed computing framework Spark-On-Angel, and the resulting training data partitions are sent to computing machines within the distributed machine learning system. Each computing machine, using the PyTorch framework, calls the GPU to calculate the gradient and Hessian matrix (second derivative), and transmits the calculation results to the parameter server (i.e., the aforementioned parameter update node). The parameter server updates and stores the model parameters, thereby completing the learning process of the Cox model on a large-scale training dataset. This achieves the following technical effects:

[0212] First, the distributed computing framework Spark can directly read training sample data, making the entire model training process efficient and direct without manual intervention.

[0213] Second, it can accelerate the training and learning of COX models on full-scale datasets (hundreds of millions) and high-dimensional feature sets (tens of thousands). On a 2 million * 1k dataset, after acceleration using GPUs and a distributed machine learning system, the computation time per iteration is 1000 * n times faster than the single-machine CPU version, where n is the number of tasks. The comparison of computation time per task and per iteration on a single machine CPU is as follows: Figure 12 As shown, Figure 12 This is a diagram comparing the training time of machine learning models. Here, the training time of the distributed machine learning system in this application is 0.3, and the training time of the single-machine CPU version is 298.4. It can be seen that there is a huge difference between the two.

[0214] The exemplary application and implementation of the distributed machine learning system provided in this application have been used to illustrate the model training method of the distributed machine learning system provided in this application. Based on this, this application also provides a node device, which includes:

[0215] Memory, used to store executable instructions;

[0216] The processor, when executing executable instructions stored in the memory, implements the model training method based on a distributed machine learning system provided in the embodiments of this application.

[0217] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the model training method based on a distributed machine learning system provided in this application.

[0218] This application also provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the model training method based on a distributed machine learning system provided in this application.

[0219] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0220] In some embodiments, executable instructions may take 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 standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0221] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0222] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

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

Claims

1. A distributed machine learning system, characterized in that, The system includes: a parameter update node, and at least two executor nodes; wherein, The parameter update node is used to send a machine learning model to each of the executor nodes in response to a model acquisition request from at least two of the executor nodes; the model parameters of the machine learning model include a first model parameter and a second model parameter. The executor node is used to receive the machine learning model and obtain the corresponding training sample subset, predict the training samples in the training sample subset through the machine learning model, obtain the prediction result, and determine the difference between the prediction result and the corresponding sample label. Each of the executor nodes corresponds to a subset of training samples, which is obtained by splitting the training sample set used to train the machine learning model. The actuator node is further configured to determine a target parameter based on the difference, and send the target parameter to the parameter update node; The executor node is further configured to perform statistical analysis on the training samples in the training sample subset based on multiple data statistical indicators to obtain the indicator values ​​of each data statistical indicator; determine intermediate model parameters based on the indicator values ​​of each data statistical indicator and the first model parameters; and send the intermediate model parameters to the parameter update node. The parameter update node is also used to update the first model parameters of the machine learning model based on the target parameters sent by each of the executor nodes; The parameter update node is also used to aggregate the intermediate model parameters sent by each of the executor nodes, and update the second model parameters of the machine learning model based on the aggregated intermediate model parameters to obtain the trained machine learning model.

2. The system as described in claim 1, characterized in that, The system further includes: a driver node, which, together with the at least two actuator nodes, constitutes the distributed computing framework of the system; The driver node is used to acquire a training sample set for training the machine learning model, and split the training sample set based on the distributed computing framework to obtain a training sample subset corresponding to each of the executor nodes.

3. The system as described in claim 2, characterized in that, The driver node is also used to generate computing tasks corresponding to each of the executor nodes and send the computing tasks to the corresponding executor nodes; The computational task is used to instruct the machine learning model to predict the training samples in the training sample subset, obtain the prediction result, determine the difference between the prediction result and the corresponding sample label, and determine the target parameter based on the difference.

4. The system as described in claim 1, characterized in that, When there are at least three parameter update nodes, the at least three parameter update nodes include a primary parameter update node and at least two secondary parameter update nodes; The executor node is also used to split the target parameter into at least two sub-target parameters, and send each sub-target parameter to the corresponding slave parameter update node. The slave parameter update node is used to update the model parameters of the machine learning model based on the sub-target parameters sent by each of the executor nodes, to obtain the intermediate model parameters of the machine learning model, and to send the intermediate model parameters to the master parameter update node. The master parameter update node is used to aggregate the intermediate model parameters sent by the at least two slave parameter update nodes, and update the model parameters of the machine learning model based on the aggregated intermediate model parameters to obtain the trained machine learning model.

5. The system as described in claim 1, characterized in that, The executor node is also used to extract features from the training samples in the training sample subset through the feature extraction layer of the machine learning model, so as to obtain the user profile features of the target user corresponding to the training sample, the page content features of the target page corresponding to the training sample, and the user behavior features based on the target page. The feature prediction layer of the machine learning model combines user profile features, page content features, and user behavior features to predict the target user's behavior on the target page.

6. The system as described in claim 1, characterized in that, The neural network framework corresponding to the machine learning model is the target neural network framework; The actuator node is also used to call the graphics processor to predict the training samples in the training sample subset based on the target neural network framework, obtain the prediction result, determine the difference between the prediction result and the corresponding sample label, and determine the target parameter based on the difference.

7. The system as described in claim 1, characterized in that, The executor node is also used to extract features from the training samples in the training sample subset through the machine learning model when the machine learning model is a proportional hazards regression model, so as to obtain the user profile features of the target user corresponding to the training sample, the page content features of the target page corresponding to the training sample, and the user behavior features based on the target page. The feature prediction layer of the machine learning model combines user profile features, page content features, and user behavior features to make predictions, thereby obtaining a prediction result representing the time interval between two consecutive visits of the target page by the target user.

8. The system as described in claim 1, characterized in that, The executor node is further configured to determine the value of the loss function of the machine learning model based on the difference, and to calculate the derivative of the value of the loss function to obtain the target parameters.

9. A model training method based on a distributed machine learning system, characterized in that, The system includes: a parameter update node and at least two executor nodes; wherein each executor node corresponds to a subset of training samples, the subset of training samples being obtained by splitting the training sample set used to train the machine learning model; the method includes: The executor node acquires the machine learning model and the corresponding training sample subset; the model parameters of the machine learning model include first model parameters and second model parameters; The machine learning model is used to predict the training samples in the corresponding training sample subset to obtain the prediction results. Based on the difference between the prediction result and the corresponding sample label, the target parameters of the machine learning model are determined and sent to the parameter update node; The actuator node further performs statistical analysis on the training samples in the training sample subset based on multiple data statistical indicators to obtain the indicator values ​​of each data statistical indicator; based on the indicator values ​​of each data statistical indicator and the first model parameters, it determines intermediate model parameters and sends the intermediate model parameters to the parameter update node. The parameter update node updates the first model parameters of the machine learning model based on the target parameters sent by each of the executor nodes; The parameter update node aggregates the intermediate model parameters sent by each of the executor nodes, and updates the second model parameters of the machine learning model based on the aggregated intermediate model parameters to obtain the trained machine learning model.

10. The method as described in claim 9, characterized in that, When the input to the machine learning model includes user profile data, page content data of the media feed page, and user behavior data of the user on the media feed page, and the output of the machine learning model is the time interval between two consecutive visits of the user to the media feed page, the method further includes: Obtain the trained machine learning model from the parameter update node; Obtain user profile data of multiple users accessing the media feed page, page content data of the media feed page, and user behavior data of each user accessing the media feed page; Using the machine learning model, combined with the user profile data, page content data and user behavior data corresponding to each of the accessing users, the access time interval of each of the accessing users is predicted to obtain the corresponding target prediction results. The target prediction result is used to characterize the time interval between two consecutive visits by the corresponding user to the media information stream page; Based on the target prediction results corresponding to the multiple access users, the target user group corresponding to the media information flow page is determined from the multiple access users.

11. The method as described in claim 9, characterized in that, When the input to the machine learning model includes user profile data, content data of the media information to be recommended, and user behavior data of the user regarding the media information to be recommended, and the output of the machine learning model is the predicted click data of the user regarding the media information to be recommended, the method further includes: Obtain the trained machine learning model from the parameter update node; Acquire user profile data of multiple users corresponding to the media information to be recommended, content data of the media information to be recommended, and user behavior data of each user regarding the media information to be recommended; Using the machine learning model, combined with the user profile data, content data and user behavior data of each user, the predicted click data of each user for the media information to be recommended is predicted, and the corresponding target prediction results are obtained. Based on the target prediction results corresponding to the multiple users, the target user group corresponding to the media information to be recommended is determined from the multiple users.

12. The method as described in claim 9, characterized in that, The method further includes: The drop-down menu for the corresponding media operation metrics and the drop-down menu for the corresponding media information flow page are displayed. In response to the selection operation of media operation indicators triggered by the first drop-down selection box, the selected media operation indicator is used as the target media operation indicator; In response to the selection operation of the media feed page triggered by the first drop-down selection box, the selected media feed page is set as the target media feed page, and Output the target user group corresponding to the target media information stream page; The target user group is selected from the target prediction results obtained by predicting the target media operation indicators for multiple users accessing the target media information flow page based on the machine learning model.

13. The method as described in claim 12, characterized in that, After the step of outputting the target user group, the method further includes: The target user group corresponding to the target media information flow page is presented in a coordinate system, wherein the first coordinate axis of the coordinate system is used to characterize the exposure degree of the target media information flow page, and the second coordinate axis is used to characterize the magnitude of the target media operation index. In response to adjustments to the exposure of the target media feed page, information on changes in metrics generated by the identifier of the target user group is presented.

14. A node device, characterized in that, The node device includes: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the model training method based on a distributed machine learning system as described in any one of claims 9 to 13.

15. A computer-readable storage medium, characterized in that, The system stores executable instructions, which, when executed, are used to implement the model training method based on a distributed machine learning system as described in any one of claims 9 to 13.

16. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the model training method based on a distributed machine learning system as described in any one of claims 9 to 13.

Citation Information

Patent Citations

  • Method and device for neural network machine learning model training

    CN109754060A

  • Neural network linguistic model training method and device, equipment and storage medium

    CN110379416A