Model updating method and device, electronic equipment and computer readable storage medium
Through the combination of the sub-model queue and the object selection main model, the machine learning model is updated using the newly added sample data, which solves the problems of cumbersome model update and fitting risk in the existing technology, and achieves efficient and accurate model update and personalized recommendation. .
Patent Information
- Application Number
- CN202410726154.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-30
AI Technical Summary
The update process of existing machine learning models is cumbersome and has high fitting risks, which affects the accuracy of the output results and is difficult to accommodate convenience and accuracy.
By obtaining sample data within the new time interval, train the object selection sub-model and add it to the sub-model queue. Combine the sub-model queue with the object selection main model, and update the main model to reflect the device's inclination towards the target object, reducing calculation quantity to improve model update efficiency.
It improves the efficiency and accuracy of model updates, reduces the amount of calculation, enhances the device's personalized recommendation capabilities for different objects, and improves user experience.
Smart Images

Figure CN118569409A
Abstract
Description
[Technical field]
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model updating method and device, an electronic device, and a computer-readable storage medium. [Background technology]
[0002] At present, machine learning models are often used to detect the degree of interest of a device in an object of interest, that is, the degree of inclination. Generally, deep neural networks can be trained. However, the deep neural network system is large and complex in structure. Its training process is cumbersome and has a large fitting risk, which makes its update process equally cumbersome and has a large fitting risk. If the machine learning model is simplified to reduce the fitting risk, the accuracy of the output results of the machine learning model will be affected.
[0003] Therefore, how to ensure the accuracy of the output results of the machine learning model while improving the convenience of updating the machine learning model has become a technical problem that needs to be solved urgently. [Summary of the invention]
[0004] The embodiments of the present application provide a model updating method and device, an electronic device and a computer-readable storage medium, which are intended to solve the technical problem that the model updating method in the related art is not compatible with the requirements of convenience and accuracy in the tendency detection process.
[0005] In a first aspect, an embodiment of the present application provides a model updating method, comprising: acquiring newly added sample data within a newly added time interval, the newly added sample data comprising object selection association information and a first target object selected by a device based on the object selection association information; training a newly added object selection sub-model based on the newly added sample data, the newly added object selection sub-model being used to reflect the association relationship between the object selection association information and a first tendency of the device to select the first target object when the object selection association information exists; adding the newly added object selection sub-model to a sub-model queue, the sub-model queue being used to output a first tendency queue, wherein the sub-model queue before updating comprises a plurality of historical object selection sub-models corresponding to each of a plurality of historical time intervals and arranged in chronological order of the plurality of historical time intervals, each of the historical object selection sub-models being trained by historical sample data within the corresponding historical time interval; updating an object selection main model based on the sub-model queue, wherein the object selection main model is used to reflect the association relationship between the first tendency queue and a second tendency of the device to select a second target object when all the object selection association information corresponding to the sub-model queue exists.
[0006] In a second aspect, an embodiment of the present application provides a model updating device, comprising: a newly added sample data acquisition unit, used to acquire newly added sample data within a newly added time interval, the newly added sample data including object selection association information and a first target object selected by the device based on the object selection association information; a newly added sub-model training unit, used to train a newly added object selection sub-model based on the newly added sample data, the newly added object selection sub-model being used to reflect the association relationship between the object selection association information and a first tendency of the device to select the first target object when the object selection association information exists; a sub-model queue updating unit, used to add the newly added object selection sub-model to a sub-model queue, the sub-model queue being used to output a first tendency queue, wherein the sub-model queue before updating includes a plurality of historical object selection sub-models corresponding to each of a plurality of historical time intervals and arranged in chronological order of the plurality of historical time intervals, each of the historical object selection sub-models being trained by the historical sample data within the corresponding historical time interval; a main model updating unit, used to update an object selection main model based on the sub-model queue, wherein the object selection main model is used to reflect the association relationship between the first tendency queue and a second tendency of a second target object, the second target object being selected by the device based on the first tendency queue.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; and 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 configured to execute the method described in the first aspect above.
[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the method flow described in the first aspect above.
[0009] The above technical solution aims at the technical problem that the model update method in the related technology is not compatible with the convenience and accuracy requirements in the tendency detection process. While obtaining the tendency of the device to select the second target object by combining the sub-model queue with the object selection main model, a new object selection sub-model is obtained by training with a small amount of new sample data, and the new object selection sub-model is added to the sub-model queue to realize the update of the sub-model queue. Compared with training a large deep neural network, the amount of calculation involved in the update is reduced, and the efficiency of the model update is improved. Furthermore, the final probability of the device selecting the second target object is determined by the sub-model queue and the output first tendency queue and the object selection main model. The object selection main model has low complexity, greatly reduced calculation, and training, updating and application are all efficient. In summary, in the process of determining the probability of the device selecting the second target object, the efficiency of the model update is effectively increased. At the same time, it is convenient to make personalized recommendations for the device in a timely manner for different objects, thereby improving the user experience of the device.
Brief Description of the Drawings
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0011] Figure 1 A flow chart of a model updating method according to an embodiment of the present application is shown;
[0012] Figure 2 Shown in the use of Figure 1 A flowchart of an object selection method based on a model updating method is shown;
[0013] Figure 3 A schematic diagram showing a model updating method according to another embodiment of the present application is shown;
[0014] Figure 4 A block diagram of a model updating device according to an embodiment of the present application is shown;
[0015] Figure 5 A block diagram of an electronic device according to an embodiment of the present application is shown. [Specific implementation method]
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] Embodiment 1
[0018] Figure 1 A flow chart of a model updating method according to an embodiment of the present application is shown.
[0019] Step 102: Acquire new sample data within a new time interval.
[0020] The newly added sample data in the newly added time interval refers to the sample data added in the newly added time interval over time and used to fine-tune the trained model. The newly added sample data includes object selection association information and the first target object selected by the device based on the object selection association information. The object selection association information refers to information that has a certain influence on which object the device selects, and the first target object refers to the object actually selected by the device when it is influenced by the object selection association information.
[0021] In a possible design, the object selection association information includes device feature information and object feature information. The device feature information refers to feature information of the device that performs the selection behavior and has a certain influence on which object the device selects, while the object feature information refers to feature information of the object that can be selected by the device and has a certain influence on which object the device selects.
[0022] In one possible design, the device characteristic information includes: a combination of one or more of the device user's age information, the device user's gender information, the device's historical viewing times for the sample optional objects, the device's historical viewing times for all objects of the object type to which the sample optional objects belong, the device's historical selection times for the sample optional objects, and the device's historical viewing times for all objects of the object type to which the sample optional objects belong; the object characteristic information includes: a combination of one or more of the sample optional objects' category information, brand information, current price information, historical price information, historical viewing times, and historical selection times.
[0023] Therefore, any multiple types of device feature information and any multiple types of object feature information can be combined to reflect from multiple dimensions the degree of influence of the device and the objects that can be selected by the device on which object the device selects.
[0024] Step 104: training a new object selection sub-model based on the new sample data.
[0025] That is to say, the technical solution of the present application for training the newly added object selection sub-model with newly added sample data replaces the technical solution of retraining the deep neural network with newly added sample data and historical sample data in the related art. In this way, the amount of newly added sample data is much smaller than the amount of historical sample data used to train the deep neural network, and training the newly added object selection sub-model is faster and more convenient than training a large deep neural network.
[0026] The newly added object selection submodel is used to reflect the association between the object selection association information and the first tendency of the device to select the first target object when the object selection association information exists. In other words, the newly added object selection submodel takes the object selection association information as input, determines the first tendency of the device to select the first target object based on the object selection association information, and outputs the first tendency. The first tendency is used to reflect the possibility of the device selecting the first target object, that is, the probability of the device selecting the first target object.
[0027] In a possible design, the newly added object selection sub-model may be trained based on the device feature information and the object feature information, as well as the selection result of the device corresponding to the device feature information for the sample selectable object having the object feature information. Specifically, the newly added object selection sub-model is trained with the device feature information and the object feature information as input samples and the selection result as output samples, so that the newly added object selection sub-model obtained can effectively reflect the association relationship between the object selection association information and the possibility of the device selecting the first target object having the object selection association information.
[0028] Step 106: Add the newly added object selection sub-model to a sub-model queue.
[0029] The sub-model queue before updating includes a plurality of historical object selection sub-models corresponding to the plurality of historical time intervals and arranged in the time sequence of the plurality of historical time intervals, and each of the historical object selection sub-models is trained by the historical sample data in the corresponding historical time interval. In other words, the plurality of object selection sub-models in the sub-model queue are arranged in the order of the generation period of the sample data used by each of them.
[0030] Based on this, after obtaining the new sample data within the new time interval, it is only necessary to add the new object selection sub-model trained by the new sample data to the sub-model queue to achieve the update of the sub-model queue.
[0031] Furthermore, the sub-model queue is used to output a first tendency queue, and each first tendency in the first tendency queue is output by the corresponding object selection sub-model.
[0032] In a possible design, the newly added object selection submodel is added to the tail of the submodel queue, and the historical object selection submodel at the head of the submodel queue is deleted. Specifically, the closer the occurrence time of the sample data is to the current moment, the more effectively it can reflect the actual data level, and the farther away from the current moment, the greater the error with the actual data level at the current moment. Therefore, the historical object selection submodel at the head of the submodel queue can be deleted while adding the newly added object selection submodel.
[0033] In a possible design, the number of the newly added object selection sub-models added to the tail is equal to the number of the historical object selection sub-models deleted at the head. That is, the number of newly added object selection sub-models added to the tail is the same as the number of historical object selection sub-models deleted at the head, so that the number of object selection sub-models in the sub-model queue remains unchanged, thereby maintaining the total amount of sample data in the sub-model queue unchanged, making the sub-model queue and the association relationship reflected by the object selection main model obtained by training the sub-model queue more stable.
[0034] In another possible design, the number of the newly added object selection sub-models added at the tail is greater than the number of the historical object selection sub-models deleted at the head. This is equivalent to increasing the total amount of sample data in the sub-model queue by increasing the number of the latest sample data, thereby enabling the sub-model queue and the object selection main model trained by the sub-model queue to more accurately reflect the association relationship they reflect.
[0035] Step 108: Update the object selection main model based on the sub-model queue.
[0036] The object selection main model is used to reflect the association between the first propensity queue and the second propensity of the second target object, and the second target object is selected by the device based on the first propensity queue. In other words, the second propensity is obtained by training the first propensity queue, which can more accurately reflect the possibility of the device selecting the second target object.
[0037] The input of the object selection main model is a first propensity queue, which is a numerical queue composed of multiple probability values, and the output of the object selection main model is a second propensity, which is a numerical value reflecting the probability of the device selecting the second target object. It is obvious that the complexity of the object selection main model is much lower than the large deep neural network trained in the related art.
[0038] In a possible design, the object selection main model can be updated based on the first propensity queue output by the sub-model queue after the newly added object selection sub-model is added, and the selection result of the device for the sample selectable object corresponding to the first propensity queue. Specifically, the first propensity queue output by the sub-model queue is used as an input sample, and the selection result is used as an output sample to train the object selection main model, so that the obtained object selection main model can effectively reflect the correlation between the first propensity queue and the possibility of the device selecting the second target object.
[0039] The above technical solution, while obtaining the tendency of the device to select the second target object by combining the sub-model queue with the object selection main model, obtains the newly added object selection sub-model through training with a small amount of newly added sample data, and adds the newly added object selection sub-model to the sub-model queue to realize the update of the sub-model queue. Compared with training a large deep neural network, the amount of calculation involved in the update is reduced, and the efficiency of the model update is improved. Furthermore, the final probability of the device selecting the second target object is determined by the sub-model queue and the output first tendency queue and the object selection main model. The object selection main model has low complexity, greatly reduced calculation amount, and training, updating and application are all efficient. In summary, in the process of determining the probability of the device selecting the second target object, the efficiency of the model update is effectively increased. At the same time, it is convenient to make personalized recommendations for the device in a timely manner for different objects, thereby improving the user experience of the device.
[0040] It should be added that, based on the first embodiment, the newly added time interval can be determined based on the rules determined based on the predetermined time interval. That is to say, when fine-tuning the sub-model queue and the object selection main model, the time interval within which the newly added sample data is collected can be controlled.
[0041] In one possible design, the predetermined time interval determination rule includes: the newly added time interval is of equal length to the multiple historical time intervals, that is, each object selection submodel in the submodel queue is generated by collecting sample data within a time interval of the same length.
[0042] In another possible design, the predetermined time interval determination rule includes: the newly added time interval is equal to the specified historical time interval, wherein the position of the specified historical time interval in the historical time period is consistent with the position of the newly added time interval in the current time period. For example, if the specified historical time interval is 8:00 to 10:00 every morning of the previous week, then the newly added time interval is 8:00 to 10:00 every morning of this week.
[0043] In another possible design, the number of new sample data in the newly added time interval is equal to the number of historical sample data in each of the historical time intervals, that is, the update criterion is not the duration but the increment of sample data. Whenever the sample data increases by a specified number, the new object selection sub-model is trained with the newly added sample data of the specified number.
[0044] It should be added that the object selection sub-model in the sub-model queue can be selected as a CART decision tree, and the object selection main model can be selected as a multi-layer perceptron. Of course, the object selection sub-model and the object selection main model can also be any other type of model that meets the demand for tendency judgment.
[0045] Figure 2 Shown in the use of Figure 1 A flow chart showing an object selection method based on a model updating method.
[0046] like Figure 2 As shown, for any current optional object in the current optional object set, including:
[0047] Step 202: Determine a first tendency queue based on device feature information of the device, object feature information of the currently selectable object, and a sub-model queue.
[0048] Step 204: Determine a second tendency for the device to select the currently selectable object based on the first tendency queue and the object selection main model.
[0049] Step 206: Select the current selectable object with the highest second tendency in the current selectable object set as the second target object of the device.
[0050] The above technical solution can obtain the tendency of the device to select the second target object by combining the sub-model queue with the object selection main model, so as to make personalized recommendations for the device in time for different objects and improve the user experience of the device.
[0051] Embodiment 2
[0052] Figure 3 A schematic diagram of a model updating method according to another embodiment of the present application is shown.
[0053] like Figure 3 As shown in the figure, only the newly added data can be used to fine-tune the original model without completely retraining, thereby improving the efficiency of model updating. The specific process is as follows:
[0054] S1. Collect historical data to form a training set, and split the training set into several groups according to consecutive, fixed-length, and ordered time windows.
[0055] The time window is 1 week long, and 12 weeks of historical data are used as training data, and the training data is divided into 12 groups. In chronological order, they can be called the 1st, 2nd, ..., 12th groups of training data.
[0056] The historical data consists of three parts: the user feature vector x_user, the item feature vector x_item, and whether the user has clicked on the item y.
[0057] Among them, y is the item to be estimated, 0 means no click, and 1 means there is a click behavior.
[0058] The user feature vector x_user is composed of elements such as user age, historical clicks or purchases, and gender; product features include price, category, brand, historical sales, etc.; among them, discrete features such as user gender, product category, and brand need to be one-hot encoded.
[0059] S2. For each training set, train a sub-model respectively, and add all sub-models to the sub-model queue in chronological order.
[0060] For example, using the CART decision tree as a sub-model, the 1st, 2nd, ..., 12th groups of historical data are used to train the 1st, 2nd, ..., 12th decision trees respectively, and these decision trees are arranged in chronological order as a sub-model queue.
[0061] The input of each sub-model in the sub-model queue is the concatenation of the user feature vector x_user and the product feature vector x_item, that is, the vector [x_user, x_item]. The output of each sub-model in the sub-model queue is denoted as y_i, i = 1, 2, ..., 12. Among them, the output y_i of the i-th sub-model represents the probability of the user clicking on the product, that is, the user's estimated value of y, which is a value between 0 and 1.
[0062] S3. Building a main model based on the 1st, 2nd, ..., 12th sub-models.
[0063] The input of the main model is the output results y_i of the 12 sub-models, i=1, 2, ..., 12, and the output is the summarized estimation result y_ensemble, and the value range of y_ensemble is also between 0 and 1.
[0064] Using a multilayer perceptron (MLP) with a single hidden layer as an example, the process of building the main model is as follows:
[0065]
[0066] y ensemble=Sigmoid(W y h+b y )
[0067] Among them, W h ∈R N×12 ,W y ∈R 1×N ,b h ,b y ∈R, all three are model parameters; Relu and Sigmoid are activation functions, N is a setting value, which can be selected as 100, 200, etc. Of course, N can be any value, not limited to the above examples. h∈R N×1 is the hidden layer output of the MLP model; y ensemble ∈R, is the final output result of the MLP model, that is, the probability estimate after summarizing the output results of the 12 sub-models, 0≤y ensemble ≤1.
[0068] The training steps of the MLP model are as follows:
[0069] Using the gradient descent method as an example, the parameter W of the MLP model is iteratively optimized:
[0070]
[0071] Among them, α>0 is the learning rate, L is the cross entropy loss function, W={W h ,W y ,b h ,b y} represents the model parameter set of the MLP model.
[0072] L = -∑y·log(y ensemble )
[0073] Among them, y is the label in the historical data, that is, whether there is a true value of the click behavior, y ensemble is the output of the MLP model, which is the estimated value of the click probability.
[0074] When the loss function L is continuously lower than the specified threshold after iteration, the training process can be considered to have converged and the model parameters are optimized.
[0075] S4. Sub-model update.
[0076] As time goes by, new time windows appear. The data in the latest time window is used to train a new sub-model, which is added to the end of the sub-model queue. The oldest sub-model is removed from the head of the sub-model queue to complete the sub-model update.
[0077] After completing the above steps S1-S3, 12 sub-models are obtained. As time goes by, when the time exceeds the length of a time window, that is, after 1 week, a new set of historical data will be generated. At this time, the sub-model queue needs to be updated, and the historical data used in the latest 12 weeks is the 2nd to 11th set of historical data before the update, as well as the new set of historical data.
[0078] Therefore, the 2nd to 11th sub-models trained with the aforementioned 2nd to 11th groups of historical data remain unchanged and do not need to be updated. Instead, it is only necessary to use a newly added set of data to train a sub-model, insert it into the tail end of the sub-model queue, and remove the 1st sub-model from the head of the sub-model queue.
[0079] After the sub-model queue is updated, the 2nd to 11th groups of historical data and the new group of historical data will become the new 1st to 12th groups of historical data. The 2nd to 11th sub-models before the update and the newly added sub-model will become the new 1st to 12th sub-models, forming a new sub-model queue.
[0080] S5. After the sub-model queue is updated, the main model constructed in step S3 is iteratively updated.
[0081] After the sub-model queue is updated, its length remains unchanged, that is, the number of sub-models remains at 12, so the MLP model can also be incrementally updated based on the original model.
[0082] The updating method of the MLP model is the same as that described in step S3 and will not be repeated here.
[0083] At this point, after the main model is updated, it can be combined with 12 sub-models to predict the possibility of users selecting objects of interest, so as to facilitate the prediction and recommendation of objects of interest to users and achieve the purpose of personalized recommendation. Specifically, the recommendation process is as follows:
[0084] First, user information is collected to form a user feature vector x_user. At the same time, candidate product information is collected to form a product feature vector x_item. The lengths, elements and arrangement order of the two feature vectors remain consistent with those in step S1.
[0085] Next, the two feature vectors are concatenated to obtain the vector [x_user, x_item], and the concatenated vector is input into 12 sub-models to obtain 12 prediction results y_i, where i = 1, 2, ..., 12.
[0086] Furthermore, the above 12 prediction results are input into the MLP model to obtain an estimated value y_ensemble of the user's selection probability for the object of interest.
[0087] Finally, all candidate selectable objects are sorted from large to small according to the estimated value of selection probability, and a specified number of objects with the largest estimated value are selected as the final recommendation result for the user. The specified number is determined by the specific business involved in the recommendation.
[0088] In summary, compared to a single, large neural model, this solution uses multiple simple sub-models, and aggregates and merges the estimated results of the sub-models through the main model to achieve ensemble learning. Among them, the sub-model structure is relatively simple and reliable, avoiding the risk of overfitting that may exist in the training process of large neural networks. At the same time, a large number of data sets are grouped and disassembled to facilitate parallel computing, which can improve the efficiency of model training, updating and prediction. At the same time, compared to classic ensemble learning methods such as xgboost and random forests, this solution supports incremental updates. When new training data is generated over time, only the newly added data can be used to fine-tune the existing model without completely initializing and retraining the entire model.
[0089] Figure 4 A block diagram of a model updating device according to an embodiment of the present application is shown.
[0090] like Figure 4 As shown, according to an embodiment of the present application, a model updating device 400 includes: a newly added sample data acquisition unit 402, which is used to acquire newly added sample data within a newly added time interval, wherein the newly added sample data includes object selection association information and a first target object selected by the device based on the object selection association information; a newly added sub-model training unit 404, which is used to train a newly added object selection sub-model based on the newly added sample data, wherein the newly added object selection sub-model is used to reflect the association relationship between the object selection association information and the first tendency of the device to select the first target object when the object selection association information exists; a sub-model queue updating unit 406, which is used to update the newly added object selection sub-model The model is added to a sub-model queue, and the sub-model queue is used to output a first tendency queue, wherein the sub-model queue before updating includes a plurality of historical object selection sub-models corresponding to each of the plurality of historical time intervals and arranged in chronological order of the plurality of historical time intervals, and each of the historical object selection sub-models is trained by the historical sample data within the corresponding historical time interval; a main model updating unit 408 is used to update the object selection main model based on the sub-model queue, wherein the object selection main model is used to reflect the association relationship between the first tendency queue and the second tendency of the second target object, and the second target object is selected by the device based on the first tendency queue.
[0091] In one possible design, the model updating device 400 also includes: a newly added time interval determination unit, which is used to determine the newly added time interval based on a predetermined time interval determination rule before obtaining the newly added sample data in the newly added time interval, wherein the predetermined time interval determination rule includes: the newly added time interval is equal in length to multiple historical time intervals; or the newly added time interval is equal in length to a specified historical time interval, wherein the position of the specified historical time interval in the historical time period is consistent with the position of the newly added time interval in the current time period; or the number of newly added sample data in the newly added time interval is equal to the number of historical sample data in each of the historical time intervals.
[0092] In one possible design, the object selection association information includes device feature information and object feature information, and the newly added sub-model training unit 404 is used to train the newly added object selection sub-model based on the device feature information and the object feature information, and the selection results of the device corresponding to the device feature information for the sample optional objects having the object feature information.
[0093] In one possible design, the device characteristic information includes: a combination of one or more of the device user's age information, the device user's gender information, the device's historical viewing times for the sample optional objects, the device's historical viewing times for all objects of the object type to which the sample optional objects belong, the device's historical selection times for the sample optional objects, and the device's historical viewing times for all objects of the object type to which the sample optional objects belong; the object characteristic information includes: a combination of one or more of the sample optional objects' category information, brand information, current price information, historical price information, historical viewing times, and historical selection times.
[0094] In a possible design, the sub-model queue updating unit 406 is used to add the newly added object selection sub-model to the end of the sub-model queue, and delete the historical object selection sub-model at the head of the sub-model queue.
[0095] In a possible design, the number of the newly added object selection sub-models added to the tail is greater than or equal to the number of the historical object selection sub-models deleted from the head.
[0096] In one possible design, the main model updating unit 408 is used to update the object selection main model based on the first tendency queue output by the sub-model queue after the newly added object selection sub-model is added, and the selection result of the device for the sample optional objects corresponding to the first tendency queue.
[0097] In one possible design, the object selection sub-model in the sub-model queue is a CART decision tree, and the object selection main model is a multi-layer perceptron.
[0098] In one possible design, the model updating device 400 also includes: an object recommendation unit, which is used to determine the first tendency queue for any current optional object in the current optional object set based on the device feature information of the device and the object feature information of the current optional object, and the sub-model queue; determine the second tendency of the device to select the current optional object based on the first tendency queue and the object selection main model; and select the current optional object with the highest second tendency in the current optional object set as the second target object of the device.
[0099] The model updating device 400 uses any of the solutions described in the above embodiments, and therefore has all the above technical effects, which will not be described in detail here.
[0100] Figure 5 A block diagram of an electronic device according to an embodiment of the present application is shown.
[0101] like Figure 5 As shown, an electronic device 500 of an embodiment of the present application includes at least one memory 502; and a processor 504 in communication with the at least one memory 502; wherein the memory stores instructions executable by the at least one processor 504, and the instructions are configured to execute the scheme described in any of the above embodiments. Therefore, the electronic device 500 has the same technical effects as any of the above embodiments, which will not be described in detail here.
[0102] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:
[0103] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
[0104] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0105] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
[0106] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0107] (5) Other electronic devices with data interaction functions.
[0108] In addition, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to perform the following steps: obtaining newly added sample data within a newly added time interval, wherein the newly added sample data includes object selection association information and a first target object selected by a device based on the object selection association information; training a newly added object selection sub-model based on the newly added sample data, wherein the newly added object selection sub-model is used to reflect the association relationship between the object selection association information and a first tendency of the device to select the first target object when the object selection association information exists; adding the newly added object selection sub-model to a sub-model queue, wherein the sub-model queue is used to output a first tendency queue, wherein the sub-model queue before updating includes a plurality of historical object selection sub-models corresponding to each of a plurality of historical time intervals and arranged in chronological order of the plurality of historical time intervals, wherein each of the historical object selection sub-models is trained by the historical sample data within the corresponding historical time interval; updating an object selection main model based on the sub-model queue, wherein the object selection main model is used to reflect the association relationship between the first tendency queue and a second tendency of a second target object, wherein the second target object is selected by the device based on the first tendency queue.
[0109] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or electronic device can refer to the relevant description in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0110] The technical solution of the present application is described in detail above in conjunction with the accompanying drawings. Through the technical solution of the present application, while obtaining the propensity of the device to select the second target object by combining the sub-model queue with the object selection main model, a newly added object selection sub-model is obtained by training with a small amount of newly added sample data, and the newly added object selection sub-model is added to the sub-model queue to achieve the update of the sub-model queue. Compared with training a large deep neural network, the amount of calculation involved in the update is reduced, and the efficiency of the model update is improved. Furthermore, the final probability of the device selecting the second target object is determined by the sub-model queue and the output first tendency queue and the object selection main model. The object selection main model has low complexity, greatly reduced calculation, and training, updating and application are all highly efficient. In summary, in the process of determining the selection probability of the device for the second target object, the efficiency of the model update is effectively increased. At the same time, it is convenient to make personalized recommendations for the device in a timely manner for different objects, thereby improving the user experience of the device.
[0111] It should be understood that although the terms first, second, etc. may be used to describe the tendency in the embodiments of the present application, these tendencies should not be limited to these terms. These terms are only used to distinguish the tendencies from each other. For example, without departing from the scope of the embodiments of the present application, the first tendency may also be referred to as the second tendency, and similarly, the second tendency may also be referred to as the first tendency.
[0112] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0113] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0114] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0115] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0116] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0117] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A model updating method, characterized in that: include: Acquire new sample data within a new time interval, the new sample data including object selection association information and a first target object selected by the device based on the object selection association information; Based on the newly added sample data, training a newly added object selection sub-model, wherein the newly added object selection sub-model is used to reflect the association relationship between the object selection association information and the first tendency of the first target object; Adding the newly added object selection sub-model to a sub-model queue, the sub-model queue being used to output a first tendency queue, wherein the sub-model queue before updating includes a plurality of historical object selection sub-models corresponding to respective historical time intervals and arranged in the time sequence of the plurality of historical time intervals, each of the historical object selection sub-models being trained by historical sample data within the corresponding historical time interval; Based on the sub-model queue, the object selection main model is updated, wherein the object selection main model is used to reflect the association relationship between the first tendency queue and the second tendency of the second target object, and the second target object is selected by the device based on the first tendency queue.
2. The model updating method according to claim 1, characterized in that: Before acquiring the newly added sample data within the newly added time interval, the method further includes: The newly added time interval is determined based on a predetermined time interval determination rule, wherein the predetermined time interval determination rule includes: The newly added time interval is of equal length to the plurality of historical time intervals; or The newly added time interval is equal to the specified historical time interval, wherein the position of the specified historical time interval in the historical time period is consistent with the position of the newly added time interval in the current time period; or The amount of the newly added sample data in the newly added time interval is equal to the amount of the historical sample data in each of the historical time intervals.
3. The model updating method according to claim 1, characterized in that: The object selection association information includes device feature information and object feature information. The training of a new object selection sub-model based on the new sample data includes: The newly added object selection sub-model is trained based on the device feature information and the object feature information, as well as the selection result of the device corresponding to the device feature information for the sample selectable objects having the object feature information.
4. The model updating method according to any one of claims 1 to 3, characterized in that: The adding the newly added object selection sub-model into the sub-model queue includes: The newly added object selection sub-model is added to the tail of the sub-model queue, and the historical object selection sub-model at the head of the sub-model queue is deleted, wherein: The number of the newly added object selection sub-models added to the tail is greater than or equal to the number of the historical object selection sub-models deleted from the head.
5. The model updating method according to claim 3, characterized in that: The updating of the object selection main model based on the sub-model queue includes: The object selection main model is updated based on the first tendency queue output by the sub-model queue after the addition of the newly added object selection sub-model and the selection result of the device for the sample optional objects corresponding to the first tendency queue.
6. The model updating method according to claim 1, characterized in that: The object selection sub-model in the sub-model queue is a CART decision tree, and the object selection main model is a multi-layer perceptron.
7. The model updating method according to claim 3, characterized in that: Also includes: For any currently selectable object in the current selectable object set, Determining the first tendency queue based on the device feature information of the device, the object feature information of the currently selectable object, and the sub-model queue; Determining, based on the first propensity queue and the object selection master model, a second propensity for the device to select the currently selectable object; The current selectable object with the highest second tendency is selected from the current selectable object set as the second target object of the device.
8. A model updating device, characterized in that: include: A newly added sample data acquisition unit, configured to acquire newly added sample data within a newly added time interval, wherein the newly added sample data includes object selection association information and a first target object selected by the device based on the object selection association information; A newly added sub-model training unit, used for training a newly added object selection sub-model based on the newly added sample data, wherein the newly added object selection sub-model is used for reflecting the association relationship between the object selection association information and the first tendency of the device to select the first target object when the object selection association information exists; a sub-model queue updating unit, configured to add the newly added object selection sub-model to a sub-model queue, wherein the sub-model queue is configured to output a first tendency queue, wherein the sub-model queue before updating includes a plurality of historical object selection sub-models corresponding to respective historical time intervals and arranged in a time sequence of the plurality of historical time intervals, and each of the historical object selection sub-models is trained by historical sample data within the corresponding historical time interval; A main model updating unit is used to update the object selection main model based on the sub-model queue, wherein the object selection main model is used to reflect the association relationship between the first tendency queue and the second tendency of the second target object, and the second target object is selected by the device based on the first tendency queue.
9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, wherein the instructions are configured to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the method process according to any one of claims 1 to 7.
