Parameter splicing-based large model end-cloud collaborative computing method and system
By optimizing the recommendation model through parameter concatenation technology, the problems of excessive parameters, high computational cost, and resource-constrained deployment in recommendation systems are solved, enabling efficient and real-time personalized recommendations.
Patent Information
- Application Number
- CN202411120313.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-08-15
Smart Images

Figure CN119048198B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of recommendation systems, and in particular relates to a method and system for edge-cloud collaborative computing based on parameter splicing of large and small models. Background Technology
[0002] In the field of recommender systems, accurately identifying and meeting user needs is crucial for achieving user satisfaction and business value. With the rapid development of information technology and artificial intelligence, recommender systems have become an indispensable component of e-commerce, online video, social networks, and other fields. Traditional recommender algorithms, such as collaborative filtering and content-based recommendation, have achieved some success in practical applications. However, with the explosive growth of data volume and the diversification of user needs, these traditional methods face numerous challenges, including but not limited to problems such as excessive parameters, high training costs, and difficulty in capturing dynamically changing user preferences.
[0003] In recent years, the application of deep learning technology in recommender systems has attracted widespread attention. By leveraging the powerful representational capabilities of deep neural networks, researchers are attempting to solve complex nonlinear problems in recommender systems, achieving more personalized and accurate recommendations. For example, sequence-based recommender systems utilize deep learning models to capture temporal relationships within user behavior sequences to better predict users' next actions. However, deep learning models often contain a large number of parameters, which not only increases the computational cost of model training and inference but may also lead to overfitting, limiting their deployment and application on resource-constrained devices.
[0004] To address these issues, some research has explored techniques such as model pruning and ensemble learning to improve the efficiency and accuracy of recommendation systems by reducing the number of parameters in the model or combining the predictions of multiple models. Model pruning reduces model size and computational complexity by removing less important parameters or connections, while ensemble learning improves recommendation accuracy by integrating the predictions of multiple models. Although these methods alleviate some of the problems associated with applying deep learning models in recommendation systems, they each have their limitations. Model pruning may sacrifice model performance, while ensemble learning increases the inference cost of the model, especially in recommendation scenarios with high real-time requirements.
[0005] Furthermore, with increasing awareness of privacy protection and the development of edge computing technology, deploying recommendation models on edge devices to achieve personalized recommendations on the device side has become a new research direction. This can not only reduce data transmission latency and costs and improve user experience, but also help protect user data privacy. However, edge devices typically have limited computing and storage resources, which places higher demands on the size and computational efficiency of recommendation models.
[0006] It is evident that the shortcomings of existing technologies are:
[0007] (1) Too many parameters and high computational cost: Deep learning models often contain a large number of parameters, which leads to very high computational costs for model training and inference. Especially in the scenario of recommendation system with a large amount of data, this high computational cost limits the application scope of the model.
[0008] (2) Difficulty in capturing dynamic changes in user preferences: Traditional recommendation algorithms and some deep learning models have difficulty in effectively capturing dynamic changes in user preferences over time, resulting in recommendation results that cannot accurately reflect the user's current needs.
[0009] (3) Model pruning may impair performance: Although model pruning techniques can reduce computational costs by reducing the number of parameters, this method may impair model performance, especially when removing parameters that have a significant impact on prediction results.
[0010] (4) Ensemble learning increases inference cost: Ensemble learning improves accuracy by integrating the prediction results of multiple models, but this significantly increases the inference cost of the model, which is not feasible, especially in application scenarios that require fast response.
[0011] (5) Difficult to deploy on resource-constrained edge devices: With the rise of edge computing, recommendation systems need to be able to run on resource-constrained edge devices, but existing deep learning models are often difficult to deploy due to their high model size and computational complexity.
[0012] In summary, the field of recommendation systems urgently needs a new solution that can fully utilize the powerful capabilities of deep learning while addressing issues such as excessive parameters, high computational costs, difficulty in adapting to dynamically changing needs, and deployment on edge devices. Summary of the Invention
[0013] The purpose of this invention is to address the problems existing in the prior art and provide a method and system for edge-cloud collaborative computing based on parameter splicing of large and small models. The method of this invention improves the performance of recommendation systems through parameter splicing technology, aiming to solve the performance problems caused by insufficient parameter training in existing recommendation systems. This invention optimizes the recommendation quality of recommendation models by evaluating and fusing the parameters of multiple recommendation models, without increasing additional inference costs. This invention aims to optimize deep learning models through innovative parameter processing techniques to adapt to the needs of recommendation models in different application scenarios.
[0014] To achieve the above-mentioned objectives, the present invention specifically adopts the following technical solution:
[0015] In a first aspect, the present invention provides a cloud-edge collaborative computing method based on a large-scale model using parameter splicing, for making personalized product recommendations to users, including the following steps:
[0016] S1. In parameter concatenation, the cloud side initializes the parameters of M recommendation models. The initialized M recommendation models are pre-trained on the user behavior dataset, and the cloud side obtains M pre-trained recommendation models. The user behavior dataset consists of user behavior data and corresponding labels. Each user behavior data includes user ID, product ID and user's historical click sequence.
[0017] S2. In parameter value evaluation, the cloud side trains M pre-trained recommendation models on the user behavior dataset. The cloud side fuses the parameter matrix of the trained recommendation model with its respective value matrix to obtain the parameters of the fused spliced model. The parameter fusion adopts either hard fusion or soft fusion.
[0018] When training each pre-trained recommendation model, the cloud side fuses the local parameter value matrix obtained from local value evaluation with the global parameter value obtained from global value evaluation to form the value matrix of each trained recommendation model.
[0019] S3. In inference, the cloud side uses the parameters of the splicing model after parameter fusion in S2 as the parameters of the trained splicing model. The cloud side sends the trained splicing model to the edge side. The edge side inputs the user behavior data to be detected into the trained splicing model, and the trained splicing model outputs the probability of interaction between user ID and product ID.
[0020] Based on the above scheme, each step can be implemented in the following preferred manner.
[0021] As a preferred embodiment of the first aspect mentioned above, the calculation methods for the local parameter value matrix and the global parameter value obtained from the parameter value assessment in step S2 are as follows:
[0022] S21. The cloud side subtracts each value in the parameter matrix of each recommendation model from the values in the parameter matrices of the other recommendation models at the same position, obtaining (M-1) parameter difference matrices. The cloud side then processes each of the obtained parameter difference matrices using a transformation function for parameters with differences, resulting in (M-1) local value evaluation factors. These (M-1) local value evaluation factors are then calculated using the following formula to obtain the local parameter value matrix for each recommendation model:
[0023]
[0024] Among them, V A-LocalV represents the local parameter value matrix of the A-th recommendation model; m and n represent the number of rows and columns of the recommendation model parameter matrix, respectively; A-L [i,j] represents the value of the local value evaluation factor of the Ath recommendation model in the i-th row and j-th column; V k′-L [i,j] represents the value of the local value evaluation factor of the k′-th recommendation model in the i-th row and j-th column; k and k′ both represent the index of the recommendation model; M represents the number of recommendation models; f L W represents the transformation function when there are differences between the parameters. A [i,j] and W k [i,j] represent the parameter values in the i-th row and j-th column of the parameter matrix of the A-th recommendation model and the k-th recommendation model, respectively;
[0025] S22. The cloud side calculates the model parameter entropy for each recommendation model's parameter matrix. It then subtracts the entropy of each recommendation model from the entropy of the other recommendation models, obtaining (M-1) entropy differences. These entropy differences are then processed using a global parameter matrix transformation function to obtain (M-1) global value evaluation factors. Finally, the global parameter value for each recommendation model is calculated using the following formula:
[0026]
[0027] Among them, V A-Global V represents the global parameter value of the A-th recommendation model; A-G [i,j] represents the value of the global value evaluation factor of the A-th recommendation model in the i-th row and j-th column; V k′-G [i,j] represents the value of the global value evaluation factor of the k′-th recommendation model in the i-th row and j-th column; V A-G f represents the global value evaluation factor for the A-th recommendation model; G E(W) represents the transformation function of the global parameter matrix. A ) and E(W k ) represent the model parameter information entropy of the A-th recommendation model and the k-th recommendation model, respectively.
[0028] As a preferred embodiment of the first aspect above, the specific calculation method of the model parameter information entropy is as follows: The cloud side takes the maximum value in the parameter matrix of each recommendation model as the upper bound of the parameter value, and the minimum value in the parameter matrix of each recommendation model as the lower bound of the parameter value. The range formed by the lower bound and the upper bound of the parameter value is evenly divided into a preset number of parameter value intervals. The number of parameter values in the parameter matrix of the recommendation model that fall in each parameter value interval is counted and a parameter distribution histogram is constructed. A parameter probability distribution function is generated from the parameter distribution histogram. The parameter probability distribution function is used as the probability distribution in the information entropy to obtain the model parameter information entropy.
[0029] As a preferred embodiment of the first aspect mentioned above, the method for fusing the local parameter value matrix and the global parameter value to obtain the value matrix is as follows:
[0030]
[0031] Among them, V k′ V represents the value matrix of the k′-th recommendation model; k′-Global V represents the global parameter value of the k′-th recommendation model; k′-Local Let represent the local parameter value matrix of the k′-th recommendation model.
[0032] As a preferred option in the first aspect mentioned above, the specific method for obtaining the parameters of the spliced model after parameter fusion using a hard fusion approach is as follows:
[0033]
[0034] Among them, V k′ [i,j]∈{0,1} represents the value of the value matrix of the k′-th recommendation model in the i-th row and j-th column; W k′ [i,j] represents the value of the parameter matrix of the k′-th recommendation model in the i-th row and j-th column; W[i,j] represents the parameter value of the concatenated model after parameter fusion in the i-th row and j-th column.
[0035] As a preferred embodiment of the first aspect mentioned above, the specific method for obtaining the parameters of the spliced model after parameter fusion using a soft fusion approach is as follows:
[0036]
[0037] Where, 0≤V k′ [i,j]≤1 represents the value of the value matrix of the k′-th recommendation model in the i-th row and j-th column; W k′ [i,j] represents the value of the parameter matrix of the k′-th recommendation model in the i-th row and j-th column; W[i,j] represents the parameter value of the concatenated model after parameter fusion in the i-th row and j-th column.
[0038] As a preferred embodiment of the first aspect above, the transformation function when the parameters have differences is implemented by one or two fully connected layers.
[0039] As a preferred embodiment of the first aspect above, the transformation function of the global parameter matrix is implemented by one or two fully connected layers.
[0040] Secondly, the present invention provides a large-scale model edge-cloud collaborative computing system based on parameter splicing, characterized in that it includes an edge device and a cloud device, and the edge device and the cloud device are connected for communication, for implementing a large-scale model edge-cloud collaborative computing method based on parameter splicing as described in any of the solutions in the first aspect above.
[0041] As a preferred embodiment of the second aspect above, the end-side device includes a computer, and the cloud-side device includes a server.
[0042] Compared with the prior art, the present invention has the following advantages:
[0043] (1) The method of this invention emphasizes real-time responsiveness, that is, enhancing the model without introducing additional resources. This problem is of great significance in the field of recommender systems, but it has been neglected by many researchers. Compared with the prior art, this invention is the first to address this problem.
[0044] (2) The method of this invention designs a general recommendation parameter concatenation method, which includes two key steps: parameter value evaluation and parameter fusion. This method can be applied to small models, large models, and dynamic models in recommendation systems.
[0045] (3) Although some parameters in the model are not very important in model pruning, pruning can still reduce the model's performance. Compared with model pruning, the method of this invention does not lead to a decrease in model performance.
[0046] (4) Ensemble learning typically increases the cost of inference significantly, which is unacceptable in the field of recommendation systems with extremely high real-time requirements. The method of this invention does not significantly increase the cost of inference. Attached Figure Description
[0047] Figure 1 This is a flowchart of the steps of the method of the present invention;
[0048] Figure 2 This is a schematic diagram of parameter value assessment and parameter fusion in the method of the present invention; wherein, (a) is a schematic diagram of parameter value assessment; and (b) is a schematic diagram of parameter fusion.
[0049] Figure 3The diagram shows a comparison between the method of the present invention and existing methods; wherein, (a) is a schematic diagram when the parameters are not sufficiently trained; (b) is a schematic diagram of model pruning; (c) is a schematic diagram of output integration; and (d) is a schematic diagram of the method of the present invention. Detailed Implementation
[0050] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in the various embodiments of the present invention can be combined accordingly without mutual conflict.
[0051] In view of the shortcomings mentioned above, the technical problem to be solved by the present invention is as follows:
[0052] (1) Reduce computational cost: Propose a new model structure or parameter processing method to significantly reduce the computational cost of the recommendation system while maintaining or improving the predictive performance of the model.
[0053] (2) Enhance the model’s ability to capture dynamic changes in user preferences: Design recommendation algorithms that can effectively capture and adapt to dynamic changes in user preferences in order to improve the accuracy of recommendations and user satisfaction.
[0054] (3) Optimize model pruning strategy: Develop an efficient model pruning method to minimize the negative impact on model performance and reduce the computational cost of the model.
[0055] (4) Reduce the inference cost of ensemble learning: Propose a new ensemble learning strategy or model fusion technique to improve recommendation accuracy without significantly increasing the inference cost.
[0056] (5) Model deployment adapted to resource-constrained environments: Design a lightweight recommendation model or optimize an existing model to enable it to run efficiently on resource-constrained edge devices, while taking into account the needs of data privacy and security.
[0057] In existing technologies, X = {u, v, s} is used to represent user behavior data, and Y = {y} is used to represent the corresponding labels. The user behavior dataset, consisting of user behavior data and labels, can be represented as D = {X, Y}. Here, u, v, and s represent the user ID, product ID, and the user's historical click sequence, respectively. Roughly speaking, if the loss obtained by training a recommendation model on the user behavior dataset D is L, then the recommendation model parameters can be obtained through the optimization function argmin L. Therefore, a basic training of the recommendation model can be performed using the user behavior dataset D and the recommendation model parameters.
[0058] During the training of recommendation models, when training M ≥ 2 recommendation models based on the user behavior dataset, for simplicity, we first set the number of training recommendation models M to 2, and denote the outputs of the two recommendation models trained from the same user behavior data as y. A and y B Then, the recommendation model training can be formalized as follows:
[0059] y = α·y A +β·y B
[0060] Where α and β both represent hyperparameters that determine the output fusion weights; y represents the output.
[0061] Meanwhile, during the training process of the recommendation model, recommendation model pruning can be used to accelerate the training efficiency and enhance the results. In recommendation model pruning, the pruning algorithm can be formalized as follows:
[0062] W prune =W before ⊙M mask
[0063] Among them, W prun W represents the parameters of the recommendation model after pruning. before M represents the original parameters of the recommendation model. mask It is a mask matrix; ⊙ represents pointwise multiplication.
[0064] Unlike existing technologies, this invention is primarily applicable to fields such as e-commerce, social media, and content recommendation, where real-time response and data privacy protection are particularly important for recommendation systems. By deploying a model optimized through parameter concatenation on the device side, both user data privacy and fast, efficient recommendation services can be achieved.
[0065] like Figure 1As shown, in a preferred embodiment of the present invention, the above-mentioned cloud-edge collaborative computing method based on parameter splicing of the size model includes the following steps S1 to S3, which are used to make personalized recommendations of products to users. The specific implementation process of each step will be described in detail below.
[0066] S1. In parameter concatenation, the cloud side initializes the parameters of M recommendation models. The initialized M recommendation models are pre-trained on the user behavior dataset, and the cloud side obtains M pre-trained recommendation models. The user behavior dataset consists of user behavior data and corresponding labels. Each user behavior data includes user ID, product ID and the user's historical click sequence.
[0067] S2. In parameter value evaluation, the cloud side trains M pre-trained recommendation models on the user behavior dataset. The cloud side fuses the parameter matrix of the trained recommendation model with its respective value matrix to obtain the parameters of the fused spliced model. The parameter fusion adopts either hard fusion or soft fusion.
[0068] When training each pre-trained recommendation model, the cloud side fuses the local parameter value matrix obtained from local value evaluation with the global parameter value obtained from global value evaluation to form the value matrix of each trained recommendation model.
[0069] It should be noted that multiple recommendation models have already been obtained through step S1. Based on parameter fusion, the parameter value of the M recommendation models needs to be evaluated to further enhance their capabilities. Therefore, a value evaluation of the parameters contained in the M pre-trained recommendation models is required, namely, local parameter evaluation and global parameter evaluation.
[0070] In this embodiment, as Figure 2 As shown in (a), the calculation methods for the local parameter value matrix and the global parameter value obtained from the parameter value assessment are as follows:
[0071] S21. The cloud side subtracts each value in the parameter matrix of each recommendation model from the values in the parameter matrices of the other recommendation models at the same position, obtaining (M-1) parameter difference matrices. The cloud side then processes each of the obtained parameter difference matrices using a transformation function for parameters with differences, resulting in (M-1) local value evaluation factors. These (M-1) local value evaluation factors are then calculated using the following formula to obtain the local parameter value matrix for each recommendation model:
[0072]
[0073] Among them, V A-LocalV represents the local parameter value matrix of the A-th recommendation model; m and n represent the number of rows and columns of the recommendation model parameter matrix, respectively; A-L [i,j] represents the value of the local value evaluation factor of the Ath recommendation model in the i-th row and j-th column; V k′-L [i,j] represents the value of the local value evaluation factor of the k′-th recommendation model in the i-th row and j-th column; k and k′ both represent the index of the recommendation model; M represents the number of recommendation models; f L W represents the transformation function when there are differences between the parameters. A [i,j] and W k [i,j] represent the parameter values in the i-th row and j-th column of the parameter matrix of the A-th recommendation model and the k-th recommendation model, respectively; the A-th recommendation model and the k-th recommendation model are recommendation models with different indices, i.e., k≠A.
[0074] It should be noted that in step S21, as Figure 2 As shown in section (a1) of (a), the local value of each location parameter is determined by comparing the differences in parameters at the same location, thus obtaining a local parameter value matrix. Furthermore, the calculation of each parameter value is a key focus in the local value assessment. The differences in parameters of multiple recommendation models obtained from the same user behavior data are crucial for determining the parameter values at specific locations. Therefore, a parameter difference matrix is first calculated from the parameter matrix of each recommendation model, and then processed by a transformation function for parameters with differences to obtain the local value assessment factor for each recommendation model.
[0075] It should be noted that in step S21, the conversion function when there is a difference in parameters is implemented by one or two fully connected layers, or by a mathematical function, and there is no limitation in this invention.
[0076] S22. The cloud side calculates the model parameter entropy for each recommendation model's parameter matrix. It then subtracts the entropy of each recommendation model from the entropy of the other recommendation models, obtaining (M-1) entropy differences. These entropy differences are then processed using a global parameter matrix transformation function to obtain (M-1) global value evaluation factors. Finally, the global parameter value for each recommendation model is calculated using the following formula:
[0077]
[0078] Among them, V A-Global V represents the global parameter value of the A-th recommendation model; A-G [i,j] represents the value of the global value evaluation factor of the A-th recommendation model in the i-th row and j-th column; V k′-G[i,j] represents the value of the global value evaluation factor of the k′-th recommendation model in the i-th row and j-th column; V A-G f represents the global value evaluation factor for the A-th recommendation model; G E(W) represents the transformation function of the global parameter matrix. A ) and E(W k ) represent the model parameter information entropy of the A-th recommendation model and the k-th recommendation model, respectively.
[0079] It should be noted that in step S22, as Figure 2 As shown in part (a2) of (a), the specific calculation method of the model parameter information entropy is as follows: The cloud side takes the maximum value in the parameter matrix of each recommendation model as the upper bound of the parameter value and the minimum value in the parameter matrix of each recommendation model as the lower bound of the parameter value. The range formed by the lower bound and the upper bound of the parameter value is evenly divided into a preset number of parameter value intervals. The number of parameter values in the parameter matrix of the recommendation model that are in each parameter value interval is counted and a parameter distribution histogram is formed. The parameter probability distribution function is generated from the parameter distribution histogram. The parameter probability distribution function is used as the probability distribution in the information entropy to obtain the model parameter information entropy.
[0080] Specifically, in the global value assessment of this embodiment, it is necessary to focus on a global perspective to determine which recommendation model should receive more trust during the parameter fusion process, and what its weight should be. Therefore, this invention further designs a global-level value assessment. The importance of the recommendation model is measured from a global perspective using the magnitude of the model parameter information entropy. To calculate the model parameter information entropy, the probability p of the parameter falling within a distribution needs to be obtained. Therefore, this invention first defines this probability distribution, that is, dividing the range between the minimum and maximum values of the recommendation model parameters into k equal parts. Then, it can be determined which part interval the parameter value in the recommendation model parameter matrix belongs to. Subsequently, based on the number of parameters c in each part interval, i Calculate the entropy of the model parameters.
[0081] It should be noted that in step S22, the transformation function of the global parameter matrix is implemented by one or two fully connected layers, or by a mathematical function, and there is no limitation in this invention.
[0082] It should be noted that, in this invention, as Figure 2 As shown in part (a3) of (a), the method of fusing the local parameter value matrix and the global parameter value to obtain the value matrix is as follows:
[0083]
[0084] Among them, V k′V represents the value matrix of the k′-th recommendation model; k′-Global V represents the global parameter value of the k′-th recommendation model; k′-Local Let represent the local parameter value matrix of the k′-th recommendation model.
[0085] It should be noted that in step S2 of the present invention, as Figure 2 As shown in (b), after evaluating the parameter values, parameter value fusion is required, which can be divided into two types: hard fusion and soft fusion. Hard fusion directly compares the values of the parameters and selects the parameter with the higher value to replace the parameter with the lower value. Soft fusion, on the other hand, uses the parameter values as weights and combines the parameters of multiple recommendation models to retain useful information to the greatest extent possible.
[0086] like Figure 2 As shown in part (b1) of (b), the specific method for obtaining the parameters of the spliced model after parameter fusion using hard fusion is as follows:
[0087]
[0088] Among them, V k′ [i,j]∈{0,1} represents the value of the value matrix of the k′-th recommendation model in the i-th row and j-th column; W k′ [i,j] represents the value of the parameter matrix of the k′-th recommendation model in the i-th row and j-th column; W[i,j] represents the parameter value of the concatenated model after parameter fusion in the i-th row and j-th column.
[0089] like Figure 2 As shown in part (b2) of (b), the specific method for obtaining the parameters of the spliced model after parameter fusion using the soft fusion approach is as follows:
[0090]
[0091] Where, 0≤V k′ [i,j]≤1 represents the value of the value matrix of the k′-th recommendation model in the i-th row and j-th column; W k′ [i,j] represents the value of the parameter matrix of the k′-th recommendation model in the i-th row and j-th column; W[i,j] represents the parameter value of the concatenated model after parameter fusion in the i-th row and j-th column.
[0092] S3. In inference, the cloud side uses the parameters of the splicing model after parameter fusion in S2 as the parameters of the trained splicing model. The cloud side sends the trained splicing model to the edge side. The edge side inputs the user behavior data to be detected into the trained splicing model, and the trained splicing model outputs the probability of interaction between user ID and product ID.
[0093] The present invention will now demonstrate the application effect of the parameter-joining-based large-scale model edge-cloud collaborative computing method described in S1 to S3 of the above embodiments on a specific dataset through a specific example, so as to facilitate understanding of the essence of the present invention.
[0094] Example
[0095] This invention compares the performance of the splicing model. This embodiment uses three datasets from a personalized product recommendation scenario for evaluation: Amazon-CDs (recommended record data from Amazon), Douban-Book (recommended book data from Douban), and Douban-Music (recommended music data from Douban).
[0096] When evaluating the models, this invention compares them with the following baseline models: the static recommendation model DIN, which utilizes an attention mechanism to improve recommendation performance; the dynamic recommendation framework DUET, which consists of a parameter generation model and a main model, dynamically generating the parameters of the main model based on samples during inference; and methods for handling the PTP problem, such as model pruning and output ensemble, which respectively solve the PTP problem in the recommendation system by pruning unimportant connections and integrating inference results.
[0097] Based on the baseline model described above, this invention compares the performance of parameters generated using a static model and a dynamic framework with other models / methods. Since the dynamic framework generates parameters based on samples for the main model, parameter concatenation occurs only after the dynamic framework has generated the parameters. Here, both the main model of the dynamic framework and the pre-trained static model use the same model to ensure consistency in model structure, thereby facilitating parameter concatenation.
[0098] This embodiment uses the following evaluation metrics to measure the performance of the splicing model: NDCG (Normalized Discounted Cumulative Gain): measures the quality and ranking accuracy of the recommendation list.
[0099] This embodiment tested the proposed parameter-stitched large-scale model-end-cloud collaborative computing method on the aforementioned dataset. As shown in Table 1, the method of this invention exhibits superior performance compared to other baseline models across all datasets and metrics. Furthermore, this performance improvement is more significant than that achieved through parameter stitching between static models. Here, both the pre-trained static model and the main model in the pre-trained dynamic framework utilize DIN. This performance enhancement indicates that the method of this invention is also applicable between static model parameters and dynamic model frameworks, demonstrating the universality of parameter splitting. It is evident that the method of this invention can significantly improve model performance without increasing inference costs, whether in static models or dynamic recommendation frameworks. This demonstrates the significant advantages of the method of this invention in improving model efficiency and effectiveness.
[0100] Table 1. Test results of the method of the present invention compared with other baseline models.
[0101] Table 2. Comparison of the characteristics of the method of the present invention with other baseline models
[0102]
[0103]
[0104] As shown in Table 2, Table 2 describes a comparison of the features of the method of the present invention and existing methods. The method of the present invention is the only one that can enhance the output and model without increasing resource consumption.
[0105] Table 3. Performance comparison of the method of the present invention with other baseline models (1)
[0106] NDCG@5 cost <![CDATA[Model M A > 0.3779 1 <![CDATA[Model M B > 0.3763 1 Pruning 0.3480 0.9 integrated 0.3658 2 This invention 0.3805 1
[0107] As shown in Table 3, compared with model pruning and other benchmark methods, the method of the present invention can achieve performance exceeding that of benchmark methods when splicing static recommendation models without increasing any additional time cost.
[0108] Table 4. Performance comparison of the method of the present invention with other baseline models (2)
[0109] NDCG@5 cost Basic Model 0.3779 1 Dynamic framework 0.3760 1 Pruning 0.3150 0.9 integrated 0.3728 2 This invention 0.3941 1
[0110] As shown in Table 4, compared with model pruning and other benchmark methods, the method of the present invention can achieve performance exceeding that of benchmark methods without increasing any additional time cost when splicing based on dynamic recommendation models.
[0111] Compared with the closest prior art, the advantages of the present invention are:
[0112] 1. Performance Improvement: This invention effectively improves the performance of the recommendation model through parameter concatenation. Comparative experiments using evaluation metrics (such as AUC, NDCG, etc.) show that this invention significantly improves recommendation accuracy in both static and dynamic recommendation frameworks.
[0113] 2. No Increased Inference Cost: Compared to existing techniques such as model pruning and output ensemble methods, the method of this invention does not increase additional inference cost and is highly efficient. The concatenated model maintains the same structure and number of parameters as the original recommendation model, ensuring no additional inference cost is incurred. This is particularly important for recommendation systems that require real-time responses, as it improves model performance without sacrificing inference speed.
[0114] 3. Strong generalization ability: This invention is designed as a general recommendation parameter concatenation algorithm, not limited to specific types of recommendation models. It is applicable to both static and dynamic recommendation frameworks, and can even fuse parameters between these two types of models. This demonstrates its strong generalization ability and flexibility, and its universal applicability.
[0115] 4. Flexible Parameter Fusion Strategy: The parameter fusion proposed in this invention includes both hard fusion and soft fusion methods, allowing for the selection of the most suitable fusion strategy based on different application scenarios and requirements. This flexibility enables the invention to retain more useful information while effectively eliminating unimportant or harmful parameters.
[0116] 5. Solving the PTP Problem: This invention effectively solves the Poorly Trained Parameters (PTP) problem by optimizing parameters in the model that have little or no negative impact on output accuracy through parameter fusion technology. This is difficult to achieve with traditional techniques, especially without increasing inference costs.
[0117] 6. Wide Applicability: Because this invention is not limited to a specific model, its application scope is very broad. Whether it's product recommendation on e-commerce platforms, content recommendation on social media, or news push notifications, this invention can play a significant role. Comprehensive experiments across multiple datasets demonstrate the effectiveness and versatility of the method, showcasing its ability to enhance recommendation models.
[0118] 7. Real-time responsiveness: Emphasizes enhancing the model without introducing additional resources to meet the real-time response requirements of recommendation systems.
[0119] like Figure 3 As shown, this embodiment compares the method of the present invention with the differences between existing methods. Among them, Figure 3(a) describes the parameter problem due to insufficient training. Model M, when trained under different initialization conditions... A and model M B It mainly consists of well-trained parameters, but also contains some invalid and harmful parameters. During inference, M is selected. A and M B One of the better-performing applications. Figure 3 (b) describes model pruning, which removes model M A Inefficient parameters in the model are used to obtain model M′. A . Figure 3 (c) describes output integration, which integrates model M during inference. A and model M B The reasoning results are used to obtain the final reasoning result. Figure 3 (d) describes the parameter concatenation method of the present invention, which evaluates the value of each parameter of each model from both global and local perspectives. These parameters are then concatenated into model M. C And use model M during inference. C .
[0120] In summary, this invention, through its unique parameter splicing strategy (Unified Parameter Splicing, or Uniting for short), not only demonstrates significant advantages in improving the performance of recommendation systems, but also surpasses existing technologies in terms of inference cost control, model generalization ability, and flexibility of parameter fusion strategies, showcasing its broad application prospects and practical value.
[0121] It should also be noted that the parameter-stitched large-scale model edge-cloud collaborative computing method in the above embodiments can essentially be executed by a computer program or module. Therefore, similarly, based on the same inventive concept, another preferred embodiment of the present invention also provides a parameter-stitched large-scale model edge-cloud collaborative computing system corresponding to the parameter-stitched large-scale model edge-cloud collaborative computing method provided in the above embodiments. This system includes an edge device and a cloud device, with a communication connection between the edge device and the cloud device, used to implement the parameter-stitched large-scale model edge-cloud collaborative computing method as described in the above embodiments. The edge device includes a computer. The cloud device includes a server.
[0122] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.
Claims
1. A method for edge-cloud collaborative computing based on a large-scale model using parameter splicing, characterized in that, The process for providing personalized product recommendations to users includes the following steps: S1. In parameter concatenation, the cloud side initializes the parameters of M recommendation models. The initialized M recommendation models are pre-trained on the user behavior dataset, and the cloud side obtains M pre-trained recommendation models. The user behavior dataset consists of user behavior data and corresponding labels. Each user behavior data includes user ID, product ID and user's historical click sequence. S2. In parameter value evaluation, the cloud side trains M pre-trained recommendation models on the user behavior dataset. The cloud side fuses the parameter matrix of the trained recommendation model with its respective value matrix to obtain the parameters of the fused spliced model. The parameter fusion adopts either hard fusion or soft fusion. When training each pre-trained recommendation model, the cloud side fuses the local parameter value matrix obtained from local value evaluation with the global parameter value obtained from global value evaluation to form the value matrix of each trained recommendation model. S3. In inference, the cloud side uses the parameters of the splicing model after parameter fusion in S2 as the parameters of the trained splicing model. The cloud side sends the trained splicing model to the edge side. The edge side inputs the user behavior data to be detected into the trained splicing model, and the trained splicing model outputs the probability of interaction between user ID and product ID.
2. The method for collaborative computing between edge and cloud based on a large-scale model using parameter splicing as described in claim 1, characterized in that, In step S2, the calculation methods for the local parameter value matrix and the global parameter value obtained from the parameter value assessment are as follows: S21. The cloud side subtracts each value in the parameter matrix of each recommendation model from the values in the parameter matrices of the other recommendation models at the same position, obtaining (M-1) parameter difference matrices. The cloud side then processes each of the obtained parameter difference matrices using a transformation function for parameters with differences, resulting in (M-1) local value evaluation factors. These (M-1) local value evaluation factors are then calculated using the following formula to obtain the local parameter value matrix for each recommendation model: Among them, V A-Local V represents the local parameter value matrix of the A-th recommendation model; m and n represent the number of rows and columns of the recommendation model parameter matrix, respectively; A-L [i,j] represents the value of the local value evaluation factor of the Ath recommendation model in the i-th row and j-th column; V k′-L [i,j] represents the value of the local value evaluation factor of the k′-th recommendation model in the i-th row and j-th column; k and k′ both represent the index of the recommendation model; M represents the number of recommendation models; f L W represents the transformation function when there are differences between the parameters. A [i,j] and W k [i,j] represent the parameter values in the i-th row and j-th column of the parameter matrix of the A-th recommendation model and the k-th recommendation model, respectively; S22. The cloud side calculates the model parameter entropy for each recommendation model's parameter matrix. It then subtracts the entropy of each recommendation model from the entropy of the other recommendation models, obtaining (M-1) entropy differences. These entropy differences are then processed using a global parameter matrix transformation function to obtain (M-1) global value evaluation factors. Finally, the global parameter value for each recommendation model is calculated using the following formula: Among them, V A-Global V represents the global parameter value of the A-th recommendation model; A-G [i,j] represents the value of the global value evaluation factor of the A-th recommendation model in the i-th row and j-th column; V k′-G [i,j] represents the value of the global value evaluation factor of the k′-th recommendation model in the i-th row and j-th column; V A-G f represents the global value evaluation factor for the A-th recommendation model; G E(W) represents the transformation function of the global parameter matrix. A ) and E(W k ) represent the model parameter information entropy of the A-th recommendation model and the k-th recommendation model, respectively.
3. The method for collaborative computing between edge and cloud based on a large-scale model using parameter splicing as described in claim 2, characterized in that, The specific calculation method of the model parameter information entropy is as follows: The cloud side takes the maximum value in the parameter matrix of each recommendation model as the upper bound of the parameter value and the minimum value in the parameter matrix of each recommendation model as the lower bound of the parameter value. The range formed by the lower bound and the upper bound of the parameter value is evenly divided into a preset number of parameter value intervals. The number of parameter values in the parameter matrix of the recommendation model that are in each parameter value interval is counted and a parameter distribution histogram is constructed. The parameter probability distribution function is generated from the parameter distribution histogram. The parameter probability distribution function is used as the probability distribution in the information entropy to obtain the model parameter information entropy.
4. The method for collaborative computing between edge and cloud based on a large-scale model using parameter splicing as described in claim 2, characterized in that, The method for fusing the local parameter value matrix and the global parameter value to obtain the value matrix is as follows: Among them, V k′ V represents the value matrix of the k′-th recommendation model; k′-Global V represents the global parameter value of the k′-th recommendation model; k′-Local Let represent the local parameter value matrix of the k′-th recommendation model.
5. The method for collaborative computing between edge and cloud based on a large-scale model using parameter splicing as described in claim 4, characterized in that, The specific method for obtaining the parameters of the spliced model after parameter fusion using hard fusion is as follows: Among them, V k′ [i,j]∈{0,1} represents the value of the value matrix of the k′-th recommendation model in the i-th row and j-th column; W k′ [i,j] represents the value of the parameter matrix of the k′-th recommendation model in the i-th row and j-th column; W[i,j] represents the parameter value of the concatenated model after parameter fusion in the i-th row and j-th column.
6. The method for collaborative computing between edge and cloud based on a large-scale model using parameter splicing as described in claim 4, characterized in that, The specific method for obtaining the parameters of the spliced model after parameter fusion using soft fusion is as follows: Where, 0≤V k′ [i,j]≤1 represents the value of the value matrix of the k′-th recommendation model in the i-th row and j-th column; W k′ [i,j] represents the value of the parameter matrix of the k′-th recommendation model in the i-th row and j-th column; W[i,j] represents the parameter value of the concatenated model after parameter fusion in the i-th row and j-th column.
7. The method for collaborative computing between edge and cloud based on a large-scale model using parameter splicing as described in claim 2, characterized in that, The conversion function when there are differences in the parameters is implemented by one or two fully connected layers.
8. The method for collaborative computing between edge and cloud based on a large-scale model using parameter splicing as described in claim 2, characterized in that, The transformation function of the global parameter matrix is implemented by one or two fully connected layers.
9. A cloud-edge collaborative computing system based on a large-scale model using parameter splicing, characterized in that, It includes end-side devices and cloud-side devices, and the communication connection between the end-side devices and cloud-side devices is used to implement the end-cloud collaborative computing method based on parameter splicing of a large model as described in any one of claims 1 to 8.
10. The edge-cloud collaborative computing system based on parameter splicing of a large-scale model as described in claim 9, characterized in that, The endpoint device includes a computer, and the cloud-side device includes a server.
Citation Information
Patent Citations
End-cloud cooperation system, distributed processing cluster and mobile end device
CN114884832A
Method and apparatus for defending against adversarial attacks against federated learning systems
CN115943382A