Strategy selection method and device, equipment and storage medium
Through the meta-learning framework and the two-layer cycle optimization model, the problem of uncertainty in marketing effects in strategy selection is solved, rapid adjustment and knowledge retention between new and old strategies are achieved, and the efficiency of marketing effects and strategy selection is improved.
Patent Information
- Application Number
- CN202310265364.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2024-09-20
AI Technical Summary
There is uncertainty in the marketing effect in strategy selection in the existing technology. This is mainly due to the reliance on human experience rather than data-driven decision-making, which makes it difficult to guarantee the efficiency and effectiveness of strategy selection.
Using a meta-learning framework, by obtaining the policy training set and historical user labels, a two-layer cycle optimization model is trained, including meta-learners and basic learners, and meta-loss is used to update model parameters to achieve adaptive and incremental learning of policy selection, ensuring Rapid adjustment and knowledge retention between old and new strategies.
When there are few samples in the initial stage of a new strategy, it can adaptively select strategies, improve marketing effects, avoid catastrophic forgetting, ensure that the model can establish a better decision-making surface when data is scarce, make full use of the correlation between strategies, and improve strategies. Compactness of content characteristics.
Smart Images

Figure CN118674494A
Abstract
Description
Background Art
[0002] Strategy selection, including marketing strategy selection, advertising strategy selection, price strategy selection and other scenarios, refers to the use of network, communication and digital media technologies to think about and analyze problems in order to achieve strategic goals, and then make decision conclusions. Achieving strategic positioning is the core idea of strategy selection in each scenario, and various methods based on Internet tools are the basic means of conducting strategy selection.
[0003] The selection of different marketing strategies is usually based on human experience, which leads to the problem of uncertainty in marketing effects.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The present disclosure provides a strategy selection, device, equipment and storage medium, which at least to a certain extent overcome the problem of uncertainty in marketing effect of strategy selection in related technologies.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a strategy selection method is provided, comprising: obtaining a strategy training set, the strategy training set comprising a support set and a query set, wherein the support set comprises historical user tags and corresponding strategy samples, and the query set comprises user tags of multiple strategies to be selected; training a first network model based on a first strategy sample in the support set and the corresponding multiple historical user tags to obtain initial model parameters of the first network model; initializing model parameters of a second network model with the initial model parameters, training the second network model based on a second strategy sample in the support set and the corresponding multiple historical user tags to obtain a trained second network model, wherein the second strategy sample is different from the first strategy sample; processing multiple user tags in the query set by the trained second network model, obtaining meta-losses of the multiple user tags in the query set based on multiple strategies provided in the training process, and updating the model parameters of the first network model according to the meta-loss; iteratively training the first network model and the second network model until a training stop condition is met, and using the trained second network model as a target network model to select a target strategy according to the target network model.
[0008] In one embodiment of the present disclosure, the second network model includes a feature extractor and a strategy selector; wherein, the training of the second network model based on the second strategy sample in the support set and the corresponding multiple historical user labels to obtain the trained second network model includes: inputting the historical user label corresponding to the second strategy sample in the support set into the feature extractor of the second network model to obtain the feature embedding vector of the historical user; inputting the feature embedding vector of the historical user into the strategy selector of the second network model to output the prediction strategy; calculating the model loss of the second network model according to the prediction strategy and the second strategy sample, and obtaining the trained second network model according to the model loss of the second network model.
[0009] In one embodiment of the present disclosure, it also includes: during each round of training of the second network model, stopping updating the model parameters of the strategy selector of the second network model and updating the model parameters of the feature extractor of the second network model.
[0010] In one embodiment of the present disclosure, the loss function of the second network model is a maximized central loss function based on the Mahalanobis distance to characterize the distance between the user label of the strategy to be selected and the distribution corresponding to the strategy sample.
[0011] In one embodiment of the present disclosure, satisfying the training stop condition includes: if the model loss of the second network model is less than a preset loss threshold, and the number of model iterations reaches a preset number threshold, then it is determined that the training stop condition is satisfied; or, if the model loss of the second network model is less than a preset loss threshold, and the model iteration duration reaches a preset duration threshold, then it is determined that the training stop condition is satisfied.
[0012] In one embodiment of the present disclosure, the first network model and the second network model have the same structure, the feature extractors of the first network model and the second network model include a convolutional neural network model, and a linear rectification function is used as an activation function; the strategy selectors of the first network model and the second network model include a fully connected layer or a convolutional layer.
[0013] In another aspect of the present disclosure, a strategy selection method is provided, comprising: obtaining a label of a current user; processing the label of the current user according to a target network model to obtain a target strategy, wherein the target network model is trained by the above-mentioned strategy selection method.
[0014] In another aspect of the present disclosure, a strategy selection device is also provided, including: a first acquisition module, used to acquire a strategy training set, the strategy training set includes a support set and a query set, wherein the support set includes historical user tags and corresponding strategy samples, and the query set includes multiple user tags of strategies to be selected; a first training module, used to train a first network model based on the first strategy sample in the support set and the corresponding multiple historical user tags, and obtain initial model parameters of the first network model; a second training module, used to initialize model parameters of a second network model with the initial model parameters, train the second network model based on the second strategy sample in the support set and the corresponding multiple historical user tags, and obtain a trained second network model, wherein the second strategy sample is different from the first strategy sample; a parameter updating module, used to process multiple user tags in the query set through the trained second network model, obtain meta-loss of multiple user tags in the query set based on multiple strategies provided in the training process, and update the model parameters of the first network model according to the meta-loss; the first training module and the second training module, used to iteratively train the first network model and the second network model until a training stop condition is met, and use the trained second network model as the target network model to select a target strategy according to the target network model.
[0015] In another aspect of the present disclosure, a policy selection device is provided, comprising: a second acquisition module for acquiring a label of a current user; a policy selection module for processing the label of the current user according to a target network model to obtain a target policy, wherein the target network model is trained by the above-mentioned policy selection device.
[0016] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-mentioned policy selection method by executing the executable instructions.
[0017] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned strategy selection method is implemented.
[0018] According to another aspect of the present disclosure, a computer program product is provided, the computer program product comprising a computer program or computer instructions, the computer program or the computer instructions being loaded and executed by a processor so that a computer implements the above-mentioned strategy selection method.
[0019] In an embodiment of the present disclosure, a strategy training set is obtained, and the strategy training set includes a support set and a query set; based on the first strategy sample in the support set and the corresponding historical user label, the first network model is trained to obtain the initial model parameters of the first network model; the model parameters of the second network model are initialized with the initial model parameters, and the second network model is trained based on the second strategy sample in the support set and the corresponding historical user label to obtain the trained second network model; multiple user labels in the query set are processed by the trained second network model to obtain the meta-loss of the multiple user labels in the query set, and the model parameters of the first network model are updated according to the above meta-loss; the first network model and the second network model are iteratively trained until the training stop condition is met, and the trained second network model is used as the target network model to select the target strategy according to the target network model, so that when the initial samples of the new strategy are small, the new and old strategies can be adaptively selected, and the continuous addition of new strategies can be supported, which can effectively promote marketing effects.
[0020] 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
[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0022] Figure 1 The following is a diagram showing the architecture of a policy selection system provided by an embodiment of the present disclosure;
[0023] Figure 2 A flow chart of a strategy selection method provided by an embodiment of the present disclosure is shown;
[0024] Figure 3 Another flow chart of a strategy selection method provided by an embodiment of the present disclosure is shown;
[0025] Figure 4 A schematic diagram of the calculation principle of maximizing the center loss based on the Mahalanobis distance provided by an embodiment of the present disclosure is shown;
[0026] Figure 5 A flow chart of a network model training method provided by an embodiment of the present disclosure is shown;
[0027] Figure 6 A flow chart of an iterative cycle training method for an adaptive feature extractor provided by an embodiment of the present disclosure is shown;
[0028] Figure 7 A flow chart of a strategy selection method provided by an embodiment of the present disclosure is shown;
[0029] Figure 8 A schematic diagram showing the structure of a strategy selection device provided by an embodiment of the present disclosure is shown;
[0030] Fig. 9 A schematic diagram showing the structure of another strategy selection device provided by an embodiment of the present disclosure is shown;
[0031] Fig.10 A structural block diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0033] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0034] Figure 1 An exemplary system architecture 100 is shown to which the policy selection method or policy selection apparatus according to the embodiments of the present disclosure can be applied.
[0035] like Figure 1 As shown, the system architecture 100 may include a terminal device 110 , a network 120 and a server 130 .
[0036] The network 120 is a medium for providing a communication link between the terminal device 110 and the server 130 , and may be a wired network or a wireless network.
[0037] The user may use the terminal device 110 to interact with the server 130 through the network 120 to receive or send messages.
[0038] The terminal device 110 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a display screen, and a desktop computer.
[0039] The client of the application program that can be installed on the terminal device 110 is the same, or the client of the same type of application program based on different operating systems. Based on the different terminal platforms, the specific form of the client of the application program can also be different, for example, the application program client can be a mobile client, a PC client, etc.
[0040] Exemplarily, the terminal device 110 is installed with various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. User tags can be collected through the communication client application, and applicable strategies can be selected based on the collected user tags.
[0041] The server 130 may be a server that provides various services, such as a background management server that provides support for devices operated by users using the terminal device 110. The background management server may analyze and process the received request data (such as user tags, etc.) to obtain processing results (such as target policies).
[0042] Optionally, server 130 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0043] Those skilled in the art will know that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration, and any number of terminal devices, networks and servers may be provided according to actual needs, and the embodiments of the present disclosure do not limit this.
[0044] In order to solve the problem of uncertainty in marketing effects caused by manual selection of strategies based on assumed experience, the present disclosure proposes an adaptive small-sample incremental learning model for strategy selection, which can adaptively select between new and old strategies when there are few samples in the initial stage of a new strategy, and at the same time supports the continuous addition of new strategies, which can effectively promote marketing effects.
[0045] Meta-learning: learning how to learn, so that the model can acquire the ability to "learn to learn" and quickly learn new tasks based on existing "knowledge".
[0046] Few-sample learning: Considering that many real-world application scenarios (such as in the medical, military, and financial fields) do not have the conditions to obtain enough labeled training samples, machine learning / deep learning systems can efficiently learn and generalize their cognitive abilities from a very small number of samples.
[0047] Incremental learning: Incremental learning means that the model can continuously process the continuous flow of information in the real world, and retain or even integrate and optimize the old knowledge while absorbing new knowledge.
[0048] The few-shot incremental learning model has gone through two stages, namely the dynamic few-shot learning stage and the few-shot incremental learning stage. The training of the dynamic few-shot learning model is usually divided into the basic class learning stage and the new class learning stage, which requires the use of old class samples to construct a pseudo new class learning task; while the few-shot incremental learning removes the above restrictions and puts forward a more challenging assumption, that is, in the new class learning stage, the model cannot obtain the old class data. In this case, the model itself is required to have the ability to remember old knowledge, and the single new class learning task is also expanded to serialized multiple new class learning tasks.
[0049] However, the few-sample tasks in incremental scenarios in related technologies cannot fully utilize the priority supervisory signals. On the one hand, the model is prone to overfitting due to the small number of samples in the new scenario; on the other hand, the relevant knowledge of the old scenarios that have been learned is catastrophically forgotten during the incremental learning process.
[0050] In the study of incremental learning, simply fine-tuning the model parameters on a new session will cause obvious catastrophic forgetting problems. The related technology has alleviated this problem to a certain extent by decoupling the learning of the feature extractor from the learning of the classifier, but due to the scarcity of training samples, the model still cannot quickly adjust the parameters when learning in a new session, so the performance is not as expected.
[0051] Therefore, the present disclosure adopts a meta-learning framework to achieve fast and effective update of model parameters. The learning of model parameters is placed under the supervision of a meta-learner.
[0052] Specifically, in the learning phase of the skeleton network, a two-layer loop optimization model is introduced. The network in the outer loop is called the meta-learner or the first network, and the model trained for the first network is called the first network model. The network in the inner loop is called the base learner or the second network, and the model trained for the second network is called the second network model. The second network is responsible for performing specific strategy selection tasks, while the first network is responsible for guiding the initialization of the model parameters of the second network model in a larger scope, and accepting the feedback of the second network, that is, meta-information or meta-loss, to update itself, so as to achieve better generalization in subsequent tasks. With the help of the ideas in the field of meta-learning, a feature extractor that can quickly adapt to different strategy changes is constructed, and then the rapid learning of incremental sessions is realized to improve the model's ability to balance new knowledge learning and old knowledge maintenance, and respond to new strategies in a timely manner. At the same time, it avoids adverse effects on the relevant knowledge of the learned strategies during the update process, resulting in catastrophic forgetting, so that the model can establish a better decision surface with little data, make full use of the correlation between different strategies, and improve the compactness of strategy content features.
[0053] It should be noted that the strategies disclosed herein may include marketing strategies with scarce training samples, or other sales strategies with scarce training samples.
[0054] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.
[0055] The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.
[0056] First, a policy selection method is provided in the embodiments of the present disclosure, and the method can be executed by any system with computing processing capabilities. In some embodiments, the policy selection method provided in the embodiments of the present disclosure can be executed by a server; in other embodiments, the policy selection method provided in the embodiments of the present disclosure can be implemented by a terminal device and a server through interaction.
[0057] Figure 2 A flow chart of a strategy selection method provided in an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the strategy selection method provided in the embodiment of the present disclosure includes the following steps:
[0058] S202: Obtain a strategy training set, where the strategy training set includes a support set and a query set, wherein the support set includes historical user tags and corresponding strategy samples, and the query set includes multiple user tags of strategies to be selected.
[0059] In one embodiment, the strategy training set is used to provide data required for network model training. The support set is used to provide input data required for model training for the first network model and the second network model; and the query set is used to provide input data for calculating model loss for the second network model.
[0060] During the training process, given a batch of τ strategy τ, each strategy set τ i Contains a support set S i and a query set Q i . Each support set includes N strategy samples, and each strategy provides K labeled instances, that is, K historical user labels correspond to one strategy sample; and each query set includes M user labels of the strategy to be selected, where M, N, and K are positive integers.
[0061] It should be noted that user tags are used to characterize user attributes, and user tags may include but are not limited to gender, age, occupation, city, marital status, education, applicable terminal device brand, etc. Strategies may include at least one of issuing vouchers and sending push messages, where vouchers of different denominations may represent different strategies, and push messages of different contents may represent different strategies.
[0062] S204: Based on the first strategy sample in the support set and the corresponding multiple historical user tags, train the first network model to obtain initial model parameters of the first network model.
[0063] In one embodiment, based on the first network model to be trained, multiple historical user tags corresponding to the first strategy sample in the support set are used as input, and the first strategy is used as output to train the first network model, and the model loss of the first network model is calculated to obtain the initial model parameters of the first network model. The first network model can be constructed based on the above initial model parameters and model loss, and a round of iterative training of the first network model is completed.
[0064] The loss function of the first network model can be a maximized center loss function based on Mahalanobis distance, a SoftMax cross entropy loss function based on center distance, or the like.
[0065] The first network model can also be called a meta-learner model or an outer loop model, which is used for basic strategy instruction learning. The basic strategy with enough labeled samples is used to build the core of the shell as basic knowledge.
[0066] S206, initializing the model parameters of the second network model with the initial model parameters, training the second network model based on the second strategy sample in the support set and the corresponding multiple historical user labels to obtain a trained second network model, wherein the second strategy sample is different from the first strategy sample.
[0067] After the first network model is trained, the model parameters of the second network model are initialized using the initial model parameters of the first network model to construct the second network model to be trained and perform model training. The initialization here can be understood as assigning the initial model parameters of the first network model to the model parameters of the second network model. At this stage, it is incremental learning of the new strategy, and each incremental learning session is regarded as learning to adjust the model in a new domain. The learning of each new session is the domain adaptation process.
[0068] Based on the second network model to be trained, the historical user labels corresponding to the second strategy samples in the support set are used as input, and the second strategy samples are used as output. The second network model to be trained is trained to obtain the model parameters and model loss of the second network model. The trained second network model can be constructed based on the model parameters and model loss of the first network model, thereby completing a round of iterative training of the second network model.
[0069] The loss function of the second network model can be a maximized center loss function based on Mahalanobis distance, a SoftMax cross entropy loss function based on center distance, or the like.
[0070] It should be noted that the historical user labels corresponding to the second strategy sample input into the second network model are different from the historical user labels corresponding to the first strategy sample input into the first network model, and a batch of pseudo-incremental learning tasks can be introduced to achieve rapid learning of incremental sessions.
[0071] The number of the first strategy samples and the number of the second strategy samples mentioned above can be determined according to actual conditions, and the present disclosure does not make any specific limitations. Usually, the number of the first strategy samples is smaller than the number of the second strategy samples, so that the model parameters of the first network model can be used to quickly initialize the model parameters of the second network model.
[0072] S208. Process multiple user tags in the query set through the trained second network model, obtain meta-loss of the multiple user tags in the query set based on multiple strategies provided by the training process, and update the model parameters of the first network model according to the meta-loss.
[0073] Taking multiple user labels in the query set as input and all strategies provided in the training process as output, after processing by the trained second network model, the external loss, or meta-loss or meta-information of each strategy query set is obtained, and the model parameters of the first network model are updated according to the meta-loss to complete a round of training of the network model.
[0074] It should be noted that the number of the multiple strategies provided by the above training process is greater than or equal to the sum of the number of the first strategy samples and the number of the second strategy samples.
[0075] S210, iteratively training the first network model and the second network model until a training stop condition is met, and using the trained second network model as a target network model to select a target strategy according to the target network model.
[0076] After completing a round of training of the network model, continue to iteratively train the first network model and the second network model until the training stop condition is met. The trained second network model is the second network model when the training stop condition is met. The above second network model is used as the target network model, the label of the current user is input into the target network model, and the strategy applicable to the current user is output. By updating the model parameters of the first network model through the meta-loss, the meta-learner can extract more general knowledge from various strategies, so as to guide the inner loop (or base learner) to achieve the optimal initialization of model parameters faster and better.
[0077] It should be noted that the above-mentioned conditions for satisfying the training stop condition include: if the model loss of the second network model is less than the preset loss threshold, and the number of model iterations reaches the preset number threshold, then it is determined that the training stop condition is satisfied; or, if the model loss of the second network model is less than the preset loss threshold, and the model iteration time reaches the preset time threshold, then it is determined that the training stop condition is satisfied.
[0078] The above-mentioned preset training stop condition can be pre-configured in the strategy selection device, and the values of each parameter can be determined according to the actual situation. For example, if the model loss of the second network model is less than 5% and the number of model iterations reaches 100 times, it is determined that the training stop condition is met; or, if the model loss of the second network model is less than 5% and the model iteration time reaches 1 hour, it is determined that the training stop condition is met.
[0079] When the model loss of the second network model is greater than or equal to the preset loss threshold, and / or the number of model iterations does not reach the preset number threshold, it is determined that the training stop condition is not met, and the first network model and the second network model are continued to be iteratively trained until the training stop condition is met; or, when the model loss of the second network model is greater than or equal to the preset loss threshold, and / or the model iteration duration does not reach the preset duration threshold, it is determined that the training stop condition is not met, and the first network model and the second network model are continued to be iteratively trained until the training stop condition is met.
[0080] The target strategy is the prediction result of the target network model.
[0081] In an embodiment of the present disclosure, a strategy training set is obtained, and the strategy training set includes a support set and a query set; based on the first strategy sample in the support set and the corresponding historical user label, a first network model is trained to obtain initial model parameters of the first network model; the initial model parameters are used to initialize model parameters of a second network model, and the second network model is trained based on the second strategy sample in the support set and the corresponding historical user label to obtain a trained second network model; multiple user labels in the query set are processed by the trained second network model to obtain meta-loss of the multiple user labels in the query set, and the model parameters of the first network model are updated according to the above meta-loss; the first network model and the second network model are iteratively trained. Model, until the training stop condition is met, the trained second network model is used as the target network model, and the target strategy is selected according to the target network model, so as to build a feature extractor that can quickly adapt to the changes of different strategies with the help of the idea of meta-learning, and then realize the rapid learning of incremental sessions, so as to improve the model's ability to balance the learning of new knowledge and the maintenance of old knowledge, and respond to the newly proposed strategies in a timely manner. At the same time, it avoids the adverse effects on the relevant knowledge of the learned strategies during the updating process, resulting in catastrophic forgetting, so that the model can establish a better decision-making surface with very little data, make full use of the correlation between different strategies, and improve the compactness of the strategy content features.
[0082] By iteratively training the first network model and the second network model, the target network model is obtained, and the strategy applicable to the current user is selected through the target network model. However, the above method cannot adapt well to changes in the field. Each new session can actually be regarded as a miniature cross-domain task, and the distribution of data will continue to change with the continuous addition of new strategies. In order to achieve fast and effective adjustment of model parameters under different strategies, in this disclosure, the entire backbone system is decoupled into two parts: feature extractor and strategy selector, using θ={θ b ,θ c} means, where θ b and θ c They respectively represent model parameters of the feature extractor and the strategy selector. The first network model and the second network model have the same structure, and include a feature extractor and a strategy selector respectively.
[0083] In one embodiment, the first network model and the second network model have the same structure, and the feature extractors of the first network model and the second network model include a convolutional neural network model, using a linear rectification function as an activation function. Specifically, the feature extractor can adopt a convolutional neural network model ResNet series; the strategy selectors of the first network model and the second network model include a fully connected layer or a convolutional layer.
[0084] Figure 3Another strategy selection method flow chart provided in the embodiment of the present disclosure is shown as follows: Figure 3 As shown, the above S206 trains the second network model based on the second strategy sample in the support set and the corresponding multiple historical user tags to obtain the trained second network model, including:
[0085] S302: Input the historical user labels corresponding to the second strategy samples in the support set into the feature extractor of the second network model to obtain feature embedding vectors of the historical users.
[0086] In one embodiment, the feature extractor may be adapted from the ResNet family of convolutional neural networks.
[0087] S304: Input the feature embedding vector of the historical user into the strategy selector of the second network model, and output the prediction strategy.
[0088] The above strategy selector can be understood as a classifier, which can be composed of a fully connected layer or a convolutional layer. The input of the strategy selector is the output of the feature extractor.
[0089] S306. Calculate the model loss of the second network model according to the prediction strategy and the second strategy sample, and obtain the trained second network model according to the model loss of the second network model.
[0090] In one embodiment, the model loss of the second network model can be calculated using a SoftMax cross entropy loss function based on center distance, or can be calculated using a maximized center loss function based on Mahalanobis distance.
[0091] The second network model can be obtained according to the initial model parameters of the first network model, the model loss of the second network model, the learning rate of the second network model, the parameter change of the second network model, etc.
[0092] The present disclosure decouples the entire backbone system into feature extractor and strategy selector parts, thereby enabling fast and effective adjustment of model parameters under different strategies.
[0093] In order to make the network model respond to the strategy in the new session in a timely manner and avoid adverse effects on the learned strategy knowledge during the update process, resulting in catastrophic forgetting, it is necessary to constrain the model parameter updates of the above two network models. In one embodiment, during each round of training of the second network model, the model parameters of the strategy selector of the second network model are stopped from being updated, and the model parameters of the feature extractor of the second network model are updated.
[0094] By setting the learning rate of the strategy selector, you can stop updating the model parameters of the strategy selector during the training of the second network model, so that the network model can quickly adapt and adjust to the new session, avoiding catastrophic forgetting of relevant knowledge of old scenarios that have been learned during the incremental learning process.
[0095] In one embodiment, the loss function of the second network model is a maximized central loss function based on the Mahalanobis distance to characterize the distance between the user label of the strategy to be selected and the distribution corresponding to the strategy sample, which can clearly induce dense feature areas, thereby improving robustness.
[0096] The SoftMax cross entropy loss function based on center distance may cause the feature representation extracted by the network to be sparsely distributed in space. As new strategies are continuously added, the possibility of feature representations from different strategies overlapping or occluding in the feature space will become higher, which will further interfere with the judgment of the strategy selector.
[0097] The present invention adopts the Max-Mahalanobis center (MMC) function based on the Mahalanobis distance. When selecting a strategy for a user tag, the distance between the user tag and the strategy center is no longer simply calculated. Instead, the distribution corresponding to the strategy is taken into account and the distance between the user tag and the distribution corresponding to the strategy is calculated.
[0098] The following uses the marketing strategy with few training samples as an example to illustrate the strategy of the embodiment of the present disclosure. Figure 4 As shown, for marketing strategy A and marketing strategy B, the prototypes of the corresponding strategies can be calculated based on the center points of multiple user labels in the support set provided by the corresponding marketing strategies, that is, the solid points of marketing strategy A and marketing strategy B in the figure.
[0099] When selecting a marketing strategy for the user label C to be selected in the query set, the cross-entropy loss function based on the center distance directly calculates the distance between the user label C and the prototypes of marketing strategy A and marketing strategy B, which are recorded as D1 and D2 respectively. When D1=D2, the marketing strategy selector cannot make an accurate selection judgment.
[0100] In the present disclosure, by taking into account the distribution range of marketing strategy A and marketing strategy B in the feature space, it can be easily determined that the distance between the user label and marketing strategy A is closer, so it is determined that the probability of selecting marketing strategy A is higher.
[0101] The calculation formula of the Mahalanobis distance of a single data point is as follows:
[0102]
[0103] Among them, μ is the cluster center and S represents the covariance matrix.
[0104] Assume that the variance of all feature dimensions is σ 2 , Formula 1 can be simplified to:
[0105]
[0106] Where I is the identity matrix.
[0107] The measure based on Mahalanobis distance can be expressed as:
[0108]
[0109] It can be obtained that the maximum center loss function L based on the Mahalanobis distance M It can be expressed as follows:
[0110]
[0111] in, is the τth i A set of multiple user tags is supported, x, y belongs to one of the user tags, D m is the above formula 3, C is the query set, Z is the i-th user tag in the query set C, Represents the probability that user label Z belongs to this support set C.
[0112] The present disclosure sets the cluster center of the strategy as the average value of the user label representation in the support set corresponding to each strategy, namely, the prototype. The prototype can be continuously adjusted as the model training progresses, thereby adjusting the feature distribution of all user labels, making the feature representation extracted by the network model more compact, thereby improving the accuracy of strategy selection.
[0113] It should be noted that the first network model and the second network model have the same structure. The first network model and the second network model respectively include a feature extractor and a strategy selector. The training process of the first network model is similar to the training process of the second network model. The difference lies in the different user labels input into the network model. The training process of the first network model can refer to the training process of the second network model, which will not be repeated here.
[0114] In order to facilitate a deeper understanding of the embodiments of the present disclosure, Figure 5-6 Provide detailed explanation.
[0115] The network model disclosed in the present invention includes a first network model (for an outer loop) and a second network model (for an inner loop) with the same structure, and the network model is decoupled into a feature extractor and a strategy selector.
[0116] The following uses a marketing strategy with few training samples as an example to illustrate the strategy of the embodiment of the present disclosure. Figure 5 As shown, first obtain the marketing strategy training set, which includes the support set, which includes n marketing strategies and the labels of the users corresponding to each marketing strategy, where n is a positive integer. For example, the support set includes n marketing strategies, namely marketing strategy 1, marketing strategy 2, ..., marketing strategy n, and the training set of marketing strategy 1 includes the labels of user a, user b, user c, ..., user d, etc.; the training set of marketing strategy 2 includes the labels of user e, user f, user g, ..., user h, etc.; the training set of marketing strategy n includes the labels of user n, user o, user p, ..., user q, etc.
[0117] It should be noted that the number of user tags corresponding to each marketing strategy can be the same or different, depending on the actual situation.
[0118] Then, the labels of the users in the support set of each marketing strategy are input into the fast adaptive feature extractor to obtain the feature embedding vector corresponding to the above label. For example, the labels of the users corresponding to marketing strategies 1 to n are input into the fast adaptive feature extractor in sequence to obtain the corresponding feature embedding vector.
[0119] Based on the maximized central loss function of the Mahalanobis distance, the model loss of the network model is calculated, and the network model is updated according to the model loss of the network model to obtain a corrected feature embedding vector.
[0120] The corrected feature embedding vector is input into the marketing strategy selector, and the marketing strategy selection result is output.
[0121] Figure 6 FIG. 2 shows a flow chart of an iterative loop training method for an adaptive feature extractor provided by an embodiment of the present disclosure. Figure 6 As shown, the feature extractor iterative cycle training method mainly includes the following steps:
[0122] Given a batch of tasks following the distribution D τ N-way K-shot marketing strategy τ, each marketing strategy training set τ i Include a support set S i and a query set Q i , where each support set S i It includes N marketing strategy samples, each of which provides K historical user label instances, and the query set Q i Contains M user tags for the marketing strategies to be selected.
[0123] Support set S iMultiple historical user labels corresponding to the first marketing strategy sample in the training data are input into the first network model to be trained to obtain model parameters of the first network model.
[0124] The model parameters of the second network model are initialized using the model parameters of the first network model.
[0125] In the support set S corresponding to the first marketing strategy sample i The second network model is used to calculate the internal loss L S , and quickly update the model parameters of the second network model to complete the inner loop.
[0126] The trained second network model is expressed as follows:
[0127]
[0128] Among them, θ meta represents the model parameters of the first network model, is the model parameter of the second network model, τ i is the i-th incremental learning task, or the i-th second marketing strategy sample, is the parameter change of the second network model, is the model loss of the second network model.
[0129] For all B marketing strategies in the training process, calculate the external loss L for each marketing strategy query set Q , that is, meta-loss or meta-information, and use the meta-loss to update the model parameters of the first network model to complete the outer loop.
[0130] The updated first network model is expressed as follows:
[0131]
[0132] in, is the model parameter of the first network model after update, θ meta is the model parameter of the first network model before updating, L Q is the model loss of the second network model, α out is the learning rate of the second network model, and B is the number of all marketing strategies in the training process.
[0133] At this point, a round of model training is completed, and the network model is iteratively trained until the training stop condition is met, and the second network model is taken as the target network model.
[0134] During the training of the second network model, in order to make the model respond to the strategies in the new session in a timely manner and avoid adverse effects on the learned strategy knowledge during the update process and cause catastrophic forgetting, the embodiment of the present disclosure decouples the network model into two parts: a feature extractor and a strategy selector. When the model training enters the inner loop, the model parameters of the strategy selector are stopped from being updated, and only the model parameters of the feature extractor are updated.
[0135] Among them, the model parameters of the feature extractor of the second network model are and the model parameters of the strategy selector They are expressed in the following formulas:
[0136]
[0137]
[0138] Among them, α in,b ≠0 is the learning rate of the feature extractor, α in,c = 0 is the learning rate of the policy selector.
[0139] The model loss of the network model is corrected using Formula 4.
[0140] Figure 7 A flow chart of a strategy selection method provided by an embodiment of the present disclosure is shown. Figure 7 As shown, a strategy selection method provided by an embodiment of the present disclosure mainly includes the following steps:
[0141] S702, obtaining the tag of the current user;
[0142] S704: Process the label of the current user according to the target network model to obtain a target strategy, wherein the target network model is trained by the above-mentioned strategy selection method.
[0143] After obtaining the target network model, the label of the current user can be processed to obtain the target strategy.
[0144] The current user registers through an application installed on the terminal device used by the user, and a tag of the current user is generated according to the registration information.
[0145] The label of the current user is input into the feature extractor of the target network model, and the feature embedding vector of the current user is output; the feature embedding vector of the current user is input into the strategy selector of the target network model, and the target strategy is output.
[0146] It should be noted that the target network model is trained using the above method, which will not be described in detail here.
[0147] The disclosed embodiment obtains the label of the current user, processes the label of the current user through a pre-trained target network model, and obtains a target strategy. The target network model is constructed and trained with the help of ideas in the field of meta-learning to achieve rapid learning of incremental sessions, so as to improve the model's ability to balance new knowledge learning and old knowledge maintenance, and respond to newly proposed strategies in a timely manner. At the same time, it avoids adverse effects on the relevant knowledge of the learned strategies during the updating process and causes catastrophic forgetting, so that the model can establish a better decision-making surface when very little data is obtained, make full use of the correlation between different strategies, and improve the compactness of strategy content features.
[0148] Based on the same inventive concept, the present disclosure also provides a strategy selection device in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0149] Figure 8 FIG. 2 is a schematic diagram of a strategy selection device provided by an embodiment of the present disclosure. Figure 8 As shown, the strategy selection device of this embodiment includes a first acquisition module 801 , a first training module 802 , a second training module 803 and a parameter updating module 804 .
[0150] The first acquisition module 801 is used to acquire a strategy training set, which includes a support set and a query set, wherein the support set includes historical user tags and corresponding strategies, and the query set includes multiple samples of strategies to be selected;
[0151] A first training module 802 is used to train a first network model based on a first strategy sample in a support set and a plurality of corresponding historical user tags to obtain initial model parameters of the first network model;
[0152] A second training module 803 is used to initialize the model parameters of the second network model with the initial model parameters, train the second network model based on the second strategy sample in the support set and the corresponding multiple historical user labels, and obtain a trained second network model, wherein the second strategy sample is different from the first strategy sample;
[0153] A parameter updating module 804 is used to process the multiple user tags in the query set through the trained second network model, obtain the meta-loss of the multiple user tags in the query set based on the multiple strategies provided by the training process, and update the model parameters of the first network model according to the meta-loss;
[0154] The first training module 802 and the second training module 803 are used to iteratively train the first network model and the second network model until a training stop condition is met, and use the trained second network model as a target network model to select a target strategy according to the target network model.
[0155] In one embodiment, the second network model includes a feature extractor and a strategy selector; wherein the second training module 803 is used to input the historical user label corresponding to the second strategy sample in the support set into the feature extractor of the second network model to obtain the feature embedding vector of the historical user;
[0156] Input the feature embedding vector of the historical user into the strategy selector of the second network model and output the prediction strategy;
[0157] The model loss of the second network model is calculated according to the prediction strategy and the second strategy sample, and the trained second network model is obtained according to the model loss of the second network model.
[0158] In one embodiment, the second training module 803 is further used to stop updating the model parameters of the strategy selector of the second network model and update the model parameters of the feature extractor of the second network model during each round of training of the second network model.
[0159] It should be noted that the loss function of the second network model is a maximized central loss function based on the Mahalanobis distance, so as to characterize the distance between the user label of the strategy to be selected and the distribution corresponding to the strategy sample.
[0160] It should be noted that satisfying the training stop condition includes: if the model loss of the second network model is less than the preset loss threshold, and the number of model iterations reaches the preset number threshold, then it is determined that the training stop condition is satisfied; or, if the model loss of the second network model is less than the preset loss threshold, and the model iteration duration reaches the preset duration threshold, then it is determined that the training stop condition is satisfied.
[0161] It should be noted that the structures of the first network model and the second network model are the same, the feature extractors of the first network model and the second network model include a convolutional neural network model, and a linear rectification function is used as an activation function; the strategy selectors of the first network model and the second network model include a fully connected layer or a convolutional layer.
[0162] In the disclosed embodiments, with the help of ideas from the field of meta-learning, a feature extractor is constructed that can quickly adapt to changes in different strategies, thereby achieving rapid learning of incremental sessions, so as to improve the model's ability to balance new knowledge learning and old knowledge maintenance, and respond to newly proposed strategies in a timely manner. At the same time, it avoids adverse effects on the relevant knowledge of the learned strategies during the updating process, which may lead to catastrophic forgetting. This enables the model to establish a better decision-making surface with very little data, make full use of the correlation between different strategies, and improve the compactness of the strategy content features.
[0163] Fig. 9 FIG. 2 is a schematic diagram of another strategy selection device provided by an embodiment of the present disclosure. Fig. 9 As shown, the strategy selection device of this embodiment includes a second acquisition module 901 and a strategy selection module 902 .
[0164] The second acquisition module 901 is used to acquire the tag of the current user;
[0165] The strategy selection module 902 is used to process the label of the current user according to the target network model to obtain the target strategy, wherein the target network model is trained by the above-mentioned strategy selection device.
[0166] The disclosed embodiment obtains the label of the current user, processes the label of the current user through a pre-trained target network model, and obtains a target strategy. The target network model is constructed and trained with the help of ideas in the field of meta-learning to achieve rapid learning of incremental sessions, so as to improve the model's ability to balance new knowledge learning and old knowledge maintenance, and respond to newly proposed strategies in a timely manner. At the same time, it avoids adverse effects on the relevant knowledge of the learned strategies during the updating process and causes catastrophic forgetting, so that the model can establish a better decision-making surface when very little data is obtained, make full use of the correlation between different strategies, and improve the compactness of strategy content features.
[0167] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0168] Refer to the following Fig.10 The electronic device 1000 according to this embodiment of the present invention will be described. Fig.10 The electronic device 1000 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0169] like Fig.10 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, and a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010).
[0170] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 2 As shown in , the strategy training set is obtained, the strategy training set includes a support set and a query set, wherein the support set includes historical user tags and corresponding strategy samples, and the query set includes multiple user tags of strategies to be selected; based on the first strategy sample in the support set and the corresponding multiple historical user tags, the first network model is trained to obtain the initial model parameters of the first network model; the model parameters of the second network model are initialized with the initial model parameters, and the second network model is trained based on the second strategy sample in the support set and the corresponding multiple historical user tags to obtain the trained second network model, wherein the second strategy sample is different from the first strategy sample; the multiple user tags in the query set are processed by the trained second network model, and the meta-loss of the multiple user tags in the query set is obtained based on the multiple strategies provided by the training process, and the model parameters of the first network model are updated according to the meta-loss; the first network model and the second network model are iteratively trained until the training stop condition is met, and the trained second network model is used as the target network model to select the target strategy according to the target network model.
[0171] Exemplarily, the processing unit 1010 may also execute the following Figure 7 As shown, the label of the current user is obtained; the label of the current user is processed according to the target network model to obtain the target strategy, wherein the target network model is trained by the above-mentioned strategy selection method.
[0172] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202 , and may further include a read-only storage unit (ROM) 10203 .
[0173] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0174] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0175] The electronic device 1000 may also communicate with one or more external devices 1040 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the system, and / or any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the system may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. Fig.10 As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via the bus 1030. It should be understood that although Fig.10 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0176] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0177] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. In an exemplary embodiment of the present disclosure, a computer program product is also provided, which includes a computer program or a computer instruction, and the computer program or the computer instruction is loaded and executed by a processor to enable the computer to implement the steps of the method disclosed in the above embodiment.
[0178] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0179] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0180] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0181] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0182] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0183] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0184] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0185] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which 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 description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A strategy selection method, characterized in that: include: Obtain a strategy training set, wherein the strategy training set includes a support set and a query set, wherein the support set includes historical user tags and corresponding strategy samples, and the query set includes user tags of multiple strategies to be selected; Based on the first strategy sample in the support set and the corresponding multiple historical user labels, training a first network model to obtain initial model parameters of the first network model; Initializing the model parameters of the second network model with the initial model parameters, training the second network model based on the second strategy sample in the support set and the corresponding multiple historical user labels to obtain a trained second network model, wherein the second strategy sample is different from the first strategy sample; Processing the multiple user tags in the query set by the trained second network model, obtaining meta-losses of the multiple user tags in the query set based on multiple strategies provided by the training process, and updating the model parameters of the first network model according to the meta-losses; Iteratively train the first network model and the second network model until a training stop condition is met, and use the trained second network model as a target network model to select a target strategy according to the target network model.
2. The method according to claim 1, characterized in that The second network model includes a feature extractor and a strategy selector; The step of training the second network model based on the second strategy sample in the support set and the corresponding multiple historical user labels to obtain the trained second network model includes: Inputting the historical user labels corresponding to the second policy samples in the support set into the feature extractor of the second network model to obtain feature embedding vectors of the historical users; Inputting the feature embedding vector of the historical user into the strategy selector of the second network model, and outputting a prediction strategy; The model loss of the second network model is calculated according to the prediction strategy and the second strategy sample, and the trained second network model is obtained according to the model loss of the second network model.
3. The method according to claim 2, characterized in that Also includes: During each round of training of the second network model, the updating of the model parameters of the strategy selector of the second network model is stopped, and the model parameters of the feature extractor of the second network model are updated.
4. The method according to claim 2, characterized in that: The loss function of the second network model is a maximized central loss function based on the Mahalanobis distance, so as to characterize the distance between the user label of the strategy to be selected and the distribution corresponding to the strategy sample.
5. The method according to claim 1, characterized in that The training stop condition is satisfied as follows: If the model loss of the second network model is less than a preset loss threshold, and the number of model iterations reaches a preset number threshold, it is determined that the training stop condition is met; or, If the model loss of the second network model is less than a preset loss threshold and the model iteration duration reaches a preset duration threshold, it is determined that the training stop condition is met.
6. The method according to any one of claims 1 to 5, characterized in that: The first network model and the second network model have the same structure. The feature extractors of the first network model and the second network model include convolutional neural network models, using linear rectification functions as activation functions. The strategy selectors of the first network model and the second network model include fully connected layers or convolutional layers.
7. A strategy selection method, characterized in that: include: Get the current user's tags; The label of the current user is processed according to the target network model to obtain a target strategy, wherein the target network model is trained by the strategy selection method according to any one of claims 1 to 6.
8. A strategy selection device, characterized in that: include: A first acquisition module is used to acquire a strategy training set, wherein the strategy training set includes a support set and a query set, wherein the support set includes historical user tags and corresponding strategy samples, and the query set includes multiple user tags of strategies to be selected; A first training module, configured to train a first network model based on a first strategy sample in the support set and a plurality of corresponding historical user labels, to obtain initial model parameters of the first network model; A second training module is used to initialize the model parameters of a second network model with the initial model parameters, and train the second network model based on a second strategy sample in the support set and a corresponding plurality of historical user labels to obtain a trained second network model, wherein the second strategy sample is different from the first strategy sample; A parameter updating module, configured to process the multiple user tags in the query set through the trained second network model, obtain meta-losses of the multiple user tags in the query set based on multiple strategies provided by the training process, and update the model parameters of the first network model according to the meta-losses; The first training module and the second training module are used to iteratively train the first network model and the second network model until a training stop condition is met, and the trained second network model is used as a target network model to select a target strategy according to the target network model.
9. A strategy selection device, characterized in that: include: The second acquisition module is used to obtain the tag of the current user; A strategy selection module is used to process the label of the current user according to a target network model to obtain a target strategy, wherein the target network model is trained by the strategy selection device as described in claim 8.
10. An electronic device, characterized in that: include: processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the policy selection method as described in any one of claims 1 to 6, or execute the policy selection method as described in claim 7 by executing the executable instructions.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the strategy selection method according to any one of claims 1 to 6, or implements the strategy selection method according to claim 7.
Citation Information
Cited By
Incremental learning method and apparatus using session prototypes
KR102935903B1
