Recommendation method and apparatus, device, cluster, and medium
Patent Information
- Application Number
- PCT/CN2025/079826
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-05
- Filing Date
- 2025-02-28
- Publication Date
- 2025-10-02
AI Technical Summary
When processing multi-scenario data recommendations, existing recommendation systems are unable to effectively utilize the common and unique features of each scenario, resulting in low recommendation accuracy for unpopular scenarios and excessive resource consumption.
A multi-scenario prediction model is adopted, including common sub-networks, exclusive sub-networks and universal sub-networks, to learn the common features of each scenario, the unique features of a single scenario and the overall common features respectively. By dynamically adjusting the number of exclusive sub-networks and the proportion of data volume, it can adapt to the needs of different scenarios.
It improves the accuracy of recommendations for unpopular scenarios, reduces resource consumption, adapts to different user needs and scenario changes, and improves the overall efficiency of the recommendation system.
Smart Images

Figure CN2025079826_02102025_PF_FP_ABST
Abstract
Description
Recommended methods, devices, equipment, clusters, and media
[0001] This application claims priority to the Chinese patent application with application number 202410253125.9 filed with the State Intellectual Property Office of China on March 5, 2024, and priority to the Chinese patent application with the invention name “Recommendation method, device, equipment, cluster and medium”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence, and in particular to a recommendation method, apparatus, device, cluster, and medium. Background Art
[0003] Recommendation systems can obtain recommendation results from massive amounts of data (such as items, information, and advertisements) based on demand, and provide users with data (such as items, information, and advertisements) that meets their preferences. However, there are obvious differences in the data distribution of users in different scenarios of the same application or the same business. For example, different scenarios based on popularity can include popular scenarios and unpopular scenarios. Among them, popular scenarios are scenarios with relatively large amounts of data. In addition to a few popular scenarios, there are also a large number of unpopular scenarios with lower data volumes but a wide variety. For example, popular scenarios for short video applications may include entertainment scenarios, news scenarios, real estate scenarios, etc., and unpopular scenarios may include cultural relics scenarios, cooking scenarios, etc. Although the data volume of each of these unpopular scenarios is usually relatively small, overall, their data volume may add up to more than that of popular scenarios. Therefore, unpopular scenarios cannot be ignored.
[0004] Existing recommendation systems mainly use the following two methods to implement data recommendations in different scenarios:
[0005] (1) Each scenario implements data recommendations based on its own data model. This approach fails to leverage the commonalities of each scenario, and the amount of data for unpopular scenarios is relatively small. With relatively small amounts of data, it is difficult to train data models for unpopular scenarios. Furthermore, maintaining a data model for each scenario significantly increases system resource overhead.
[0006] (2) Data recommendations for different scenarios are achieved by sharing the same data model across scenarios. This approach ignores the characteristics of each scenario, resulting in the prediction accuracy of the shared data model in each scenario being lower than that of the data model independently set for each scenario. In addition, the amount of data used in the training of the shared data model for popular scenarios is much larger than that for a single unpopular scenario, resulting in the shared data model primarily learning knowledge about popular scenarios and rarely learning knowledge about unpopular scenarios. This results in the shared data model having very poor accuracy in recommending unpopular scenarios.
[0007] Therefore, both existing methods have problems and cannot well meet the needs of users in multiple scenarios. Summary of the Invention
[0008] The present application provides a recommendation method, apparatus, device, cluster, and medium that can use a single data model to recommend multiple scenarios of the same application / business, and ensure that the accuracy of recommendations for both popular and unpopular scenarios can meet user needs.
[0009] In a first aspect, a recommendation method is provided. The recommendation method is applied to a multi-scenario recommendation system, wherein a multi-scenario prediction model is deployed in the multi-scenario recommendation system. The topology of the multi-scenario prediction model includes a common sub-network, a first dedicated sub-network, and a second dedicated sub-network. The common sub-network can perform data transmission with the first dedicated sub-network and the second dedicated sub-network. The topology of the multi-scenario prediction model also includes a universal sub-network. Data can be transmitted between the universal sub-network and the common sub-network.
[0010] The method includes the following steps: a multi-scenario recommendation system obtains a first recommendation request. The first recommendation request includes first test data and a first tag. The first test data is data generated by a first scenario among multiple scenarios supported by the multi-scenario recommendation system. The first tag is used to indicate that the first test data is associated with the first scenario.
[0011] The multi-scenario recommendation system obtains a first prediction result for the first scenario using the common subnetwork and the first exclusive subnetwork in the multi-scenario prediction model based on the first tag. The multi-scenario prediction model is configured to perform different data processing on unpopular and popular scenarios of the same application or business to obtain prediction results associated with different scenarios.
[0012] The multi-scenario recommendation system performs recommendation processing according to the first prediction result to obtain a first recommendation result for the first scenario.
[0013] The multi-scenario recommendation system obtains a second recommendation request. The second recommendation request includes second test data and a second tag. The second test data is data generated by a second scenario among multiple scenarios supported by the multi-scenario recommendation system. The second tag is used to indicate that the second test data is associated with the second scenario.
[0014] The multi-scenario recommendation system performs recommendation processing according to the second prediction result to obtain a second recommendation result for the second scenario.
[0015] The multi-scenario recommendation system obtains a second prediction result of the second scenario by using the common sub-network and the universal sub-network in the multi-scenario prediction model according to the second label.
[0016] The multi-scenario recommendation system obtains a third recommendation request. The third recommendation request includes third test data and a third tag. The third test data is data generated by a third scenario among the multiple scenarios supported by the multi-scenario recommendation system. The third tag is used to indicate that the third test data is associated with the third scenario.
[0017] The multi-scenario recommendation system obtains a third prediction result of the third scenario by using the common sub-network and the second exclusive sub-network in the multi-scenario prediction model according to the third tag.
[0018] The multi-scenario recommendation system performs recommendation processing according to the third prediction result to obtain a third recommendation result for the third scenario.
[0019] In the above scheme, the common sub-network learns the common features of different scenarios of the same application or business, the first exclusive sub-network learns the unique features of the first scenario, the second exclusive sub-network learns the unique features of the second scenario, and the universal sub-network further learns the common features of different scenarios of the same application or business based on the common sub-network. Therefore, the common sub-network and the first exclusive sub-network can be used for recommendation in the first scenario, and the common sub-network and the second exclusive sub-network can be used for recommendation in the third scenario. The second scenario that does not have a corresponding exclusive sub-network can use the common sub-network and the universal sub-network for recommendation. Compared with the prior art that uses multiple data models to recommend different scenarios, the present application only needs to use one data model to recommend different scenarios, which can effectively reduce resource consumption. Moreover, the multiple data models are independent of each other and cannot utilize the common features between scenarios, resulting in a relatively small amount of data for some unpopular scenarios, resulting in low accuracy in the recommendation of unpopular scenarios. Compared to the existing technology that simply uses the same data model, different scenarios can use different dedicated sub-networks for recommendations in addition to the common sub-network, thereby fully utilizing the unique characteristics of each scenario and avoiding the situation where the amount of data for popular scenarios is large and the amount of data for unpopular scenarios is small, resulting in the entire data model being biased towards popular scenarios, resulting in low accuracy in recommendations for unpopular scenarios. When an unknown scenario occurs (i.e., a scenario that does not have a corresponding dedicated sub-network), such as the second scenario, or before the dedicated sub-network is trained, the common sub-network and the universal sub-network can be used for recommendations. Because the universal sub-network further learns the common characteristics of each scenario based on the common sub-network, the recommendation accuracy is relatively high.
[0020] In some possible designs, the common subnetwork includes a first common network layer and a second common network layer. The first dedicated subnetwork includes a first dedicated network layer and a second dedicated network layer. The first dedicated network layer is used to receive data output by the first common network layer, and the second dedicated network layer is used to receive data output by the second common network layer. The number of layers in the second common network layer is greater than the number of layers in the first common network layer, and the number of layers in the second dedicated network layer is greater than the number of layers in the first dedicated network layer. For example, the common subnetwork includes common network layers 1 to common network layers L, and the first dedicated subnetwork includes dedicated network layers 1 to dedicated network layers L. Then, common network layer 1 outputs data to dedicated network layer 1, common network layer 2 outputs data to dedicated network layer 2, ..., and common network layer L outputs data to dedicated network layer L. For another example, common network layer 1 outputs data to dedicated network layer 1, common network layer 3 outputs data to dedicated network layer 2, common network layer 6 outputs data to dedicated network layer 3, ...
[0021] In the above solution, the common sub-network can transmit data output by multiple common network layers with different numbers of layers to the first exclusive sub-network, so that the first exclusive sub-network can obtain sufficient information and improve the accuracy of the first exclusive sub-network.
[0022] In some possible designs, the merging sub-network includes a switch, and the switch is used to determine how much data amount of the common sub-network output data to receive.
[0023] In the above scheme, the amount of data output by the common sub-network can be selected by a switch, thereby adjusting the ratio between common features and unique features according to actual needs. For example, in unpopular scenes, the amount of common features can be reduced to increase the proportion of unique features corresponding to the scene, thus preventing common features from masking unique features.
[0024] In some possible designs, the number of dedicated subnetworks can be freely increased or decreased for the multi-scenario prediction model as needed, and when adding or decreasing dedicated subnetworks, the normal operation of other subnetworks in the multi-scenario prediction model is not affected. For example, when the multi-scenario recommendation system needs to add a third scenario, a third dedicated subnetwork is added to the multi-scenario prediction model, wherein data transmission can be performed between the third dedicated subnetwork and the common subnetwork. Alternatively, when the multi-scenario recommendation system needs to reduce the first scenario, the first dedicated subnetwork is deleted from the multi-scenario prediction model.
[0025] In the above scheme, the number of exclusive sub-networks in the multi-scenario prediction model can be dynamically adjusted to meet the needs of different users. Moreover, as the scenario changes, the number of exclusive sub-networks can also be adjusted for adaptation, which has strong adaptability.
[0026] In a second aspect, the present application provides a recommendation device, which includes various modules for executing the recommendation method in the first aspect or any possible implementation manner of the first aspect.
[0027] A third aspect provides a computing device, comprising a processor and a memory, wherein the memory stores instructions, and the processor executes the instructions to implement the method as described in any one of the first aspects.
[0028] In a fourth aspect, a computing cluster is provided, comprising a plurality of computing devices, wherein the computing devices comprise a processor and a memory, and the processor executes the instructions to implement the method as described in any one of the first aspects.
[0029] In a fifth aspect, a readable storage medium is provided, comprising instructions, which, when executed by a computing device, can implement the operating steps of the method described in the first aspect or any possible implementation of the first aspect.
[0030] In a sixth aspect, a computer program product is provided, comprising instructions, which, when executed by a computing device, can implement the operating steps of the method described in the first aspect or any possible implementation of the first aspect.
[0031] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] FIG1 is a schematic diagram of the structure of a recommendation system provided by the present application;
[0033] FIG2A is a schematic diagram of the structure of a multi-scenario prediction model provided by the present application;
[0034] FIG2B is a flow chart of a method for training a multi-scenario prediction model provided in this application;
[0035] FIG2C is a flowchart of a recommendation method using a multi-scenario prediction model provided by the present application;
[0036] FIG3 is a schematic structural diagram of a specific embodiment of the multi-scenario prediction model shown in FIG2A ;
[0037] FIG4 is a schematic structural diagram of another specific embodiment of the multi-scenario prediction model shown in FIG2A ;
[0038] FIG5 is a schematic structural diagram of another specific embodiment of the multi-scenario prediction model shown in FIG2A ;
[0039] FIG6 is a schematic diagram of the structure of another recommendation system provided by the present application;
[0040] FIG7 is a schematic diagram of the structure of a computing device provided by the present application. DETAILED DESCRIPTION
[0041] To address the problem of the existing technology's difficulty in balancing the number of data models and the accuracy of the data models, the present application provides a multi-scenario prediction model, which includes a common sub-network and a dedicated sub-network. The common sub-network can be used to learn the common features of each scene, the dedicated sub-network is used to learn the unique features of a single scene, and the universal sub-network learns the common features of each scene. During training, the training data of different scenes will affect the common sub-network, while only the training data of the scene corresponding to the dedicated sub-network will affect the dedicated sub-network. Therefore, both the common sub-network and the dedicated sub-network can be well trained. When the test data of a certain scene is input into the multi-scenario prediction model for prediction, the common sub-network and the dedicated sub-network corresponding to the scene can be used to calculate and obtain the prediction result. Therefore, since the training data of different scenes will affect the common sub-network, the common sub-network can well learn the common features of each scene, while for the dedicated sub-network, only the training data of the scene corresponding to the dedicated sub-network will affect the dedicated sub-network. This can also avoid the situation where the amount of data for the head scene is too large and the amount of data for the tail scene is too small, causing the dedicated sub-network to learn too many features of the head scene and be biased by the head scene.
[0042] The following describes in detail a recommendation system that uses a multi-scenario prediction model for recommendations with reference to the accompanying drawings.
[0043] 1 , which is a schematic diagram of the structure of a recommendation system provided by the present application. As shown in FIG1 , the recommendation system of the present application includes: a client 11 and a multi-scenario recommendation system 12.
[0044] Client 11 is used to implement human-computer interaction and can be deployed on a terminal device or computing device. Terminal devices include personal computers, smartphones, wearable devices, handheld processing devices, tablet computers, mobile notebooks, augmented reality (AR) devices, virtual reality (VR) devices, all-in-one handheld game consoles, wearable devices, in-vehicle devices, smart conferencing devices, smart advertising devices, smart home appliances, etc. Smart home appliances may include robot vacuums and mops, etc., which are not specifically limited here. Computing devices can be described in the next paragraph.
[0045] The client 11 can be a software or application running on a terminal device or computing device controlled by the user, such as a personal computer (PC) client, a web client accessed based on a browser, an application (APP) client running on a mobile terminal, or a console of a cloud platform. This application does not make any specific restrictions.
[0046] The client 11 may also be a client of a cloud platform, such as a console of a cloud platform, specifically a console based on the World Wide Web (web) or a console based on an application programming interface (API), which is not specifically limited in this application.
[0047] The multi-scenario recommendation system 12 includes one or more multi-scenario prediction models (which will be described in detail below), which can be deployed on a computing device, a computing device cluster or a terminal device. Figure 1 takes the deployment of a multi-scenario prediction model on a computing device as an example. Among them, computing devices include servers, virtual machines, containers or edge computing devices. Both virtual machines and containers refer to computing systems composed of virtualized processing of hardware resources such as computing, storage, and network through a virtualization platform. Edge computing devices refer to devices that are closer to data sources and end users and have low latency and high bandwidth characteristics, such as smart routing, edge servers, etc. A computing device cluster may include multiple of the above-mentioned computing devices, such as a data center, which is not specifically limited in this application; the description of the terminal device can refer to the above content and will not be repeated here. For the sake of convenience, the following content is described as an example of a multi-scenario prediction model running in a computing device.
[0048] The following section details the multi-scenario prediction model, the training method for the multi-scenario model, and the method for using the multi-scenario model for recommendation.
[0049] As shown in FIG2A , the multi-scenario prediction model provided by the present application includes a common sub-network 110 and a dedicated sub-network. The dedicated sub-network includes dedicated sub-network 1 121 and dedicated sub-network 2 122 .
[0050] The common sub-network 110 is a sub-network set up to learn the common features of each known scene. Because the common features of each known scene are the same features that each scene has, the number of common sub-networks 110 can be one. Among them, the known scene is a scene that already exists when the multi-scene prediction model is trained. In a specific embodiment, the common sub-network can be a large language sub-network, for example, a generative pre-trained transformer (GPT) sub-network, a bidirectional encoder representations from transformers (BERT) sub-network, an XLNet sub-network, a robustly optimized BERT pretraining approach (RoBERTa) sub-network, a text-to-text transfer transformer (T5) sub-network, etc. In addition, the common sub-network can also be a deep neural network, etc.
[0051] A dedicated subnetwork is a subnetwork designed to learn the unique features of a single known scenario. Because unique features are unique to each scenario and not found in other scenarios, there can be multiple dedicated subnetworks. For example, in the example shown in Figure 2A, the dedicated subnetworks include dedicated subnetwork 1 121 and dedicated subnetwork 2 122. Dedicated subnetwork 1 121 corresponds to scenario A, and dedicated subnetwork 2 122 corresponds to scenario B. Specifically, dedicated subnetworks are configured based on the number of known scenarios. For example, a dedicated subnetwork can be configured for each known scenario. Therefore, the more known scenarios, the more dedicated subnetworks there are, and the fewer known scenarios, the fewer dedicated subnetworks there are. It is understood that in addition to configuring a dedicated subnetwork for each known scenario, if the unique features of some known scenarios are similar, these known scenarios can also share a single dedicated subnetwork, thereby reducing the number of dedicated subnetworks and conserving network resources. In addition to configuring multiple dedicated subnetworks, if there is only one known scenario, the number of dedicated subnetworks can also be one, and this is not specifically limited in this application. Dedicated sub-network 1 121 may include characteristic sub-network 1 1211, merged sub-network 1 1212, and tower sub-network 1 1213. Characteristic sub-network 1 1211 may be a deep neural network, merged sub-network 1 1212 may concatenate two or more data sets, tower sub-network 1 1213 may be a tower network, and so on. Characteristic sub-network 2 1221, merged sub-network 2 1222, and tower sub-network 2 1223 in dedicated sub-network 2 may be similar to characteristic sub-network 1 1211, merged sub-network 1 1212, and tower sub-network 1 1213.
[0052] It can be understood that the example shown in Figure 2A is an example of a multi-scenario prediction model including two exclusive sub-networks. In actual applications, more exclusive sub-networks can be included, and in addition to the common sub-network 110 and the exclusive sub-network, more sub-networks can be included.
[0053] The following will describe in detail the training process of the multi-scenario prediction model shown in FIG2A and the process of making recommendations using the multi-scenario prediction model shown in FIG2A in conjunction with the accompanying drawings.
[0054] First, the training process of the first multi-scenario prediction model is described in detail, using a first multi-scenario prediction model including dedicated sub-network 1 121 and dedicated sub-network 2 122 as an example. Dedicated sub-network 1 corresponds to one scenario of an application or service (hereinafter referred to as scenario A for ease of description), and dedicated sub-network 2 corresponds to another scenario of the same application or service (hereinafter referred to as scenario B for ease of description).
[0055] Referring to FIG2B , FIG2B is a flow chart of a method for training a multi-scenario prediction model provided by the present application. As shown in FIG2B , the first method for training a multi-scenario prediction model includes the following steps:
[0056] S101 , interweaving the A training data under scenario A and the B training data under scenario B to obtain interwoven training data.
[0057] Scenario A corresponds to training set A. Training set A consists of multiple elements, each representing a user's historical data set under scenario A. Each element can include training data A and ground truth A. Training data A is the input data of the user's historical data under scenario A, and ground truth A is the label corresponding to the training data A. Training set A can be used to train the common subnetwork and dedicated subnetwork 1 in the multi-scenario prediction model. Training data A and ground truth A are different in different scenarios. For example, if scenario A is a shopping scenario, training data A can be the user's historical shopping behavior, and ground truth A can be the purchased product. If scenario A is an advertising scenario, training data A can be the user's historical ad click behavior, and ground truth A can be the corresponding advertisement. Similarly, scenario B corresponds to training set B. Training set B consists of multiple elements, each representing a user's historical data set under scenario B. Each element can include training data B and ground truth B. Training data B is the input data of the user's historical data under scenario B, and ground truth B is the label corresponding to the training data B. Training set B can be used to train the common subnetwork and dedicated subnetwork 2 in the multi-scenario prediction model.
[0058] In order to improve the training speed, the training data A and the training data B can be interleaved to obtain a set of training interleaved data. Assume that the training data A is The training data for B is n is the dimension of the training data, and n is an integer greater than zero. The interleaving process is as follows:
[0059] (1) A training data And A mask template [1 0 1 0... 1 0] is operated to obtain the first training interleaved data During the operation, each element in the A training data is stored according to the memory location indicated by the element with value 1 in the A mask template [1 0 1 0... 1 0], and the location indicated by the element with value 0 is filled with 0. For example, the memory location indicated by the 1st bit in the A mask template is used to store x1, the location indicated by the 3rd bit in the A mask template is used to store x3, and so on. The memory location indicated by the 2n-1th bit in the A mask template is used to store x 2n-1 , the memory location indicated by the even bit is filled with 0, and the first training interleaved data can be obtained
[0060] (2) B training data The second training data to be interleaved is obtained by performing operation on the B mask template [0 1 0 1... 0 1] The process of calculating and obtaining the second training data to be interleaved is similar to the process of calculating and obtaining the first training data to be interleaved, and will not be described in detail here.
[0061] (3) The first training data to be interleaved and the second training data to be interleaved The training interleaved data is obtained by adding
[0062] S102: Input the training interleaved data into the multi-scenario prediction model to obtain a prediction value.
[0063] (1) Input the training interleaved data into the multi-scenario prediction model to obtain prediction data A and prediction data B. The specific process is as follows:
[0064] (a) Input the training interleaved data into the common sub-network 110 to obtain a first training representation, and copy the first training representation into two copies. Taking the common sub-network 110 as a deep neural network as an example, the process of inputting the training interleaved data into the common sub-network 110 to obtain the first training representation can refer to the process of inputting the input data into the deep neural network to obtain a feature vector. Taking the common sub-network 110 as a large language sub-network as an example, the process of inputting the training interleaved data into the common sub-network 110 to obtain the first training representation can refer to the process of inputting the input data into the large language sub-network to obtain a feature vector. Specifically, if the common sub-network 110 is a deep neural network, assuming a total of 2L (L≧1) layers of common network layers, let Z l represents the output result of the lth layer, where 1≤l≤2L, then the relationship between the lth layer and the l+1th layer is: l+1 =W l Z l +b l Z l+1 =f l+1 (a l+1 )
[0065] Among them, W l is the weight vector of the lth layer, b l is the bias vector of the lth layer, a l+1 is the intermediate vector of the l+1th layer, f l+1 is the activation function of the l+1th layer, Z l+1is the output of the common network layer at layer l+1. The activation function can be any of the following: sigmoid function, hyperbolic tangent function, ReLU function, ELU (exponential linear units) function, etc.
[0066] It is worth noting that the process of inputting the training interleaved data into the common sub-network 110 to obtain A prediction data and B prediction data can be obtained by adjusting the multi-scenario prediction model during the specific implementation process according to business needs, and this application does not limit this.
[0067] (b) Inputting one of the first training representations into feature sub-network 1 1211 to obtain feature representation A. Taking feature sub-network 1 as an example, the process of inputting one of the first training representations into feature sub-network 1 to obtain feature representation A can refer to the process of inputting input data into a deep neural network to obtain a feature vector.
[0068] (c) Inputting the interleaved training data into the common sub-network 110 to obtain a common representation. Taking the common sub-network 110 as a deep neural network as an example, the process of inputting the interleaved training data into the common sub-network 110 to obtain a common representation can refer to the process of inputting input data into the deep neural network to obtain a feature vector. Taking the common sub-network 110 as a large language sub-network as an example, the process of inputting the interleaved training data into the common sub-network 110 to obtain a common representation can refer to the process of inputting input data into the large language sub-network to obtain a feature vector.
[0069] (d) Input the A feature representation and the common representation into the merging sub-network 1 for concatenation to obtain the predicted A representation. Concatenation can be concatenating the A feature representation to the last bit of the common representation, or concatenating the common representation to the last bit of the A feature representation. For example, if the value of A feature representation 11 is "10" and the value of the common representation is "01", then the concatenation results in "1001" or "0110".
[0070] (e) Input the prediction representation of A into the tower sub-network 1 to calculate the prediction data of A
[0071] (f) Input another first training representation into the feature sub-network 2 1221 to obtain B feature representation.
[0072] (g) The feature representation of B and the common representation are input into the merging sub-network 2 for concatenation to obtain the prediction representation of B. The concatenation can be concatenating the feature representation of B to the last bit of the common representation, or concatenating the common representation to the last bit of the feature representation of B.
[0073] (h) Input the B prediction representation into the tower sub-network 2 to calculate the B prediction data
[0074] Since training data A is the data of scenario A, and training data B is the data of scenario B, ideally, users expect only training data A to be used. The prediction value is calculated by the common sub-network 110 and the dedicated sub-network 1 121 corresponding to the A scene, and only the B training data The prediction value is calculated by the common sub-network 110 and the dedicated sub-network 2 corresponding to the B scene. However, in order to improve the calculation speed, the training interleaved data is input into the common sub-network 110 to obtain the first training representation, and the first training representation is copied into two copies. Then, the first copy of the first training representation is input into the dedicated sub-network 1 121 to calculate the A prediction data. The second first training representation is input into the exclusive sub-network 2 122 to calculate and obtain the B prediction data
[0075] Therefore, the prediction data A includes two parts: a first prediction component and a second prediction component. The first prediction component is the prediction component calculated by applying the common subnetwork 110 and the dedicated subnetwork 1 121 to the A training data, i.e., the elements with odd subscripts in the A prediction data. The second prediction component is the prediction component calculated by applying the common subnetwork 110 and the dedicated subnetwork 1 121 to the B training data, i.e., the elements with even subscripts in the A prediction data. Therefore, the first prediction component is what the user desires, while the second prediction component is unnecessary data generated by training the A and B training data together to increase training speed, which is not what the user desires. Therefore, it is necessary to delete the unnecessary second prediction component.
[0076] Similar to the prediction data A, the prediction data B also includes two parts: a third prediction component and a fourth prediction component. The third prediction component is the prediction component calculated by applying the common subnetwork 110 and the dedicated subnetwork 2 122 to the A training data, i.e., the elements with odd subscripts in the B prediction data. The fourth prediction component is the prediction component calculated by applying the common subnetwork 110 and the dedicated subnetwork 2 122 to the B training data, i.e., the elements with even subscripts in the B prediction data. Therefore, the third prediction component is unnecessary data generated by training the A and B training data together to increase training speed and is not what the user desires. However, the fourth prediction component is what the user desires. Therefore, the unnecessary third prediction component needs to be deleted.
[0077] (2) Based on A prediction data Get the predicted value A.
[0078] Specifically, the A prediction data can be The second prediction component in is eliminated to obtain the predicted value A.
[0079] Since the A mask template is used to process the A training data during interleaving, the A mask template can also be used to process the A prediction data during elimination, eliminating the second prediction component in the A prediction data to obtain the A prediction value. Specifically, the A prediction data can be processed by the A mask template [1 0 1 0…1 0] Perform bitwise AND operation to get the predicted value of A
[0080] (3) Based on B prediction data Get the B predicted value.
[0081] Specifically, the B prediction data can be The third prediction component in is eliminated to obtain the B prediction value.
[0082] Since the B mask template is used to process the B training data during interleaving, the B mask template can also be used to process the B prediction data during elimination, eliminating the third prediction component in the B prediction data to obtain the B prediction value. Specifically, the B prediction data can be processed using the B mask template [0 1 0 1... 0 1] Perform bitwise AND operation to get the B prediction value
[0083] (4) Add the predicted value of A and the predicted value of B bit by bit to get the predicted value
[0084] S103: Calculate the loss function of the multi-scenario prediction model based on the predicted value and the true value.
[0085] The loss function is an important equation used to measure the difference between the predicted value and the true value. A higher loss function output (loss) indicates a greater difference, while a lower loss function output (loss) indicates a smaller difference.
[0086] The loss function of the multi-scenario prediction model is used to describe the relationship between the predicted value and the true value of the output of the multi-scenario prediction model. In the case of , assuming the true value is Then, the loss function of the multi-scenario prediction model can be expressed as:
[0087] Among them, the true value The true value of A And the true value of B The way A's true value and B's true value are interwoven should be the same as the way A's training data and B's training data are interwoven. Because only when the way A's true value and B's true value are interwoven is the same as the way A's training data and B's training data are interwoven, will it make sense to subtract the true value from the predicted value in the loss function. Taking the above loss function as an example, the components with odd subscripts in the predicted value are the predicted components of A's training data, and the components with even subscripts are the predicted components of B's training data. Then, the components with odd subscripts in the true value should come from A's true value, and the components with even subscripts should come from B's true value, so that it makes sense to subtract the true value from the predicted value. Therefore, the way A's true value and B's true value are interwoven can be as follows:
[0088] (1) The true value of A Calculate the first interleaved value by using the A mask template [1 0 1 0... 1 0] The operation process is the same as the training data [x1 x3 … x 2n-1 ] and the process of performing operations on the mask template A [1 0 1 0…1 0] is similar and will not be described here.
[0089] (2) The true value of B The second interleaved value is obtained by performing operation on the B mask template [0 1 0 1... 0 1] B training data The operation process is similar to that of the B mask template [0 1 0 1 ... 0 1] and is not described here.
[0090] (3) The first value to be interleaved and the second value to be interleaved Add up to get the true value
[0091] S104: Update the multi-scenario prediction model according to the loss function of the multi-scenario prediction model.
[0092] When updating the multi-scenario prediction model, each network in the model updates based on the gradient of the model's loss function. The process of updating the multi-scenario prediction model based on the model's loss function is similar to that of updating the deep neural network model based on the model's loss function. The gradient is the slope or derivative of the multi-scenario prediction model's loss function and is used to indicate the speed at which the multi-scenario prediction model updates.
[0093] The loss function of a deep neural network model is determined based on the entire input data, and updates based on this loss function are naturally affected by the entire input data. However, while the loss function of a multi-scenario prediction model includes both the loss function for scenario A and the loss function for scenario B—that is, it is determined based on training data A and training data B—updates to each dedicated subnetwork in the multi-scenario prediction model are only affected by a portion of the input data, while updates to the common subnetwork are affected by the entire input data.
[0094] Specifically, the update of exclusive sub-network 1 will only be affected by the gradient generated by the loss function in scenario A (that is, A training data), and will not be affected by the gradient generated by the loss function in scenario B (that is, B training data); the update of exclusive sub-network 2 will only be affected by the gradient generated by the loss function in scenario B (that is, B training data), and will not be affected by the gradient generated by the loss function in scenario A (that is, A training data); the update of the common sub-network will be affected by both the gradient generated by the loss function in scenario A (that is, A training data) and the gradient generated by the loss function in scenario B (that is, B training data).
[0095] In the above conclusion, the update of exclusive sub-network 1 will only be affected by the gradient generated by the loss function in scenario A (that is, A training data), and will not be affected by the gradient generated by the loss function in scenario B (that is, B training data); the update of exclusive sub-network 2 will only be affected by the gradient generated by the loss function in scenario B (that is, B training data), and will not be affected by the gradient generated by the loss function in scenario A (that is, A training data). This can be proved by the following calculation.
[0096] From step S103, we can know that the loss function of the multi-scenario prediction model is expressed as:
[0097] For the sake of simplicity, the loss function of the multi-scenario prediction model can be expressed as the sum of the loss function under scenario A and the loss function under scenario B, that is, L total =L A (o A (θ A ,θ b ))+L B (o B (θ B ,θ b ))
[0098] Among them, L total is the loss function of the multi-scenario prediction model, L A is the loss function of the exclusive sub-network 1 in scenario A, LB is the loss function of the exclusive sub-network 2 in scenario B, o A is the output function in scenario A, o B is the output function in scenario B, θ A is the exclusive parameter of the exclusive sub-network 1 in scenario A, θ b is the shared parameter of the common sub-network, θ B These are the dedicated parameters for dedicated sub-network 2 in scenario B.
[0099] Since the gradient of the dedicated sub-network 1 corresponding to scenario A is:
[0100] in, To find the partial derivative. Since L B Only depends on o B and θ B , o A Does not depend on θ A ,therefore, The above formula can be simplified to:
[0101] It can be seen that the right side of the above equation only includes L A , o A ,θ A , so it can be concluded that the gradient value of the corresponding exclusive sub-network 1 in scenario A will be affected by L A will not be affected by L B Also, in L A It is generated based on training data A but not training data B. Therefore, it can be concluded that the gradient value of the corresponding exclusive sub-network 1 in scenario A will be affected by training data A but not by training data B.
[0102] Since the gradient of the dedicated sub-network 2 corresponding to scenario B is:
[0103] in, To find the partial derivative. Since L A Only depends on o A and θ A , o B Does not depend on θ B ,therefore, The above formula can be simplified to:
[0104] It can be seen that the right side of the above equation only includes L B , o B ,θ B , so it can be concluded that the gradient value of the corresponding exclusive sub-network 2 in scenario B will be affected by LB will not be affected by L A Also, in L B It is generated based on the B training data but not the A training data. Therefore, it can be concluded that the gradient value of the corresponding exclusive sub-network 2 in the B scenario will be affected by the B training data but not by the A training data.
[0105] Repeat steps S101 to S104 until the number of training cycles reaches a threshold, or the value of the loss function of the multi-scenario prediction model is less than the loss threshold, or the prediction accuracy of the multi-scenario prediction model reaches an accuracy threshold. The number threshold, loss threshold, and accuracy threshold can all be set based on experience.
[0106] During the aforementioned training process, compared to first training dedicated sub-network 1 with training data A and then training dedicated sub-network 2 with training data B, using interleaved training data allows dedicated sub-network 1 and dedicated sub-network 2 to be trained simultaneously, thus reducing training time. For example, in step S102, dedicated sub-network 1 and dedicated sub-network 2 simultaneously calculate the first training representation. In step S104, dedicated sub-network 1 and dedicated sub-network 2 are also updated simultaneously.
[0107] The more exclusive subnetworks there are, the more significant the training time savings are. For example, when there are two exclusive subnetworks, the training time required for the above training method can be reduced by half compared to first training the first exclusive subnetwork and then training the second exclusive subnetwork. When there are three exclusive subnetworks, the training time required for the above training method can be reduced by two-thirds compared to first training the first exclusive subnetwork, then training the second exclusive subnetwork, and finally training the third exclusive subnetwork. It should be understood that the above-mentioned simultaneous does not necessarily strictly require that it occurs at the same time, minute, second, or even at the same moment. When the moments of occurrence are slightly different, it can also be understood as occurring "simultaneously."
[0108] The above example illustrates a multi-scenario prediction model with two dedicated subnetworks. In practice, the number of dedicated subnetworks can be three or more. The following briefly describes the training process of a multi-scenario prediction model, using a model with three dedicated subnetworks as an example.
[0109] Assume that exclusive sub-network 1 corresponds to scenario A, exclusive sub-network 2 corresponds to scenario B, and exclusive sub-network 3 corresponds to scenario C. The training data A in scenario A is The data in scenario B is B and the training data is The C training data in the C scenario is n is the dimension of the training data, and n is an integer greater than zero.
[0110] (1) Interweave the A training data, B training data, and C training data to obtain training interleaved data
[0111] (2) The training interleaved data is input into the common sub-network 110 to obtain a second training representation, and the second training representation is copied to obtain three copies of the second training representation.
[0112] (3) Input the training interleaved data into the commonality sub-network 110 to obtain commonality representation.
[0113] (4) Input the first and second training representations and the common representation into the exclusive sub-network 1 to obtain A prediction data The specific process can be found in steps (b) to (e) in step S102 (1), which will not be described in detail here.
[0114] (5) Input the second training representation into the exclusive sub-network 2 to obtain B prediction data
[0115] (6) Input the third second training representation into the exclusive sub-network 3 to obtain C prediction data
[0116] (7) Based on A prediction data Get A predicted value Here, based on A prediction data The process of obtaining the predicted value of A is the same as that in Figure 2B above based on the predicted data of A. The process of obtaining the predicted value of A is similar and will not be described here. The difference is that based on the predicted data of A The process of obtaining the predicted value A requires eliminating both the prediction components of the B training data and the C training data calculated by the common sub-network 110 and the exclusive sub-network 1.
[0117] (8) Based on B prediction data Get the B predicted value Here, based on the B prediction data The process of obtaining the predicted value of B is the same as that in step (6) above based on the predicted data of A. The process of obtaining the predicted value of A is similar and will not be described here. The difference is that based on the predicted data of B The process of obtaining the prediction value B requires eliminating both prediction components obtained by calculating the common sub-network 110 and the exclusive sub-network 2 for the A training data and the C training data.
[0118] (9) Based on C prediction data Get the predicted value of C Here, based on the C prediction data The process of obtaining the predicted value of C is the same as that in step (6) above based on the predicted data of A. The process of obtaining the predicted value of A is similar and will not be described here. The difference is that based on the predicted data of C The process of obtaining the predicted value of C requires eliminating both the predicted components of the A training data and the B training data calculated by the common sub-network 110 and the exclusive sub-network 3.
[0119] (10) Add the predicted values of A, B, and C to get the predicted value
[0120] (11) The loss function of the multi-scenario prediction model is calculated based on the predicted value and the true value. The true value of A B true value C true value Obtained by interweaving.
[0121] (12) Update the multi-scenario prediction model according to the loss function of the multi-scenario prediction model.
[0122] The loss function of the multi-scenario prediction model is determined based on training data A, B, and C. However, updates to dedicated sub-network 1 are affected by the gradients generated by training data A, but not by those generated by training data B and C. Updates to dedicated sub-network 2 are affected by the gradients generated by training data B, but not by those generated by training data A and C. Updates to dedicated sub-network 3 are affected by the gradients generated by training data C, but not by those generated by training data A and B. Updates to the common sub-network are affected by the gradients generated by training data A, B, and C.
[0123] When the number of known scenarios is greater, the above method can be used for analogy, which will not be elaborated here.
[0124] The following describes the recommendation process using a multi-scenario prediction model, including dedicated sub-networks 1 and 2. Dedicated sub-network 1 corresponds to one scenario of an application or service (hereinafter referred to as scenario A), while dedicated sub-network 2 corresponds to another scenario of the same application or service (hereinafter referred to as scenario B).
[0125] Referring to FIG2C , FIG2C is a flowchart of a method for recommending using a multi-scenario prediction model provided by the present application. As shown in FIG2B , the method for recommending using the first multi-scenario prediction model includes the following steps:
[0126] S201: Receive a first recommendation request, wherein the first recommendation request includes A test data and A label.
[0127] Data A to be tested is the current data of the user in scenario A. For example, in a shopping scenario, data A to be tested can be the user's current shopping behavior; in an advertising scenario, data A to be tested can be the user's current ad click behavior.
[0128] The A tag is used to identify the A test data as data under scenario A. The A tag may be automatically generated when the application generates the A test data under scenario A, or the A test data may be manually marked.
[0129] S202: Input the A test data and the A label in the A scenario into the multi-scenario prediction model to obtain the A prediction result.
[0130] Based on the A marker, the A test data will pass through the common sub-network and the dedicated sub-network 1 in sequence to obtain the prediction result A. Since the calculation method of the common sub-network and the dedicated sub-network 1 in the prediction process is similar to the calculation method of the common sub-network and the dedicated sub-network 1 in the training process, it will not be described in detail here.
[0131] S203: Execute recommendation processing according to prediction result A to obtain a first recommendation result.
[0132] S204 : Receive a second recommendation request, wherein the first recommendation request includes B test data and B mark.
[0133] The B test data is the user's current data in scenario B. The B tag is used to identify the B test data as data in scenario B. Based on the B tag, the B test data will pass through the common sub-network and the dedicated sub-network 2 in sequence to obtain the B prediction result.
[0134] S205 , inputting the B test data and the B label in the B scenario into the multi-scenario prediction model to obtain a B prediction result.
[0135] Since the calculation method of the common sub-network and the exclusive sub-network 2 in the prediction process is similar to the calculation method of the common sub-network and the exclusive sub-network 2 in the training process, it will not be described in detail here.
[0136] S206: Perform recommendation processing according to the B prediction result to obtain a second recommendation result.
[0137] The above prediction process is illustrated using two scenarios as an example. When there are more scenarios, the prediction process is similar to the above prediction process and will not be elaborated here.
[0138] In order to improve the accuracy of recommendations, the multi-scenario prediction model shown in FIG3 is based on the multi-scenario prediction model shown in FIG2A, and has been improved as follows: the common sub-network includes a first common network layer and a second common network layer, and the first exclusive sub-network includes a first exclusive network layer and a second exclusive network layer. The first exclusive network layer is used to receive data output by the first common network layer. The second exclusive network layer is used to receive data output by the second common network layer. The number of layers of the second common network layer is greater than the number of layers of the first common network layer, and the number of layers of the second exclusive network layer is greater than the number of layers of the first exclusive network layer. Therefore, the common sub-network can transmit data output by multiple common network layers with different numbers of layers to the first exclusive sub-network, so that the first exclusive sub-network can obtain sufficient information to improve the accuracy of the first exclusive sub-network. In a specific example,
[0139] The common sub-network 110 may include 2L network layers, that is, the network layers of the common sub-network 110 may include network layer 1, network layer 2, ..., network layer 2L. Among them, the network layer refers to a layer that converts and processes the input data. Each layer is composed of a group of neurons (or nodes), each neuron receives a group of inputs, performs certain calculations, and generates outputs. For example, the network layers of the common sub-network 110 may be one or more of a fully connected layer, a convolutional layer, a pooling layer, a recurrent layer, a long short-term memory (LSTM) layer, a batch normalization layer, an activation function layer, a loss function layer, etc. When the common sub-network 110 is a deep neural network, the network structure of the common sub-network 110 can refer to the network structure of the deep neural network. When the common sub-network 110 is a large language sub-network, the network structure of the common sub-network 110 can refer to the network structure of the large language sub-network.
[0140] The structure of the exclusive sub-network 1 includes tower A, switch 1, and characteristic sub-network 1. Tower A is a sub-network (sub-tower) in the tower model. The tower model is a neural network model, also known as a tower structure. It is a hierarchical structure composed of multiple sub-networks (sub-towers), each of which is responsible for processing specific input features or tasks. Switch 1 can splice the common representation and the characteristic representation output by the characteristic sub-network 1. Furthermore, switch 1 can also include a gating network. The gating network is used to determine how many common representations and characteristic representations to splice to balance the common representations and characteristic representations. For example, when the amount of data in scene A is less than the first threshold, the characteristic representation and the less common representation can be spliced through the gating network to avoid the common representation becoming dominant and causing the characteristic representation to be masked. Conversely, the characteristic representation and the more common representation can be spliced. The setting method of the first threshold can be dynamically determined based on the training accuracy of historical data, or it can be set to a fixed value based on expert experience. The number of common representations and characteristic representations that are spliced together by switch 1 can be determined by a dedicated subnetwork, a common subnetwork, or both. Alternatively, it can be manually set based on experience. In a specific embodiment, the gating network may include one or more of an input gate, a forget gate, and an output gate. The input gate controls which information in the input data should be remembered and passed to subsequent processing units. Specifically, the input gate generates a value between 0 and 1 based on the current input data and the previous hidden state, indicating the importance of the input data at the corresponding position. The closer the value is to 1, the more important the input data at that position is. The forget gate determines which past memories should be forgotten. Specifically, the forget gate uses a value between 0 and 1 to control how much information in the previous memory unit is retained. A value closer to 0 indicates that the previous memory should be completely forgotten; a value closer to 1 indicates that the previous memory should be completely retained. The output gate determines which information in the current hidden state should be output to subsequent processing units. Specifically, the output gate controls the degree of information transmission through a value between 0 and 1. The closer this value is to 0, the less important the information is and it does not need to be passed to the subsequent processing units; the closer this value is to 1, the more important the information is and it should be passed to the subsequent processing units in its entirety. Therefore, through the control of the input gate, forget gate, and output gate, the gated network can selectively process and filter information in the input data. The characteristic sub-network 1 may include network layer 1, network layer 2, ..., network layer L. For example, the L-layer network layer of the characteristic sub-network 1 may be one or more of a fully connected layer, a convolutional layer, a pooling layer, a recurrent layer, a long short-term memory layer, a batch normalization layer, an activation function layer, a loss function layer, and the like.When the characteristic sub-network 1 is a deep neural network, the network structure of the characteristic sub-network 1 can refer to the network structure of the deep neural network.
[0141] The structure of the exclusive sub-network 2 includes tower B, switch 2 and characteristic sub-network 2. Among them, tower B is a sub-network (sub-tower) in the tower model. Tower B and tower A can have their own independent weight parameters for learning and processing input features related to the sub-network. In addition, each sub-network can have a different structure to adapt to the processing requirements of different input features. Switch 2 can splice the common representation and the characteristic representation output by the characteristic sub-network 2. Furthermore, switch 2 can also include a gating network. The characteristic sub-network 2 can include network layer 1, network layer 2, ..., network layer L. The structure of the characteristic sub-network 2 can refer to the structure of the characteristic sub-network 1 and will not be described here.
[0142] In the example shown in FIG3 , the network layers of both characteristic sub-network 1 and characteristic sub-network 2 are L. In actual applications, the number of network layers in characteristic sub-network 1 and the number of network layers in characteristic sub-network 2 may be different. For example, characteristic sub-network 21 is applied to popular scenarios, and characteristic sub-network 2 is applied to unpopular scenarios. In this case, the number of network layers in characteristic sub-network 1 can be set to be more than that in characteristic sub-network 2.
[0143] Since the multi-scenario prediction model of FIG3 is a further improvement on the multi-scenario prediction model of FIG2A , it is also necessary to further improve the training method of the multi-scenario prediction model shown in FIG2B , so as to obtain a training method suitable for the multi-scenario prediction model shown in FIG3 .
[0144] In the example shown in FIG2B , (1) the interleaved training data is input into the common sub-network 110 to obtain a first training representation, and the first training representation is copied into two copies: one of the first training representations is input into the dedicated sub-network 1 for calculation to obtain prediction data A, and the other first training representation is input into the dedicated sub-network 2 to obtain prediction data B. Specifically, the following can be used:
[0145] The training interleaved data is input into the common sub-network and calculated through network layers 1 to 2L. A training representation is calculated for every two network layers in network layers 1 to 2L of the common sub-network 110, and the training representation is copied into two copies. That is, network layer K-1 and network layer K are used to calculate the training representation K, and the training representation K is copied to obtain two training representations K, 2≤K≤2L, and K and L are both integers greater than zero. Therefore, if the number of network layers of the common sub-network 110 is 2L, a training representation is calculated for every two network layers, then the first training representation calculated by the common sub-network 110 includes training representation 1, training representation 2, ..., training representation L, and the calculated training representation 1, training representation 2, ..., training representation L are each copied into two copies. One of the training representations (training representation 1, training representation 2, ..., training representation L) is input into dedicated sub-network 1 to calculate predicted data A, and the other training representations (training representation 1, training representation 2, ..., training representation L) are input into dedicated sub-network 2 to calculate predicted data B. The following describes the execution process in detail from the perspectives of (1) common sub-network 110, (2) dedicated sub-network 1, and (3) dedicated sub-network 2:
[0146] (1) In the common sub-network 110, the calculation process is as follows:
[0147] (1) The training interleaved data is sequentially input into the network layer 1 and the network layer 2 of the common sub-network 110 for calculation to obtain a training representation 1. Then, the training representation 1 is copied to obtain two training representations 1. One of the training representations 1 is input into the network layer 1 of the exclusive sub-network 1, and the other training representation 1 is input into the network layer 1 of the exclusive sub-network 2. For example, when the common sub-network is a deep neural network, the process of sequentially inputting the training interleaved data into the network layer 1 and the network layer 2 of the common sub-network 110 for calculation is similar to the process of inputting the input data into the network layer 1 and the network layer 2 of the deep neural network for calculation, and will not be described in detail here.
[0148] (2) The training representation 1 is sequentially input into the network layer 3 and the network layer 4 of the common sub-network 110 to calculate and obtain the training representation 2, and then the training representation 2 is copied to obtain two training representations 2, one of which is input into the network layer 2 of the exclusive sub-network 1, and the other training representation 2 is input into the network layer 2 of the exclusive sub-network 2.
[0149] (…)….
[0150] (L) The network layer 2L-1 and the network layer 2L of the common sub-network 110 calculate the training representation L, and then copy the training representation L to obtain two training representations L. One of the training representations L is input into the network layer L and switch 1 of the dedicated sub-network 1, and the other training representation L is input into the network layer L and switch 2 of the dedicated sub-network 2.
[0151] (2) In dedicated sub-network 1, the calculation process is as follows:
[0152] (1) The network layer 1 of the exclusive sub-network 1 performs an uncompressed calculation on the training representation 1 output by the common sub-network to obtain the training output value 11. The uncompressed calculation makes the number of bits of the training representation 1 the same as the number of bits of the training output value 11. For example, if the training representation 1 is 128 bits, the training output value 11 is also 128 bits. For example, when the L-layer network layer of the exclusive sub-network 1 adopts a deep neural network structure and the network layer 1 is a fully connected layer, the network layer 1 can perform an uncompressed calculation on the training representation 1 output by the common sub-network.
[0153] (2) The network layer 2 of the exclusive sub-network 1 concatenates the training output value 11 and the training representation 2 to obtain the training concatenation result 12, and then performs a compressed calculation on the training concatenation result 11 to obtain the training output value 12. The concatenation can be to connect the training output value 11 to the last bit of the training representation 2, or to connect the training representation 2 to the last bit of the training output value 11. For example, if the value of the training output value 11 is "10" and the value of the training representation 2 is "01", then after concatenation, "1001" or "0110" is obtained. Compressed calculation means that the number of bits of the output is less than the number of bits of the input. For example, when the compression rate is 1 / 2, the input is 256 bits and the output is 128 bits. For example, when the L-layer network layer of the exclusive sub-network 1 adopts a deep neural network structure and the network layer 2 is a pooling layer, the network layer 2 can perform a compressed calculation on the training concatenation result 11.
[0154] (…)….
[0155] (L) The network layer L of the exclusive sub-network 1 concatenates the training output value 1(L-1) and the training representation L to obtain the training concatenation result 1L, and then performs a compressed calculation on the training concatenation result 1L to obtain the training output value 1L.
[0156] Switch 1 of (L+1) dedicated sub-network 1 receives training output value 1L output by network layer L of dedicated sub-network 1. Switch 1 selects a portion or all of the representations from training representation L and concatenates them with training output value 1L to obtain switch training output value 1.
[0157] (L+2) Tower A of exclusive sub-network 1 receives the switch training output value 1 output by switch 1 and performs calculation to obtain A prediction data
[0158] (3) In dedicated sub-network 2, the calculation process is as follows:
[0159] (1) The network layer 1 of the exclusive sub-network 2 performs an uncompressed calculation on the training representation 1 output by the common sub-network to obtain the training output value 21.
[0160] (2) The network layer 2 of the exclusive sub-network 2 concatenates the training output value 21 and the training representation 2 to obtain a training concatenation result 22, and then performs a compressed calculation on the training concatenation result 21 to obtain a training output value 22.
[0161] (…)….
[0162] (L) The network layer L of the exclusive sub-network 2 concatenates the training output value 2(L-1) and the training representation L to obtain the training concatenation result 2L, and then performs a compressed calculation on the training concatenation result 2L to obtain the training output value 2L.
[0163] Switch 2 of (L+1) dedicated sub-network 2 receives training output value 2L output by network layer L of dedicated sub-network 2. Switch 2 selects a portion or all of the representations from training representation L and concatenates them with training output value 2L to obtain switch training output value 2.
[0164] (L+2) Tower B of dedicated sub-network 2 receives switch training output value 2 output by switch 1 and calculates it to obtain prediction data B
[0165] In the example shown in FIG3 , the example of outputting a training representation to dedicated sub-network 1 and dedicated sub-network 2 for every two network layers in the common sub-network is used for illustration. However, in actual applications, it is also possible to output a representation to dedicated sub-network 1 and dedicated sub-network 2 for every three or even more network layers. In addition, it is also possible to output training representations to dedicated sub-network 1 and dedicated sub-network 2 using an unfixed number of network layers. For example, training interleaved data can be first input into network layer 1 to obtain training representation 1. Then, training representation 1 is calculated through network layers 2 and 3 to obtain training representation 2, and so on. Furthermore, the common sub-network can output a training representation to dedicated sub-network 1 for every two network layers, but output a training representation to dedicated sub-network 2 for every three network layers, and so on.
[0166] Compared to outputting only the representation of the 2L layer of the common sub-network to the dedicated sub-network, outputting a training representation to the dedicated sub-network after every two network layers in the common sub-network can provide more information to the dedicated sub-network, resulting in better training results for the dedicated sub-network. However, if the number of network layers between the two training representations output to the dedicated sub-network is too small, the amount of computation will increase significantly. If the number of network layers between the two training representations output to the dedicated sub-network is too large, the dedicated sub-network will not receive enough information. Therefore, based on experience, an appropriate number of network layers between the training representations can be set to achieve a balance between computation and training results.
[0167] The above text describes in detail the training process of the second multi-scenario prediction model in conjunction with the accompanying drawings. Next, taking the exclusive sub-network 1 corresponding to scene A and the exclusive sub-network 2 corresponding to scene B as examples, the recommendation process using the second multi-scenario prediction model will be described in detail.
[0168] Since the second multi-scenario prediction model in Figure 3 is a further introduction to the first multi-scenario prediction model in Figure 2A, it is also necessary to further introduce the recommendation method using the first multi-scenario prediction model shown in Figure 2C, so as to obtain the recommendation method of the second multi-scenario prediction model in Figure 3.
[0169] In FIG2C , the A test data and the A label under scenario A are input into the multi-scenario prediction model to obtain the A prediction result. The execution process can be specifically described from the perspectives of (1) the common sub-network 110 and (2) the dedicated sub-network 1:
[0170] (1) In the common sub-network 110, the calculation process is as follows:
[0171] (1) The A test data and the A label are sequentially input into the network layer 1 and the network layer 2 of the common sub-network 110 to calculate the prediction representation 11, and then, according to the A label, the prediction representation 11 is input into the network layer 1 of the exclusive sub-network 1; (2) The prediction representation 11 is sequentially input into the network layer 3 and the network layer 4 of the common sub-network 110 to calculate the prediction representation 12, and then, according to the A label, the prediction representation 12 is input into the network layer 2 of the exclusive sub-network 1; ...; (L) The prediction representation 1 (L-1) is sequentially input into the network layer (L-1) and the network layer L of the common sub-network 110 to calculate the prediction representation 1L, and then, according to the A label, the prediction representation 1L is input into the network layer L of the exclusive sub-network 1 and the switch 1.
[0172] (2) In dedicated sub-network 1, the calculation process is as follows:
[0173] (1) The network layer 1 of the exclusive sub-network 1 performs an uncompressed calculation on the prediction representation 1 output by the common sub-network to obtain the predicted output value 11.
[0174] (2) The network layer 2 of the exclusive sub-network 1 concatenates the predicted output value 11 and the predicted representation 2 to obtain the predicted concatenation result 12, and then performs a compressed calculation on the predicted concatenation result 11 to obtain the predicted output value 12. (…)…; (L) The network layer L of the exclusive sub-network 1 concatenates the predicted output value 1(L-1) and the predicted representation L to obtain the predicted concatenation result 1L, and then performs a compressed calculation on the predicted concatenation result 1L to obtain the predicted output value 1L. (L+1) The switch 1 of the exclusive sub-network 1 receives the predicted output value 1L output by the network layer L of the exclusive sub-network 1. The switch 1 selects a portion of the representation from the predicted representation L and concatenates it with the predicted output value 1L to obtain the switch predicted output value 1. (L+2) The tower A of the exclusive sub-network 1 receives the switch predicted output value 1 output by the switch 1, and performs calculation to obtain the A prediction result.
[0175] In FIG2C , the B test data and the B label in the B scenario are input into the multi-scenario prediction model to obtain the B prediction result. Specifically, the execution process can be described from the perspectives of (1) the common sub-network 110 and (2) the dedicated sub-network 2:
[0176] (1) In the common sub-network 110, the calculation process is as follows:
[0177] (1) The B test data and the B label are sequentially input into the network layer 1 and the network layer 2 of the common sub-network 110 to calculate and obtain the prediction representation 21. Then, the prediction representation 21 is input into the network layer 1 of the exclusive sub-network 2 according to the B label.
[0178] (2) The prediction representation 21 is sequentially input into the network layer 3 and the network layer 4 of the common sub-network 110 to calculate the prediction representation 22, and then, according to the B mark, the prediction representation 22 is input into the network layer 2 of the exclusive sub-network 2.
[0179] (…)….
[0180] (L) The predicted representation 2(L-1) is sequentially input into the network layer (L-1) and the network layer L of the common sub-network 110 to calculate the predicted representation 2L. Then, according to the B mark, the predicted representation 2L is input into the network layer L and the switch 2 of the exclusive sub-network 2.
[0181] (2) In dedicated sub-network 2, the calculation process is as follows:
[0182] (1) The network layer 1 of the exclusive sub-network 2 performs an uncompressed calculation on the predicted representation 21 output by the common sub-network to obtain the predicted output value 21.
[0183] (2) The network layer 2 of the exclusive sub-network 2 concatenates the predicted output value 21 and the predicted representation 21 to obtain a predicted concatenated result 22, and then performs a compressed calculation on the predicted concatenated result 22 to obtain a predicted output value 22.
[0184] (…)….
[0185] (L) The network layer L of the exclusive sub-network 2 concatenates the predicted output value 2(L-1) and the predicted representation L to obtain a predicted concatenation result 2L, and then performs a compressed calculation on the predicted concatenation result 2L to obtain a predicted output value 2L.
[0186] Switch 2 of (L+1) dedicated sub-network 2 receives predicted output value 2L output by network layer L of dedicated sub-network 2. Switch 2 selects a portion of the predicted representation L and concatenates it with predicted output value 2L to obtain switch predicted output value 2.
[0187] Tower A in the (L+2) dedicated sub-network 2 receives the switch prediction output value 2 output by switch 1 and calculates it to obtain the prediction result B.
[0188] The above prediction process is illustrated using two scenarios as an example. When there are more scenarios, the recommendation process is similar to the above recommendation process and will not be elaborated here.
[0189] The above multi-scenario prediction model training process and the recommendation process using the multi-scenario prediction model are described with the number of dedicated sub-networks in the multi-scenario prediction model as fixed. In actual applications, the number of dedicated sub-networks can be changed dynamically. For specific changes, please refer to the following cases 1 and 2:
[0190] Case 1: If a known scene disappears, the dedicated sub-network corresponding to the known scene is deleted.
[0191] Case 2: If an unknown scenario occurs, a dedicated sub-network corresponding to the unknown scenario is added.
[0192] Therefore, the exclusive sub-network is "pluggable", that is, when a known scenario disappears, that is, when the exclusive sub-network corresponding to some scenarios needs to be deleted from the existing multi-scenario prediction model, the function or software module corresponding to the exclusive sub-network of the known scenario can be deleted, and the calling interface of the exclusive sub-network of the known scenario can be disabled. If an unknown scenario appears, that is, when the exclusive sub-network corresponding to some scenarios needs to be added to the existing multi-scenario prediction model, the function or software module corresponding to the exclusive sub-network corresponding to the unknown scenario can be added, and the calling interface of the exclusive sub-network corresponding to the unknown scenario can be established to facilitate the calling of the exclusive sub-network corresponding to the unknown scenario. In this way, the exclusive sub-network in the multi-scenario prediction model can be dynamically adjusted according to actual needs to adapt to the needs of different multiple scenarios.
[0193] It's worth noting that the pluggable nature of the dedicated subnetworks necessitates adjustments to the structure of the multi-scenario prediction model. Since the common subnetwork receives gradients for all scenarios, while the dedicated subnetworks receive gradients specific to their specific scenarios, they are decoupled. During training and prediction, the common and dedicated subnetworks do not interfere with each other, making them pluggable.
[0194] However, for the above situation 2: unknown scene D appears, since unknown scene D is a scene that did not exist before the multi-scenario prediction model began training. Therefore, when the multi-scenario prediction model adds the dedicated sub-network 4 corresponding to unknown scene D, the common sub-network and dedicated sub-network (for example, dedicated sub-network 1 and dedicated sub-network 2) that originally existed in the multi-scenario prediction model are trained, while the dedicated sub-network 4 corresponding to the unknown scene is not trained. Therefore, using this dedicated sub-network to predict the test data of the corresponding scene will result in very low accuracy.
[0195] In actual applications, new unknown scenes often appear. At this time, the multi-scene prediction model does not have an exclusive sub-network corresponding to this unknown scene, and it is impossible to make recommendations for this unknown scene. Or, even if a new exclusive sub-network is added to correspond to this unknown scene, the prediction accuracy of the newly added exclusive sub-network is not high before there is sufficient data to train the new exclusive sub-network. Therefore, as shown in Figure 4, a universal sub-network 130 can be added to the structure of the multi-scene prediction model shown in Figure 3. The universal sub-network 130 is used to further learn the common features of each scene on the basis of the common sub-network. Therefore, it can be used to recommend unknown scenes, or, before the new exclusive sub-network is trained, it can replace the exclusive sub-network for recommendation. After the new exclusive sub-network is trained, the trained exclusive sub-network can be used to recommend the unknown scene.
[0196] Universal subnetwork 130 is designed to further learn the common features of various scenarios based on common subnetwork 110 to cope with unknown scenarios. Universal subnetwork 130 can be a subnetwork (subtower) in the tower model. Tower C can have its own independent weight parameters for learning and processing representations related to this subnetwork. Furthermore, the structure of Tower C can be the same as or different from Tower A and Tower B, and this is not specifically limited here.
[0197] Therefore, universal sub-network 130 is added in series to the output of network layer L of common sub-network 110 to further learn the common features of various scenarios. Because universal sub-network 130 is trained together with common sub-network 110, specific sub-network 1, and specific sub-network 2, and because it has learned more common features across various scenarios, the prediction accuracy of the trained universal sub-network is higher than that of the untrained specific sub-network 4. Therefore, before the newly added specific sub-network is trained, universal sub-network 130 can be used for prediction. After the added specific sub-network is trained, the trained specific sub-network can be used for prediction.
[0198] Since the multi-scenario prediction model shown in FIG4 adds a universal sub-network on the basis of the multi-scenario prediction model shown in FIG3, it is necessary to add a training process for the universal sub-network and a process for recommendation using the universal sub-network on the basis of the training process and recommendation process of the multi-scenario prediction model shown in FIG3, so as to obtain the training process of the multi-scenario prediction model shown in FIG4 and the process for recommendation using the multi-scenario prediction model shown in FIG4.
[0199] Since the training process and recommendation process of the common sub-network and the dedicated sub-network have been introduced in the training process and recommendation process of the multi-scenario prediction model shown in Figure 3, the training process and recommendation process of the common sub-network and the dedicated sub-network will not be described in detail here. The following will only describe the training process and recommendation process of the common sub-network 130 in detail.
[0200] 1. Training process of the general sub-network 130.
[0201] (1) The training interleaved data is input into the 2L network layers of the common sub-network for calculation to obtain the training representation L. This process has been described in detail in the example shown in Figure 3, and please refer to the above for details.
[0202] (2) Input the training representation L into tower C to calculate the general prediction value
[0203] (3) Based on the general prediction value and the true value is The general loss function for determining the general sub-network can be:
[0204] (4) Update the universal sub-network according to the universal loss function.
[0205] 2. Recommendation process of the general sub-network 130.
[0206] Assume that a new unknown scene D has appeared and a dedicated sub-network 4 has been added for it. The unknown scene D has D test data and a label D. The label D is used to indicate that the universal sub-network should be used for recommendation. Before the newly added dedicated sub-network 4 is trained, the universal sub-network 130 can be used to make recommendations for the unknown scene D. The recommendation process of the universal sub-network 130 can be:
[0207] (1) D test data and D label are input into the common sub-network 110. After layer-by-layer calculations are performed through network layers 1 to L of the common sub-network 110, a prediction representation 3L is obtained. The prediction representation 3L is sent to the general sub-network 130 according to the D label.
[0208] (2) Column C in the universal sub-network 130 calculates the prediction representation 3L to obtain a prediction result D, and performs a recommendation process based on the prediction result D to obtain a third recommendation result. Then, based on the user's response to the prediction result D, it is determined whether the prediction result D is correct. If the prediction result D is correct, the D test data and the prediction result D can be used as training data to train the newly added dedicated sub-network 4. After the dedicated sub-network 4 is trained, the universal sub-network 130 can be stopped from making recommendations for the unknown scene D.
[0209] It can be understood that, when the common sub-network is a large language sub-network, the training data or test data input into the common sub-network is usually text-based data, and when the common sub-network is not a large language sub-network, the training data or test data input into the common sub-network is usually identifier-based data. Therefore, in order to be compatible with different types of inputs, when the common sub-network is a large language sub-network, as shown in FIG5 , a conversion module 140 can also be set before the common sub-network. The conversion module 140 is used to convert identifier-based data into text-based data. Specifically, a manually set conversion template can be obtained, and part or all of the identifier-based data can be filled into the conversion template to obtain text-based data. Assume that the identifier-based data is:
[0210] The conversion template is: User ID is user_{**}, previously clicked {**}, the current product ID is {**}, the name is {**}, the brand is {**}, and the price is {**}. {**} is an example of a placeholder. In practice, placeholders can also be represented in other ways. Placeholders are symbols or strings that represent certain values or information, and are used to replace unknown or dynamically changing values.
[0211] Fill the user ID "125" into the first {**}, fill "Product_13: [text information]; Product_16: [text information]" into the second {**}, fill the product representation "53" into the third {**}, fill the product name "S Product" into the fourth {**}, fill the product trademark into "S Trademark" into the fifth {**}, and fill the product price "23 yuan" into the fifth {**} to obtain text-based data:
[0212] The user ID is user_125, who previously clicked product_13:[text information]; product_16:[text information]. The ID of the current product is 53, the name is S product, the trademark is S trademark, and the price is 23 yuan.
[0213] The above example is merely an example. In actual applications, the data and conversion template based on the identifier may also be in other forms and contents, which are not specifically limited here.
[0214] Referring to Figure 6 , which is a schematic diagram of the structure of another recommendation system provided by this application, as shown in Figure 6 , the recommendation system provided by this application includes a client 210 and a multi-scenario recommendation system 220 . The following will focus on the multi-scenario recommendation system 220 . The multi-scenario recommendation system includes an acquisition unit 221 , a prediction unit 222 , and a recommendation unit 223 .
[0215] The acquisition unit 221 is used to obtain a first recommendation request, wherein the first recommendation request includes first data to be tested and a first tag, the first data to be tested is data generated by the first scene among the multiple scenes supported by the multi-scene recommendation system, and the first tag is used to indicate that the first data to be tested is associated with the first scene.
[0216] The prediction unit 222 is used to obtain a first prediction result of the first scenario according to the first recommendation request using the multi-scenario prediction model deployed in the multi-scenario recommendation system, wherein the multi-scenario prediction model is used to perform different data processing on unpopular scenarios and popular scenarios of the same application or the same business to obtain prediction results associated with different scenarios.
[0217] The recommendation unit 223 is configured to perform recommendation processing according to the first prediction result to obtain a first recommendation result for the first scenario.
[0218] It should be understood that the multi-scenario recommendation system 220 of the present application can be implemented by a central processing unit (CPU), or by an application-specific integrated circuit (ASIC), or by a programmable logic device (PLD), wherein the PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC), or any combination thereof. When the recommendation method shown in Figures 2C and 2B is implemented by software, the multi-scenario recommendation system 220 and its various modules can also be software modules.
[0219] As a possible implementation, when the multi-scenario recommendation system 220 is implemented by a software functional unit, the prediction unit 222 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the prediction unit 222 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0220] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0221] As a possible implementation, when the multi-scenario recommendation system 220 is implemented by a hardware functional unit, the prediction unit 222 may include at least one computing device, such as a server. Alternatively, the prediction unit 222 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0222] The multiple computing devices included in the prediction unit 222 can be distributed in the same region or in different regions. The multiple computing devices included in the prediction unit 222 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the prediction unit 222 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0223] It should be noted that, in actual applications, the acquisition unit 221 can be used to execute any step in the recommendation method, the prediction unit 222 can be used to execute any step in the recommendation method, and the recommendation unit 223 can be used to execute any step in the recommendation method. The steps that the acquisition unit 221, the prediction unit 222 and the recommendation unit 223 are responsible for implementing can be specified as needed. The full functions of the recommendation device are realized by respectively implementing different steps in the recommendation method through the acquisition unit 221, the prediction unit 222 and the recommendation unit 223.
[0224] Referring to Figure 7, Figure 7 is a schematic diagram of the structure of a computing device provided by this application. Computing device 300 may be the data query system described above. Furthermore, computing device 300 includes a processor 301, a storage unit 302, a storage medium 303, and a communication interface 304. The processor 301, storage unit 302, storage medium 303, and communication interface 304 communicate via a bus 305. Processor 301 may invoke program code stored in storage unit 302 to perform the following operations:
[0225] Obtaining a first recommendation request, wherein the first recommendation request includes first test data and a first tag, the first test data being data generated by a first scenario among multiple scenarios supported by the multi-scenario recommendation system, and the first tag being used to indicate that the first test data is associated with the first scenario;
[0226] Obtaining, according to the first recommendation request, a first prediction result for the first scenario using a multi-scenario prediction model deployed in the multi-scenario recommendation system, wherein the multi-scenario prediction model is configured to perform different data processing on unpopular scenarios and popular scenarios of the same application or the same business to obtain prediction results associated with different scenarios;
[0227] Recommendation processing is performed according to the first prediction result to obtain a first recommendation result for the first scenario.
[0228] The processor 301 is composed of multiple general-purpose processors, such as CPUs. The hardware chip is an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC), or any combination thereof. The processor 301 executes various types of digital storage instructions, such as software or firmware programs stored in the storage unit 302, which enables the computing device 300 to provide a wide variety of services.
[0229] In a specific implementation, as an embodiment, the processor 301 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG. 7 .
[0230] In a specific implementation, as an embodiment, computing device 300 also includes multiple processors, such as processor 301 and processor 306 shown in FIG7 . Processor 301 and processor 306 can be homogeneous or heterogeneous. When processor 301 and processor 306 are homogeneous, processor 301 and processor 306 can both be general-purpose processors, such as CPUs. When processor 301 and processor 306 are heterogeneous, processor 301 can be a general-purpose processor, and processor 306 can be a data processing unit (DPU) or a graphics processing unit (GPU), etc.
[0231] Each of these processors can be a single-CPU or a multi-CPU. A processor herein refers to one or more devices, circuits, and / or processor cores for processing data (eg, computer program instructions).
[0232] The storage unit 302 is used to store program code and is controlled by the processor 301 to execute the processing steps of the training method or recommendation method in any of the embodiments of Figures 1 to 5 above. The program code includes one or more software units. The one or more software units are the acquisition unit 221, prediction unit 222, and recommendation unit 223 in the embodiment of Figure 6. Specifically, the acquisition unit 221 can be used to implement steps S201, S204 and their optional steps in the embodiment of Figure 2C, the prediction unit 222 can be used to implement S202, S205 and their optional steps in the embodiment of Figure 2C, and the recommendation unit 223 can be used to implement steps S203 and S206 in the embodiment of Figure 2C.
[0233] The storage unit 302 includes a read-only memory and a random access memory, and provides instructions and data to the processor 301. The storage unit 302 also includes a non-volatile random access memory. The storage unit 302 is a volatile memory or a non-volatile memory, or includes both volatile and non-volatile memories. Among them, the non-volatile memory is a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory is a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are used, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronized dynamic random access memory (SLDRAM), and direct RAM bus RAM (DR RAM). A hard disk, a universal serial bus (USB), a flash memory, a secure digital memory card (SD card), a memory stick, etc., and a hard disk can be a hard disk drive (HDD), a solid state drive (SSD), a mechanical hard disk (HDD), etc., which is not specifically limited in this application.
[0234] The storage medium 303 is a carrier for storing data, such as a hard disk, a universal serial bus (USB), a flash memory, a secure digital memory card (SD card), a memory stick, etc. The hard disk can be a hard disk drive (HDD), a solid state disk (SSD), a mechanical hard disk (HDD), etc., and this application does not make specific limitations.
[0235] The communication interface 304 is a wired interface (such as an Ethernet interface), an internal interface (such as a high-speed serial computer expansion bus (Peripheral Component Interconnect express, PCIe) bus interface), a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other servers or units.
[0236] Bus 305 is a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a unified bus (UBus or UB), a Compute Express Link (CXL), or a Cache Coherent Interconnect for Accelerators (CCIX). Bus 305 is divided into an address bus, a data bus, and a control bus.
[0237] In addition to the data bus, the bus 305 also includes a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus 305 in the figure.
[0238] It should be understood that the computing device 300 according to the present application may correspond to the multi-scenario recommendation system 220 in the present application, and may correspond to executing the corresponding subjects in Figures 2C and 2B of the present application according to the present invention, and the above-mentioned and other operations and / or functions of each module in the multi-scenario recommendation system 220 are respectively for implementing the corresponding processes of each method in Figures 2C and 2B. For the sake of brevity, they will not be repeated here.
[0239] It should be noted that FIG7 is only one possible implementation of the present application. In actual applications, the computing device 300 may also include more or fewer components, which is not limited here. For matters not shown or described in this application, please refer to the relevant descriptions of the embodiments of FIG1 to FIG6 above, and will not be repeated here.
[0240] The present application also provides a computing device cluster, which may be the business management system described above, and includes at least one computing device 300. The storage unit 302 in one or more computing devices 300 in the computing device cluster may store the same or different instructions for executing the business management method.
[0241] The present application also provides a computer program product containing instructions. The computer program product may be software or a program product containing instructions that can be executed on a computing device or stored in any available medium. When the computer program product is executed on at least one computing device, the at least one computing device executes the service management method.
[0242] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the service management method.
[0243] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. A computer program product includes multiple computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions according to the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0244] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent repairs or replacements within the technical scope disclosed in the present invention, and such repairs or replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A recommendation method, characterized in that: The method is performed by a multi-scenario recommendation system, and the method includes: Obtaining a first recommendation request, wherein the first recommendation request includes first test data and a first tag, the first test data being data generated by a first scenario among multiple scenarios supported by the multi-scenario recommendation system, and the first tag being used to indicate that the first test data is associated with the first scenario; Obtaining, according to the first recommendation request, a first prediction result for the first scenario using a multi-scenario prediction model deployed in the multi-scenario recommendation system, wherein the multi-scenario prediction model is configured to perform different data processing on unpopular scenarios and popular scenarios of the same application or the same business to obtain prediction results associated with different scenarios; Recommendation processing is performed according to the first prediction result to obtain a first recommendation result for the first scenario.
2. The method according to claim 1, characterized in that The topological structure of the multi-scenario prediction model includes a common sub-network, a first dedicated sub-network, and a second dedicated sub-network. The common sub-network can perform data transmission with the first dedicated sub-network and the second dedicated sub-network.
3. The method according to claim 2, characterized in that The topological structure of the multi-scenario prediction model further includes a universal sub-network, and data transmission can be performed between the universal sub-network and the common sub-network.
4. The method according to claim 3, characterized in that The common subnetwork and the general subnetwork are used to perform data processing on the second recommendation request to obtain a second prediction result, wherein the second recommendation request includes second test data and a second tag, the second test data is data generated by the second scene in the multiple scenes supported by the multi-scene recommendation system, and the second tag is used to indicate that the second test data is associated with the second scene; the second prediction result is used to generate a second recommendation result.
5. The method according to any one of claims 2 to 4, characterized in that The first prediction result is obtained by processing the first recommendation request through the common sub-network and the first exclusive sub-network.
6. The method according to any one of claims 2 to 5, characterized in that The common subnetwork includes a first common network layer and a second common network layer, the first exclusive subnetwork includes a first exclusive network layer and a second exclusive network layer, the first exclusive network layer is used to receive data output by the first common network layer, the second exclusive network layer is used to receive data output by the second common network layer, the number of layers of the second common network layer is greater than the number of layers of the first common network layer, and the number of layers of the second exclusive network layer is greater than the number of layers of the first exclusive network layer.
7. The method according to any one of claims 2 to 6, characterized in that The first dedicated network includes a characteristic sub-network, a merged sub-network, and a tower sub-network, wherein data transmission can be performed between the characteristic sub-network and the common sub-network, data transmission can be performed between the characteristic sub-network and the merged sub-network, data transmission can be performed between the merged sub-network and the common sub-network, and data transmission can be performed between the merged sub-network and the tower sub-network.
8. The method according to claim 7, characterized in that The merging sub-network includes a switch, and the switch is used to determine the amount of data output from the common sub-network to be received.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: When the multi-scenario recommendation system needs to add a third scenario, a third dedicated sub-network is added to the multi-scenario prediction model, wherein data transmission can be performed between the third dedicated sub-network and the common sub-network; or When the multi-scenario recommendation system needs to reduce the first scenario, the first exclusive sub-network is deleted from the multi-scenario prediction model.
10. A recommendation device, characterized in that: The device comprises: an acquiring unit, configured to acquire a first recommendation request, wherein the first recommendation request includes first test data and a first tag, the first test data being data generated by a first scenario among multiple scenarios supported by the multi-scenario recommendation system, and the first tag being used to indicate that the first test data is associated with the first scenario; a prediction unit, configured to obtain, according to the first recommendation request, a first prediction result for the first scenario using a multi-scenario prediction model deployed in the multi-scenario recommendation system, wherein the multi-scenario prediction model is configured to perform different data processing on unpopular scenarios and popular scenarios of the same application or the same business to obtain prediction results associated with different scenarios; A recommendation unit is configured to perform recommendation processing according to the first prediction result to obtain a first recommendation result for the first scenario.
11. A computing device, characterized in that The method comprises a processor and a memory, wherein the memory stores instructions, and the processor executes the instructions to implement the method according to any one of claims 1 to 9.
12. A computing cluster, characterized in that: The method comprises a plurality of computing devices, wherein the computing devices include a processor and a memory, and the processor executes the instructions to implement the method according to any one of claims 1 to 9.
13. A readable storage medium, characterized in that: The method comprises instructions, which, when executed by a computing device, can implement the method according to any one of claims 1 to 9.