Method for accelerating training of recommendation model on edge node

By calculating the expected transmission cost and scheduling the embedded samples based on the load balancing mechanism, the problem of excessive embedded transmission cost on edge work nodes is solved, and the acceleration and efficiency improvement of recommended model training is achieved.

CN119623582AActive Publication Date: 2025-03-14UNIV OF SCI & TECH OF CHINA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411802374.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-14
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

When training recommended models on edge working nodes in the prior art, the embedded transmission cost is too high, resulting in a decline in training performance.

Method used

By calculating the expected transmission cost of each input embedded sample to each edge work node, and determining scheduling decisions based on the load balancing mechanism, the scheduling of embedded samples is optimized and the transmission cost is reduced.

Benefits of technology

The acceleration of training recommended models on edge nodes is achieved, minimizing the cost of embedding transmission and improving training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623582A_ABST
    Figure CN119623582A_ABST
Patent Text Reader

Abstract

The invention discloses a method for accelerating the training of a recommendation model on edge nodes, and the method comprises the steps: firstly, for each input embedded sample, calculating the expected transmission cost of each embedded deployment dispatched to each edge working node based on each edge working node, and obtaining the total expected transmission cost; and then, determining a scheduling decision of each edge working node according to the total expected transmission cost obtained by calculation, so as to obtain an embedded sample required for training a recommendation model based on the scheduling decision. According to the method, a scheduling decision solving scheme capable of balancing the solving quality and resource occupation can be provided aiming at the challenges that the computing resources of the edge working nodes are limited and a plurality of tasks compete for resources. Moreover, experimental results show that compared with the prior art, the implementation scheme provided by the invention can achieve 1.74 times of training acceleration at most, and the embedded transmission cost can be reduced by 36.76%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent technology, and in particular to a method for accelerating the training of a recommendation model on an edge node. Background Art

[0002] As an artificial intelligence algorithm, the recommendation system is good at processing high-dimensional and sparse IoT data, thereby providing personalized recommendation services for IoT applications and enhancing the ability to retrieve information from IoT data. However, uploading IoT data to a remote cloud server for recommendation model training will bring about problems such as privacy leakage and network congestion. Therefore, training the recommendation model on the edge working node near the data source has become a natural alternative.

[0003] As a key component of the recommendation system, the recommendation model is usually composed of an embedding layer and a multi-layer perceptron (MLP). The embedding layer is used to convert high-dimensional sparse inputs into low-dimensional dense real-valued vectors (embeddings) and store them in a large lookup table (i.e., embedding table). The corresponding embedding table occupies a huge memory space (each embedding occupies several KB, which can reach tens of GB to TB in total). The space occupied by the MLP layer is usually smaller (several MB to hundreds of MB).

[0004] Since the size of the embedding table exceeds the memory size of the resource-limited edge worker nodes, training recommendation models on edge workers is often implemented based on a hybrid parallel and parameter server (PS) architecture. In the corresponding PS architecture, a globally shared embedding is maintained in a parameter server with a large memory, and edge workers cache part of the embedding table in their local memory to speed up embedding lookup operations. A copy of the MLP layer is stored on the graphics processing unit (GPU) of each edge worker node, and the AllReduce algorithm is used for gradient synchronization during training.

[0005] However, in production workloads, a single training sample may involve up to thousands of embeddings. Despite the use of hybrid parallelization and PS architecture, existing recommendation model training methods are still plagued by the embedding access bottleneck. This is because each training iteration requires embedding transmission between the worker node and the parameter server. Experiments show that the time to transmit embeddings often takes up more than 90% of the model training time, that is, the embedding transmission cost is huge.

[0006] At present, in order to reduce the embedding transmission cost, the input samples assigned to each working node are scheduled. That is, when the training process is for the current iteration, the input batch samples of the next iteration can be managed to reduce the embedding transmission cost by scheduling each sample to the appropriate working node.

[0007] However, existing research efforts that attempt to reduce the embedding transmission cost are mainly aimed at training recommendation models in cloud data centers, which is only applicable to multiple worker nodes in cloud data centers that can use high-speed connections at the same rate as the parameter server, but does not take into account the network heterogeneity and resource-constrained characteristics of edge worker nodes.

[0008] In summary, the existing solutions to reduce the embedding transmission cost cannot solve the problem of excessive embedding transmission cost in edge working nodes, and will further lead to the inability to ensure that each scheduling decision is completed within the training iteration during the online training of the recommendation model, resulting in a decrease in the corresponding training performance. Summary of the invention

[0009] The purpose of the present invention is to provide a method for accelerating the training of a recommendation model on an edge node, so as to solve the problem of excessively high embedded transmission cost of edge working nodes existing in the prior art.

[0010] The objective of the present invention is achieved through the following technical solutions:

[0011] A method for accelerating training of a recommendation model on an edge node, comprising:

[0012] For each input embedded sample, the expected transmission cost of each embedded deployment dispatched to each edge working node is calculated based on each edge working node, and after completing the calculation for the input embedded sample and each edge working node, the total expected transmission cost is obtained, and the total expected transmission cost includes the expected transmission cost of each embedded sample to each edge working node;

[0013] Determine a scheduling decision for each edge working node according to the calculated total expected transmission cost, wherein the scheduling decision is determined based on a load balancing mechanism;

[0014] Each edge working node obtains the embedded samples required for training the recommendation model based on the scheduling decision.

[0015] The processing process of calculating the expected transmission cost of each embedded deployment and scheduling to each edge working node includes: if the embedding corresponding to the current embedding ID is not on the current edge working node, then the expected transmission cost of scheduling the embedded sample where the current embedding ID is located to the current edge working node is increased; if the embedding corresponding to the current embedding ID exists on other edge working nodes, then the expected transmission cost of scheduling the embedded sample where the current embedding ID is located to the current edge working node is increased.

[0016] The process of increasing the expected transmission cost of scheduling the embedded sample where the current embedded ID is located to the current edge working node includes:

[0017] The cost of transmitting the embedding from the edge working node where the embedding corresponding to the current embedding ID is located to the parameter server is added to the expected transmission cost of scheduling the embedding sample where the current embedding ID is located to the current edge working node.

[0018] The process of determining the scheduling decision of each edge working node includes:

[0019] Based on the expected transmission costs of each embedded sample to each edge working node respectively included in the total expected transmission cost, obtain the minimum two expected transmission costs of each embedded sample to each edge working node, and calculate the difference between the minimum two;

[0020] According to the difference values, a predetermined number of embedded samples are obtained in sequence from large to small;

[0021] The predetermined number of embedded samples are solved using the optimal solution algorithm, and the embedded samples of the predetermined data are scheduled to different edge working nodes according to the solution results; for the remaining other embedded samples, they are scheduled to a corresponding edge working node according to the current load status of each edge working node.

[0022] The process of sequentially acquiring a predetermined number of embedded samples includes:

[0023] Based on the set solution ratio parameter, the number of embedded samples with the set solution ratio parameter is selected from the total input embedded samples as the predetermined number of embedded samples, and the solution ratio parameter is set according to the expected solution quality and resource consumption, and the value α of the solution ratio parameter is 1≥α≥0.

[0024] The solution ratio parameter may take the following values: 1, 0.5, 0.25, 0.125 or 0.

[0025] The process of dispatching each edge working node to a corresponding edge working node according to its current load condition includes:

[0026] For the remaining embedded samples, each embedded sample is scheduled to the edge working node with the smallest expected transmission cost among the edge working nodes corresponding to the current embedded sample. If the edge working node has reached the maximum load value, the edge working node with the second smallest expected transmission cost is selected until the scheduling of all remaining embedded samples is completed.

[0027] The method further includes:

[0028] When training the current iteration, it is necessary to input batch samples into the scheduling decision calculation process of the next iteration to calculate the corresponding scheduling decision for the next iteration.

[0029] Compared with the prior art, the method for accelerating the training of recommendation models on edge nodes provided by the present invention calculates the transmission cost of input samples and executes the corresponding scheduling strategy implementation scheme according to the transmission cost calculation result, so as to provide a scheduling decision solution that can balance the solution quality and resource occupancy for the challenges of limited computing resources of edge working nodes and multiple tasks competing for resources. Furthermore, the implementation scheme provided by the present invention is applied to an experimental platform equipped with 8 GPUs, and an evaluation experiment is conducted using three loads from the real world; the corresponding experimental results show that compared with the prior art, the implementation scheme provided by the present invention can achieve up to 1.74 times of training acceleration and can reduce the embedded transmission cost by 36.76%. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0031] Figure 1 A schematic diagram of the architecture of training a recommendation model on an edge node according to an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of the implementation flow of the method provided in the embodiment of the present invention;

[0033] Figure 3 A schematic diagram of the execution timing of the scheduling decision processing provided by an embodiment of the present invention;

[0034] Figure 4 A schematic diagram of an algorithm for calculating an expected embedding transmission cost provided by an embodiment of the present invention;

[0035] Figure 5 A schematic diagram of an algorithm for making scheduling decisions based on transmission cost provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in combination with the specific content of the present invention; it is obvious that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, which does not constitute a limitation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.

[0037] First, the terms that may be used in this article are explained as follows:

[0038] The term “and / or” means that either or both of them can be realized at the same time. For example, X and / or Y means both “X” or “Y” and “X and Y”.

[0039] The terms "include", "comprises", "contains", "has" or other descriptions with similar semantics should be interpreted as non-exclusive inclusion. For example, including certain technical feature elements (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or products, etc.) should be interpreted as including not only certain technical feature elements explicitly listed, but also other technical feature elements known in the art that are not explicitly listed.

[0040] The term "consisting of..." means excluding any technical feature elements not explicitly listed. If this term is used in a claim, it will make the claim closed, so that it does not contain technical feature elements other than the technical feature elements explicitly listed, except for the conventional impurities related to them. If this term only appears in a clause of a claim, it only limits the elements explicitly listed in the clause, and the elements recorded in other clauses are not excluded from the overall claim.

[0041] Unless otherwise specified or limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this article can be understood according to specific circumstances.

[0042] When concentration, temperature, pressure, size or other parameters are expressed in the form of a numerical range, the numerical range should be understood to specifically disclose all ranges formed by the pairing of any upper limit, lower limit, and preferred value in the numerical range, regardless of whether the range is explicitly stated; for example, if a numerical range of "2 to 8" is stated, the numerical range should be interpreted as including ranges such as "2 to 7", "2 to 6", "5 to 7", "3 to 4 and 6 to 7", "3 to 5 and 7", "2 and 5 to 7", etc. Unless otherwise specified, the numerical ranges stated herein include both their end values ​​and all integers and fractions within the numerical range.

[0043] The orientation or position relationship indicated by terms such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", etc. are based on the orientation or position relationship shown in the drawings and are only for the convenience and simplification of description, and do not explicitly or implicitly indicate that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation of this document.

[0044] In order to solve the deficiencies in the prior art, the technicians of the present invention have conducted a detailed study and analysis of the prior art; through the study and analysis, it is found that the connections between multiple edge working nodes and parameter servers are usually heterogeneous, that is, the cost of transmitting the same embedding between different edge working nodes and parameter servers is not the same. Moreover, for the case of online training of recommendation models, it is necessary to ensure that user interest drift and emerging trends are reflected in a timely and accurate manner. That is, unlike offline training where decision time is not limited, online training requires that each scheduling decision be completed within a training iteration to avoid performance degradation of the recommendation system. In addition, multiple tasks often compete for limited resources on edge working nodes. If they are not managed to minimize resource consumption on edge working nodes as much as possible, the edge working nodes will not work properly. In short, the present invention needs to comprehensively consider the characteristics of online training and the challenges brought by resource consumption on the basis of the above research and analysis, and then provide an implementation scheme for accelerating the method of training recommendation models on edge nodes.

[0045] Based on the above research and analysis results, the present invention proposes a method for scheduling input samples to reduce the time spent on training recommendation models on multiple edge devices; specifically, it provides an input batch sample scheduling mechanism and a solution method that balances solution quality and resource occupancy, in order to reduce the time required to train recommendation models on edge nodes, thereby accelerating the training of recommendation models on edge nodes. Figure 1 The architecture implementation for training the recommendation model on the edge node shown is based on the PS architecture and the hybrid parallel strategy. The edge working nodes 1, 2, and 3 of the architecture include an embedding cache and an MLP respectively, and the parameter server side includes a global embedding, which includes an ID (embedding ID) and the embedding vector itself.

[0046] The present invention provides a method for accelerating the training of a recommendation model on an edge node (i.e., an edge working node). The method first needs to calculate the expected embedding transmission cost (referred to as the expected transmission cost) of scheduling each embedded input sample to different edge working nodes (hereinafter referred to as working nodes), and then obtain the scheduling decision through a solution method that balances solution quality and resource occupancy.

[0047] That is to say, the present invention may include a processing process for calculating the expected embedded transmission cost and a solution processing process for making scheduling decisions based on the transmission cost in the specific implementation process; the processing process for calculating the expected embedded transmission cost may include: for each input embedded sample, based on each edge working node, respectively calculating the expected transmission cost of each embedded deployment and scheduling to each edge working node, and after completing the calculation of the input embedded sample and each edge working node, obtaining the total expected transmission cost, the total expected transmission cost includes the expected transmission cost of each embedded sample to each edge working node; the solution processing process for making scheduling decisions based on the transmission cost may include: determining the scheduling decision of each edge working node according to the calculated total expected transmission cost, the scheduling decision may be determined based on a load balancing mechanism, after determining the scheduling decision, each edge working node may obtain the embedded samples required for training the recommendation model based on the scheduling decision, so as to train the corresponding recommendation model.

[0048] The following will describe in detail the above-mentioned process of calculating the expected embedded transmission cost and the implementation process of solving the scheduling decision based on the transmission cost, wherein:

[0049] (I) A process for calculating the expected embedding transmission cost

[0050] Specifically, in the processing, for each input embedding sample, if the embedding corresponding to the current embedding ID in a certain embedding sample is not on the current edge working node, then the expected transmission cost of scheduling the embedding sample where the current embedding ID is located to the current edge working node is increased; if the embedding corresponding to the current embedding ID exists on other edge working nodes, then the expected transmission cost of scheduling the embedding sample where the current embedding ID is located to the current edge working node is increased; the corresponding processing of increasing the expected transmission cost of scheduling the embedded sample where the current embedding ID is located to the current edge working node means: adding the transmission embedding cost from the edge working node where the embedding corresponding to the current embedding ID is located to the parameter server to the expected transmission cost of scheduling the embedded sample where the current embedding ID is located to the current edge working node, so as to update the expected transmission cost of scheduling the embedded sample where the embedding ID is located to the current edge working node;

[0051] Further, refer to Figure 2 As shown, the processing process may specifically include the following processing steps:

[0052] Step 11, initialize all elements in the expected cost matrix to 0;

[0053] That is, the expected cost matrix is ​​initialized to initialize the unit embedded transmission cost from different working nodes to the parameter server, so as to realize the initialization setting of the expected transmission cost in the expected cost matrix;

[0054] Step 12, calculating the expected transmission cost of scheduling each input embedding sample to the current working node;

[0055] Specifically, based on the situation where each input sample contains multiple embedded IDs, the following processing can be used for each working node:

[0056] If the embedding corresponding to an embedding ID in the input sample is not on the current working node, increase the expected transmission cost of scheduling the input embedding sample to the current working node;

[0057] If the embedding corresponding to the current embedding ID exists on other working nodes, the expected transmission cost of scheduling the input embedding sample to the current working node also needs to be increased;

[0058] Each input sample belongs to all embedded samples used by each edge working node to train the recommendation model, which can be referred to as samples. Each embedded sample usually contains multiple embedding IDs, and each embedding ID corresponds to one embedding;

[0059] Step 13, for all input embedded samples and working nodes, repeat the above step 12 to calculate the expected transmission cost of each input embedded sample scheduled to each working node, obtain all elements in the expected cost matrix to calculate the expected transmission cost, and fill the corresponding calculation results into the expected cost matrix, so as to obtain the updated expected cost matrix.

[0060] It can be seen that the present invention provides an implementation scheme for calculating the expected transmission cost of each embedded sample scheduled to different edge working nodes, which can take into account the different costs of transmitting the same sample between different edge nodes and parameter servers, and effectively ensure that each sample can be transmitted at a lower transmission cost, so as to improve the transmission efficiency of the sample, and further ensure the efficiency of training the recommendation model.

[0061] (II) A Process for Solving Scheduling Decisions Based on Transmission Cost

[0062] In the processing, first, the expected transmission costs of each embedded sample to each edge working node included in the total expected transmission cost can be obtained, and the two smallest expected transmission costs of each embedded sample to each edge working node (i.e., the smallest one and the second smallest one) can be obtained, and the difference between the two smallest ones can be calculated; then, a predetermined number of embedded samples can be obtained in order from large to small according to the difference; finally, the predetermined number of embedded samples are solved by using the optimal solution algorithm, and the embedded samples of the predetermined data are scheduled to different edge working nodes according to the solution results; for the remaining other embedded samples, they can be scheduled to a corresponding edge working node according to the current load status of each edge working node;

[0063] The process of sequentially acquiring a predetermined number of embedded samples may be, but is not limited to, based on a set ratio parameter, selecting the number of embedded samples with the set ratio parameter from the total input embedded samples as the predetermined number of embedded samples.

[0064] Further, still refer to Figure 2 As shown, the processing process may specifically include the following processing steps:

[0065] Step 14, using the expected cost matrix obtained by the above-mentioned method for calculating the expected embedded transmission cost as input, initializing the load value of each working node in the expected cost matrix to 0, so as to initialize the maximum load value;

[0066] Step 15, in the expected cost matrix, calculate the result obtained by subtracting the minimum value from the next minimum value of each row;

[0067] Step 16, in the expected cost matrix, re-sorting each row in descending order based on the result obtained in the above step 15;

[0068] Step 17, the first several rows (i.e., a part of the rows, for example, the first 50% of the rows) in the reordered expected cost matrix are solved by using the optimal solution algorithm, and each corresponding sample can be scheduled to a different working node according to the solution result, and the load value of each working node needs to be increased and adjusted according to the solution result;

[0069] Step 18: For the remaining rows, the corresponding embedded samples are scheduled to the working nodes in the current row with the minimum transmission cost and not reaching the maximum load value;

[0070] That is, for the remaining rows in the expected cost matrix, the sample is scheduled to the working node with the smallest expected transmission cost in the current row. If it is determined according to the information in the expected cost matrix that the working node has reached the maximum load value, the working node with the second smallest expected transmission cost can be selected, and so on, until the scheduling processing of the corresponding embedded samples of all the remaining rows is completed;

[0071] Through the processing of this step, it can be achieved that for the remaining other embedded samples, each embedded sample can be scheduled to the edge working node with the smallest expected transmission cost among the edge working nodes corresponding to the current embedded sample. Moreover, if the edge working node has reached the maximum load value, the edge working node with the second smallest expected transmission cost can be selected until the scheduling processing of all the remaining other embedded samples is completed and the execution of the corresponding scheduling strategy is completed.

[0072] It can be seen from the above processing that, compared with the prior art, the implementation scheme provided by the present invention for accelerating the training of recommendation models on edge nodes can reduce the transmission cost of embedded samples and improve the timeliness of training recommendation models on edge working nodes by reasonably scheduling input samples.

[0073] In the process of executing the above-mentioned method for solving scheduling decisions based on transmission cost, the specific timing of calculating the corresponding scheduling decision can be referred to Figure 3 Specifically, when the GPU is processing the current iteration (Iteration) I t During training, you can set the next iteration I as needed. t+1 Input batch sample IBES t+1 The premise of adopting this scheduling decision execution method is that the data loader to be used can be used when the GPU is processing I t Provide the next iteration I when training t+1 Input batch sample IBES t+1 This scheduling decision execution method can effectively improve the efficiency of training recommendation models on edge nodes.

[0074] It can be seen that the present invention provides a scheduling decision solution that can balance the solution quality and resource occupancy for the situation where the computing resources of edge nodes are limited and multiple tasks compete for resources. It can therefore reasonably schedule the application of limited resources based on the expected transmission cost obtained by the aforementioned method, thereby effectively improving the efficiency of training the recommendation model.

[0075] Furthermore, in order to verify the application effect of the technical solution provided by the present invention, the technical solution provided by the present invention was also applied to an experimental platform equipped with 8 GPUs, and three loads from the real world were used for experimental evaluation. According to the corresponding experimental evaluation results, compared with the existing methods, the technical solution provided by the present invention can achieve a maximum of 1.74 times the recommendation model training acceleration and can reduce the embedding transmission cost by 36.76%.

[0076] To facilitate further understanding of the present invention, the method for accelerating the training of a recommendation model on an edge node provided by the present invention will be described in detail below with reference to the accompanying drawings.

[0077] 1.1 The process of calculating the expected embedding transmission cost

[0078] Reference Figure 4 As shown, the corresponding process of calculating the expected embedding transmission cost may include:

[0079] Step 21: Substitute the cost matrix (i.e., expected cost matrix) All elements in (mn rows, n columns) are initialized to 0;

[0080] Assuming that the input batch sample ε, the total number of samples is mn, where m is the maximum load value of each working node, and n means that there are n working nodes in total. For one of the embedded samples E i , which can consist of multiple embeddings and corresponding multiple embedding IDs (x i )composition;

[0081] Step 22, initialize the cost matrix According to each working node and each sample E i Update the expected embedding transmission cost for each embedding ID;

[0082] That is, for the working node w j , for E i For each embedded ID in , the corresponding processing process may include:

[0083] If its corresponding embedding is not in the working node w j The expected transmission cost is in is the working node w j The cost of transmitting the embedding to the parameter server is the expected transmission cost of scheduling the corresponding embedded sample to the worker node Make updates;

[0084] If its corresponding embedding exists in another working node w j ′, then the expected transmission cost in is the node wj ′ is the cost of transmitting the embedding to the parameter server to Make updates;

[0085] In the above process, the cost of the corresponding working node and the parameter server to transmit the embedding can be determined in real time or preset according to performance parameters such as the bandwidth between the two;

[0086] Step 23, for the embedded sample E i All embedded IDs in execute the above step 22 respectively to obtain the corresponding embedded samples E i To the working node w j The expected transmission cost And fill it into the cost matrix The i row and j column in ;

[0087] Step 24, execute the steps 22 and 23 for all embedded samples in the input batch sample ε, and obtain the updated cost matrix after the execution is completed

[0088] 2. The process of scheduling decisions based on expected transmission cost

[0089] Reference Figure 5 As shown, the corresponding process of making scheduling decisions based on expected transmission costs may include:

[0090] Step 25, based on the cost matrix obtained in step 24 above (mn rows, n columns) is used as input, the load value of each node is initialized to 0, the maximum load value of each node is m, the solution scale parameter (referred to as scale parameter) α can be set according to the desired solution quality and resource consumption. The larger α is, the better the solution quality is, the more resource consumption is, and α is 1≥α≥0. Usually, the values ​​that can be used include: 1, 0.5, 0.25, 0.125, 0, etc.

[0091] Step 26, in the cost matrix , calculate the result of subtracting the minimum value from the second minimum value of each row;

[0092] Step 27, in the cost matrix In , sort the mn rows in descending order according to the result obtained in step 26;

[0093] Step 28: sort the cost matrix 0 to The optimal solution algorithm (such as the Hungarian algorithm) is used to solve the problem. The solution result is the scheduling strategy for scheduling each sample to a different working node. Before solving the problem, copy each column to List;

[0094] Step 29: According to the solution result, increase the current load value of each working node to ;

[0095] Step 210, for each remaining row in the cost matrix, select and schedule the sample to the working node with the smallest expected transmission cost in the current row. If the working node has reached the maximum load value, select the working node with the second smallest expected transmission cost and increase the corresponding working node load value, and so on, until the processing of each remaining row in the cost matrix is ​​completed.

[0096] In summary, it can be seen that the above-mentioned expected transmission cost calculation method and the corresponding scheduling decision strategy can reduce the embedded transmission cost while effectively accelerating the process of training the recommendation model on the edge node, so that the above-mentioned corresponding technical solution can well achieve the purpose of accelerating the training of the recommendation model on the edge node.

[0097] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims. The information disclosed in the background technology section of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or in any form that the information constitutes prior art known to those skilled in the art.

Claims

1. A method for accelerating the training of a recommendation model on an edge node, characterized in that: include: For each input embedded sample, the expected transmission cost of each embedded deployment dispatched to each edge working node is calculated based on each edge working node, and after completing the calculation for the input embedded sample and each edge working node, the total expected transmission cost is obtained, and the total expected transmission cost includes the expected transmission cost of each embedded sample to each edge working node; Determine a scheduling decision for each edge working node according to the calculated total expected transmission cost, wherein the scheduling decision is determined based on a load balancing mechanism; Each edge working node obtains the embedded samples required for training the recommendation model based on the scheduling decision.

2. The method according to claim 1, characterized in that The process of calculating the expected transmission cost of each embedded deployment scheduling to each edge working node includes: If the embedding corresponding to the current embedding ID is not on the current edge working node, then the expected transmission cost of scheduling the embedded sample where the current embedding ID is located to the current edge working node is increased. If the embedding corresponding to the current embedding ID exists on other edge working nodes, then the expected transmission cost of scheduling the embedded sample where the current embedding ID is located to the current edge working node is increased.

3. The method according to claim 2, characterized in that The process of increasing the expected transmission cost of scheduling the embedded sample where the current embedded ID is located to the current edge working node includes: The cost of transmitting the embedding from the edge working node where the embedding corresponding to the current embedding ID is located to the parameter server is added to the expected transmission cost of scheduling the embedding sample where the current embedding ID is located to the current edge working node.

4. The method according to claim 1, 2 or 3, characterized in that: The process of determining the scheduling decision of each edge working node includes: Based on the expected transmission costs of each embedded sample to each edge working node respectively included in the total expected transmission cost, obtain the minimum two expected transmission costs of each embedded sample to each edge working node, and calculate the difference between the minimum two; According to the difference values, a predetermined number of embedded samples are obtained in sequence from large to small; The predetermined number of embedded samples are solved using the optimal solution algorithm, and the embedded samples of the predetermined data are scheduled to different edge working nodes according to the solution results; for the remaining other embedded samples, they are scheduled to a corresponding edge working node according to the current load status of each edge working node.

5. The method according to claim 4, characterized in that The process of sequentially acquiring a predetermined number of embedded samples includes: Based on the set solution ratio parameter, the number of embedded samples with the set solution ratio parameter is selected from the total input embedded samples as the predetermined number of embedded samples, and the solution ratio parameter is set according to the expected solution quality and resource consumption, and the value α of the solution ratio parameter is 1≥α≥0.

6. The method according to claim 5, characterized in that The solution ratio parameter may take the following values: 1, 0.5, 0.25, 0.125 or 0.

7. The method according to claim 4, characterized in that The process of dispatching each edge working node to a corresponding edge working node according to its current load condition includes: For the remaining embedded samples, each embedded sample is scheduled to the edge working node with the smallest expected transmission cost among the edge working nodes corresponding to the current embedded sample. If the edge working node has reached the maximum load value, the edge working node with the second smallest expected transmission cost is selected until the scheduling of all remaining embedded samples is completed.

8. The method according to claim 4, characterized in that The method further includes: When training the current iteration, it is necessary to input batch samples into the scheduling decision calculation process of the next iteration to calculate the corresponding scheduling decision for the next iteration.

Citation Information

Patent Citations

  • Network resource scheduling method combined with edge computing

    CN113612853A

  • Application layer deterministic service resource scheduling method and system

    CN116896562A

  • Transaction scheduling optimization method based on graph embedding

    CN117216071A

  • Task scheduling method and device for edge environment

    CN118132237A

  • Bayesian optimal transmission-based user behavior modeling method

    CN119004004A