A method and device for sorting and publishing messages
By introducing batch modules in message sorting model training, generating and synchronizing batch tags, and determining the training data weight in advance, the problem of reducing training samples in the existing technology resulting in low model accuracy is solved, and more efficient training and more accurate message publishing recommendations are achieved.
Patent Information
- Application Number
- CN202010623356.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-01
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2040-10-03
AI Technical Summary
In the prior art, in order to improve the efficiency of message publishing, training samples are usually reduced during the training process of message sorting model, resulting in poor model accuracy, which in turn affects the accuracy of message publishing.
By introducing a batch module, batch tags are generated during the acquisition and processing of training data and synchronized to the calculation module and storage module, the training data weight is determined in advance, and the number of interactions between the calculation module and the storage module and the amount of data transmission is reduced.
The training efficiency of deep learning models is improved, and while ensuring training efficiency, it can use more dimensions of training data to train the message sorting model, thereby significantly improving the accuracy of the model and improving the recommendation effect of message publishing.
Smart Images

Figure CN113888199B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a message sequencing and publishing method, device, electronic device, and storage medium. Background Art
[0002] In the field of advertising message recommendation, in order to ensure that advertisers' advertising messages can have a better click-through rate, applications often need to publish messages to different users in different advertising rankings based on the content of the advertisers' advertising messages and the interests and preferences of users, so that this method of message ranking and publishing can bring better click-through effects.
[0003] In order to realize this advertisement ranking and publishing function, it is often necessary to pre-build a message ranking model to calculate the order of advertisement message publishing for different users through the ranking and publishing model. In this case, the quality of the pre-built message ranking model will directly affect the result of message ranking recommendation. Therefore, in the related art, it is often expected to train the message ranking model through more dimensional training data and more complex algorithms.
[0004] Take the Parameter server architecture (PS architecture) commonly used in related technologies for deep learning model training as an example. In the PS architecture, the nodes in the cluster are divided into two categories: parameter servers and workers. The parameter server stores the parameters of the model, while the worker is responsible for calculating the gradient of the parameters.
[0005] In the related art, the Parameter server architecture is as follows Figure 1 As shown in the figure, in each iterative training process, after the worker module obtains the training data from the "train data" module, it will request the ps module in turn according to the ID information contained in the training data, and obtain the corresponding embedding parameters or dense parameters from the ps module according to the ID. The worker module can iterate these parameters through the training data and return the calculated gradient to the ps module. The ps module aggregates the gradients returned from the worker module, then updates the parameters, and broadcasts the new parameters to the worker module, thereby completing the entire update iterative training process.
[0006] In the scenario of message sorting model training, in order to improve the push accuracy of advertising messages, the parameter range that the message model needs to process is often in the billions or trillions. Under this data volume, if the deep learning model needs to be deployed in a distributed manner, the parameters required by each algorithm in the model training process often need to be stored in a distributed manner.
[0007] The machine learning model built with the PS architecture requires the worker module to obtain training parameters by accessing the PS module. In this case, if a large amount of training data is used for model training in order to improve model accuracy, the parameter acquisition stage during training and subsequent use will rely heavily on the current network conditions, which greatly reduces the efficiency of the message sorting model and affects the message publishing of the application; if the training samples used in the training process are reduced for the sake of model efficiency, the accuracy of the final trained model will be poor, which will also affect the accuracy of the application's message publishing. Summary of the invention
[0008] The present disclosure provides a message sorting and publishing method, device, electronic device and storage medium, so as to at least solve the problem that the message publishing method provided in the related art reduces the training samples used in the message sorting model training process in order to ensure the message publishing efficiency, resulting in poor accuracy of the message sorting model, and further resulting in poor accuracy of application message publishing. The technical solution of the present disclosure is as follows:
[0009] According to a first aspect of an embodiment of the present disclosure, a message sequencing and publishing method is provided, comprising:
[0010] Acquire first data of a message to be published and second data of a message recipient; calculate the first data and the second data according to a pre-trained message sorting model to obtain a publishing order of the message to be published; and publish the message to be published in accordance with the publishing order.
[0011] In one embodiment, the message sorting model is generated in the following manner: batch acquiring training data to be allocated to a computing module, generating batch labels for the training data, wherein the training data is composed of first historical data of published messages and second historical data of message recipients; sending the batch labels to a storage module so that the storage module determines the training data weight corresponding to the batch labels according to the batch labels; wherein the storage module stores the training weights corresponding to the training data; sending the training data and the batch labels to a computing module so that the computing module acquires the training data weight corresponding to the batch labels from the storage module according to the batch labels, and generates a message sorting model according to the training data weights and the training data training.
[0012] In one embodiment, batch acquisition of training data to be assigned to computing modules and generation of batch processing labels for the training data specifically include: determining the number of computing modules in the machine learning model; grouping the training data according to the number of computing models to obtain at least two training data sets; and generating batch processing labels for the training data sets respectively.
[0013] In one embodiment, sending the batch label to the storage module specifically includes: determining a training data set corresponding to the batch label; determining a training data label corresponding to each training data contained in the training data set; and sending the batch label and the training data label to the storage module.
[0014] In one embodiment, sending the training data and the batch labels to the computing module specifically includes: determining the training data sets corresponding to each computing module respectively; determining the training data and batch labels corresponding to each training data set; and sending the training data and batch labels corresponding to each training data set respectively to the computing module corresponding to the training data set.
[0015] In one embodiment, the machine learning model is constructed using a Parameter server architecture; the computing module is a worker module in the Parameter server architecture; and the storage module is a parameter server module in the Parameter server architecture.
[0016] According to a second aspect of an embodiment of the present disclosure, a message sorting and publishing device is provided, which is applied to a data processing system and is characterized in that it includes: a data acquisition unit, configured to execute acquisition of first data of a message to be published and second data of a message recipient; a sorting determination unit, configured to execute calculation on the first data and the second data according to a pre-trained message sorting model to obtain a publishing order of the message to be published; and a publishing unit, configured to execute message publishing in accordance with the publishing order for the message to be published.
[0017] In one embodiment, the data processing system further includes a batch processing unit, a storage unit, and a computing unit;
[0018] The batch processing unit is configured to execute batch acquisition of training data to be assigned to the computing unit, generate batch processing labels for the training data, wherein the training data is composed of first historical data of published messages and second historical data of message recipients; send the batch processing labels to the storage unit; send the training data and the batch processing labels to the computing unit;
[0019] The storage unit is configured to receive the batch processing label sent by the batch processing module; determine the training data weight corresponding to the batch processing label according to the batch processing label; wherein the training weight corresponding to the training data is stored in the storage module;
[0020] The computing unit is configured to receive the training data and the batch processing label sent by the batch processing module; obtain the training data weight corresponding to the batch processing label from the storage module according to the batch processing label, and generate a message sorting model according to the training data weight and the training data training.
[0021] In one embodiment, the batch processing unit is specifically configured to perform: determining the number of computing units in the machine learning model; grouping the training data according to the number of computing units to obtain at least two training data sets; and generating batch processing labels for the training data sets respectively.
[0022] In one embodiment, the batch processing unit is specifically configured to perform: determining a training data set corresponding to the batch processing label; determining a training data label corresponding to each training data contained in the training data set; and sending the batch processing label and the training data label to the storage unit.
[0023] In one embodiment, the batch processing unit is specifically configured to perform: respectively determine the training data sets corresponding to each computing unit; determine the training data and batch processing labels corresponding to each training data set; and respectively send the training data and batch processing labels corresponding to each training data set to the computing unit corresponding to the training data set.
[0024] In one implementation, the message sorting model is constructed using a Parameter server architecture; the computing unit is a worker module in the Parameter server architecture; and the storage unit is a parameter server module in the Parameter server architecture.
[0025] According to a third aspect of an embodiment of the present disclosure, there is provided a data processing system, including: a publishing module, a batch processing module, a computing module, and a storage module;
[0026] The publishing module is used to obtain first data of the message to be published and second data of the message recipient; calculate the first data and the second data according to the pre-trained message sorting model to obtain the publishing order of the message to be published; and publish the message to be published according to the publishing order;
[0027] The batch processing module is used to batch-acquire the training data to be assigned to the computing module, generate batch processing labels for the training data, wherein the training data is composed of the first historical data of the published message and the second historical data of the message recipient; send the batch processing labels to the storage module; send the training data and the batch processing labels to the computing module;
[0028] The computing module is configured to receive the training data and the batch processing label sent by the batch processing module; obtain the training data weight corresponding to the batch processing label from the storage module according to the batch processing label, and generate a message sorting model according to the training data weight and the training data training;
[0029] The storage module is used to receive the batch processing label sent by the batch processing module; determine the training data weight corresponding to the batch processing label according to the batch processing label; wherein the training weight corresponding to the training data is stored in the storage module.
[0030] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device for sorting and publishing messages, including:
[0031] processor;
[0032] a memory for storing instructions executable by the processor;
[0033] Wherein, the processor is configured to execute the instructions to implement the message sorting and publishing method as described in any one of claims 1 to 6.
[0034] According to the fifth aspect of an embodiment of the present disclosure, a storage medium is provided, comprising: when the instructions in the storage medium are executed by a processor of an electronic device for message sorting and publishing, the electronic device for message sorting and publishing is enabled to perform any step of the message sorting and publishing method in the above-mentioned first aspect.
[0035] According to a sixth aspect of an embodiment of the present disclosure, a computer program product is provided, including:
[0036] When it runs on the device, the project packaging device executes: any one of the message sorting and publishing method steps in the above-mentioned first aspect.
[0037] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0038] According to the message sorting and publishing method provided by the embodiment of the present disclosure, when publishing a message, the first data of the message to be published and the second data of the message recipient can be first obtained, and the first data and the second data can be calculated according to the message sorting model obtained in advance to obtain the publishing order of the message to be published, and then the message to be published can be published according to the publishing order. However, in the embodiment of the present disclosure, when training the message sorting model, the training data will not be sent directly to the calculation module, but the batch processing module will first obtain the training data in batches. After obtaining the training data, the batch processing module will generate a batch processing label for the batch training data, and send the batch processing label to the storage module and the calculation module respectively, so as to inform the storage module of the training data to be used by the calculation module in advance through the batch processing label, and then the storage module can determine all the training data weights corresponding to the batch processing label in advance according to the batch processing label, so that the subsequent calculation model can obtain these weights; and the calculation model can obtain all the training data weights corresponding to the batch processing label by sending the received batch processing label to the storage module, and then use the training data weights and the corresponding training data to train the machine learning model. Compared with the method in the related art in which the computing module needs to send all the labels corresponding to the received training data to the storage module, the message sorting and publishing method provided by the embodiment of the present disclosure is adopted. Since a batch processing module is added, a batch processing label can be generated for the batch-acquired training data through the batch processing module, and the batch processing label is synchronized to the computing module and the storage module. Then, when the computing module needs to obtain the training data weight for model training, it only needs to send a batch processing label to the storage module to obtain all the training data weights corresponding to the batch processing label, which greatly reduces the number of interactions between the computing module and the storage module, and also reduces the amount of data transmitted each time the computing module and the storage module interact. In the case of distributed deployment, the degree of dependence of the computing module on the network condition in the process of obtaining parameters is reduced, and then the computing module can obtain the training data weight more quickly, and use the training data weight for model training, thereby improving the training efficiency of the deep learning model. Therefore, in the embodiment of the present application, more dimensional training data can be used to train the message sorting model, while ensuring the training efficiency, the accuracy of the model is also greatly improved, thereby ensuring that the message release according to the sorting result calculated by the model can achieve better recommendation.
[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0041] Figure 1 is an architectural diagram of a Parameter server framework in a related technology according to an exemplary embodiment;
[0042] Figure 2 is a flow chart of a message sorting and publishing method according to an exemplary embodiment;
[0043] Figure 3 is an architectural diagram of a Parameter server framework according to an exemplary embodiment;
[0044] Figure 4 is a block diagram of a message sequencing and publishing device according to an exemplary embodiment;
[0045] Figure 5 is a block diagram of a data processing system according to an exemplary embodiment;
[0046] Figure 6 The invention is a block diagram of an electronic device for sequencing and publishing messages according to an exemplary embodiment. DETAILED DESCRIPTION
[0047] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0049] The technical solutions provided by the embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0050] An embodiment of the present disclosure provides a message sorting and publishing method, which is used to at least solve the problem that the message publishing method provided in the related art reduces the training samples used in the message sorting model training process in order to ensure the message publishing efficiency, resulting in poor accuracy of the message sorting model and further poor accuracy of application message publishing.
[0051] The execution subject of the message sorting and publishing method provided in the embodiment of the present disclosure may be, but is not limited to, at least one of a mobile phone, a tablet computer, a personal computer (PC), a smart TV, and any terminal device that can run an application. Alternatively, the execution subject of the method may also be the application itself installed on the above-mentioned device, such as a live broadcast APP, a short video APP, and a model training APP. In addition, the execution subject of the method may also be a server, for example, a background server of a live broadcast APP, a background server of a short video APP, and a model training server, and so on.
[0052] For ease of description, the following takes the execution subject of the method as a data processing server as an example to introduce the message sorting and publishing method provided by the embodiment of the present disclosure. It can be understood that the execution subject of the method as a data processing server is only an exemplary description and should not be understood as a limitation of the embodiment of the present disclosure.
[0053] Figure 2 is a flowchart of a message sorting and publishing method according to an exemplary embodiment. Figure 2 As shown, the message sorting and publishing method is used in a data processing server, and includes the following steps:
[0054] In step S101, first data of a message to be published and second data of a message recipient are obtained;
[0055] Among them, the message to be published may refer to the advertising message placed by the advertiser on the application, and the first data of the message to be published may refer to the type data, content data, duration data, etc. of the advertisement; in addition, in the embodiment of the present disclosure, since the application will directly publish the advertisement placed by the advertiser on the advertising space of the application so that the user can watch the advertisement while using the application, the message recipient generally refers to the user of the application, and the second data of the message recipient may generally refer to the historical data of the user watching advertisements while using the application, such as which advertisements the user clicked to watch, and which advertisements the user chose to skip directly, etc.
[0056] In step S102, the first data and the second data obtained by executing step S101 are calculated according to the pre-trained message sorting model to obtain the publishing order of the messages to be published;
[0057] At present, in the distributed training of machine learning models, the Parameter server architecture (PS architecture) is the most commonly used distributed training architecture. Therefore, in the embodiment of the present application, the message sorting and publishing method provided by the present application is introduced in detail by taking the use of the PS architecture for training the machine learning model as an example. It can be understood that the application of this method to the training of the machine learning model under the PS architecture is only an exemplary description and should not be understood as a limitation on the embodiments of the present disclosure.
[0058] In one implementation, the PS architecture provided by the embodiment of the present disclosure is as follows: Figure 3 As shown, it mainly includes the following three modules:
[0059] 1. Batch processing module: The batch processing module is a module newly added to the PS architecture for preprocessing training data in order to train the message sorting model provided in the embodiment of the present application (i.e. Figure 3 The specific use of this batch processing module in the PS architecture is described below;
[0060] 2. Computation module: used to perform computational training on training data to achieve iterative model updates, i.e. Figure 3 The worker module in the PS architecture generally includes several worker modules. When performing iterative model update training, multiple worker modules can obtain training data in parallel and use the training data to perform iterative model update training. This method of parallel computing training with multiple worker modules can improve the training efficiency of the machine learning model.
[0061] 3. Storage module: used to store relevant training parameters, i.e. Figure 3 The ps module in the embodiment of the present application, specifically, the ps module mainly stores the weight parameters corresponding to each training data.
[0062] Since the batch processing module (hereinafter referred to as the hub module for ease of description) is a new module added to the traditional PS framework in order to adapt to the message sorting and publishing method provided by the present application, the message sorting and publishing method provided by the present application is introduced below using the hub module in the PS framework as an example.
[0063] In one implementation, the message sequencing model may be generated using the following method:
[0064] Sub-step S1021, batch-acquire training data to be allocated to the computing module, and generate batch labels for the training data;
[0065] The training data is composed of first historical data of published messages and second historical data of message recipients.
[0066] In the embodiment of the present application, the hub module can obtain the training sample database (i.e. Figure 3 or it may also respond to instructions from other modules. For example, after the calculation module has completed the calculation of the previous batch of training data, it may send a request for obtaining training data to the hub module. Then, the hub module may respond to the request and obtain training data in batches from the train data.
[0067] It should be noted here that since the PS architecture often includes multiple worker modules, during the training process, each worker module must obtain training data, and then the model training can be performed in parallel. Therefore, in order to ensure that each worker module can obtain training data, in an embodiment of the present application, the hub module can group the training data obtained in batches according to the number of worker modules included in the PS architecture, and generate batch labels for each group of training data, respectively, to ensure that each worker module can be assigned a corresponding batch label.
[0068] In an embodiment of the present application, a specific implementation method for generating batch labels for training data may include: determining the number of computing modules in the machine learning model; grouping the training data according to the number of computing models to obtain at least two training data sets; and generating batch labels for each of the training data sets.
[0069] Assume that the PS architecture in the embodiment of the present application is as follows Figure 3 As shown in the figure, there are three worker modules. The hub module obtains 3000 training data in batches from the train data. The hub module can divide the obtained training data into three training data sets according to the number of worker modules. Each training data set contains 1000 training data, and generates batch labels for these three training data sets respectively: batch id1, batch id2 and batch id3.
[0070] In addition, it should be noted that the hub module can use the generated random number as the batch label corresponding to the training data set, or the hub module can also generate the batch label corresponding to the training data set according to the label of each training data in the training data set. The embodiment of the present application does not limit the specific method of generating the batch label, as long as the hub module can generate a corresponding batch label for each training data set.
[0071] Sub-step S1022, sending the batch labels generated by executing sub-step S1021 to the storage module, so that the storage module determines the training data weights corresponding to the batch labels according to the batch labels;
[0072] After the batch labels are generated through the above sub-step S1021, in order for the computing module and the storage module to use the batch labels for data query in the subsequent training process, in an embodiment of the present application, the hub module will send the generated batch labels to the computing module and the storage module respectively.
[0073] In the traditional PS architecture, the weight parameters corresponding to each training data are stored in the storage module in the form of key-value, where the key is the label (id) of the training data and the value is the weight parameter corresponding to the training data. In the traditional PS framework, after the storage module receives the key corresponding to the training data sent by the computing module, it can search for the weight parameter stored in the corresponding value according to the key.
[0074] In order to minimize the changes to the entire PS framework, in the embodiment of the present application, only the hub module is added, and the storage module and the calculation module are not changed. Therefore, in the embodiment of the present application, the storage module still only stores the weight parameters corresponding to each training data label. In this case, if the hub only sends the generated batch labels to the storage module, since the storage module does not store the relevant content of the batch labels, the storage module will not be able to find the corresponding training data parameters according to the batch labels.
[0075] In order to ensure that the storage module can find the weight parameters corresponding to the corresponding training data according to the received batch labels, in one embodiment, the specific implementation method of sub-step S1022 may include: determining the training data set corresponding to the batch labels; determining the training data labels corresponding to each training data contained in the training data set; and sending the batch labels and the training data labels to the storage module.
[0076] In an embodiment of the present application, the hub module sends the training data label (ID) contained in the training data set corresponding to the batch label to the storage module together with the batch label, so that the storage module can determine the training data label corresponding to each batch label, and then determine the training data weight parameter corresponding to each batch label accordingly.
[0077] Sub-step S1023, sending the training data and batch labels obtained by executing sub-step S1021 to the computing module.
[0078] Then, the computing module obtains the training data weights corresponding to the batch labels from the storage module according to the batch labels, and performs machine learning model training according to the training data weights and the training data.
[0079] Since the PS framework contains multiple computing modules (for the sake of ease of description, they will be referred to as worker modules in the following text), when the hub module sends batch labels to the worker modules, it will first determine the training data set assigned to each worker module, and then send the batch identifier of the training data set and the training data corresponding to the training data set to the corresponding worker module.
[0080] In one embodiment, the specific implementation method of sub-step S1023 may include: respectively determining the training data sets corresponding to each computing module; determining the training data and batch processing labels corresponding to each training data set; and sending the training data and batch processing labels corresponding to each training data set to the computing modules corresponding to the training data sets.
[0081] The worker module can send the received batch labels to the storage module via the Internet, so that the storage module can find the training data weights corresponding to the batch labels, and send the training data weight parameters back to the worker module, and then the worker module can perform machine learning model training according to the training data weights and training data.
[0082] In step S103, the messages to be published are published according to the publishing order determined by executing step S102.
[0083] According to the message sorting and publishing method provided by the embodiment of the present disclosure, when publishing a message, the first data of the message to be published and the second data of the message recipient can be first obtained, and the first data and the second data can be calculated according to the message sorting model obtained in advance to obtain the publishing order of the message to be published, and then the message to be published can be published according to the publishing order. However, in the embodiment of the present disclosure, when training the message sorting model, the training data will not be sent directly to the calculation module, but the batch processing module will first obtain the training data in batches. After obtaining the training data, the batch processing module will generate a batch processing label for the batch training data, and send the batch processing label to the storage module and the calculation module respectively, so as to inform the storage module of the training data to be used by the calculation module in advance through the batch processing label, and then the storage module can determine all the training data weights corresponding to the batch processing label in advance according to the batch processing label, so that the subsequent calculation model can obtain these weights; and the calculation model can obtain all the training data weights corresponding to the batch processing label by sending the received batch processing label to the storage module, and then use the training data weights and the corresponding training data to train the machine learning model. Compared with the method in the related art in which the computing module needs to send all the labels corresponding to the received training data to the storage module, the message sorting and publishing method provided by the embodiment of the present disclosure is adopted. Since a batch processing module is added, a batch processing label can be generated for the batch-acquired training data through the batch processing module, and the batch processing label is synchronized to the computing module and the storage module. Then, when the computing module needs to obtain the training data weight for model training, it only needs to send a batch processing label to the storage module to obtain all the training data weights corresponding to the batch processing label, which greatly reduces the number of interactions between the computing module and the storage module, and also reduces the amount of data transmitted each time the computing module and the storage module interact. In the case of distributed deployment, the degree of dependence of the computing module on the network condition in the process of obtaining parameters is reduced, and then the computing module can obtain the training data weight more quickly, and use the training data weight for model training, thereby improving the training efficiency of the deep learning model. Therefore, in the embodiment of the present application, more dimensional training data can be used to train the message sorting model, while ensuring the training efficiency, the accuracy of the model is also greatly improved, thereby ensuring that the message release according to the sorting result calculated by the model can achieve better recommendation.
[0084] Figure 4A message sorting and publishing device is shown according to an exemplary embodiment, which is applied to a data processing system to at least solve the problem that the message publishing method provided in the related art reduces the training samples used in the message sorting model training process in order to ensure the message publishing efficiency, resulting in poor accuracy of the message sorting model, and further leads to poor accuracy of application message publishing. Figure 4 The device includes a data acquisition unit 121, a ranking determination unit 122 and a publishing unit 123.
[0085] The data acquisition unit 121 is configured to acquire first data of the message to be published and second data of the message recipient;
[0086] The order determination unit 122 is configured to perform calculation on the first data and the second data according to a pre-trained message ordering model to obtain a release order of the to-be-released messages;
[0087] The publishing unit 123 is configured to publish the messages to be published in the publishing order.
[0088] In one embodiment, the data processing system further includes a batch processing unit, a storage unit, and a computing unit;
[0089] The batch processing unit is configured to execute batch acquisition of training data to be assigned to the computing unit, generate batch processing labels for the training data, wherein the training data is composed of first historical data of published messages and second historical data of message recipients; send the batch processing labels to the storage unit; send the training data and the batch processing labels to the computing unit;
[0090] A storage unit is configured to receive a batch label sent by the batch processing module; determine the training data weight corresponding to the batch label according to the batch label; wherein the training weight corresponding to the training data is stored in the storage module;
[0091] The computing unit is configured to receive the training data and the batch processing label sent by the batch processing module; obtain the training data weight corresponding to the batch processing label from the storage module according to the batch processing label, and generate a message sorting model according to the training data weight and the training data training.
[0092] In one embodiment, the batch processing unit is specifically configured to perform: determining the number of computing units in the machine learning model; grouping the training data according to the number of computing units to obtain at least two training data sets; and generating batch processing labels for the training data sets respectively.
[0093] In one embodiment, the batch processing unit is specifically configured to perform: determining a training data set corresponding to the batch processing label; determining a training data label corresponding to each training data contained in the training data set; and sending the batch processing label and the training data label to the storage unit.
[0094] In one embodiment, the batch processing unit is specifically configured to perform: respectively determine the training data sets corresponding to each computing unit; determine the training data and batch processing labels corresponding to each training data set; and respectively send the training data and batch processing labels corresponding to each training data set to the computing unit corresponding to the training data set.
[0095] In one embodiment, the message sorting model is constructed using a Parameter server architecture; the computing unit is a worker module in the Parameter server architecture; and the storage unit is a parameter server module in the Parameter server architecture.
[0096] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0097] By using the message sorting and publishing device provided by the embodiment of the present disclosure, when publishing a message, the first data of the message to be published and the second data of the message recipient can be first obtained, and the first data and the second data can be calculated according to the message sorting model obtained in advance to obtain the publishing order of the message to be published, and then the message to be published can be published according to the publishing order. However, in the embodiment of the present disclosure, when training the message sorting model, the training data will not be sent directly to the calculation module, but the batch processing module will first obtain the training data in batches. After obtaining the training data, the batch processing module will generate a batch processing label for the batch training data, and send the batch processing label to the storage module and the calculation module respectively, so as to inform the storage module of the training data to be used by the calculation module in advance through the batch processing label, and then the storage module can determine all the training data weights corresponding to the batch processing label in advance according to the batch processing label, so that the subsequent calculation model can obtain these weights; and the calculation model can obtain all the training data weights corresponding to the batch processing label by sending the received batch processing label to the storage module, and then use the training data weights and the corresponding training data to train the machine learning model. Compared with the method in the related art in which the computing module needs to send all the labels corresponding to the received training data to the storage module, the message sorting and publishing method provided by the embodiment of the present disclosure is adopted. Since a batch processing module is added, a batch processing label can be generated for the batch-acquired training data through the batch processing module, and the batch processing label is synchronized to the computing module and the storage module. Then, when the computing module needs to obtain the training data weight for model training, it only needs to send a batch processing label to the storage module to obtain all the training data weights corresponding to the batch processing label, which greatly reduces the number of interactions between the computing module and the storage module, and also reduces the amount of data transmitted each time the computing module and the storage module interact. In the case of distributed deployment, the degree of dependence of the computing module on the network condition in the process of obtaining parameters is reduced, and then the computing module can obtain the training data weight more quickly, and use the training data weight for model training, thereby improving the training efficiency of the deep learning model. Therefore, in the embodiment of the present application, more dimensional training data can be used to train the message sorting model, while ensuring the training efficiency, the accuracy of the model is also greatly improved, thereby ensuring that the message release according to the sorting result calculated by the model can achieve better recommendation.
[0098] Figure 5 A data processing system is shown according to an exemplary embodiment, which is used to at least solve the problem that the message publishing method provided in the related art reduces the training samples used in the message sorting model training process in order to ensure the message publishing efficiency, resulting in poor accuracy of the message sorting model, and further leads to poor accuracy of application message publishing. Figure 5 The device includes a publishing module 131, a batch processing module 132, a calculation module 133 and a publishing unit 134.
[0099] The publishing module 131 is used to obtain first data of the message to be published and second data of the message recipient; calculate the first data and the second data according to the message sorting model obtained by pre-training to obtain the publishing order of the message to be published; and publish the message to be published according to the publishing order;
[0100] The batch processing module 132 is used to batch-acquire the training data to be assigned to the computing module, generate batch processing labels for the training data, wherein the training data is composed of the first historical data of the published message and the second historical data of the message recipient; send the batch processing labels to the storage module; send the training data and the batch processing labels to the computing module;
[0101] The calculation module 133 is used to receive the training data and the batch processing label sent by the batch processing module; obtain the training data weight corresponding to the batch processing label from the storage module according to the batch processing label, and generate a message sorting model according to the training data weight and the training data training;
[0102] The storage module 134 is used to receive the batch processing label sent by the batch processing module; determine the training data weight corresponding to the batch processing label according to the batch processing label; wherein the training weight corresponding to the training data is stored in the storage module.
[0103] By using the data processing system provided by the embodiment of the present disclosure, when publishing a message, the first data of the message to be published and the second data of the message recipient can be first obtained, and the first data and the second data can be calculated according to the message sorting model obtained by pre-training to obtain the publishing order of the message to be published, and then the message to be published can be published according to the publishing order. However, in the embodiment of the present disclosure, when training the message sorting model, the training data will not be sent directly to the calculation module, but the batch processing module will first obtain the training data in batches. After obtaining the training data, the batch processing module will generate a batch processing label for the batch training data, and send the batch processing label to the storage module and the calculation module respectively, so as to inform the storage module in advance of the training data to be used by the calculation module through the batch processing label, and then the storage module can determine all the training data weights corresponding to the batch processing label in advance according to the batch processing label, so that the subsequent calculation model can obtain these weights; and the calculation model can obtain all the training data weights corresponding to the batch processing label by sending the received batch processing label to the storage module, and then use the training data weights and the corresponding training data to train the machine learning model. Compared with the method in the related art in which the computing module needs to send all the labels corresponding to the received training data to the storage module, the message sorting and publishing method provided by the embodiment of the present disclosure is adopted. Since a batch processing module is added, a batch processing label can be generated for the batch-acquired training data through the batch processing module, and the batch processing label is synchronized to the computing module and the storage module. Then, when the computing module needs to obtain the training data weight for model training, it only needs to send a batch processing label to the storage module to obtain all the training data weights corresponding to the batch processing label, which greatly reduces the number of interactions between the computing module and the storage module, and also reduces the amount of data transmitted each time the computing module and the storage module interact. In the case of distributed deployment, the degree of dependence of the computing module on the network condition in the process of obtaining parameters is reduced, and then the computing module can obtain the training data weight more quickly, and use the training data weight for model training, thereby improving the training efficiency of the deep learning model. Therefore, in the embodiment of the present application, more dimensional training data can be used to train the message sorting model, while ensuring the training efficiency, the accuracy of the model is also greatly improved, thereby ensuring that the message release according to the sorting result calculated by the model can achieve better recommendation.
[0104] Figure 6 FIG. 4 is a schematic diagram showing a structure of an electronic device 400 for message sequencing and publishing according to an exemplary embodiment. Figure 6At the hardware level, the message sorting and publishing electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.
[0105] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0106] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0107] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a message sorting and publishing device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0108] Acquire first data of a message to be published and second data of a message recipient; calculate the first data and the second data according to a pre-trained message sorting model to obtain a publishing order of the message to be published; and publish the message to be published in accordance with the publishing order.
[0109] As disclosed above Figure 6The method for executing the message sorting and publishing electronic device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0110] The electronic device may also perform Figure 2 Method, and realize the message sorting and publishing device in Figure 2 The functions in the illustrated embodiments will not be described in detail in the embodiments of the present disclosure.
[0111] Of course, in addition to software implementation, the electronic device disclosed in the present invention does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0112] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by the processor 420 of the electronic device 400 to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0113] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0114] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A message sequencing and publishing method, characterized in that: include: Obtaining first data of a message to be published and second data of a message recipient; Calculating the first data and the second data according to a pre-trained message sorting model to obtain a publishing order of the to-be-published messages; For the messages to be published, publish the messages in the publishing order; The message sorting model is generated in the following way: Batch-acquire training data to be allocated to the computing module, and generate batch labels for the training data, wherein the training data is composed of first historical data of published messages and second historical data of message recipients; Sending the batch label to a storage module, so that the storage module determines the training data weight corresponding to the batch label according to the batch label; wherein the training weight corresponding to the training data is stored in the storage module; The training data and the batch labels are sent to a computing module, so that the computing module obtains the training data weights corresponding to the batch labels from the storage module according to the batch labels, and generates a message sorting model according to the training data weights and the training data training.
2. The message sequencing and publishing method according to claim 1, characterized in that: Batch acquiring training data to be assigned to the computing module and generating batch processing labels for the training data specifically includes: determining the number of said computing modules in the machine learning model; Grouping the training data according to the number of the computing modules to obtain at least two training data sets; Batch labels are generated for the training data sets respectively.
3. The message sequencing and publishing method according to claim 2, characterized in that: Sending the batch processing label to the storage module specifically includes: Determine a training data set corresponding to the batch label; Determine a training data label corresponding to each training data included in the training data set; The batch labels and the training data labels are sent to the storage module.
4. The message sequencing and publishing method according to claim 2, characterized in that: Sending the training data and the batch labels to a computing module specifically includes: Determine the training data sets corresponding to each computing module respectively; Determine the training data and batch labels corresponding to each training data set; The training data and batch labels corresponding to each training data set are respectively sent to the computing modules corresponding to the training data sets.
5. The message sequencing and publishing method according to claim 1, characterized in that: The message sorting model is constructed using the Parameter server architecture; The computing module is a worker module in the Parameter server architecture; The storage module is a parameter server module in the Parameter server architecture.
6. A message sorting and publishing device, applied to a data processing system, characterized in that: include: A data acquisition unit, configured to acquire first data of a message to be published and second data of a message recipient; A sorting determination unit is configured to perform calculations on the first data and the second data according to a pre-trained message sorting model to obtain a publishing order of the to-be-published messages; A publishing unit, configured to publish the message to be published in the publishing order; The data processing system also includes a batch processing unit, a storage unit and a computing unit; The batch processing unit is configured to execute batch acquisition of training data to be assigned to the computing unit, generate batch processing labels for the training data, wherein the training data is composed of first historical data of published messages and second historical data of message recipients; send the batch processing labels to the storage unit; send the training data and the batch processing labels to the computing unit; The storage unit is configured to receive the batch processing label sent by the batch processing unit; determine the training data weight corresponding to the batch processing label according to the batch processing label; wherein the training weight corresponding to the training data is stored in the storage unit; The computing unit is configured to receive the training data and the batch processing label sent by the batch processing unit; obtain the training data weight corresponding to the batch processing label from the storage unit according to the batch processing label, and generate a message sorting model according to the training data weight and the training data training.
7. The message sequencing and publishing device according to claim 6, characterized in that: The batch processing unit is specifically configured to execute: determining a number of said computational units in the machine learning model; Grouping the training data according to the number of the computing units to obtain at least two training data sets; Batch labels are generated for the training data sets respectively.
8. The message sequencing and publishing device according to claim 7, characterized in that: The batch processing unit is specifically configured to execute: Determine a training data set corresponding to the batch label; Determine a training data label corresponding to each training data included in the training data set; The batch labels and the training data labels are sent to the storage unit.
9. A data processing system, characterized in that: include: Publishing module, batch processing module, computing module and storage module; The publishing module is used to obtain first data of the message to be published and second data of the message recipient; calculate the first data and the second data according to the pre-trained message sorting model to obtain the publishing order of the message to be published; and publish the message to be published according to the publishing order; The batch processing module is used to batch-acquire the training data to be assigned to the computing module, generate batch processing labels for the training data, wherein the training data is composed of the first historical data of the published message and the second historical data of the message recipient; send the batch processing labels to the storage module; send the training data and the batch processing labels to the computing module; The computing module is configured to receive the training data and the batch processing label sent by the batch processing module; obtain the training data weight corresponding to the batch processing label from the storage module according to the batch processing label, and generate a message sorting model according to the training data weight and the training data training; The storage module is used to receive the batch processing label sent by the batch processing module; determine the training data weight corresponding to the batch processing label according to the batch processing label; wherein the training weight corresponding to the training data is stored in the storage module.
10. An electronic device for publishing messages in sequence, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the message sorting and publishing method as described in any one of claims 1 to 5.
11. A storage medium, when the instructions in the storage medium are executed by a processor of an electronic device for sorting and publishing messages, the electronic device for sorting and publishing messages can execute the method for sorting and publishing messages as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and apparatus for determining issuance sequence
CN106548331A
Network-centric architecture and algorithms to accelerate distributed training of neural networks
US20210374503A1