Deep learning model training method and device based on multi-scene learning architecture
Through the combination of large language model and deep learning model, the target sample is selected using similarity to update parameters, which solves the problem of poor performance of deep learning models in different information recommendation scenarios, and improves the semantic understanding and resource utilization efficiency of the model.
Patent Information
- Application Number
- CN202510543699.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
In different information recommendation scenarios, it is difficult for the existing technology to effectively utilize the semantic differences in user information, resulting in poor performance of deep learning models in multiple scenarios and high resource consumption and operation and maintenance costs.
The large language model processed text information and scene information, combined with the deep learning model, and used similarity to select target samples for parameter updates, improving the model's semantic understanding of coding information.
The performance of deep learning models in multiple information recommendation scenarios is improved, the semantic understanding of coded information and similar sample alignment capabilities are enhanced, and resource consumption and operation and maintenance costs are reduced.
Smart Images

Figure CN120450045A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification belong to the field of computer technology, and in particular, relate to a training method and device for a deep learning model based on a multi-scenario learning architecture. Background Art
[0002] In different information recommendation scenarios, it is often necessary to decide whether to recommend relevant information to users based on their user information. Given that the user information required in different information recommendation scenarios may vary significantly, it is usually possible to train deep learning models specifically for performing recommendation decision-making tasks for different information recommendation scenarios. However, as the number of information recommendation scenarios increases, the number of deep learning models will also increase significantly, posing a huge challenge to resource consumption and operation and maintenance costs. This challenge has led to the rise of deep learning models based on the multi-scenario learning (MSL) architecture. Deep learning models based on MSL can perform information recommendation decision-making tasks in multiple different information recommendation scenarios. Summary of the Invention
[0003] The purpose of the present invention is to provide a method and device for training a deep learning model based on a multi-scenario learning architecture.
[0004] In a first aspect, a training method for a deep learning model based on a multi-scenario learning architecture is provided, the method comprising: obtaining a training data set, the training data set comprising N training samples involving K information recommendation scenarios, the text information and encoding information in the training samples being used to describe user information of the same user in the information recommendation scenarios corresponding to the training samples; processing the text information in the N training samples and the scene information of the K information recommendation scenarios through a large language model to obtain text representations of the N training samples, and processing the encoding information in the N training samples through a deep learning model to obtain encoding representations of the N training samples; for any i-th training sample among the N training samples, selecting T first target samples from the remaining training samples based on a first similarity between the text representation of the i-th training sample and the text representations of the remaining training samples; and performing parameter updating based on T second similarities between the encoding representation of the i-th training sample and the text representations of the T first target samples, the parameter updating at least comprising updating the parameters of the deep learning model.
[0005] In a second aspect, a training device for a deep learning model based on a multi-scenario learning architecture is provided, the device comprising: a data acquisition unit, configured to obtain a training data set, the training data set comprising N training samples involving K information recommendation scenarios, the text information and encoding information in the training samples being used to describe user information of the same user in the information recommendation scenarios corresponding to the training samples; a model calling unit, configured to process the text information in the N training samples and the scene information of the K information recommendation scenarios through a large language model to obtain text representations of the N training samples, and to process the encoding information in the N training samples through a deep learning model to obtain encoding representations of the N training samples; a sample alignment unit, configured to, for any i-th training sample among the N training samples, select T first target samples from the remaining training samples based on a first similarity between the text representation of the i-th training sample and the text representations of the remaining training samples; a parameter updating unit, configured to perform parameter updating based on T second similarities between the encoding representation of the i-th training sample and the text representations of the T first target samples, the parameter updating at least comprising updating the parameters of the deep learning model.
[0006] In a third aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0007] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computing device, the computing device executes the method described in the first aspect.
[0008] In the technical solutions provided in the embodiments of this specification:
[0009] Relying on the large language model to more accurately understand the semantics of text information and scene information, and using the large language model to assist in training the deep learning model, it is possible to use more semantically accurate text information and scene information to semantically enhance the encoded information, better align similar training samples from multiple different information recommendation scenarios, and transfer the large language model's more accurate semantic understanding ability of text information and scene information to the deep learning model based on the multi-scenario learning architecture. The deep learning model can more accurately understand the semantics of the encoded information involving multiple information recommendation scenarios, that is, learn the hidden relationship between the encoded information from different information recommendation scenarios, which is conducive to improving the performance of the deep learning model. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0011] Figure 1 This is a system architecture diagram of the technical solution provided in the embodiments of this specification;
[0012] Figure 2 A flowchart of a training method for a deep learning model based on a multi-scenario learning architecture is provided as an example;
[0013] Figure 3 A schematic diagram of the structure of a training device for a deep learning model based on a multi-scenario learning architecture is provided as an example. DETAILED DESCRIPTION
[0014] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of this specification.
[0015] Multi-scenario learning aims to utilize multiple training samples across multiple information recommendation scenarios to develop a unified deep learning model that can be used to execute information recommendation decision-making tasks across multiple scenarios. Typically, a single training sample can include the encoded information obtained by encoding a user's user information using a specific encoding strategy within the information recommendation scenario corresponding to the training sample, as well as the sample label corresponding to the encoded information. User information can include, but is not limited to, one or more of the following: user name, identification, age, gender, list of purchased items, list of favorite / favorite items, list of services clicked / browsed, list of content clicked / browsed, and list of friends, etc.
[0016] Because user information in different information recommendation scenarios may not contain exactly the same information items, and different encoding strategies may be used to encode user information in different information recommendation scenarios, the discovery and use of certain hidden information is severely hindered. For example, for user information U1 in information recommendation scenario A and user information U2 in information recommendation scenario B, the "purchased items list includes: basketball shoes" in user information U1, compared to the "clicked / viewed content list includes: NBA news" in user information U2, can indicate that the relevant users have a consistent interest in "basketball." However, the encoded information M1 used to describe user information U1 may use content encoding R1 to represent "basketball shoes," while the encoded information M2 used to describe user information U2 may use content encoding R2 to represent "NBA news." Content encodings R1 and R2 cannot directly represent the semantic connection between "basketball shoes" and "NBA news." When training deep learning models based on multi-scenario learning architectures using related technologies, it is often difficult to detect the correlations and differences between the encoded information. This results in poor performance of the trained deep learning models due to a lack of good semantic understanding, making it difficult to accurately execute information recommendation decisions.
[0017] In an embodiment of the present specification, a training method, apparatus, computing device, and computer-readable storage medium for a deep learning model based on a multi-scenario learning architecture are provided. First, a training data set is obtained, wherein the training data set includes N training samples involving K information recommendation scenarios, and the text information and encoding information in the training samples are used to describe the user information of the same user in the information recommendation scenario corresponding to the training sample; then, the text information in the N training samples and the scene information of the K information recommendation scenarios can be processed by a large language model to obtain text representations of the N training samples, and the encoding information in the N training samples can be processed by a deep learning model to obtain encoding representations of the N training samples; then, for any i-th training sample in the N training samples, T first target samples are selected from the remaining training samples based on a first similarity between the text representation of the i-th training sample and the text representations of the remaining training samples; finally, parameter updating is performed based on T second similarities between the encoding representation of the i-th training sample and the text representations of the T first target samples, wherein the parameter updating described herein at least includes updating the parameters of the deep learning model.
[0018] In this way, relying on the large language model to more accurately understand the semantics of text information and scene information, and using the large language model to assist in training the deep learning model, it is possible to use more semantically accurate text information and scene information to semantically enhance the encoded information, better align similar training samples from multiple different information recommendation scenarios, and transfer the large language model's more accurate semantic understanding ability of text information and scene information to the deep learning model based on the multi-scenario learning architecture. The deep learning model can more accurately understand the semantics of the encoded information involving multiple information recommendation scenarios, that is, learn the hidden relationship between the encoded information from different information recommendation scenarios, which is conducive to improving the performance of the deep learning model.
[0019] Figure 1 This is a system architecture diagram of the technical solution provided in the embodiments of this specification. Figure 1 As shown, the system architecture includes an exemplary deep learning model M based on the MSL architecture. The deep learning model M may include L1 shared network layers, and may also include output layers and several dedicated hidden layers corresponding to multiple information recommendation scenarios. For example, it may include an output layer and L2 dedicated hidden layers corresponding to information recommendation scenario A, and an output layer and L2 dedicated hidden layers corresponding to information recommendation scenario B. The system architecture may also include a large language model for assisting in the training of the deep learning model, and may also include a scenario feature extraction model for supporting comparative learning between the large language model and the deep learning model M.
[0020] The following combination Figure 1 The system architecture shown in the figure describes in detail the technical solutions provided in the embodiments of this specification.
[0021] Figure 2 This is a flowchart of an exemplary method for training a deep learning model based on a multi-scenario learning architecture. This method can be performed by any device, platform, equipment, or device cluster with computing / processing capabilities.
[0022] Reference Figure 2 As shown, the method may include but is not limited to part or all of the following steps S201 to S211.
[0023] First, in step S201, a training data set is obtained, which includes N training samples involving K information recommendation scenarios. The text information and encoding information in a single training sample are used to describe the user information of the same user in the information recommendation scenario corresponding to the training sample.
[0024] For example, the training data set may include K sub-data sets corresponding to K (K is an integer greater than 1) information recommendation scenarios. Any k-th sub-data set in the K sub-data sets corresponds to the k-th information recommendation scenario in the K information recommendation scenarios. A single sub-data set may include one or more training samples. The total number of training samples included in the K sub-data sets is N. For any i-th training sample in the N training samples, the i-th training sample may include text information text i and coded information id i In addition, the i-th training sample can also include the encoding information id i The corresponding sample label y i . Encoded information id i It may include multiple content codes corresponding to multiple data contents under multiple information items. i and coded information id i Used to describe the user information of the same user in the information recommendation scenario corresponding to the i-th training sample; text information text and encoding information id i The user information described in each description corresponds to the same user, and the user information described in each description may not be exactly the same.
[0025] For example, the user information U1 of a target user in the information recommendation scenario A may include "User name: Zhang San; ID-01898372; Age-19; Gender-Male; List of purchased items: basketball shoes, running shoes; List of clicked / browsed services: food, music, sports; User type: active user; Search information: basketball." According to the encoding strategy adopted by the information recommendation scenario A, the data content under some or all information items in the user information U1 can be encoded to obtain the encoded information id used to describe the user information U1. u1 For example, according to the encoding strategy adopted in the information recommendation scenario A, the data contents corresponding to the information items "identity identification", "age", "gender", "purchased goods list", "clicked / browsed service list", and "user type" in the user information U1 can be encoded in sequence to obtain the following example encoded information id u1:01898372, 19, 2, c1-c2, d1, d2, d3, cate1, in the above example encoding information: content code 01898372 is the identity identifier, content code 2 represents the gender "male", content codes c1 and c2 represent the products "basketball shoes" and "running shoes" respectively, content codes d1, d2 and d3 represent the services "food", "music" and "sports" respectively, and content code cate1 represents the user category to which user 1 belongs as an active user. The text information used to describe user information U1 needs to ensure that it can clearly and accurately describe part or all of the core information in user information U1, such as the text information used to describe user information U1. u1 It can be "Zhang San, 19 years old, male, has purchased basketball shoes and running shoes, and has clicked or browsed food, music, sports and other services." u1 The corresponding sample label y u1 The value can be 0 or 1. A value of 0 indicates that specific information (such as advertisements for a certain product or information / notifications of a certain category) can be recommended to the target user, and a value of 1 indicates that specific information cannot be recommended to the target user.
[0026] The K information recommendation scenarios described herein include, but are not limited to, at least two of the following types of recommendation scenarios: information flow recommendations when a user requests to access the service platform; related product recommendations when a user purchases or browses products through the service platform; data content recommendations based on user-provided search information; social relationship chain recommendations; and interest content recommendations intended to encourage users to visit the service platform. It will be understood that the aforementioned types of information recommendation scenarios are merely exemplary.
[0027] Step S203: Process the text information in the N training samples and the scene information of the K information recommendation scenes through the large language model to obtain the text representation of the N training samples, and process the encoding information in the N training samples through the deep learning model based on the multi-scene learning architecture to obtain the encoding representation of the N training samples.
[0028] In one possible implementation, for any k-th information recommendation scenario among K information recommendation scenarios, the scene description information of the k-th information recommendation scenario can be first converted into explicit feature information of the k-th information recommendation scenario; then, based on a number of training samples corresponding to each of the K information recommendation scenarios, a number of similar scenes similar to the k-th information recommendation scenario are determined, and the aforementioned number of training samples belong to N training samples; then, based on the explicit feature information of the number of similar scenes, the implicit feature information of the k-th information recommendation scenario is calculated; finally, based on the explicit feature information and implicit feature information of the k-th information recommendation scenario, the scene information of the k-th information recommendation scenario is determined.
[0029] The scene description information may include one or more static features such as the industry, service platform involved in the relevant information recommendation scene, and the category of the recommended information (e.g., advertisement, information, or product). For example, assuming that the scene description information given for the k-th information recommendation scene includes m static features, the m static features can be embedded to obtain m embedding vectors, and the m embedding vectors can be combined to obtain the explicit feature information ER of the k-th information recommendation scene. k .
[0030] For example, it is assumed here that in a training data set containing N training samples, the cumulative number of training samples corresponding to the k1th information recommendation scenario is n1, and the cumulative number of training samples corresponding to the k2th information recommendation scenario is n2. In addition, the n1 users involved in the n1 training samples corresponding to the k1th information recommendation scenario are recorded as the user set U k1 , the n2 users involved in the n2 training samples corresponding to the k2th information recommendation scenario are recorded as the user set U k2 , then the similarity between the k1th information recommendation scenario and the k2th information recommendation scenario can be calculated using the following formula 1:
[0031]
[0032] Among them, Sim(k1, k2) represents the similarity between the k1th information recommendation scenario and the k2th information recommendation scenario; u1 represents the user set U k1 Any user of u2; u2 represents any user belonging to the user set U k2 Any user of ; 1{u1≠u2} is an indicator function, indicating that user pairs u1 and u2 are not the same user; Characterize the set of information recommendation scenarios in which user u1 participates; Characterize the set of information access scenarios in which user u2 participates; Characterizes the activity of user u1, which can be Negative correlation, Represents the cumulative number of information recommendation scenarios in which user u1 participates; Characterizes the activity of user u2, which can be compared with Negative correlation, Represents the cumulative number of information recommendation scenarios in which user u2 participates; α is a hyperparameter used to avoid division by zero; Represents the cumulative number of the same information recommendation scenarios that users u and u2 participated in. and The setting can prevent the interaction between u1 and u2 (i.e., participating in the same information recommendation scenario) from dominating and introducing bias. Here, by emphasizing the more specific and more informative interactions of users with relatively low activity, a more balanced similarity measurement between different information recommendation scenarios is ensured.
[0033] By using the above example, we can calculate the similarity between the remaining K-1 information recommendation scenes and the k-th information recommendation scene. Then, we select G similar scenes from the remaining K-1 information recommendation scenes in descending order of similarity, and perform a predetermined operation (such as averaging) on the explicit feature information of the G similar scenes to obtain the implicit feature information IR of the k-th information recommendation scene. k , for ER k and IR k The scene information SR of the kth information recommendation scene can be obtained by splicing k .
[0034] In another possible implementation, only the explicit feature information of the information recommendation scene may be directly used as the scene information.
[0035] In one possible implementation, for any i-th training sample, the text information of the i-th training sample can be processed using the embedding layer of the large language model to obtain the text embedding feature of the i-th training sample. Use the scene feature extraction model to process the K scene information of the K information recommendation scenes to obtain the K scene representations of the K information recommendation scenes; use several hidden layers of the large language model to process the text embedding features of the i-th training sample And the scene representation of the target information recommendation scene corresponding to the i-th training sample Get the text representation of the i-th training sample Scene Representation The text embedding features used as the i-th training sample Alternatively, the text embedding feature of the i-th training sample can be And the scene information of the information recommendation scene corresponding to the i-th training sample is spliced, and the corresponding splicing results are processed by several hidden layers of the large language model to obtain the text representation of the i-th training sample
[0036] Through the scene feature extraction model, the scene information of the information recommendation scene is integrated into the scene representation as the scene prompt information. The obtained scene representation can dynamically identify and understand the complex relationship between different information recommendation scenes. The scene prompt information with richer information content enhances the ability of the large language model to accurately convey knowledge in multiple information recommendation scenes.
[0037] Referring to the foregoing, the deep learning model based on the MSL architecture may include L1 (L1 is an integer greater than 1) shared network layers, in addition to K output layers corresponding to each information recommendation scenario and L2 (L2 is an integer greater than 1) dedicated hidden layers. For any i-th training sample, prefix information may be set for the encoded information in the i-th training sample. The prefix information may, for example, be the scene identifier (assuming it is A) of the target information recommendation scenario (assuming it is information recommendation scenario A) corresponding to the i-th training sample; after the encoded information carrying the scene identifier A in the i-th training sample is output to the deep learning model based on the MSL architecture, the L1 shared network layers of the deep learning model first process the encoded information carrying the scene identifier A to obtain an intermediate result. Depending on the carried scene identifier A, the intermediate result will be output to the L2 dedicated hidden layers corresponding to the information recommendation scenario A. The L2 dedicated hidden layers corresponding to the information recommendation scenario A process the intermediate result and output the encoded representation of the i-th training sample. In other words, for any i-th training sample, the encoding representation of the i-th training sample is obtained by processing the encoding information in the i-th training sample and the scene identification of the target information recommendation scenario by multiple shared network layers in the deep learning model and several dedicated hidden layers corresponding to the target information recommendation scenario. The target information recommendation scenario is the information recommendation scenario corresponding to the i-th training sample.
[0038] Step S205 : For any i-th training sample among the N training samples, select T first target samples from the remaining training samples according to the first similarity between the text representation of the i-th training sample and the text representations of the remaining training samples.
[0039] The process of determining the T first target samples corresponding to the i-th training sample can be formally expressed as the following formula 2:
[0040]
[0041] Among them, T i1 Represent the first sample set corresponding to the i-th training sample; Characterize the text representation of the i-th training sample and the text representation of the jth training sample The first similarity between According to the order of the first similarity from large to small, select T first target samples from the remaining N-1 training samples and add them to T i1 .
[0042] Step S207 : For any i-th training sample among the N training samples, select T second target samples from the remaining training samples according to the fourth similarity between the encoded representation of the i-th training sample and the encoded representations of the remaining training samples.
[0043] The process of determining the T second target samples corresponding to the i-th training sample can be formally expressed as the following formula 3:
[0044]
[0045] Among them, T i2 Representing the second sample set corresponding to the i-th training sample; The encoding representation of the i-th training sample and the encoding representation of the jth training sample The fourth similarity between According to the descending order of the fourth similarity, select T second target samples from the remaining N-1 training samples and add them to T i2 .
[0046] Step S209 : performing parameter updating according to T second similarities between the encoded representation of the i-th training sample and the text representations of the T first target samples.
[0047] When the aforementioned step S207 is not performed, for any i-th training sample, the encoding representation of the i-th training sample can be calculated. N third similarities between the text representations of the N training samples, and T second similarities between the encoded representation of the i-th training sample and the text representations of the T first target samples are determined; then, a first loss is calculated based on the T second similarities and N third similarities corresponding to each of the N training samples, and parameter update is performed based on the first loss.
[0048] In a more specific example, the first loss function for calculating the first loss can be expressed as the following formula 4:
[0049]
[0050] in, Characterize the first loss; The encoding representation of the i-th training sample and the text representation of the jth training sample The third similarity between Represents the text representation of the t-th first target sample among the T first target samples corresponding to the i-th training sample, The encoding representation of the i-th training sample is and The second similarity between them; τ is a hyperparameter.
[0051] The significance of the process of calculating the first loss or the first loss function of the above formula 4 example is that for any i-th training sample, we try to find T first target samples similar to the i-th training sample through the text representation of each of N training samples, and minimize the encoding representation of the i-th training sample. The distance between the text representation of the T first target samples is maximized to maximize the encoding representation of the i-th training sample The distance between the text representations of the remaining NT training samples. If the text representations of any two training samples from two different information recommendation scenarios show similar user interests, that is, present the same or similar user information, by updating the parameters of the deep learning model and / or the parameters of the scene feature extraction model, the distance between the text representation of one training sample and the encoded representation of the other training sample can be shortened. The large language model and deep learning model can learn this knowledge, which is beneficial to improving the performance of the deep learning model.
[0052] Formula 4 used to calculate the first loss in the aforementioned example is merely exemplary, and the first loss may also be calculated by other variants based on Formula 4, for example, without setting the hyperparameter τ in the first loss function of the example in Formula 4.
[0053] When executing the aforementioned step S207, the aforementioned step S209 can specifically perform parameter updating based on the T second similarities between the encoded representation of the i-th training sample and the text representation of the T first target samples, and the T fifth similarities between the text representation of the i-th training sample and the encoded representation of the T first target samples.
[0054] In a more specific example, for any i-th training sample, the encoding representation of the i-th training sample can be calculated The first loss is calculated based on the N third similarities between the text representation of the i-th training sample and the text representation of the T first target samples, and the T second similarities and N third similarities corresponding to each of the N training samples. In addition, for any i-th training sample, the N sixth similarities between the text representation of the i-th training sample and the coding representation of the N training samples can be calculated, and the T fifth similarities between the text representation of the i-th training sample and the coding representation of the T second target samples can be determined. The second loss is calculated based on the T fifth similarities and N sixth similarities corresponding to each of the N training samples. Finally, the target loss is calculated based on the first loss and the second loss, and the parameter update is performed based on the target loss.
[0055] The process of calculating the first similarity can be referred to above. The process of calculating the second similarity will be described below as an example.
[0056] For example, the second loss function for calculating the second loss can be expressed as the following formula 5:
[0057]
[0058] in, Characterize the second loss; Characterize the text representation of the i-th training sample and the encoding representation of the jth training sample The sixth similarity between Characterizes the encoding representation of the t-th second target sample among the T second target samples corresponding to the i-th training sample, The text representation of the i-th training sample is and The fifth similarity between them; τ is a hyperparameter.
[0059] The significance of the process of calculating the second loss or the first loss function of the above formula 5 example is that for any i-th training sample, we try to find T second target samples similar to the i-th training sample through the encoding representation of each of the N training samples, and minimize the text representation of the i-th training sample. The distance between the encoding representation of the T second target samples is maximized to maximize the text representation of the i-th training sample The distance between the encoding representations of the remaining NT training samples. If the encoding representations of any two training samples from two different information recommendation scenarios show similar user interests, that is, present the same or similar user information, by updating the parameters of the deep learning model and / or the parameters of the scene feature extraction model, the distance between the text representation of one training sample and the encoding representation of the other training sample can be shortened. The large language model and deep learning model can learn this knowledge, which is beneficial to improving the performance of the deep learning model.
[0060] Formula 5 used to calculate the second loss in the aforementioned example is merely exemplary, and the second loss may also be calculated by other variants based on Formula 5, for example, without setting the hyperparameter τ in the second loss function of the example in Formula 5.
[0061] After obtaining the first loss and the second loss, the target loss function used to calculate the target loss can be expressed as the following formula 6:
[0062]
[0063] Among them, L alignment Characterize the target loss.
[0064] The formula 6 used to calculate the target loss in the above example is only exemplary. The target loss can also be calculated by other variations based on formula 6. For example, and The sum of is taken as the target loss.
[0065] During the parameter update process, the parameters of the deep learning model can be updated in the direction of decreasing loss value based on the corresponding loss function. In addition, the parameters of the scene feature extraction model can also be updated accordingly, so that the scene feature extraction model can process scene information more accurately and obtain a more accurate scene representation, thereby enhancing the large language model's understanding of the information recommendation scenario.
[0066] It can be understood that the aforementioned first loss, second loss, and target loss all belong to comparative losses.
[0067] Part or all of steps S203 through S209 above describe a single round of comparative learning using a large language model and / or a scene feature extraction model for a deep learning model based on the MSL architecture. In practice, multiple rounds of comparative learning can be performed by performing part or all of steps S203 through S209 multiple times.
[0068] After completing multiple rounds of comparative learning, the deep learning model that has undergone multiple rounds of comparative learning can be fine-tuned. More specifically, after performing some or all of the aforementioned steps S203 to S209 multiple times, step S211 can be performed next.
[0069] In step S211, the parameters of the deep learning model are updated using the encoding information and sample labels in the N training samples.
[0070] More specifically, for any i-th training sample among N training samples, prefix information can be set for the encoded information in the i-th training sample. The prefix information can be, for example, the scene identifier (assuming it is A) of the target information recommendation scene (assuming it is information recommendation scene A) corresponding to the i-th training sample; after the encoded information carrying the scene identifier A in the i-th training sample is input into the deep learning model based on the MSL architecture, the L1 shared network layers of the deep learning model first process the encoded information carrying the scene identifier A to obtain an intermediate result. Depending on the carried scene identifier A, the intermediate result will be output to the L2 dedicated hidden layers corresponding to the information recommendation scene A, and the L2 dedicated hidden layers and output layer corresponding to the information recommendation scene A will process the intermediate result. Finally, the output layer corresponding to the information recommendation scene A outputs the prediction result corresponding to the i-th training sample (denoted as P i );P iis the recommendation decision information corresponding to the encoding information in the i-th training sample, P i The value of can be 0 or 1; or, P i The value of can also be considered as the predicted probability in the interval [0, 1].
[0071] Finally, the loss value (denoted as L) can be calculated based on the predetermined loss function and the sample labels and output results corresponding to the N training samples. ce ), and update the parameters of the deep learning model in the direction of decreasing loss value according to the loss function.
[0072] For example, in step S211, the loss value may be calculated using the loss function shown in the following formula 7:
[0073]
[0074] Among them, y i Represents the sample label in the i-th training sample, p i Represents the prediction result corresponding to the i-th training sample.
[0075] In some embodiments, the loss function exemplified in Formula 7 above can be used to calculate the loss value corresponding to the k-th information recommendation scenario based on the sample labels and prediction results corresponding to the plurality of encoded information in the plurality of training samples corresponding to the k-th information recommendation scenario. Furthermore, based on the loss function and the loss value corresponding to the k-th information recommendation scenario, the plurality of dedicated hidden layers corresponding to the k-th information recommendation scenario in the deep learning model can be updated. During this process, the multiple shared network layers of the deep learning model and the dedicated hidden layers corresponding to other information recommendation scenarios are not updated.
[0076] By executing step S211 once or multiple times and completing one or more rounds of updating of the parameters of the deep learning model, the deep learning model that meets the convergence conditions can be migrated to the relevant information recommendation scenario to execute specific information recommendation decision-making tasks.
[0077] Based on the same concept as the aforementioned method embodiment, this specification embodiment also provides a training device 300 for a deep learning model based on a multi-scenario learning architecture. Figure 3As shown, the device 300 includes: a data acquisition unit 301, configured to obtain a training data set, wherein the training data set includes N training samples involving K information recommendation scenarios, and the text information and encoding information in the training samples are used to describe the user information of the same user in the information recommendation scenarios corresponding to the training samples; a model calling unit 303, configured to process the text information in the N training samples and the scene information of the K information recommendation scenarios through a large language model to obtain text representations of the N training samples, and process the encoding information in the N training samples through a deep learning model to obtain encoding representations of the N training samples; a sample alignment unit 305, configured to, for any i-th training sample in the N training samples, select T first target samples from the remaining training samples according to a first similarity between the text representation of the i-th training sample and the text representations of the remaining training samples; a parameter updating unit 307, configured to perform parameter updating according to T second similarities between the encoding representation of the i-th training sample and the text representations of the T first target samples, wherein the parameter updating at least includes updating the parameters of the deep learning model.
[0078] A computer-readable storage medium is also provided in an embodiment of this specification, on which a computer program / instruction is stored. When the computer program / instruction is executed in a computer, the computer is caused to execute a training method for a deep learning model based on a multi-scenario learning architecture as described in the aforementioned embodiments.
[0079] A computing device is also provided in an embodiment of this specification, including a memory and a processor, wherein the memory stores a computer program / instructions, and when the processor executes the computer program / instructions, it implements a training method for a deep learning model based on a multi-scenario learning architecture as described in the aforementioned embodiments.
[0080] It is understood that before or when using the technical solutions provided in the embodiments of this specification, the specific content, scope of use, and usage scenarios of the user information involved will be informed to the user in an appropriate manner in accordance with relevant laws and regulations, and the user's authorization will be obtained. For example, when obtaining user information from relevant information sources and constructing training samples, the user will be clearly prompted through corresponding prompt information. Thus, the user can independently choose whether to provide user information to software or hardware such as electronic devices, applications, servers, or storage media that perform the operations of the technical solutions of this disclosure based on the prompt information.
[0081] As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, and the prompt message can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide user information to the electronic device or a specific service. It can be understood that the above notification and user authorization process are only illustrative and do not constitute a limitation on the implementation method of the present disclosure. Other methods that meet relevant laws and regulations can also be applied to the implementation method of the present disclosure.
[0082] Furthermore, user information can be desensitized, masking one or more of the user's name, age, and gender, using specific rules. For example, instead of including the actual user name in the text message, the user's identity identifier assigned to the user in the relevant information recommendation scenario can be used instead. It is even possible to not include the user name in the text message of the training sample, and not include the identity identifier in the encoded information.
[0083] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0084] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.
[0085] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, this application does not exclude that with the future development of computer technology, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, an in-vehicle human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0086] Although one or more embodiments of this specification provide method operation steps as described in the embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not clearly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any particular order.
[0087] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing one or more of the present specifications, the functions of each module can be implemented in the same or multiple software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0088] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0089] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0090] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0091] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0092] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0093] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0094] Those skilled in the art will appreciate that one or more embodiments of this specification may be provided as a method, system, or computer program product. Thus, one or more embodiments of this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0096] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between the various embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. In particular, since the system embodiments are generally similar to the method embodiments, the description is relatively simple. For relevant parts, reference can be made to the description of the method embodiments. Throughout this specification, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and integrate the different embodiments or examples, and features of different embodiments or examples, described in this specification, unless they conflict with each other.
[0097] The foregoing description is merely an example of one or more embodiments of this specification and is not intended to limit the one or more embodiments of this specification. Those skilled in the art will appreciate that various modifications and variations of one or more embodiments of this specification are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this specification are intended to be included within the scope of the claims.
Claims
1. A training method for a deep learning model based on a multi-scenario learning architecture, the method comprising: Obtaining a training data set, which includes N training samples involving K information recommendation scenarios, where the text information and encoding information in the training samples are used to describe user information of the same user in the information recommendation scenarios corresponding to the training samples; Processing the text information in the N training samples and the scene information of the K information recommendation scenes through a large language model to obtain text representations of the N training samples, and processing the encoding information in the N training samples through a deep learning model to obtain encoding representations of the N training samples; For any i-th training sample among the N training samples, selecting T first target samples from the remaining training samples according to a first similarity between the text representation of the i-th training sample and the text representations of the remaining training samples; Parameter updating is performed according to T second similarities between the encoded representation of the i-th training sample and the text representation of the T first target samples, where the parameter updating at least includes updating parameters of the deep learning model.
2. The method according to claim 1, wherein the processing of the text information in the N training samples and the scene information of the K information recommendation scenes by a large language model to obtain the text representation of the N training samples comprises: Processing the text information of the i-th training sample using the embedding layer of the large language model to obtain text embedding features; Processing K scene information of the K information recommendation scenes using a scene feature extraction model to obtain K scene representations of the K information recommendation scenes; The text embedding features and the scene representation of the target information recommendation scene corresponding to the i-th training sample are processed by utilizing several hidden layers of the large language model to obtain a text representation of the i-th training sample.
3. The method according to claim 2, wherein the parameter updating further comprises updating the parameters of the scene feature extraction model.
4. The method according to claim 1, wherein performing parameter updating based on T second similarities between the encoded representation of the i-th training sample and the text representation of the T first target samples comprises: Calculating N third similarities between the encoded representation of the i-th training sample and the text representations of the N training samples; A first loss is calculated according to the T second similarities and the N third similarities corresponding to each of the N training samples, and parameter updating is performed according to the first loss.
5. The method according to claim 1, further comprising: selecting T second target samples from the remaining training samples according to a fourth similarity between the encoding representation of the i-th training sample and the encoding representations of the remaining training samples; Wherein, performing parameter updating according to the T second similarities between the encoded representation of the i-th training sample and the text representation of the T first target samples includes: performing parameter updating according to the T second similarities between the encoded representation of the i-th training sample and the text representation of the T first target samples, and T fifth similarities between the text representation of the i-th training sample and the encoded representation of the T second target samples.
6. The method according to claim 5, wherein the performing parameter updating based on the T second similarities between the encoded representation of the i-th training sample and the textual representations of the T first target samples, and the T fifth similarities between the textual representation of the i-th training sample and the encoded representations of the T second target samples, comprises: Calculating N third similarities between the encoded representation of the i-th training sample and the text representations of the N training samples; Calculating a first loss according to the T second similarities and the N third similarities corresponding to each of the N training samples; Calculating N sixth similarities between the text representation of the i-th training sample and the encoded representations of the N training samples; Calculating a second loss according to the T fifth similarities and the N sixth similarities corresponding to each of the N training samples; A target loss is calculated based on the first loss and the second loss, and parameter updating is performed based on the target loss.
7. The method according to claim 1, wherein the deep learning model comprises a plurality of shared network layers and a plurality of dedicated hidden layers corresponding to each of the K information recommendation scenarios; The encoded representation of the i-th training sample is obtained by processing the encoded information in the i-th training sample and the scene identifier of the target information recommendation scenario by the multiple shared network layers and several dedicated hidden layers corresponding to the target information recommendation scenario, and the target information recommendation scenario is the information recommendation scenario corresponding to the i-th training sample.
8. The method according to claim 1, further comprising: For any k-th information recommendation scenario among the K information recommendation scenarios, converting the scenario description information of the k-th information recommendation scenario into explicit feature information of the k-th information recommendation scenario; Determining, based on a plurality of training samples corresponding to each of the K information recommendation scenarios, a plurality of similar scenarios similar to the k-th information recommendation scenario, wherein the plurality of training samples belong to the N training samples; Calculating implicit feature information of the k-th information recommendation scene based on explicit feature information of the plurality of similar scenes; The scene information of the k-th information recommendation scene is determined according to the explicit feature information and the implicit feature information of the k-th information recommendation scene.
9. The method according to any one of claims 1 to 8, further comprising: Utilize the encoding information and sample labels in the N training samples to update the parameters of the deep learning model.
10. According to the method described in any one of claims 1 to 8, the K information recommendation scenarios include at least two of the following types of recommendation scenarios: information flow recommendation when a user requests to access a service platform, related product recommendation when a user purchases / browses products through the service platform, data content recommendation based on search information provided by the user, social relationship chain recommendation, and interest content recommendation for the purpose of awakening the user to visit the service platform.
11. A training device for a deep learning model based on a multi-scenario learning architecture, comprising: A data acquisition unit is configured to obtain a training data set, wherein the training data set includes N training samples involving K information recommendation scenarios, and the text information and encoding information in the training samples are used to describe user information of the same user in the information recommendation scenario corresponding to the training samples; a model calling unit configured to process the text information in the N training samples and the scene information of the K information recommendation scenes through a large language model to obtain text representations of the N training samples, and to process the encoding information in the N training samples through a deep learning model to obtain encoding representations of the N training samples; a sample alignment unit configured to, for any i-th training sample among the N training samples, select T first target samples from the remaining training samples according to a first similarity between a text representation of the i-th training sample and text representations of the remaining training samples; A parameter updating unit is configured to perform parameter updating according to T second similarities between the encoded representation of the i-th training sample and the text representation of the T first target samples, wherein the parameter updating at least includes updating the parameters of the deep learning model.
12. A computing device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed in a computing device, the computing device executes the method according to any one of claims 1 to 10.