Scene service recommendation method and device, equipment and storage medium
By designing full-scene and single-scene behavioral characteristics, and using a multi-head attention network structure, combined with shared and scene networks, to optimize model parameter learning, the problems of inaccurate recommendation results and unstable model training in the existing technology are solved, and more accurate results are achieved and stable multi-scenario business recommendations.
Patent Information
- Application Number
- CN202311332702.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2024-10-18
AI Technical Summary
The existing technology fails to effectively consider the correlation between single-scenario and multi-scenario behaviors in recommended business scenarios, resulting in inaccurate recommendation results, unstable model training, and difficulty in dynamically capturing time changes and activity attributes.
By designing full-scene behavior sequence features and single-scene behavior sequence features, and introducing scene features, using a multi-head attention network structure for feature conversion, capturing users' richer preferences, combining shared networks and scene networks for model prediction, and optimizing model parameter learning .
It improves the recommendation effect of multi-scenario models, enhances the stability of the model, can dynamically capture scene traffic changes and activity attributes, and improves the accuracy of recommendation results.
Smart Images

Figure CN118799009A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a scenario service recommendation method, device, equipment and storage medium. Background Art
[0002] In the recommendation business scenario, there will be multiple business scenarios involving recommendation services for the same APP. The user distribution and recommended content (taking product recommendation as an example) of each business scenario are quite different, but there will also be overlapping users and products between different scenarios. If you model each scenario separately, there may be too many models and difficult operation and maintenance, and it will not be possible to capture the commonalities of multiple scenarios; on the contrary, if you only merge the samples without modifying the model structure, it will cause large differences in data distribution and poor model effect.
[0003] In order to solve this problem, the common solution in the industry is to jointly model multiple scenarios into a model structure and upgrade the model structure. The model structure includes exclusive modules for each scene and shared modules. For the data of each scene, the model structure of the scene module and the shared module will be activated, and the model learning adapted to all scenes will be completed in a supervised manner. However, although the training data and features used in the prior art can be divided into multi-scenario behavior sequences and single-scenario behavior sequences and statistical features, the correlation between single-scenario and multi-scenario behaviors is not taken into account in the sequence, which easily leads to inaccurate recommendation results.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide a scenario service recommendation method, device, equipment and storage medium, aiming to solve the technical problem that the commodity recommendation results in the prior art are not accurate enough.
[0006] To achieve the above object, the present invention provides a scenario service recommendation method, which comprises the following steps:
[0007] Determine the full-scene behavior sequence features, single-scene behavior sequence features, and attribute features based on the training samples;
[0008] Inputting the full-scene behavior sequence features and the single-scene behavior sequence features into a multi-head attention module, and inputting the attribute features into a word embedding connection module to obtain processing result features;
[0009] Inputting the processing result features into the shared network and the scene network to obtain the model estimation results;
[0010] The model estimation result is input into the target neural network and the model parameters are learned to obtain the network structure output result of multi-scenario business recommendation.
[0011] Optionally, before determining the full-scenario behavior sequence features, the single-scenario behavior sequence features, and the attribute features according to the training samples, the method further includes:
[0012] Obtain user behavior characteristics in multiple preset scenarios;
[0013] Converting the behavior characteristics into a target format to obtain a target format characteristic;
[0014] A training sample is obtained according to the target format feature.
[0015] Optionally, determining the full-scenario behavior sequence features, single-scenario behavior sequence features, and attribute features according to the training samples includes:
[0016] Extracting full-scene behavior sequence and single-scene behavior sequence features of each sample according to the training samples;
[0017] Extracting scene features, user features, product features and context features according to the training samples;
[0018] Attribute features are obtained according to the scene features, the user features, the product features and the context features.
[0019] Optionally, the step of inputting the full-scene behavior sequence features and the single-scene behavior sequence features into a multi-head attention module, and inputting the attribute features into a word embedding connection module to obtain processing result features includes:
[0020] Input the full-scene behavior sequence features into the multi-head attention module to obtain global sequence features, product sequence features and global deviation features;
[0021] Input the single-scene behavior sequence features into the multi-head attention module to obtain single-domain product sequence features and single-domain deviation features;
[0022] Inputting the attribute features into a word embedding connection module for embedding and encoding to obtain processed attribute features;
[0023] A processing result feature is obtained according to the global sequence feature, the product sequence feature, the global deviation feature, the single-domain product sequence feature, the single-domain deviation feature and the processing attribute feature.
[0024] Optionally, inputting the processing result features into a shared network and a scene network to obtain a model estimation result includes:
[0025] Inputting the processing result features into a shared network to obtain full-scene shared features;
[0026] Inputting the processing result features into the scene network to obtain single scene features;
[0027] A model estimation result is obtained based on the full-scene shared features and the single-scene features.
[0028] Optionally, inputting the processing result feature into a shared network to obtain a full-scene shared feature includes:
[0029] Obtaining a multi-head attention model output result according to the processing result characteristics;
[0030] The output results of the multi-head attention model are input into the shared network and a convolution operation is performed, and based on the convolution result, each scene feature is processed in turn to obtain the shared features of the entire scene.
[0031] Optionally, the step of inputting the model estimation result into a target neural network and performing model parameter learning to obtain a network structure output result for multi-scenario service recommendation includes:
[0032] Get the loss function and optimization target;
[0033] The model estimation result is input into the target neural network, and the model parameter learning is performed in combination with the loss function and the preset optimization target to obtain the network structure output result of multi-scenario business recommendation.
[0034] In addition, to achieve the above-mentioned purpose, the present invention further proposes a scene service recommendation device, the scene service recommendation device comprising:
[0035] A feature extraction module is used to determine the full-scene behavior sequence features, single-scene behavior sequence features and attribute features based on training samples;
[0036] A feature processing module, used for inputting the full-scene behavior sequence features and the single-scene behavior sequence features into a multi-head attention module, and inputting the attribute features into a word embedding connection module to obtain processing result features;
[0037] A model estimation module, used to input the processing result features into a shared network and a scene network to obtain a model estimation result;
[0038] The business recommendation module is used to input the model estimation results into the target neural network and perform model parameter learning to obtain the network structure output results of multi-scenario business recommendations.
[0039] In addition, to achieve the above-mentioned purpose, the present invention also proposes a scene service recommendation device, which includes: a memory, a processor, and a scene service recommendation program stored in the memory and running on the processor, and the scene service recommendation program is configured to implement the scene service recommendation method described above.
[0040] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a scenario service recommendation program is stored, and when the scenario service recommendation program is executed by a processor, the scenario service recommendation method as described above is implemented.
[0041] The present invention determines the full-scene behavior sequence features, single-scene behavior sequence features and attribute features based on training samples; inputs the full-scene behavior sequence features and the single-scene behavior sequence features into a multi-head attention module, and inputs the attribute features into a word embedding connection module to obtain processing result features; inputs the processing result features into a shared network and a scene network to obtain a model prediction result; inputs the model prediction result into a target neural network and performs model parameter learning to obtain a network structure output result for multi-scene business recommendation. In this way, it is achieved by designing full-scene behavior sequence features, single-scene behavior sequence features, and introducing scene features to add more information to the model, and uses a multi-head attention network structure for feature conversion to capture richer user preferences. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a structural diagram of a scene service recommendation device in a hardware operating environment involved in an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of a flow chart of a first embodiment of a scenario service recommendation method of the present invention;
[0044] Figure 3 A schematic diagram of the network structure of a multi-scenario joint recommendation model in an embodiment of a scenario service recommendation method of the present invention;
[0045] Figure 4 A schematic diagram of a shared network structure in an embodiment of a scenario service recommendation method of the present invention;
[0046] Figure 5 A schematic diagram of the structure of a specific task subnetwork of a shared network in an embodiment of a scenario service recommendation method of the present invention;
[0047] Figure 6 This is a flow chart of a second embodiment of the scenario service recommendation method of the present invention;
[0048] Figure 7 It is a structural block diagram of the first embodiment of the scene service recommendation device of the present invention.
[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0051] Reference Figure 1 , Figure 1 The diagram is a schematic diagram of a device structure for recommending scenarios of a hardware operating environment according to an embodiment of the present invention.
[0052] like Figure 1 As shown, the scene service recommendation device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the scene service recommendation device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0054] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a scenario service recommendation program.
[0055] exist Figure 1In the scene service recommendation device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the scene service recommendation device of the present invention can be set in the scene service recommendation device, and the scene service recommendation device calls the scene service recommendation program stored in the memory 1005 through the processor 1001, and executes the scene service recommendation method provided by the embodiment of the present invention.
[0056] The embodiment of the present invention provides a scenario service recommendation method, referring to Figure 2 , Figure 2 The figure is a flow chart of a first embodiment of a scenario service recommendation method of the present invention.
[0057] In this embodiment, the scenario service recommendation method includes the following steps:
[0058] Step S10: Determine full-scene behavior sequence features, single-scene behavior sequence features, and attribute features based on training samples.
[0059] In this embodiment, the execution subject of this embodiment may be the scene service recommendation device, which has functions such as data processing, data communication, and program running, and the scene service recommendation device may be a server or an intelligent terminal. Of course, it may also be other devices with similar functions, and this implementation condition does not limit this. For ease of explanation, this implementation is described by taking the scene service recommendation device as an example.
[0060] It should be noted that in the recommendation business scenario, there will be multiple business scenarios involving recommendation services for the same APP. The user distribution and recommended content (taking product recommendation as an example) distribution of each business scenario are quite different, but there will be overlapping users and products between different scenarios. If each scenario is modeled separately, there may be too many models and difficult operation and maintenance, and the commonality of multiple scenarios cannot be captured; on the contrary, if only the samples are merged without modifying the model structure, the data distribution will be greatly different and the model effect will be poor. In order to solve this problem, the common solution used in the industry is to jointly model multiple scenarios into a model structure and upgrade the model structure. The model structure includes exclusive modules and shared modules for each scenario. For the data of each scenario, the model structure of the scenario module and the shared module will be activated, and the model learning adapted to all scenarios will be completed in a supervised manner. However, although the training data and features used in the prior art can be divided into multi-scenario behavior sequences and single-scenario behavior sequences and statistical features, the correlation between single-scenario and multi-scenario behaviors is not considered in the sequence, so it is easy to cause the recommendation results to be inaccurate.
[0061] It should be understood that the existing solution uses a deep neural network model, adds shared modules and exclusive modules to achieve multi-scenario joint training, can capture users' interest preferences for products in each scene, and considers the user's behavior sequence in each scene, but still has the following shortcomings: 1. The user's behavior sequence is only considered based on the time sequence, and the user's behavior conversion between multiple scenes and the user's behavior sequence in different scenes are not considered, and this part of the user's preference cannot be captured. 2. The distribution of traffic in each scene is very different. Some have morning peaks and some have evening peaks. Time sequence input will cause unstable model learning and large fluctuations. At this time, affected by a certain scene activity, the shared network learning parameters will have a short-term poor training problem. The industry solution is to use buffer and enter in batches, but it still cannot solve the problem of decreased effect in the short-term shared network, and it will cause the scene network to be unable to dynamically capture time changes and activity attributes. This solution adds more information to the model by designing full-scene behavior sequence features, single-scene behavior sequence features, and introducing scene features, and uses a multi head attention network structure for feature conversion to capture richer user preferences. This solution designs a special model structure switch to solve the problem of unstable model training caused by the surge in traffic in some scenes.
[0062] In a specific implementation, the purpose of the present invention is to provide a multi-scenario joint modeling algorithm in the recommendation field, using a user scenario behavior pair sequence ((s1,i1), (s2,i2), (s3,i3), ..., (sn,in)) to model the user's switching between multiple scenarios and the behavioral characteristics in multiple scenarios, capture the user's scenario preferences, behavioral preferences, etc., and improve the recommendation effect of the multi-scenario model. To achieve the above purpose, the present invention provides the following technical solution: To facilitate the description of the present solution, before describing the present solution in detail below, the relevant contents involved in the present solution are first described in detail: the pair sequence feature is ((s1,i1), (s2,i2), (s3,i3), ..., (si,ij)), where si is the i-th scenario and ij is the j-th product (the values of i and j are determined by the business scenario. For example, in the Taobao business, the maximum value of i may be 3-10, and the value of j may be in the millions or tens of millions). Assume that there are three scenarios, and the user's behavior sequences are (s0,i1), (s1,i2), (s2,i3), (s0,i5), (s0,i6), the full-scenario pair sequence is (s0,i1), (s1,i2), (s2,i3), (s0,i5), (s0,i6), and the pair sequence of scenario 0 is (s0,i1), (s0,i5), (s0,i6). We name the pair sequence of each scenario as single-scenario behavior sequence and the full-scenario pair sequence as full-scenario behavior sequence. After feature processing, the aforementioned features are input together with other features into the model structure shown in the figure below for model estimation to obtain the model output results for use by online services.
[0063] Furthermore, in order to obtain more comprehensive training samples in advance, before step S10, it also includes: obtaining the user's behavior characteristics in multiple preset scenarios; converting the behavior characteristics into a format to obtain target format characteristics; and obtaining training samples according to the target format characteristics.
[0064] It should be noted that the behavioral characteristics of multiple users in different scenarios are obtained, and the behavioral characteristics include user id, product id, scenario id, user characteristics, product characteristics, label and other information;
[0065] It should be understood that the behavior characteristics of multiple users in different scenarios are recorded in the following format: (user id, product id, scenario id, user characteristics, product characteristics, label), and the recorded behavior characteristics of multiple users are used as training samples. Among them, the label can be determined based on the common business indicators such as click-through rate or conversion rate.
[0066] Furthermore, in order to obtain scene behavior sequence features, single scene behavior sequence features and attribute features respectively based on training samples, step S10 includes: extracting full scene behavior sequence and single scene behavior sequence features of each sample according to the training samples; extracting scene features, user features, product features and context features according to the training samples; obtaining attribute features based on the scene features, the user features, the product features and the context features.
[0067] In specific implementation, the full-scenario behavior sequence feature is the user's behavior sequence in all scenarios, which is used to capture the user's overall interest. The full-scenario behavior sequence feature can express the corresponding relationship between each scenario and each product through the intersection of scenarios and products. The specific format is as follows:
[0068] (s0,i1),(s1,i2),(s2,i3),(s3,i5),(s4,i6).
[0069] It should be noted that in practical applications, although the full-scene behavior sequence feature can capture the user's overall interest, it hides the user's jump between scenes and the user's special preference for a certain scene, and cannot capture some of the user's preference information. Therefore, in this solution, when implementing recommendations, the single-scene behavior sequence feature will be further considered. The single-scene behavior sequence feature is used to represent the user's behavior sequence in a single specific scene. The single-scene behavior sequence feature can be more focused and more fully capture the particularity of a single scene. Continuing with the above example, assuming that the user's full-scene behavior sequence is (s0, i1), (s1, i2), (s2, i3) as an example, the feature format of the behavior sequence under scene 0 is (s0, i1); the feature format of the behavior sequence under scene 1 is (s1, i5). Among them, the single-domain product sequence feature can also be extracted based on the single-scene behavior sequence feature.
[0070] It should be understood that scene features, user features, product features, and context features are extracted as attribute features based on training samples. Among them, user features can characterize the user's basic attributes, preferences, etc., including the user's gender, age, region and other basic attribute information and partially mined portraits and statistical features. Portrait features include the labels of the products that the user has purchased in the past, the user's activity, etc. Statistical features include the user's historical click-through rate, purchase rate, the user's purchase attributes in all scenes and each scene, active attributes, etc. Product features include the list of scenes where the product is placed, the price and brand of the product, etc. Scene features include scene id, scene activity attributes, scene display mode, etc., and capture the user's preference for scenes and activities by crossing with user features. Context features include the time, day of the week, location, etc. when the behavior occurs.
[0071] Step S20: inputting the full-scene behavior sequence features and the single-scene behavior sequence features into a multi-head attention module, and inputting the attribute features into a word embedding connection module to obtain processing result features.
[0072] In the specific implementation, the multi-scenario joint recommendation model of this solution is a core of this solution. In order to clearly describe this solution, before introducing the specific training method, the network structure of the multi-scenario joint recommendation model of this solution is first described in detail. Figure 3 As shown in Figure 1, it is a schematic diagram of the network structure of a multi-scenario joint recommendation model provided by this solution. Figure 3 As shown in the figure, the multi-scenario joint recommendation model of this scheme includes bias-multi attention module, scenario network, shared network, word embedding connection module embedding&concat and DNN network. Among them, the bias-multi attention module is used to process single-scenario behavior sequence features and multi-scenario behavior sequence features. Specifically, it is used to convert the full-scenario behavior sequence features into global sequence features, product sequence features, and global bias features; and convert the single-scenario behavior sequence features into single-domain product sequence features and single-domain bias features. The embedding&concat module is used to embed the input features and encode continuous features, discrete features, etc., so as to reduce the sparsity of the model and make the values with similar meanings have closer embedding. The scenario network is used to capture the features of each scenario. The number of scenario networks is consistent with the number of business scenarios. For example, if the number of business scenarios is 3, the number of scenario networks is 3. When samples and features are input into the scenario network, the scenario network will select and activate the corresponding single-scenario network parameters according to the scenario id, and at the same time activate the network parameters of the shared module, and complete the model learning adapted to all scenarios in a supervised manner. The DNN network is used to learn model parameters based on the output results of the scene network and the shared network and the preset loss function and optimization objectives to obtain the network structure output results for use in multi-scenario businesses.
[0073] It should be noted that the following Figure 4As shown, the shared network is used to capture the commonality of the entire scene. The shared network includes multiple VGG-16-based convolutional layers, multiple task-specific sub-networks and an attention module, wherein the attention module includes two scene feature soft alignment modules, each of which obtains scene features from different levels of the specific task sub-network in the shared network. These features are then combined with the feature connection layer at the end of the shared network to extract the common features of the entire scene. In this scheme, the attention value of each scene feature soft alignment module can be calculated based on the compatibility score between the local features and the global features output by the first FC layer. When the local features come from deeper network levels, the compatibility score should be higher. In addition, the reason why this scheme uses two multi-feature soft alignment modules in the relatively deep layers of each specific task sub-network is to promote the diversity and complementarity of attention-weighted features. Among them, the symbol in the shared network Represents element-by-element multiplication, symbol Indicates feature connection.
[0074] It should be understood that if Figure 5 As shown in the figure, it is a schematic diagram of the structure of the specific task subnetwork in the shared network provided by this solution. The specific task subnetwork includes 3*3conv, BN layer, activation layer and pooling layer, and is used to obtain the features of each scene. In the shared network provided by this solution, the convolution layer based on VGG-16 can interact with each specific task subnetwork to promote the common features of the whole scene from the shared layer to the task-specific layer.
[0075] Furthermore, in order to process the processing result features, step S20 includes: inputting the full-scene behavior sequence features into the multi-head attention module to obtain global sequence features, product sequence features and global deviation features; inputting the single-scene behavior sequence features into the multi-head attention module to obtain single-domain product sequence features and single-domain deviation features; inputting the attribute features into the word embedding connection module for embedding and encoding to obtain processing attribute features; obtaining processing result features based on the global sequence features, the product sequence features, the global deviation features, the single-domain product sequence features, the single-domain deviation features and the processing attribute features.
[0076] It should be noted that the above features are input into the model structure after feature processing. Specifically, the single-scene behavior sequence features and multi-scene behavior sequence features are processed through the multi head attention model structure, and other features (including scene features, user features, product features, context features, etc.) are input into the embedding & concat module after feature processing.
[0077] It should be understood that bias-multi attention converts the full-scene behavior sequence features into global sequence features, product sequence features, and global bias features (global bias features); and converts the single-scene behavior sequence features into single-domain product sequence features and single-domain bias features (single-domain bias features). For example, in this scheme, global sequence features (s0, s1, s2, s3, s4), product sequence features (i1, i2, i3, i5, i6), and global bias features (0, 1, 2, 3, 4) can be extracted based on the full-scene behavior sequence features. Single-domain product sequence features (i1, i5, i6) and single-domain bias features (0, 1, 2) can be extracted from single-scene behavior sequence features.
[0078] In the specific implementation, the global sequence characteristics, product sequence characteristics, global deviation characteristics, single-domain product sequence characteristics, single-domain deviation characteristics and processing attribute characteristics are finally summarized as the processing result characteristics.
[0079] Step S30: Input the processing result features into the shared network and the scene network to obtain the model estimation results.
[0080] It should be noted that the model estimation result refers to the scene network and the shared network receiving part of the features respectively, performing deep learning training, merging the two parts of the results and inputting them into the DNN network to obtain the model estimation result.
[0081] Step S40: input the model estimation result into the target neural network and perform model parameter learning to obtain a network structure output result for multi-scenario business recommendation.
[0082] It should be understood that the final network structure output result is obtained by optimizing the model parameters after learning, and is used for business recommendation in multiple scenarios.
[0083] Furthermore, in order to output the final result, step S40 includes: obtaining a loss function and an optimization target; inputting the model estimation result into the target neural network, and performing model parameter learning in combination with the loss function and the preset optimization target to obtain a network structure output result for multi-scenario business recommendation.
[0084] In the specific implementation, the outputs of the scene network and the shared network are merged and input into the DNN neural network. The model parameters are learned according to the set loss function and optimization objectives to obtain the network structure output results for use in multi-scenario businesses.
[0085] It should be noted that this solution takes into account the differences of multiple scenarios, with large differences in distribution, some with morning peaks, and some with evening peaks. The time-sequential construction of samples for real-time input into the model will lead to poor short-term training of shared network learning parameters. The industry solution is to use buffers and batch input, but it still cannot solve the problem of reduced effect of short-term shared networks, and will also cause the scene network to be unable to dynamically capture time changes and activity attributes. Based on this, this solution designs a special model structure switch to solve the problem of unstable model training caused by the surge in traffic in some scenarios.
[0086] By analyzing the traffic distribution of each scene offline, we can know that a scene will have flash sales in the short term. These activities are controlled by the product operation team. It is impossible to manually intervene in the model in model implementation. Therefore, a traffic capture module is designed. This module will analyze the short-term traffic changes of each scene, with a five-minute window. If a scene suddenly has a surge in traffic within 1 minute, it indicates that the scene has special business activities, so the model is transmitted in time. At this time, the model parameter learning of the shared network is suspended, and only the network parameters of the scene are learned. At the same time, this part of the traffic is marked. After the traffic is restored, the data is re-entered into the network at the same time to learn the shared network and scene network parameters. In this way, the shared network is protected. The problem of the decline in the effect of the shared network in a short period of time is solved.
[0087] This embodiment determines the full-scene behavior sequence features, single-scene behavior sequence features, and attribute features based on training samples; inputs the full-scene behavior sequence features and the single-scene behavior sequence features into the multi-head attention module, and inputs the attribute features into the word embedding connection module to obtain the processing result features; inputs the processing result features into the shared network and the scene network to obtain the model prediction results; inputs the model prediction results into the target neural network and performs model parameter learning to obtain the network structure output results for multi-scene business recommendations. In this way, it is achieved by designing full-scene behavior sequence features, single-scene behavior sequence features, and introducing scene features to add more information to the model, and uses a multi-head attention network structure for feature conversion to capture the user's richer preferences.
[0088] refer to Figure 6 , Figure 6 The figure is a flow chart of a second embodiment of a scenario service recommendation method of the present invention.
[0089] Based on the first embodiment above, the scenario service recommendation method of this embodiment includes in step S20:
[0090] Step S201: input the processing result features into a shared network to obtain full-scene shared features.
[0091] It should be noted that the data and features in the processing result features are first input into the shared network, so that the shared features of the whole scene can be obtained.
[0092] Furthermore, in order to obtain shared features for the entire scene, step S201 includes: obtaining the output results of the multi-head attention model based on the processing result features; inputting the output results of the multi-head attention model into the shared network and performing a convolution operation, and processing each scene feature in turn based on the convolution result to obtain shared features for the entire scene.
[0093] It should be understood that after the shared network receives the output of the multi head attention model, it first performs convolution operations based on the received results through multiple VGG-16-based convolutional layers to obtain the convolution results. Then, after performing element-by-element multiplication based on the convolution results, it is further processed by the specific task sub-network. Figure 2 As shown, the scene features are processed one by one according to the network structure diagram of the shared network, and finally the shared features of the whole scene are obtained.
[0094] Step S202: Input the processing result features into the scene network to obtain single scene features.
[0095] In the specific implementation, when samples and features are input into the scene network, the scene network will select and activate the corresponding single-scene network parameters according to the scene ID, and at the same time activate the network parameters of the shared module, and complete the model learning adapted to all scenes in a supervised manner, and finally obtain the single-scene features.
[0096] Step S203: Obtaining a model estimation result according to the full-scene shared features and the single-scene features.
[0097] It should be noted that after obtaining the full-scene shared features and single-scene features, the full-scene shared features and single-scene features are merged to obtain the model estimation results.
[0098] This embodiment obtains full-scene shared features by inputting the processing result features into a shared network; inputting the processing result features into a scene network to obtain single-scene features; and obtaining model estimation results based on the full-scene shared features and the single-scene features. In this way, a new shared network model is provided, in which each block of the shared network can adaptively learn a task-specific sub-network to make full use of useful low-level full-scene information. Secondly, this solution also introduces an attention mechanism with a full-scene common feature soft alignment module in the shared network to further improve the ability to obtain full-scene common features.
[0099] In addition, an embodiment of the present invention further proposes a storage medium, on which a scenario service recommendation program is stored. When the scenario service recommendation program is executed by a processor, the steps of the scenario service recommendation method described above are implemented.
[0100] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0101] Reference Figure 7 , Figure 7 It is a structural block diagram of the first embodiment of the scene service recommendation device of the present invention.
[0102] like Figure 7 As shown, the scene service recommendation device proposed in the embodiment of the present invention includes:
[0103] The feature extraction module 10 is used to determine the full-scene behavior sequence features, single-scene behavior sequence features and attribute features based on the training samples.
[0104] The feature processing module 20 is used to input the full-scene behavior sequence features and the single-scene behavior sequence features into the multi-head attention module, and input the attribute features into the word embedding connection module to obtain the processing result features.
[0105] The model estimation module 30 is used to input the processing result features into the shared network and the scene network to obtain the model estimation results.
[0106] The service recommendation module 40 is used to input the model estimation result into the target neural network and perform model parameter learning to obtain a network structure output result for multi-scenario service recommendation.
[0107] This embodiment determines the full-scene behavior sequence features, single-scene behavior sequence features, and attribute features based on training samples; inputs the full-scene behavior sequence features and the single-scene behavior sequence features into the multi-head attention module, and inputs the attribute features into the word embedding connection module to obtain the processing result features; inputs the processing result features into the shared network and the scene network to obtain the model prediction results; inputs the model prediction results into the target neural network and performs model parameter learning to obtain the network structure output results for multi-scene business recommendations. In this way, it is achieved by designing full-scene behavior sequence features, single-scene behavior sequence features, and introducing scene features to add more information to the model, and uses a multi-head attention network structure for feature conversion to capture the user's richer preferences.
[0108] In one embodiment, the feature extraction module 10 is further used to obtain the user's behavior features in multiple preset scenarios; convert the behavior features into a format to obtain target format features; and obtain training samples according to the target format features.
[0109] In one embodiment, the feature extraction module 10 is also used to extract the full-scene behavior sequence and single-scene behavior sequence features of each sample based on the training samples; extract scene features, user features, product features and context features based on the training samples; and obtain attribute features based on the scene features, the user features, the product features and the context features.
[0110] In one embodiment, the feature processing module 20 is also used to input the full-scene behavior sequence features into a multi-head attention module to obtain global sequence features, product sequence features and global deviation features; input the single-scene behavior sequence features into a multi-head attention module to obtain single-domain product sequence features and single-domain deviation features; input the attribute features into a word embedding connection module for embedding and encoding to obtain processing attribute features; and obtain processing result features based on the global sequence features, the product sequence features, the global deviation features, the single-domain product sequence features, the single-domain deviation features and the processing attribute features.
[0111] In one embodiment, the model estimation module 30 is also used to input the processing result features into a shared network to obtain full-scene shared features; input the processing result features into a scene network to obtain single-scene features; and obtain a model estimation result based on the full-scene shared features and the single-scene features.
[0112] In one embodiment, the model estimation module 30 is also used to obtain the output result of the multi-head attention model based on the processing result characteristics; the output result of the multi-head attention model is input into the shared network and a convolution operation is performed, and each scene feature is processed in turn based on the convolution result to obtain the shared features of the entire scene.
[0113] In one embodiment, the business recommendation module 40 is also used to obtain a loss function and an optimization target; the model estimation result is input into the target neural network, and the model parameter learning is performed in combination with the loss function and the preset optimization target to obtain a network structure output result for multi-scenario business recommendation.
[0114] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0115] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0116] In addition, for technical details not fully described in this embodiment, reference may be made to the scenario service recommendation method provided in any embodiment of the present invention, and will not be repeated here.
[0117] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0118] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0120] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A scenario service recommendation method, characterized in that: The scenario service recommendation method includes: Determine the full-scene behavior sequence features, single-scene behavior sequence features, and attribute features based on the training samples; Inputting the full-scene behavior sequence features and the single-scene behavior sequence features into a multi-head attention module, and inputting the attribute features into a word embedding connection module to obtain processing result features; Inputting the processing result features into the shared network and the scene network to obtain the model estimation results; The model estimation result is input into the target neural network and the model parameters are learned to obtain the network structure output result of multi-scenario business recommendation.
2. The scenario service recommendation method according to claim 1, characterized in that: Before determining the full-scenario behavior sequence features, the single-scenario behavior sequence features, and the attribute features according to the training samples, the method further includes: Obtain user behavior characteristics in multiple preset scenarios; Converting the behavior characteristics into a target format to obtain a target format characteristic; A training sample is obtained according to the target format feature.
3. The scenario service recommendation method according to claim 1, characterized in that: The determining of the full-scenario behavior sequence features, the single-scenario behavior sequence features and the attribute features according to the training samples includes: Extracting full-scene behavior sequence and single-scene behavior sequence features of each sample according to the training samples; Extracting scene features, user features, product features and context features according to the training samples; Attribute features are obtained according to the scene features, the user features, the product features and the context features.
4. The scenario service recommendation method according to claim 1, characterized in that: The step of inputting the full-scene behavior sequence features and the single-scene behavior sequence features into a multi-head attention module, and inputting the attribute features into a word embedding connection module to obtain processing result features includes: Input the full-scene behavior sequence features into the multi-head attention module to obtain global sequence features, product sequence features and global deviation features; Input the single-scene behavior sequence features into the multi-head attention module to obtain single-domain product sequence features and single-domain deviation features; Inputting the attribute features into a word embedding connection module for embedding and encoding to obtain processed attribute features; A processing result feature is obtained according to the global sequence feature, the product sequence feature, the global deviation feature, the single-domain product sequence feature, the single-domain deviation feature and the processing attribute feature.
5. The scenario service recommendation method according to claim 1, characterized in that: The step of inputting the processing result features into the shared network and the scene network to obtain the model estimation result includes: Inputting the processing result features into a shared network to obtain full-scene shared features; Inputting the processing result features into the scene network to obtain single scene features; A model estimation result is obtained based on the full-scene shared features and the single-scene features.
6. The scenario service recommendation method according to claim 5, characterized in that: The step of inputting the processing result features into a shared network to obtain full-scene shared features includes: Obtaining a multi-head attention model output result according to the processing result characteristics; The output results of the multi-head attention model are input into the shared network and a convolution operation is performed, and based on the convolution result, each scene feature is processed in turn to obtain the shared features of the entire scene.
7. The scenario service recommendation method according to claim 1, characterized in that: The model estimation result is input into the target neural network and the model parameter learning is performed to obtain the network structure output result of the multi-scenario service recommendation, including: Get the loss function and optimization target; The model estimation result is input into the target neural network, and the model parameter learning is performed in combination with the loss function and the preset optimization target to obtain the network structure output result of multi-scenario business recommendation.
8. A scene service recommendation device, characterized in that: The scene service recommendation device comprises: A feature extraction module is used to determine the full-scene behavior sequence features, single-scene behavior sequence features and attribute features based on training samples; A feature processing module, used for inputting the full-scene behavior sequence features and the single-scene behavior sequence features into a multi-head attention module, and inputting the attribute features into a word embedding connection module to obtain processing result features; A model estimation module, used to input the processing result features into a shared network and a scene network to obtain a model estimation result; The business recommendation module is used to input the model estimation results into the target neural network and perform model parameter learning to obtain the network structure output results of multi-scenario business recommendations.
9. A scene service recommendation device, characterized in that: The scenario service recommendation device comprises: a memory, a processor, and a scenario service recommendation program stored in the memory and running on the processor, wherein the scenario service recommendation program is configured to implement the scenario service recommendation method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a scenario service recommendation program, and when the scenario service recommendation program is executed by the processor, the scenario service recommendation method according to any one of claims 1 to 7 is implemented.
