Model application method, device and electronic equipment
Through point-to-point downloading of updated parameter data of the model, the problem of long time from model training to application is solved, the timeliness of the recommendation system is improved, and the recommendation system can ensure that the recommendation system can respond to user needs in a timely manner.
Patent Information
- Application Number
- CN202210177935.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-25
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-02-25
AI Technical Summary
In existing recommendation systems, it takes a long time for models to be trained and applied, which results in the inability to capture user needs in a timely manner and affects the timeliness of the recommendation system.
Download the updated parameter data of the model directly from the training node in a point-to-point manner, instead of the entire model, eliminating the intermediate download process, reducing file reading and writing to remote memory access, and improving the time from training to application of the model.
It significantly reduces the time from training to application of the model, improves the timeliness of model application, and enables the recommendation system to capture user interests in a timely manner and satisfy user experience.
Smart Images

Figure CN114500642B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, in particular to the field of recommendation technology, and specifically to a model application method, device and electronic device. Background Art
[0002] In recent years, with the rapid development of information technology, the amount of information on the Internet has increased. In order to solve the problem of information overload and provide better services to users, many applications such as short videos, news information, e-commerce, etc. have deployed recommendation systems to recommend information.
[0003] Currently, recommendation systems usually recommend information through models, and usually train the model on one node and apply the model on another node. Therefore, a distribution process is usually required from the completion of model training to the application of the model to distribute the model from one node to another node for model application.
[0004] In the related art, the model is usually loaded into another node in the form of a dictionary for model application. Summary of the invention
[0005] The present disclosure provides a model application method, device and electronic device.
[0006] According to a first aspect of the present disclosure, a model application method is provided, which is applied to a terminal and includes:
[0007] Obtaining the operation information of the first user on the information page for N task targets, where N is a positive integer;
[0008] Sending target data to a first node so that the first node trains a first model based on the training data to obtain updated parameter data of the first model, wherein the target data includes the operation information, and the training data includes behavior data determined based on the target data;
[0009] Receive recommendation information sent by the second node, where the recommendation information is recommendation information of the first user determined by the second node based on the trained first model, and the updated parameter data of the trained first model is downloaded by the second node from the first node in a point-to-point manner.
[0010] According to a second aspect of the present disclosure, a model application method is provided, which is applied to a third node and includes:
[0011] Receive a first access request sent by a second node, where the first access request is used to request downloading update parameter data of a first model from a first node, where the first node is a node for training the first model, and the update parameter data is obtained by the first node by training the first model based on training data, where the training data includes behavior data determined by target data, and the target data includes operation information of a user on an information page for N task targets, where N is a positive integer;
[0012] In response to the first access request, the second node is controlled to download the updated parameter data from the first node in a point-to-point manner, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data.
[0013] According to a third aspect of the present disclosure, a model application method is provided, which is applied to a first node and includes:
[0014] Receive target data sent by the terminal, where the target data includes operation information of the user on the information page for N task targets, where N is a positive integer;
[0015] Acquiring training data, wherein the training data includes behavior data determined based on the target data;
[0016] Training the first model based on the training data to obtain updated parameter data of the first model;
[0017] The updated parameter data is sent to the second node in a point-to-point manner, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data.
[0018] According to a fourth aspect of the present disclosure, a model application device is provided, which is applied to a terminal, and includes:
[0019] A first acquisition module is used to acquire operation information of a first user on an information page for N task targets, where N is a positive integer;
[0020] A first sending module, configured to send target data to a first node, so that the first node trains a first model based on the training data to obtain updated parameter data of the first model, wherein the target data includes the operation information, and the training data includes behavior data determined based on the target data;
[0021] The first receiving module is used to receive recommendation information sent by the second node, where the recommendation information is recommendation information of the first user determined by the second node based on the trained first model, and the updated parameter data of the trained first model is downloaded by the second node from the first node in a point-to-point manner.
[0022] According to a fifth aspect of the present disclosure, a model application device is provided, which is applied to a third node and includes:
[0023] A second receiving module is configured to receive a first access request sent by a second node, wherein the first access request is used to request downloading update parameter data of a first model from a first node, wherein the first node is a node for training the first model, and the update parameter data is obtained by the first node through training the first model based on training data, wherein the training data includes behavior data determined by target data, and the target data includes operation information of a user on an information page for N task targets, where N is a positive integer;
[0024] The first control module is used to control the second node to download the updated parameter data from the first node in a point-to-point manner in response to the first access request, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data.
[0025] According to a sixth aspect of the present disclosure, a model application device is provided, which is applied to a first node and includes:
[0026] A third receiving module is used to receive target data sent by the terminal, wherein the target data includes operation information of the user on the information page for N task targets, where N is a positive integer;
[0027] A second acquisition module, used to acquire training data, wherein the training data includes behavior data determined based on the target data;
[0028] A training module, used to train the first model based on the training data to obtain updated parameter data of the first model;
[0029] The second sending module is used to send the updated parameter data to the second node in a point-to-point manner, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data.
[0030] According to a seventh aspect of the present disclosure, there is provided an electronic device, including:
[0031] at least one processor; and
[0032] a memory communicatively connected to at least one processor; wherein,
[0033] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to execute any method in the first aspect, or execute any method in the second aspect, or execute any method in the third aspect.
[0034] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any one of the methods in the first aspect, or any one of the methods in the second aspect, or any one of the methods in the third aspect.
[0035] According to a ninth aspect of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements any one of the methods in the first aspect, or implements any one of the methods in the second aspect, or executes any one of the methods in the third aspect.
[0036] The technology disclosed in the present invention solves the problem of a long time from model training to effectiveness, reduces the time from model training to effectiveness, and improves the timeliness of model application.
[0037] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0039] Figure 1 is a flowchart of a model application method according to the first embodiment of the present disclosure;
[0040] Figure 2 is a flowchart of a model application method according to a second embodiment of the present disclosure;
[0041] Figure 3 It is a schematic diagram of the download mechanism of the distribution process;
[0042] Figure 4 is a flowchart of a model application method according to a third embodiment of the present disclosure;
[0043] Figure 5 is a structural schematic diagram of a model application device according to a fourth embodiment of the present disclosure;
[0044] Figure 6is a structural schematic diagram of a model application device according to a fifth embodiment of the present disclosure;
[0045] Figure 7 is a structural schematic diagram of a model application device according to a sixth embodiment of the present disclosure;
[0046] Figure 8 is a schematic block diagram of an example electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0048] First embodiment
[0049] like Figure 1 As shown, the present disclosure provides a model application method, which is applied to a terminal and includes the following steps:
[0050] Step S101: obtaining the operation information of the first user on the information page for N task targets, where N is a positive integer;
[0051] Step S102: Sending target data to a first node, so that the first node trains a first model based on the training data to obtain updated parameter data of the first model, wherein the target data includes the operation information, and the training data includes behavior data determined based on the target data;
[0052] Step S103: receiving recommendation information sent by the second node, wherein the recommendation information is recommendation information of the first user determined by the second node based on the trained first model, and the updated parameter data of the trained first model is downloaded by the second node from the first node in a point-to-point manner.
[0053] In this embodiment, the model application method relates to the field of data processing technology, and in particular to the field of recommendation technology, which can be widely used in recommendation scenarios. The model application method of the embodiment of the present disclosure can be executed by the model application device of the embodiment of the present disclosure. The model application device of the embodiment of the present disclosure can be configured in any electronic device, which can be a terminal, to execute the model application method of the embodiment of the present disclosure.
[0054] In recommendation scenarios, such as recommendation scenarios in short videos, news information, e-commerce and other applications, models are needed for information recall and sorting to recommend information. The model can be a deep learning model, and the model is usually relatively large, such as a capacity of up to TG level.
[0055] Normally, model training and model application are not on the same node. If the model is distributed in the form of a dictionary, the distribution time is relatively long, resulting in the inability to capture user needs in a timely manner. The purpose of this embodiment is to solve the distribution problem of the model so that the entire process from model training to model application is relatively short. Specifically, the second node of the model application can directly download the updated parameter information of the first model from the first node in a point-to-point manner to reduce the distribution time of the first model from the training node (referring to the first node) to the application node (referring to the second node), thereby reducing the time for the first model to take effect from the application node to the online, and improving the timeliness of the model application. Among them, model effectiveness refers to the application of the first model in the recommendation system, so that the recommendation system can perform online estimation based on the first model to recommend information to the terminal.
[0056] In step S101, the first user may be any user logged in on the target application of the terminal, and the target application may be an application such as short video, news information, e-commerce, etc. The terminal may display the information page of the target application, and the information page may be an information flow page, and the information page may include information such as news recommended to the terminal by the second node (the application node of the model in the recommendation system) based on the historical updated version of the first model. The historical updated version of the first model may be the version of the first model that was most recently updated by the second node.
[0057] The user can operate the information displayed on the information page, such as clicking, liking, sharing, etc. Correspondingly, the terminal can obtain the operation information of the first user on the information page for N task targets. Among them, the operation on the N task targets may refer to the operation on the information displayed on the information page. If the operation is an operation to close the information page, then the operation is not an operation on the N task targets.
[0058] The operation information of the first user on the information page for N task objectives may include the operation type (such as a click operation, a like operation, or a share operation, etc.) and the information identifier of the operation (such as information 1 or information 2, etc.).
[0059] The operation information can be obtained through the operation position of the first user, the information display position, the display state of the information, or the operated control. For example, if the operation position of the first user is the display position of information 1, and the display state of information 1 is the display state of a thumbnail, the operation type in the operation information can be a click operation, and the click operation is used to open the landing page of the information to browse the information 1, and the information operated in the operation information is identified as information 1.
[0060] For another example, if the control operated by the first user is a like control associated with information 2, then the operation type in the operation information may be a like operation, and the information operated on in the operation information is identified as information 2.
[0061] In step S102, the target data may be ordinary data, and the target data may be sent to the first node periodically. The target data may also be stream data, which is not specifically limited here.
[0062] Taking stream data as an example of target data, the operation information obtained by the terminal can be sent to the first node in the form of data stream, that is, the terminal will send the stream data including the operation information to the first node, so that the first node can adopt an existing or new training method to train the first model based on the training data (the training data may include behavior data determined by the stream data) to obtain updated parameter data of the first model.
[0063] The behavior data determined by the flow data may include at least one of the following:
[0064] first behavior information determined by target operation information in the stream data;
[0065] Second behavior information determined by two adjacent operation information in the stream data;
[0066] When the stream data includes the Kth operation information and the K+1th operation information is not received within a preset time, the third behavior information is determined based on the Kth operation information and the preset time, where K is a positive integer.
[0067] The target operation information may include operation information of sharing operation, operation information of clicking operation to open the information landing page in the information page, operation information of like operation, etc. Correspondingly, the first behavior information may include like behavior information, sharing behavior information, behavior information of opening the information landing page, etc.
[0068] Two adjacent operation information in the stream data may include operation information of two adjacent click operations on the same information. Correspondingly, the second behavior information may include browsing behavior information on the information (the browsing behavior information may include browsing duration).
[0069] In one scenario, if the first node does not receive the K+1th operation information for a long time after receiving the Kth operation information, some user behavior information may be lost. For example, the Kth operation information is the behavior information of opening the information landing page. For example, after reading a certain information, the application is exited and no operation is performed for a period of time. At this time, the user's browsing behavior information of the information will be lost. In this scenario, the third behavior information can be determined based on the preset time and the Kth operation information. The third behavior information may include browsing behavior information of browsing a certain information for the preset time.
[0070] In addition to the stream data corresponding to the first user, the training data may also include stream data corresponding to other users. The first node may determine the training data based on the stream data corresponding to each user. The determination method may be described in detail in the third embodiment.
[0071] The updated parameter data of the first model may be all parameter data of the first model or part of parameter data of the first model. In an optional implementation, the operation information of the first user on the information page for N task targets within each preset time period may be obtained in sequence in units of preset time periods. For example, if the preset time period is 10 minutes, the operation information of the first user on the information page for N task targets within every 10 minutes may be obtained in sequence. For each preset time period, the operation information within the preset time period is sent to the first node in the form of a data stream, so that the first node can train the first model based on the behavior data determined by the stream data.
[0072] Among them, training the first model may refer to: updating the training of the first model, that is, continuing to train the first model obtained by training in the last preset time period to obtain updated parameter data of the first model. The updated parameter data may be parameter data of an updated part of the parameter data of the first model obtained by training in the last preset time period. For example, the parameter data of the first model obtained by training in the last preset time period includes parameter 1, parameter 2 and parameter 3, and the parameter data of the first model obtained by training in the current preset time period includes parameter 1, parameter 2 and parameter 4, then parameter 4 is the updated parameter data of the first model. If the current preset time period is the first training time period of the first model, then the updated parameter data of the first model is all the parameter data of the first model.
[0073] In step S103, the second node may be an application node of the first model, and the second node may be used to recommend information to the user, wherein the number of the second nodes may be one or more, which is not specifically limited here.
[0074] The first node can distribute the updated parameter data of the first model to the second node. By distributing the updated parameter data of the first model instead of the entire model, the distribution time of the first model can be reduced. The distribution method can be: notify the second node to download the updated parameter data from the first node in a point-to-point manner, so that the process of storing the first model in the middle of the disk can be cancelled, and the file reading and writing can be converted into remote memory access, which can further reduce the distribution time of the first model.
[0075] The parameter data of the first model can be stored in a storage system with key value key-content value, wherein key can represent the distribution version of the first model, that is, the training version of the first model, and value can represent the parameter data of the distribution version of the first model. When the second node obtains the updated parameter data of the first model, it can determine the parameter data of the current version of the first model based on the updated parameter data by querying the storage system. For example, the parameter data of the latest version of the first model in the storage system can be obtained, and the parameter data of the latest version of the first model and the updated parameter data can be merged to obtain the parameter data of the current version of the first model, and the parameter data of the current version of the first model can be stored in the storage system.
[0076] Correspondingly, the second node can recommend information to the first user based on the trained first model. Specifically, it can recall the information of interest to the first user based on the trained current version of the first model, and score the recalled information based on the first model to determine the recommended information for the first user, and send the recommended information of the first user to the terminal corresponding to the first user to realize information recommendation.
[0077] In this embodiment, the distribution time of the first model can be reduced by distributing the updated parameter data of the first model instead of the entire model, and the second node is notified to download the updated parameter data from the first node in a point-to-point manner. This can eliminate the process of storing the first model in the disk and convert file reading and writing into remote memory access, which can further reduce the distribution time of the first model, making the entire process from training the first model to applying the first model shorter, that is, the entire process from obtaining training, to application, and then to effectiveness of the model is shorter. This can improve the timeliness of model application, achieve real-time recommendation effect of the model, capture user interests in a timely manner, and satisfy user experience.
[0078] It should be noted that the first node and the second node can communicate through a peer-to-peer (P2P) network such as libp2p to perform remote data transmission and realize downloading of updated parameter data of the first model.
[0079] Optionally, the target data is stream data, and step S102 specifically includes:
[0080] The operation information of the first user on the information page for the N task targets is sent to the first node in a data stream manner.
[0081] In this embodiment, the terminal sends the user's operation information to the first node via a data stream to train the first model, and obtains updated parameter data of the first model. This can capture the user's interest in a timely manner and shorten the time from capturing the user's interest to training the first model, thereby further improving the timeliness of the model application.
[0082] Optionally, the N task objectives include at least one of the following:
[0083] Click on the target;
[0084] Like target;
[0085] Share goals;
[0086] Browse time goal.
[0087] In this embodiment, when training the first model, multiple factors such as user clicks, browsing time, likes, and sharing are considered, and multiple task objectives such as click-through rate and browsing time are modeled at the same time. The model is trained based on samples that support training of multiple task objectives. This can improve the recommendation effect of the model while capturing the basic needs of users' dynamic interests in real time.
[0088] Second embodiment
[0089] like Figure 2 As shown, the present disclosure provides a model application method, which is applied to a third node and includes the following steps:
[0090] Step S201: receiving a first access request sent by a second node, wherein the first access request is used to request downloading update parameter data of a first model from a first node, wherein the first node is a node for training the first model, and the update parameter data is obtained by the first node by training the first model based on training data, wherein the training data includes behavior data determined by target data, and the target data includes operation information of a user on an information page for N task targets, where N is a positive integer;
[0091] Step S202: In response to the first access request, control the second node to download the updated parameter data from the first node, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data.
[0092] In this embodiment, the model application method relates to the field of data processing technology, and in particular to the field of recommendation technology, which can be widely used in recommendation scenarios. The model application method of the embodiment of the present disclosure can be executed by the model application device of the embodiment of the present disclosure. The model application device of the embodiment of the present disclosure can be configured in any electronic device, which can be a server, and the electronic device serves as a third node to execute the model application method of the embodiment of the present disclosure.
[0093] In this embodiment, the third node may refer to a control node in the distribution process, and the third node may control the download node to download the target parameter data of the model from the first node. The second node may refer to an application node of the first model in the recommendation system, and the second node may recommend information based on the model.
[0094] The number of the second node may be at least one, and when the recommendation system includes a server cluster, the number of the second node may be multiple. In one scenario, the recommendation system may include a server cluster, and the server cluster may include multiple servers, and the multiple servers may be located in at least one computer room, and each server may be a second node for downloading updated parameter data of the first model for model application.
[0095] The first node may be a training node of the first model, and the number of the first nodes may be one or more, which is not specifically limited here. The first model is trained through the first node to obtain updated parameter data of the first model.
[0096] In step S201, the second node may send a first access request to the third node to request the third node to allow it to download updated parameter data of the first model from the first node.
[0097] The second node may send a first access request to the third node when receiving the startup information. In an optional implementation, the startup information may be sent by the first node. For example, when the first model training is completed, the first node may send the startup information to the server cluster in the recommendation system to notify each server in the server cluster that the updated parameter data of the first model is ready and can be downloaded.
[0098] In another optional implementation, the startup information can be sent by the distribution node, and the distribution node can query the current version of the model in real time or periodically. When it is found that the current version is an updated version, the startup information can be sent to the server cluster in the recommendation system to notify each server in the server cluster that the updated parameter data of the first model is ready and can be downloaded.
[0099] Accordingly, upon receiving the startup information, the second node may send a first access request to the third node to request permission to download the updated parameter data of the first model from the first node. The first access request may carry the request content and node information of the downloading node, such as an identifier.
[0100] It should be noted that, in an optional implementation, the first node or the distribution node may send a startup message to the second node, the startup message is used to instruct the second node to download the updated parameter data of the first model. Correspondingly, the second node sends a first access request to the third node, the first access request is used to request to download the updated parameter data of the first model from the first node at one time.
[0101] In another optional implementation, the update parameter data may be divided into multiple fragment patches in the form of fragmentation to distribute the data. The first node or the distribution node may periodically send a startup message to the second node, and the startup message may indicate the fragment patch to be downloaded. For example, if the update parameter data is divided into 10 fragment patches, the first node or the distribution node may periodically send 10 startup messages to M download nodes, and each startup message is used to indicate that a fragment patch can be started for download.
[0102] The first node or distribution node may also send the startup information to the second node again after receiving the feedback information from the third node. The feedback information may indicate that all the second nodes in the recommendation system have completed downloading the shard patch that needs to be downloaded currently. Correspondingly, the second node may send an access sub-request to the third node, and the access sub-request is used to request to download the target parameter data of the first model from the first node. The target parameter data is part of the parameter data in the update parameter data, namely the shard patch. The third node may receive the access sub-requests sent by the second node in sequence until all the shard patches are downloaded.
[0103] In step S202, upon receiving the first access requests sent by M downloading nodes, the third node controls the second node to download the update parameter data from the first node in response to the first access requests.
[0104] The control methods may include but are not limited to the following:
[0105] The third node can send an enable signal to the second node, which indicates that the second node is allowed to download updated parameter data from the first node. Accordingly, the second node can send a download request to the first node when receiving the enable signal. In this way, the third node can control the second node to send a download request to the first node through the enable signal to download the updated parameter data.
[0106] The third node can also send a prohibition signal to the second node that is not allowed to download the updated parameter data from the first node. The prohibition signal indicates that the second node is prohibited from downloading the updated parameter data from the first node. Correspondingly, a second node can send a download request to the first node without receiving the prohibition signal. In this way, the third node can control the second node to send a download request to the first node through the prohibition signal to download the updated parameter data.
[0107] Correspondingly, after downloading the updated parameter data of the first model, the second node can send recommendation information to the user's corresponding terminal based on the trained first model. The way of recommending information is similar to that of the first embodiment and will not be described in detail here.
[0108] In this embodiment, by receiving the first access request sent by the second node; in response to the first access request, the second node is controlled to download the updated parameter data of the first model from the first node in a point-to-point manner, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model. In this way, the third node can control the second node to perform remote memory access in a point-to-point manner to directly download the updated parameter information of the first model from the first node, thereby reducing the time from model training to effectiveness, and further improving the timeliness of model application.
[0109] Optionally, the number of the second nodes includes M, where M is an integer greater than 1, and the step S202 specifically includes:
[0110] In response to the first access request, determining a first downloading node from the M second nodes;
[0111] The first downloading node is controlled to send a first downloading request to the first node, where the first downloading request is used for the first downloading node to download the update parameter data from the first node in a point-to-point manner.
[0112] In this implementation manner, the first download node may be determined from the M second nodes, and the determination methods include but are not limited to the following.
[0113] The first method is to determine the computer rooms to which the M second nodes belong, and randomly determine the first download node from each computer room, so that the first download node can download the updated parameter data or the fragmented patch of the updated parameter data from the first node. Since downloading data from the first node is data transmission across computer rooms, the third node determines at most L first download nodes from each computer room to download data from the first node, where L is a positive integer. This can reduce the download time while reducing the bandwidth of the download source.
[0114] The second method: the first download node can be determined from the M second nodes according to the performance of the M second nodes. For example, since the download node is usually far away from the first node, the second node with better performance can be selected as the first download node, and the update parameter data or the fragmented patch of the update parameter data can be downloaded from the first node. For example, the second node with good network performance and good operation performance can be selected as the first download node.
[0115] In addition, when M second nodes have not all downloaded the same shard patch, and M second nodes receive the start information for downloading another shard patch, in this case, the third node can preferentially determine the first download node from the second nodes that have downloaded the previous shard patch, so that the shard patches can be downloaded sequentially and orderly.
[0116] The first download request may carry request content and node information of the second node, and the request content may include the data to be downloaded. The first download request is used for the first download node to download update parameter data or a patch of update parameter data from the first node in a point-to-point manner.
[0117] When the first download node completes downloading the data, other second nodes in the recommendation system can download the data from the first download node. In an optional implementation, the second nodes with similar Internet Protocol (IP) addresses usually have the shortest physical links, and the speed of downloading data from the adjacent second nodes is extremely fast, and there is usually no download long tail, so other second nodes can download data from the adjacent second nodes (which can be called peer nodes).
[0118] Figure 3 It is a schematic diagram of the download mechanism of the distribution process, such as Figure 3 As shown, the distribution process includes a third node 301, a downloading node 302, a downloading node 303, a downloading node 304, a downloading node 305, a downloading node 306, a downloading node 307, and a first node 308. The third node determines the second node 302 as the first downloading node from the six second nodes.
[0119] Correspondingly, the second node 302 can download data from the first node, and the adjacent second node 303 and the second node 307 can download data from the second node 302. In this way, it can be ensured that the updated parameter data of the first model can be quickly spread from the first node to each download node in each computer room. For example, the download time of a shard patch from the first node to each computer room can be reduced to within 30 seconds (s), thereby including the timeliness of the model application.
[0120] After each shard patch is downloaded, the updated parameter data of the first model can be obtained, which can be stored in a key-value storage system that can be queried in real time to update the parameter data of the current version of the model. At the same time, the parameter data in the model of the online estimation service in the recommendation system can be updated to take effect online for online estimation.
[0121] In this implementation, in response to the first access request, a first download node is determined from the M second nodes; the first download node is controlled to send a first download request to the first node, and the first download request is used for the first download node to download the updated parameter data from the first node in a point-to-point manner. In this way, when the second node includes multiple nodes, the third node can also control the second node to quickly download the updated parameter data of the first model from the first node, thereby improving the timeliness of the model application.
[0122] Optionally, the step S201 specifically includes:
[0123] receiving access sub-requests sent by the second node in sequence, the first access request including the access sub-request, the access sub-request being used to request downloading target parameter data of the first model from the first node, the target parameter data being part of the parameter data in the update parameter data;
[0124] Different access sub-requests request different target parameter data to be downloaded from the first node.
[0125] In this implementation, the update parameter data may be divided into multiple fragment patches in the form of fragmentation to distribute the data. The first node or the distribution node may periodically send a startup message to the second node, and the startup message may indicate the fragment patch to be downloaded. For example, if the update parameter data is divided into 10 fragment patches, the first node or the distribution node may periodically send 10 startup messages to M download nodes, and each startup message is used to indicate that a fragment patch can be started for download.
[0126] The first node or distribution node may also send the startup information to the second node again after receiving the feedback information from the third node. The feedback information may indicate that all the second nodes in the recommendation system have completed downloading the shard patch that needs to be downloaded currently. Correspondingly, the second node may send an access sub-request to the third node, and the access sub-request is used to request to download the target parameter data of the first model from the first node. The target parameter data is part of the parameter data in the update parameter data, namely the shard patch. The third node may receive the access sub-requests sent by the second node in sequence until all the shard patches are downloaded.
[0127] In this embodiment, the updated parameter data is divided into patches for data distribution. In this way, M second nodes can download the updated parameter data of the first model from the first node in parallel, thereby further reducing the data distribution time and further improving the timeliness of the model application.
[0128] Optionally, after controlling the first download node to send the first download request to the first node, the method further includes:
[0129] When it is monitored that the data downloading of the first target downloading node among the M second nodes is completed, the first target downloading node is stored in a preset list;
[0130] The first target download node includes the first download node and a second download node, and the second download node is a second node among the M second nodes that downloads data from a matching second node.
[0131] In this embodiment, the matching second node can be a neighboring second node, such as a second node with a similar IP address, which can be called a peer node. Downloading data from the peer node can be regarded as the second-level download of data by the second node in the recommendation system, and the first-level download can refer to the first download node downloading from the first node.
[0132] like Figure 3 As shown, the second node 302 is a peer node of the second node 303 and the second node 307 , the second node 303 is a peer node of the second node 304 , the second node 307 is a peer node of the second node 306 , and the second node 304 and the second node 306 are both peer nodes of the second node 305 .
[0133] That is to say, the download of data by the second node in the recommendation system includes at least two levels of download. The first level of download is that the first download node in the recommendation system downloads data (such as shard patch) from the first node. The first level of download is that when the first download node completes the download, the second node that has not downloaded the data can poll its peer node to see whether the data download is complete. When polling its peer node to see that the download is complete, the second node downloads the data from the peer node. This ensures that the updated parameter data of the first model can be quickly spread from the first node to the second nodes in each computer room.
[0134] The third node can read and write the download progress of the data by the M second nodes respectively, or can receive a download completion signal sent by the second node when the download is completed, so as to monitor the download progress of the data by the M second nodes.
[0135] Accordingly, when the first target download node among the M second nodes is monitored to have completed data download, the first target download node may be stored in a preset list, and specifically, node information such as an identifier of the first target download node may be stored in the preset list. Figure 3 As shown, the node information of the second node 302, the second node 303 and the second node 307 may be stored in a preset list.
[0136] The first target download node may include a first download node and a second download node. The first download node may be a second node that has completed the first-level download, and the first node may be a second node that has completed the second-level download.
[0137] The second node in the preset list can be used by the third node to determine the first download node for the next fragment patch, such as determining the first download node from the M second nodes excluding the second node in the preset list. It can also be used by other second nodes for local download in case of download timeout. The following implementation method will explain this in detail.
[0138] In this implementation, when the data download of the first target download node among the M second nodes is monitored to be completed, the first target download node is stored in a preset list; wherein the first target download node includes the first download node and the second download node, and the second download node is the second node among the M second nodes that downloads data from the matching second node. In this way, the third node can perform download management based on the second node in the preset list, such as when the download timeout occurs, other second nodes select the second node from the preset list for local download.
[0139] Optionally, after storing the first target download node in a preset list, the method further includes:
[0140] upon receiving a second access request sent by a second target download node, determining a third download node from the preset list, wherein the second target download node is a second node among the M second nodes whose first download duration exceeds a first preset threshold, the first download duration being a duration for downloading data from a matching second node, and the second access request is used to request downloading the update parameter data from a download node in the preset list;
[0141] The second target download node is controlled to send a second download request to the third download node, where the second download request is used for the second target download node to download the update parameter data from the third download node in a point-to-point manner.
[0142] In this implementation, since the number of first nodes is small and it takes a certain amount of time for data to gradually spread from the first node to the peer node of the second node, when the first download duration of the second node exceeds the first preset threshold, that is, when the second node has not completed downloading the data within the first download duration, it can be considered that the second node is far away from the first node, so that the data has not yet spread to its peer node. Figure 3 As shown, the second node 305 is far away from the first node, and there are many peer nodes in between.
[0143] Among them, the first download duration is the duration of downloading data from the matching second node, that is, the duration of the second target download node polling the peer node. The first preset threshold can be set according to actual conditions and is not specifically limited here.
[0144] In this case, the second target download node can send a second access request to the third node, and the second access request is used to request to download data from the second node in the preset list to perform the third-level download, that is, download the update parameter data from the second node that has been downloaded locally. The second access request can carry the request content and the node information of the second target download node.
[0145] Correspondingly, when the third node receives the second access request sent by the second target download node, it determines the third download node from the preset list. The method of determining the third download node may be the same as the method of determining the first download node. Figure 3 As shown, the third node determines the second node 302 as the third downloading node.
[0146] In addition, the third node may also determine the second node in the preset list that has the least number of peer node layers with the second target download node, that is, the second node with the shortest link to the second target download node as the third download node. Figure 3 As shown, for the second node 305, the second node 303 and the second node 307 in the preset list span one layer of peer nodes relative to the second node 305, and the second node 302 in the preset list spans two layers of peer nodes relative to the second node 305. Therefore, the third node can determine any second node among the second node 303 and the second node 307 as the third download node, which can shorten the physical link between the second nodes and further shorten the data download time.
[0147] When the third download node is determined, the third node can send target information to the second target download node, and the target information may include node information of the third download node. Accordingly, when the second target download node receives the target information, it can determine the download target, namely the third download node, and send a second download request to the third download node, so that the third node can control the second target download node to send the second download request to the third download node.
[0148] The second download request may carry request content and node information of the second target download node, and is used for the second target download node to download update parameter data from the third download node in a point-to-point manner.
[0149] In this implementation, the update parameter data is downloaded from the first node in a point-to-point manner, and the update parameter data is downloaded through a three-level download mechanism, so that the update parameter data of the first model is gradually and rapidly diffused from the first node to the second node of each computer room, thereby further reducing the time from model training to effectiveness, and further improving the timeliness of model application.
[0150] Optionally, after controlling the second target download node to send the second download request to the third download node, the method further includes:
[0151] When it is monitored that the second download duration of the second target download node exceeds a second preset threshold, the second target download node is controlled to send a third download request to the first node, and the third download request is used for the second target download node to download the update parameter data from the first node in a point-to-point manner, and the second download duration is the duration for downloading data from the third download node.
[0152] In this embodiment, the third node can read and write the progress of the second target download node downloading data to the third download node, and can also receive the download timeout signal sent when the second target download node times out to monitor the second download duration of the second target download node.
[0153] Correspondingly, when it is monitored that the second download duration of the second target download node exceeds the second preset threshold, the second target download node is controlled to send a third download request to the first node, wherein the control method can be similar to the method of controlling the first download node to send the first download request to the first node, which is not described in detail here. The second preset threshold can be set according to actual conditions and is not specifically limited here.
[0154] In this embodiment, by controlling the second target download node to send a third download request to the first node when the second download duration of the second target download node is monitored to exceed the second preset threshold, it is ensured that each second node can complete the download of the updated parameter data of the first model in a relatively short time.
[0155] Third embodiment
[0156] like Figure 4 As shown, the present disclosure provides a model application method, which is applied to a first node and includes the following steps:
[0157] Step S401: receiving target data sent by a terminal, wherein the target data includes operation information of a user on an information page for N task targets, where N is a positive integer;
[0158] Step S402: Acquire training data, where the training data includes behavior data determined based on the target data;
[0159] Step S403: training the first model based on the training data to obtain updated parameter data of the first model;
[0160] Step S404: Send the updated parameter data to the second node in a point-to-point manner, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data.
[0161] In this embodiment, the model application method relates to the field of data processing technology, and in particular to the field of recommendation technology, which can be widely used in recommendation scenarios. The model application method of the embodiment of the present disclosure can be executed by the model application device of the embodiment of the present disclosure. The model application device of the embodiment of the present disclosure can be configured in any electronic device, and the electronic device serves as the first node to execute the model application method of the embodiment of the present disclosure. The electronic device can be a server or a terminal, which is not specifically limited here.
[0162] In this embodiment, the first model can be trained based on the training data, wherein the target data can be pulled from the online regularly, the target data includes the user's operation information on the information page for N task targets, the user's behavior data is determined based on the target data, and processed into standard samples through a big data platform such as a Hadoop platform to obtain training data. The first model can regularly train samples within a specified time to obtain updated parameter data of the current version relative to the previous version, and distribute the updated parameter data after the training is completed.
[0163] It is also possible to obtain the operation information of online subscribers on the information page for N task targets in the form of real-time data stream, determine the user's behavior data based on the stream data, and obtain training data. The first model trains the samples in real time to obtain updated parameter data of the current version relative to the previous version. After the training is completed, the updated parameter data is distributed.
[0164] Among them, the behavior data may include behavior information, which can be obtained by splicing the user's behavior information. The user's behavior information may include: behavior information obtained by splicing different target operations of the user within a specified time window; behavior information determined based on the Kth target operation and the preset time when the Kth target operation is received and the K+1th target operation is not received within the preset time; and at least one item of behavior information determined based on the target operation, where K is a positive integer.
[0165] The target operation may refer to the operation performed by the user in response to the task goal. For example, if the task goal is the browsing time of information, the target operation may include clicking to open the information and clicking to exit the information. However, if the user clicks to exit the application APP, it is not a target operation.
[0166] The training data may include only the behavioral data of one task target, such as only the behavioral data of any one task target such as the like target, share target, click target and browse time target. The training data may also include the behavioral data of multiple task targets, such as including the behavioral data of multiple task targets such as the like target, share target, click target and browse time target at the same time.
[0167] The training data may include both positive sample behavior data and negative sample behavior data. The training data may be a combination of positive sample and negative sample behavior data. For click targets, the positive sample behavior data may refer to the behavior data of users clicking on information, and the negative sample behavior data may refer to the behavior data of users not clicking on information.
[0168] An existing or new training method may be used to train the first model based on the training data to obtain updated parameter data of the first model.
[0169] When the updated parameter data of the first model is obtained and the first download request sent by the second node (such as the first download node) is received, the updated parameter data of the first model or the fragmented patch of the updated parameter data can be sent to the second node in a point-to-point manner, wherein related concepts such as the first download node, the first download request and the fragmented patch have been described in detail in the first and second embodiments and will not be repeated here.
[0170] In this embodiment, the target data sent by the receiving terminal includes the user's operation information on the information page for N task targets; the training data is obtained, and the training data includes the behavior data determined based on the target data; the first model is trained based on the training data to obtain the updated parameter data of the first model; the updated parameter data is sent to the second node in a point-to-point manner, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data. In this way, the second node can perform remote memory access in a point-to-point manner to directly download the updated parameter information of the first model from the first node, thereby reducing the time from model training to effectiveness, and further improving the timeliness of model application.
[0171] Optionally, the training data includes first behavior data corresponding to each task target, the first behavior data includes positive sample behavior data and negative sample behavior data, and the step S403 specifically includes:
[0172] For each task target, based on a preset splicing rate corresponding to the task target and the positive sample behavior data, the negative sample behavior data is adjusted to obtain second behavior data corresponding to the task target, wherein the second behavior data includes the positive sample behavior data and the adjusted negative sample behavior data;
[0173] The first model is trained based on the second behavior data corresponding to the N task objectives to obtain updated parameter data of the first model.
[0174] In this embodiment, the training data may include first behavior data corresponding to the first task target, and the first behavior data may include positive sample behavior data and negative sample behavior data. The task target may refer to a modeling target set to achieve a recommendation task, such as recommending information based on the behavior data of users clicking on information, recommending information based on the behavior data of users browsing information, etc., and the first task target may refer to any of the N task targets that need to be modeled, where N is a positive integer.
[0175] For different task objectives, the positive sample behavior data and the negative sample behavior data refer to different behavior data. For example, for the click objective, the positive sample behavior data refers to the behavior data of users clicking on information, and the negative sample behavior data refers to the behavior data of users not clicking on information.
[0176] The behavior information generated by the user performing the target operation on the first task target can be pulled online at a regular interval and processed into a standard sample through a big data platform such as a Hadoop platform to obtain positive sample behavior data. The behavior information generated by the user performing the target operation on the first task target can also be obtained by subscribing online in a real-time data stream.
[0177] Negative sample behavior data can be inferred from the user's behavioral feedback on information. For example, if the recommendation system recommends two pieces of information to the user and only receives behavioral feedback from the user on information 1, it can be inferred that the user did not provide behavioral feedback on information 2, and thus the user did not click on information 2. Other methods can also be used to obtain negative sample behavior data, which are not specifically limited here.
[0178] The preset splicing rate corresponding to the first task target refers to the preset collection rate of positive samples for the first task target. For example, if the first task target is a click target, and for the information recommended by the recommendation system, it is collected that the user clicked 10 times and did not click 90 times, then for the click target, the collection rate is 10%.
[0179] Generally, for the first task goal, the preset splicing rate for positive samples in the long-term sample collection experiment is relatively fixed. For example, in the scenario where timeliness is not high, the preset splicing rate for positive samples is 10%. Due to the improvement of timeliness, some sample collection may be damaged or not collected. For example, a user browses information for a long time and eventually shares the information. However, the positive sample is not fully collected due to the premature end of the time window setting during the sample collection process. For another example, due to the improvement of timeliness, some users' click behaviors are not collected.
[0180] In this scenario, the negative sample behavior data can be adjusted based on the preset splicing rate and positive sample behavior data corresponding to the first task target to obtain the second behavior data. In an optional implementation, the behavior information in the negative sample behavior data can be deleted to obtain the second behavior data, and the second behavior data includes the remaining behavior information in the positive sample behavior data and the negative sample behavior data. For example, for the click target, the preset splicing rate is 10%, the number of behavior information in the positive sample behavior data is 8, and the number of behavior information in the negative sample behavior data is 89. 17 pieces of behavior information in the negative sample behavior data can be deleted, so that the number of remaining behavior information in the negative sample behavior data remains at 72, ensuring that the preset splicing rate remains at about 10%. In this way, the recommendation system can be kept relatively stable when the model is applied online, so as not to cause the model's estimated target to be too high or too low.
[0181] In another optional implementation, different behavior information in the negative sample behavior data may be integrated to reduce the amount of behavior information in the negative sample behavior data, so that the preset splicing rate is maintained at a relatively fixed level.
[0182] Afterwards, an existing or new training method may be used to train the first model based on the second behavior data to obtain updated parameter data of the first model.
[0183] In this implementation, by collecting negative samples, and based on the preset splicing rate and positive sample behavior data corresponding to the task target, the negative sample behavior data is adjusted to obtain the second behavior data, and the first model is trained based on the second behavior data. In this way, the negative sample behavior data can be dynamically adjusted based on the preset splicing rate, and the preset splicing rate of the positive sample can be maintained at a relatively fixed level, so that the recommendation timeliness of the first model can be met while improving the effect of the first model training.
[0184] Optionally, the target data is stream data, and the training data includes third behavior data of the second user for the N task targets, and the third behavior data is obtained in the following manner:
[0185] splicing the behavior information determined by the second user's operation information for the N task targets to obtain the third behavior data;
[0186] The behavior information includes at least one of the following:
[0187] first behavior information determined by target operation information in the stream data;
[0188] Second behavior information determined by two adjacent operation information in the stream data;
[0189] When the stream data includes the Kth operation information and the K+1th operation information is not received within a preset time, the third behavior information is determined based on the Kth operation information and the preset time, where K is a positive integer.
[0190] In this embodiment, the behavior information generated by the online subscription users performing the target operation can be obtained in the form of real-time data stream to meet the basic demand of capturing the dynamic interests of users in real time.
[0191] In order to model multiple task objectives at the same time, the various behavior information (including first behavior information and second behavior information) generated by the target operations performed by the second user for N task objectives can be spliced and merged into a positive sample to obtain third behavior data, wherein the third behavior data can include the second user's behavior information for multiple task objectives such as click objectives, browsing time objectives, like objectives and sharing objectives. In this way, a sample that supports the training of multiple task objectives can be produced at the same time, thereby capturing multiple signals of the user.
[0192] The training data may include third behavior data, which may include behavior information of the second user in the positive sample behavior data, and may be obtained by splicing the behavior information of the second user in the positive sample behavior data with various behavior information generated by target operations performed by the second user for other task targets.
[0193] In the specific implementation process, taking the collection of the second user's behavior information on the information flow page as an example, since the second user will perform multiple target operations such as refreshing, clicking, and browsing on the information flow page, in order to capture multiple signals such as clicks and browsing time more timely, the next time the second user performs the target operation, the behavior information generated by the last time the second user performed the target operation can be completely collected and spliced. The behavior information can be clicks, browsing time, likes or shares, etc., and merged into a sample to obtain the third behavior data.
[0194] However, completely relying on the next behavior feedback to splice the user's behavior information may result in the loss of the second user's last behavior feedback, such as exiting the application APP after reading a piece of information, and there will be no more behavior feedback for a period of time. In this scenario, a preset time can be set, and the preset time can be a time window. After the time window is exceeded, the third behavior information generated based on the Kth target operation (that is, the target operation closest to the time window) and the preset time will be determined, and the behavior information will be spliced with the behavior information previously generated by the second user to ensure that no behavior is missed. Among them, the preset time can be set according to the actual situation, and is not specifically limited here.
[0195] In this embodiment, the third behavior data is obtained by splicing the behavior information determined by the second user's operation information for the N task targets, and the first model is trained based on the third behavior data. In this way, by considering multiple factors such as user clicks, browsing time, likes, and sharing, multiple task targets such as click-through rate and browsing time are modeled at the same time, and the first model is trained based on samples that support training of multiple task targets. While capturing the basic needs of user dynamic interests in real time, the recommendation effect of the first model can be improved.
[0196] Optionally, after step S404, the method further includes:
[0197] When receiving a third download request sent by the second target download node, sending the update parameter data to the second target download node in a point-to-point manner;
[0198] Among them, the second target download node is the second node among the M second nodes whose first download duration exceeds the first preset threshold and whose second download duration exceeds the second preset threshold, the first download duration is the duration for downloading data from the matching second node, the second download duration is the duration for downloading data from the third download node, the third download node is the download node determined from the preset list when the third node receives the second access request sent by the second target download node, the preset list includes the first target download node, and the first target download node includes the second node among the M second nodes where data download is completed.
[0199] In this implementation manner, related concepts such as the second target download node, the third download request, the first download duration, the second download duration, the third download node, etc. have been described in detail in the first and second embodiments and will not be repeated here.
[0200] In this implementation, the first download node downloads the updated parameter data from the first node in a point-to-point manner, and downloads the updated parameter data through a three-level download mechanism, so that the updated parameter data of the first model is gradually and rapidly spread from the first node to the second nodes of each computer room; at the same time, by monitoring that the second download duration of the second target download node exceeds the second preset threshold, the second target download node is controlled to download the updated parameter data to the first node in a point-to-point manner. In this way, the timeliness of the model application can be improved while ensuring that each second node can complete the download of the updated parameter data of the first model in a relatively short time.
[0201] Fourth embodiment
[0202] like Figure 5 As shown, the present disclosure provides a model application device 500, which is applied to a terminal and includes:
[0203] The first acquisition module 501 is used to acquire the operation information of the first user on the information page for N task targets, where N is a positive integer;
[0204] A first sending module 502 is used to send target data to a first node, so that the first node trains a first model based on the training data to obtain updated parameter data of the first model, wherein the target data includes the operation information, and the training data includes behavior data determined based on the target data;
[0205] The first receiving module 503 is used to receive recommendation information sent by the second node, where the recommendation information is recommendation information of the first user determined by the second node based on the trained first model, and the updated parameter data of the trained first model is downloaded by the second node from the first node in a point-to-point manner.
[0206] Optionally, the target data is stream data, and the first sending module 502 is specifically configured to:
[0207] The operation information of the first user on the information page for the N task targets is sent to the first node in a data stream manner.
[0208] The model application device 500 provided in the present disclosure can implement each process implemented in the first embodiment of the model application method, and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0209] Fifth embodiment
[0210] like Figure 6 As shown, the present disclosure provides a model application device 600, which is applied to a third node and includes:
[0211] A second receiving module 601 is configured to receive a first access request sent by a second node, wherein the first access request is used to request downloading update parameter data of a first model from a first node, wherein the first node is a node for training the first model, and the update parameter data is obtained by the first node through training the first model based on training data, wherein the training data includes behavior data determined by target data, and the target data includes operation information of a user on an information page for N task targets, where N is a positive integer;
[0212] The first control module 602 is used to control the second node to download the updated parameter data from the first node in a point-to-point manner in response to the first access request, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data.
[0213] Optionally, the number of the second nodes includes M, where M is an integer greater than 1, and the first control module 602 is specifically configured to:
[0214] In response to the first access request, determining a first downloading node from the M second nodes;
[0215] The first downloading node is controlled to send a first downloading request to the first node, where the first downloading request is used for the first downloading node to download the update parameter data from the first node in a point-to-point manner.
[0216] Optionally, the second receiving module 601 is specifically configured to:
[0217] receiving access sub-requests sent by the second node in sequence, the first access request including the access sub-request, the access sub-request being used to request downloading target parameter data of the first model from the first node, the target parameter data being part of the parameter data in the update parameter data;
[0218] Different access sub-requests request different target parameter data to be downloaded from the first node.
[0219] Optionally, also include:
[0220] A storage module, configured to store the first target download node in a preset list when it is monitored that the data download of the first target download node among the M second nodes is completed;
[0221] The first target download node includes the first download node and a second download node, and the second download node is a second node among the M second nodes that downloads data from a matching second node.
[0222] Optionally, also include:
[0223] a determination module, configured to determine a third download node from the preset list upon receiving a second access request sent by a second target download node, wherein the second target download node is a second node among the M second nodes whose first download duration exceeds a first preset threshold, the first download duration being a duration for downloading data from a matching second node, and the second access request is used to request downloading the update parameter data from a download node in the preset list;
[0224] The second control module is used to control the second target download node to send a second download request to the third download node, where the second download request is used for the second target download node to download the update parameter data from the third download node in a point-to-point manner.
[0225] Optionally, also include:
[0226] The third control module is used to control the second target download node to send a third download request to the first node when it is monitored that the second download duration of the second target download node exceeds a second preset threshold. The third download request is used for the second target download node to download the update parameter data from the first node in a point-to-point manner. The second download duration is the duration for downloading data from the third download node.
[0227] The model application device 600 provided in the present disclosure can implement each process implemented in the second embodiment of the model application method, and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0228] Sixth embodiment
[0229] like Figure 7 As shown, the present disclosure provides a model application device 700, which is applied to a first node and includes:
[0230] The third receiving module 701 is used to receive target data sent by the terminal, where the target data includes operation information of the user on the information page for N task targets, where N is a positive integer;
[0231] A second acquisition module 702, configured to acquire training data, wherein the training data includes behavior data determined based on the target data;
[0232] A training module 703 is used to train the first model based on the training data to obtain updated parameter data of the first model;
[0233] The second sending module 704 is used to send the updated parameter data to the second node in a point-to-point manner, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data.
[0234] Optionally, the training data includes first behavior data corresponding to each task target, the first behavior data includes positive sample behavior data and negative sample behavior data, and the training module 703 is specifically used to:
[0235] For each task target, based on a preset splicing rate corresponding to the task target and the positive sample behavior data, the negative sample behavior data is adjusted to obtain second behavior data corresponding to the task target, wherein the second behavior data includes the positive sample behavior data and the adjusted negative sample behavior data;
[0236] The first model is trained based on the second behavior data corresponding to the N task objectives to obtain updated parameter data of the first model.
[0237] Optionally, the target data is stream data, and the training data includes third behavior data of the second user for the N task targets, and the third behavior data is obtained in the following manner:
[0238] splicing the behavior information determined by the second user's operation information for the N task targets to obtain the third behavior data;
[0239] The behavior information includes at least one of the following:
[0240] First behavior information determined by target operation information in the stream data;
[0241] Second behavior information determined by two adjacent operation information in the stream data;
[0242] When the stream data includes the Kth operation information and the K+1th operation information is not received within a preset time, the third behavior information is determined based on the Kth operation information and the preset time, where K is a positive integer.
[0243] The model application device 700 provided in the present disclosure can implement each process implemented in the third embodiment of the model application method, and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0244] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0245] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0246] Figure 8 A schematic block diagram of an example electronic device that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0247] like Figure 8As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0248] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0249] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the model application method. For example, in some embodiments, the model application method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the model application method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the model application method in any other appropriate manner (e.g., by means of firmware).
[0250] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0251] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0252] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0253] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0254] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0255] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0256] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0257] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A model application method, applied to a terminal, the terminal is a terminal in a model application system, the model application system also includes a first node, a server cluster and a third node, the server cluster includes a plurality of servers, the plurality of servers are located in at least one computer room, each server is a second node, the third node is a distribution node of model parameter data in the model application system, including: Obtaining the operation information of the first user on the information page for N task targets, where N is a positive integer; Sending target data to a first node so that the first node trains a first model based on the training data to obtain updated parameter data of the first model, wherein the target data includes the operation information, and the training data includes behavior data determined based on the target data; receiving recommendation information sent by a second node, wherein the recommendation information is recommendation information of the first user determined by the second node based on the trained first model, and the update parameter data of the trained first model is downloaded by the second node from the first node in a point-to-point manner; wherein the second node is an application node of the first model; The updated parameter data of the first model is downloaded from the first node by the third node in response to a first access request sent by the second node, and the first access request is used to request downloading of the updated parameter data of the first model from the first node. The first access request is sent by the second node to the third node after receiving startup information sent by the first node or the third node, and the startup information is used to notify the second node in the server cluster that the updated parameter data of the first model is ready.
2. The method according to claim 1, wherein: The target data is stream data, and sending the target data to the first node includes: The operation information of the first user on the information page for the N task targets is sent to the first node in a data stream manner.
3. A model application method, applied to a third node, the third node is a distribution node of model parameter data in a model application system, the model application system also includes a first node, a server cluster and a terminal, the server cluster includes a plurality of servers, the plurality of servers are located in at least one computer room, each server is a second node, including: Receive a first access request sent by a second node, where the first access request is used to request to download update parameter data of a first model from a first node, where the first node is a node for training the first model, where the update parameter data is obtained by the first node training the first model based on training data, where the training data includes behavior data determined by target data, where the target data includes operation information of a user on an information page for N task targets, where N is a positive integer; the first access request is sent by the second node to the third node when the second node receives startup information sent by the first node or the third node, where the startup information is used to notify the second node in the server cluster that the update parameter data of the first model is ready; In response to the first access request, control the second node to download the updated parameter data from the first node in a point-to-point manner, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data; wherein the second node is an application node of the first model.
4. The method according to claim 3, wherein: The number of the second nodes includes M, where M is an integer greater than 1, and the step of controlling the second node to download the update parameter data from the first node in a point-to-point manner in response to the first access request includes: In response to the first access request, determining a first downloading node from the M second nodes; The first downloading node is controlled to send a first downloading request to the first node, where the first downloading request is used for the first downloading node to download the update parameter data from the first node in a point-to-point manner.
5. The method according to claim 3, wherein: The receiving a first access request sent by the second node includes: receiving access sub-requests sent by the second node in sequence, the first access request including the access sub-request, the access sub-request being used to request downloading target parameter data of the first model from the first node, the target parameter data being part of the parameter data in the update parameter data; Different access sub-requests request different target parameter data to be downloaded from the first node.
6. The method according to claim 4, after controlling the first download node to send the first download request to the first node, the method further comprises: When it is monitored that the data downloading of the first target downloading node among the M second nodes is completed, the first target downloading node is stored in a preset list; The first target download node includes the first download node and a second download node, and the second download node is a second node among the M second nodes that downloads data from a matching second node.
7. The method according to claim 6, after storing the first target download node in a preset list, the method further comprises: upon receiving a second access request sent by a second target download node, determining a third download node from the preset list, wherein the second target download node is a second node among the M second nodes whose first download duration exceeds a first preset threshold, the first download duration being a duration for downloading data from a matching second node, and the second access request is used to request downloading the update parameter data from a download node in the preset list; The second target download node is controlled to send a second download request to the third download node, where the second download request is used for the second target download node to download the update parameter data from the third download node in a point-to-point manner.
8. The method according to claim 7, after controlling the second target download node to send the second download request to the third download node, the method further comprises: When it is monitored that the second download duration of the second target download node exceeds a second preset threshold, the second target download node is controlled to send a third download request to the first node, and the third download request is used for the second target download node to download the update parameter data from the first node in a point-to-point manner, and the second download duration is the duration for downloading data from the third download node.
9. A model application method, applied to a first node, the first node is a node in a model application system, the model application system also includes a terminal, a server cluster and a third node, the server cluster includes a plurality of servers, the plurality of servers are located in at least one computer room, each server is a second node, the third node is a distribution node of model parameter data in the model application system, comprising: Receive target data sent by the terminal, where the target data includes operation information of the user on the information page for N task targets, where N is a positive integer; Acquiring training data, wherein the training data includes behavior data determined based on the target data; Training the first model based on the training data to obtain updated parameter data of the first model; sending the updated parameter data to a second node in a point-to-point manner, so that the second node sends recommendation information to a terminal corresponding to the user based on the trained first model, wherein the trained first model includes the updated parameter data; wherein the second node is an application node of the first model; The updated parameter data of the first model is downloaded from the first node by the third node in response to a first access request sent by the second node, and the first access request is used to request downloading of the updated parameter data of the first model from the first node. The first access request is sent by the second node to the third node after receiving startup information sent by the first node or the third node, and the startup information is used to notify the second node in the server cluster that the updated parameter data of the first model is ready.
10. The method according to claim 9, wherein: The training data includes first behavior data corresponding to each task target, the first behavior data includes positive sample behavior data and negative sample behavior data, and the training of the first model based on the training data to obtain updated parameter data of the first model includes: For each task target, based on a preset splicing rate corresponding to the task target and the positive sample behavior data, the negative sample behavior data is adjusted to obtain second behavior data corresponding to the task target, wherein the second behavior data includes the positive sample behavior data and the adjusted negative sample behavior data; The first model is trained based on the second behavior data corresponding to the N task objectives to obtain updated parameter data of the first model.
11. The method according to claim 9, wherein: The target data is stream data, and the training data includes third behavior data of the second user for the N task targets, and the third behavior data is obtained in the following manner: splicing the behavior information determined by the second user's operation information for the N task targets to obtain the third behavior data; The behavior information includes at least one of the following: First behavior information determined by target operation information in the stream data; Second behavior information determined by two adjacent operation information in the stream data; When the stream data includes the Kth operation information and the K+1th operation information is not received within a preset time, the third behavior information is determined based on the Kth operation information and the preset time, where K is a positive integer.
12. A model application device, applied to a terminal, the terminal is a terminal in a model application system, the model application system also includes a first node, a server cluster and a third node, the server cluster includes a plurality of servers, the plurality of servers are located in at least one computer room, each server is a second node, the third node is a distribution node of model parameter data in the model application system, including: A first acquisition module is used to acquire operation information of a first user on an information page for N task targets, where N is a positive integer; A first sending module, configured to send target data to a first node, so that the first node trains a first model based on the training data to obtain updated parameter data of the first model, wherein the target data includes the operation information, and the training data includes behavior data determined based on the target data; a first receiving module, configured to receive recommendation information sent by a second node, wherein the recommendation information is recommendation information of the first user determined by the second node based on the trained first model, and the update parameter data of the trained first model is downloaded by the second node from the first node in a point-to-point manner; wherein the second node is an application node of the first model; The updated parameter data of the first model is downloaded from the first node by the third node in response to a first access request sent by the second node, and the first access request is used to request downloading of the updated parameter data of the first model from the first node. The first access request is sent by the second node to the third node after receiving startup information sent by the first node or the third node, and the startup information is used to notify the second node in the server cluster that the updated parameter data of the first model is ready.
13. The device according to claim 12, wherein: The target data is stream data, and the first sending module is specifically used for: The operation information of the first user on the information page for the N task targets is sent to the first node in a data stream manner.
14. A model application device, applied to a third node, the third node being a distribution node of model parameter data in a model application system, the model application system further comprising a first node, a server cluster and a terminal, the server cluster comprising a plurality of servers, the plurality of servers being located in at least one computer room, each server being a second node, comprising: a second receiving module, configured to receive a first access request sent by a second node, wherein the first access request is used to request to download update parameter data of a first model from a first node, wherein the first node is a node for training the first model, and the update parameter data is obtained by the first node through training the first model based on training data, wherein the training data includes behavior data determined by target data, and the target data includes operation information of a user on an information page for N task targets, where N is a positive integer; the first access request is sent by the second node to the third node when the second node receives startup information sent by the first node or the third node, and the startup information is used to notify the second node in the server cluster that the update parameter data of the first model is ready; A first control module is used to control the second node to download the updated parameter data from the first node in a point-to-point manner in response to the first access request, so that the second node sends recommendation information to the terminal corresponding to the user based on the trained first model, and the trained first model includes the updated parameter data; wherein the second node is an application node of the first model.
15. The device according to claim 14, wherein: The number of the second nodes includes M, where M is an integer greater than 1, and the first control module is specifically configured to: In response to the first access request, determining a first downloading node from the M second nodes; The first downloading node is controlled to send a first downloading request to the first node, where the first downloading request is used for the first downloading node to download the update parameter data from the first node in a point-to-point manner.
16. The device according to claim 14, wherein: The second receiving module is specifically used for: receiving access sub-requests sent by the second node in sequence, the first access request including the access sub-request, the access sub-request being used to request downloading target parameter data of the first model from the first node, the target parameter data being part of the parameter data in the update parameter data; Different access sub-requests request different target parameter data to be downloaded from the first node.
17. The apparatus according to claim 15, further comprising: A storage module, configured to store the first target download node in a preset list when it is monitored that the data download of the first target download node among the M second nodes is completed; The first target download node includes the first download node and a second download node, and the second download node is a second node among the M second nodes that downloads data from a matching second node.
18. The apparatus according to claim 17, further comprising: a determination module, configured to determine a third download node from the preset list upon receiving a second access request sent by a second target download node, wherein the second target download node is a second node among the M second nodes whose first download duration exceeds a first preset threshold, the first download duration being a duration for downloading data from a matching second node, and the second access request is used to request downloading the update parameter data from a download node in the preset list; The second control module is used to control the second target download node to send a second download request to the third download node, where the second download request is used for the second target download node to download the update parameter data from the third download node in a point-to-point manner.
19. The apparatus according to claim 18, further comprising: The third control module is used to control the second target download node to send a third download request to the first node when it is monitored that the second download duration of the second target download node exceeds a second preset threshold value. The third download request is used for the second target download node to download the update parameter data from the first node in a point-to-point manner. The second download duration is the duration for downloading data from the third download node.
20. A model application device, applied to a first node, the first node is a node in a model application system, the model application system further includes a terminal, a server cluster and a third node, the server cluster includes a plurality of servers, the plurality of servers are located in at least one computer room, each server is a second node, the third node is a distribution node of model parameter data in the model application system, including: A third receiving module is used to receive target data sent by the terminal, wherein the target data includes operation information of the user on the information page for N task targets, where N is a positive integer; A second acquisition module, used to acquire training data, wherein the training data includes behavior data determined based on the target data; A training module, used to train the first model based on the training data to obtain updated parameter data of the first model; a second sending module, configured to send the updated parameter data to a second node in a point-to-point manner, so that the second node sends recommendation information to a terminal corresponding to the user based on the trained first model, wherein the trained first model includes the updated parameter data; wherein the second node is an application node of the first model; The updated parameter data of the first model is downloaded from the first node by the third node in response to a first access request sent by the second node, and the first access request is used to request downloading of the updated parameter data of the first model from the first node. The first access request is sent by the second node to the third node after receiving startup information sent by the first node or the third node, and the startup information is used to notify the second node in the server cluster that the updated parameter data of the first model is ready.
21. The device according to claim 20, wherein: The training data includes first behavior data corresponding to each task target, the first behavior data includes positive sample behavior data and negative sample behavior data, and the training module is specifically used to: For each task target, based on a preset splicing rate corresponding to the task target and the positive sample behavior data, the negative sample behavior data is adjusted to obtain second behavior data corresponding to the task target, wherein the second behavior data includes the positive sample behavior data and the adjusted negative sample behavior data; The first model is trained based on the second behavior data corresponding to the N task objectives to obtain updated parameter data of the first model.
22. The device according to claim 20, wherein: The target data is stream data, and the training data includes third behavior data of the second user for the N task targets, and the third behavior data is obtained in the following manner: splicing the behavior information determined by the second user's operation information for the N task targets to obtain the third behavior data; The behavior information includes at least one of the following: first behavior information determined by target operation information in the stream data; Second behavior information determined by two adjacent operation information in the stream data; When the stream data includes the Kth operation information and the K+1th operation information is not received within a preset time, the third behavior information is determined based on the Kth operation information and the preset time, where K is a positive integer.
23. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1-2, or the method of any one of claims 3-8, or the method of any one of claims 9-11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-2, or the method according to any one of claims 3-8, or the method according to any one of claims 9-11.
25. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 2, or the method according to any one of claims 3 to 8, or the method according to any one of claims 9 to 11.
Citation Information
Patent Citations
Training method and device of information recommendation system
CN110287420A
Multi-mechanism collaborative learning system and method based on hierarchical parameter server
CN110995488A
Information recommendation method and device and storage medium
CN111970335A
Recommendation method and device, electronic device and storage medium
CN112114968A
Recommendation model training method and device, terminal equipment and storage medium
CN112446507A
