AI model training and calling method and system based on edge computing

By dynamically allocating computing tasks and optimizing training parameters in the edge computing environment, the problem of low efficiency of deep neural network training on edge devices is solved, and efficient online training and stable model calling are achieved.

CN118898272BActive Publication Date: 2025-01-24浙江讯盟科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411354872.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-24
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

In the edge computing scenario, the training of deep neural networks is limited by insufficient memory and computing power of edge devices, resulting in increased training difficulty and excessive time. The existing parallel training methods for model are mainly carried out on cloud devices with sufficient resources, and have failed to effectively solve the training problems of edge devices.

Method used

By obtaining the hardware information, remaining computing power resources and historical status information of multiple edges computing nodes, multiple node clusters and training sample clusters are determined. Based on a model of similar sample models and training parameters, divide and optimize training parameters for the training model, and dynamically allocate calculation tasks to improve resource utilization efficiency.

Benefits of technology

The online training of deep neural networks is performed in the edge computing environment, reducing training time, improving training efficiency and stability, and reducing the cost and error rate of manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898272B_ABST
    Figure CN118898272B_ABST
Patent Text Reader

Abstract

The present invention provides an AI model training and calling method and system based on edge computing, which relates to the field of data processing. The method includes: determining multiple node clusters and multiple training sample clusters; judging whether to divide the model to be trained based on a model division scheme of a similar sample model; if it is determined that the model to be trained is to be divided, determining the optimal training scheme according to multiple target node clusters, the data size of the training samples, multiple candidate model training parameter groups of the model to be trained and multiple candidate model division schemes of the model to be trained; if it is determined that the model to be trained is not to be divided, determining the candidate model training parameters of the model to be trained based on the model training parameters of the similar sample model, screening multiple node clusters, determining multiple target node clusters, performing AI model training, and establishing model labels to call the AI ​​model. The method has the advantage of realizing online training of deep neural networks jointly through edge computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to an AI model training and calling method and system based on edge computing. Background Art

[0002] The Internet of Things is known as the third wave of the world's information industry after computers and the Internet. In 2018, the number of global Internet of Things connections reached about 8 billion. In traditional cloud computing architecture, these data need to be centrally transmitted to the cloud for processing, which will increase the network load, cause transmission congestion and delay in data processing. In this case, a new computing architecture - edge computing - came into being. Edge computing refers to providing computing, storage and other services close to the object or data source. Compared with the data-centralized cloud computing model, edge computing processes data at the edge of the network, which can reduce the network bandwidth load, reduce request response time and improve battery life. At the same time, edge computing can ensure data security and privacy because it is performed on the side close to the data source. This advantage has led to an increasing demand for the use of deep learning technology on edge network devices. This is because as the amount of training data increases, the model trained by deep learning will become better. Training deep neural networks requires a lot of computing resources, such as computing power, memory and video memory of computing devices. The memory of edge devices is not large, which may make it difficult to train deep neural networks; and the computing power of edge devices is insufficient, which will cause the training time of deep neural networks to be too long. Solving the above difficulties is of great significance for training deep neural network models in edge computing scenarios.

[0003] Existing model parallel training methods study how to accelerate the training of large deep neural networks through model parallel technology on computing devices with sufficient memory resources and computing power resources, such as cloud devices; but do not consider how to achieve online training of deep neural networks on computing devices with insufficient memory resources and computing power resources, such as edge devices.

[0004] Therefore, it is necessary to provide an edge computing-based AI model training and calling method and system to realize online training of deep neural networks through edge computing. Summary of the invention

[0005] The present invention provides an AI model training and calling method based on edge computing, including: obtaining hardware information, remaining computing power resource information and historical status information of multiple edge computing nodes, and determining multiple node clusters according to the hardware information, remaining computing power resource information and historical status information of the multiple edge computing nodes; obtaining multiple training samples, and determining multiple training sample clusters according to the data features and model labels of the multiple training samples; establishing a sample model library, wherein the sample model library is used to record model partitioning schemes and model training parameter groups of multiple sample models, and the model training parameter group at least includes a batch size and a number of training rounds; obtaining a model to be trained; based on the structural information of the model to be trained, searching for similar sample models from the sample model library; judging whether to divide the model to be trained based on the model partitioning schemes of similar sample models; if it is determined that the model to be trained is to be divided, generating multiple candidate model partitioning schemes for the model to be trained based on the model partitioning schemes of the similar sample models and the structural information of the model to be trained, determining multiple candidate model training parameter groups for the model to be trained based on the model training parameter groups of the similar sample models, and According to the data size of the training sample, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model division schemes of the model to be trained, the multiple node clusters are screened to determine multiple target node clusters, and the optimal training scheme is determined according to the multiple target node clusters, the data size of the training sample, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model division schemes of the model to be trained, and the model to be trained is trained according to the optimal training scheme and the multiple training sample clusters to obtain a trained AI model; if it is determined that the model to be trained is not to be divided, the candidate model training parameters of the model to be trained are determined based on the model training parameters of the similar sample model, and the multiple node clusters are screened based on the data size of the training sample and the multiple candidate model training parameter groups of the model to be trained to determine multiple target node clusters, and the model to be trained is trained through the target node clusters to obtain a trained AI model; a model label of the trained AI model is established; a model call request initiated by the terminal is obtained, and the target AI model is called according to the model call request and the model label of each trained AI model.

[0006] Furthermore, according to the hardware information, the remaining computing power resource information and the historical status information of the plurality of edge computing nodes, a plurality of node clusters are determined, including: for each of the edge computing nodes, according to the hardware information of the edge computing node, obtaining the score of the edge computing node in at least one hardware indicator; clustering the plurality of edge computing nodes based on the score of each of the edge computing nodes in at least one hardware indicator through a clustering algorithm to determine a plurality of node units; for each of the edge computing nodes, according to the remaining computing power resource information of the edge computing node, obtaining the score of the edge computing node in at least one remaining computing power resource indicator; and according to the edge computing node, clustering the plurality of edge computing nodes into a plurality of node units. The method comprises the following steps: according to the historical status information of the edge computing node, calculating the score of the load fluctuation index and the score of the performance stability index of the edge computing node; for each node unit, according to the score of at least one remaining computing power resource indicator, the score of the load fluctuation index and the score of the performance stability index of any two edge computing nodes included in the node unit, calculating the node similarity of any two edge computing nodes included in the node unit; based on the node similarity of any two edge computing nodes included in the node unit through a clustering algorithm, clustering the multiple edge computing nodes included in the node unit, and determining the multiple node clusters corresponding to the node unit.

[0007] Furthermore, multiple training sample clusters are determined based on the data features and label information of multiple training samples, including: calculating the data feature similarity of any two training samples based on the data features of any two training samples; calculating the label distance of any two training samples based on the label information of any two training samples; calculating the sample similarity of any two training samples based on the data feature similarity and label distance of any two training samples; clustering the multiple training samples based on the sample similarity of any two training samples through a clustering algorithm to determine multiple training sample clusters.

[0008] Furthermore, based on the structural information of the model to be trained, similar sample models are searched from the sample model library, including: based on the structural information of the model to be trained and the structural information of the sample model, the structural similarity between the model to be trained and the sample model is calculated, and the sample model whose structural similarity is greater than the structural similarity threshold is taken as a similar sample model.

[0009] Furthermore, based on the data size of the training samples, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model partitioning schemes of the model to be trained, the multiple node clusters are screened, including: based on the data size of the training samples, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model partitioning schemes of the model to be trained, determining the first node indicator requirement, wherein the first node indicator requirement includes a first hardware indicator requirement, a first remaining computing power resource indicator requirement, a first load fluctuation index requirement and a first performance stability index requirement; based on the first node indicator requirement, the multiple node clusters are screened.

[0010] Furthermore, according to the multiple target node clusters, the data size of the training samples, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model partitioning schemes of the model to be trained, an optimal training scheme is determined, including: for each candidate model partitioning scheme, according to the multiple target node clusters, the data size of the training samples and the multiple candidate model training parameter groups of the model to be trained, calculating the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group; determining the optimal model partitioning scheme from the multiple candidate model partitioning schemes according to the scheme adaptation parameters of each candidate model partitioning scheme under each candidate model training parameter group; and determining the optimal model partitioning scheme according to the optimal model A partitioning scheme is used to divide the model to be trained into multiple sub-models to be trained; according to the scheme adaptation parameters of the optimal model partitioning scheme under each candidate model training parameter group, the optimal model training parameter group is determined from the multiple candidate model training parameter groups; for each of the target node clusters, based on the score of at least one hardware indicator, the score of at least one remaining computing power resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in the target node cluster, the sub-model to be trained corresponding to the target node cluster is determined, wherein the optimal training scheme includes the optimal model partitioning scheme, the optimal model training parameter group and the sub-model to be trained corresponding to each of the target node clusters.

[0011] Furthermore, according to the multiple target node clusters, the data size of the training samples and the multiple candidate model training parameter groups of the model to be trained, the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group are calculated, including: according to the candidate model partitioning scheme, the model to be trained is divided into multiple candidate sub-models to be trained; for each of the candidate model training parameter groups, based on the structural information of each candidate sub-model to be trained, the data size of the training samples and the candidate model training parameter group, the second node indicator requirement corresponding to each candidate sub-model to be trained is determined; according to the second node indicator requirement corresponding to each candidate sub-model to be trained and the score of at least one hardware indicator, the score of at least one remaining computing power resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in each of the target node clusters, the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group are calculated.

[0012] Furthermore, according to the optimal training scheme and the multiple training sample clusters, the model to be trained is trained to obtain a trained AI model, including: according to the sub-model to be trained corresponding to each of the target node clusters, each of the sub-model to be trained is arranged on the edge computing node included in the corresponding target node cluster; for each of the target node clusters, according to the optimal model training parameter group, multiple training samples are sampled from the multiple training sample clusters to generate multiple batches of training sample sets for each edge computing node included in the target node cluster, and the edge computing node trains and jointly optimizes the sub-model to be trained corresponding to the target node cluster based on the multiple batches of training sample sets to obtain a trained sub-model; and multiple trained sub-models are merged to obtain a trained AI model.

[0013] Further, according to the optimal model training parameter group, multiple training samples are sampled from the multiple training sample clusters to generate multiple batches of training sample sets for each edge computing node included in the target node cluster, including: according to the optimal model training parameter group, multiple training samples are sampled from the multiple training sample clusters based on a distribution balancing strategy to generate multiple candidate training sample sets; for each candidate training sample set, a first sample set similarity between the training sample set and the generated training sample set of the edge computing node is calculated, and a second sample set similarity between the training sample set and the generated training sample sets of other edge computing nodes included in the target node cluster is calculated; based on the first sample set similarity and the second sample set similarity, it is determined whether to use the candidate training sample set as a batch of training sample sets for the edge computing node.

[0014] The present invention provides an AI model training and calling system based on edge computing, including: a data acquisition module, used to acquire hardware information, remaining computing power resource information and historical status information of multiple edge computing nodes, and determine multiple node clusters according to the hardware information, remaining computing power resource information and historical status information of the multiple edge computing nodes; also used to acquire multiple training samples, and determine multiple training sample clusters according to the data features and model labels of the multiple training samples; also used to establish a sample model library, wherein the sample model library is used to record model partitioning schemes and model training parameter groups of multiple sample models, and the model training parameter group at least includes a batch size and a number of training rounds; a model training module, used to acquire a model to be trained, and based on the structural information of the model to be trained, search for similar sample models from the sample model library, and judge whether to divide the model to be trained based on the model partitioning scheme of the similar sample models; if it is determined that the model to be trained is to be divided, multiple candidate model partitioning schemes of the model to be trained are generated based on the model partitioning schemes of the similar sample models and the structural information of the model to be trained, and multiple candidate model training parameters of the model to be trained are determined based on the model training parameter group of the similar sample models group, based on the data size of the training samples, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model division schemes of the model to be trained, the multiple node clusters are screened to determine multiple target node clusters, and the optimal training scheme is determined according to the multiple target node clusters, the data size of the training samples, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model division schemes of the model to be trained, and the model to be trained is trained according to the optimal training scheme and the multiple training sample clusters to obtain a trained AI model; if it is determined that the model to be trained is not to be divided, the candidate model training parameters of the model to be trained are determined based on the model training parameters of the similar sample model, and the multiple node clusters are screened based on the data size of the training samples and the multiple candidate model training parameter groups of the model to be trained to determine multiple target node clusters, and the model to be trained is trained through the target node clusters to obtain a trained AI model; a model calling module is used to establish a model label of the trained AI model, obtain a model calling request initiated by the terminal, and call the target AI model according to the model calling request and the model label of each of the trained AI models.

[0015] Compared with the prior art, the edge computing-based AI model training and calling method and system provided by the present invention have at least the following beneficial effects:

[0016] By obtaining the hardware information, remaining computing power resource information and historical status information of multiple edge computing nodes, computing tasks can be dynamically allocated according to the current resource status to ensure efficient use of resources. According to the data characteristics and label information of the training samples, the edge computing nodes are divided into multiple node clusters. The most suitable node cluster can be selected for training according to different types of data and training requirements, thereby improving training efficiency. Based on the model partitioning scheme of similar sample models, the training model is intelligently divided, which can reduce the complexity and time of model training and improve training efficiency. The model training parameter group is obtained from the sample model library, and the optimal training scheme is determined in combination with the data size of the training sample and the candidate model partitioning scheme, further accelerating the model training process. By selecting the optimal parameters from multiple candidate model training parameter groups through methods such as grid search, the model can achieve the best performance during the training process. Using multiple edge computing nodes for parallel training can speed up the training speed, reduce the computing pressure of a single node, and improve the stability and accuracy of training. The entire process realizes the automated management from edge computing resource allocation, model training to model deployment and calling, reducing the cost and error rate of manual intervention. Based on the model call request initiated by the terminal and the label information of each trained AI model, the target AI model can be called quickly and accurately, improving the system's response speed and user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0018] Figure 1 It is a flowchart of an AI model training and calling method based on edge computing according to some embodiments of this specification;

[0019] Figure 2 It is a module diagram of an AI model training and calling system based on edge computing as shown in some embodiments of this specification. DETAILED DESCRIPTION

[0020] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of this specification. For ordinary technicians in this field, this specification can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0021] Figure 1is a flowchart of an AI model training and calling method based on edge computing according to some embodiments of this specification, such as Figure 1 As shown, the AI ​​model training and calling method based on edge computing may include the following steps.

[0022] Step 111, obtain hardware information, remaining computing resource information and historical status information of multiple edge computing nodes, and determine multiple node clusters based on the hardware information, remaining computing resource information and historical status information of the multiple edge computing nodes.

[0023] The hardware information of the edge computing node may include information of devices such as processors and memory.

[0024] The remaining computing power resource information may include the current remaining computing resources (for example, remaining CPU resources (remaining number of CPU cores, CPU usage, CPU idle time or cycles, etc.), remaining CPU resources (for example, remaining video memory, GPU usage, number of available CUDA cores, etc.), usage rate of embedded neural network processors, usage rate of dedicated processors such as ASIC, etc.), storage resources (for example, remaining memory capacity, remaining disk space, etc.), network resources (for example, remaining bandwidth, network delay, packet loss rate, etc.), etc.

[0025] Historical status information may include computing resource usage at multiple historical time points, such as CPU usage, memory usage, disk read and write times, read and write speeds and delays, upload and download bandwidth usage, network connection times, connection duration, reasons for disconnection, network delays and packet loss rates, the running time of each service, response time, throughput, number of concurrent users, time of failure, cause and recovery time, intrusion attempts or security incidents, security vulnerability scan results, health status, temperature and power consumption of hardware components (such as CPU, memory, hard disk, etc.), etc.

[0026] Preferably, step 111 specifically includes:

[0027] For each edge computing node, according to the hardware information of the edge computing node, the score of the edge computing node in at least one hardware indicator is obtained, wherein the hardware indicator may include a hard disk type indicator, a storage capacity indicator, a read / write speed indicator, etc. For example, hard disk type: SSD (Solid State Disk or Solid State Drive) has a significant advantage in read / write speed compared to HDD (Hard Disk Drive). If the hard disk type of the edge computing node is SSD, then 4 points are obtained in the hard disk type indicator. If the hard disk type of the edge computing node is HDD, then 2 points are obtained in the hard disk type indicator. If the storage capacity of the edge computing node is 128GB or less, then 2 points are obtained in the storage capacity indicator. If the storage capacity of the edge computing node is 128-512GB, then 3 points are obtained in the storage capacity indicator. If the storage capacity of the edge computing node is more than 512GB, then 4 points are obtained in the storage capacity indicator. If the read / write speed of the edge computing node is lower than 500MB / s, 3 points will be awarded in the read / write speed index; if the read / write speed of the edge computing node is between 500-1000MB / s, 4 points will be awarded in the read / write speed index; if the read / write speed of the edge computing node is higher than 1000MB / s, 5 points will be awarded in the read / write speed index;

[0028] Clustering the plurality of edge computing nodes based on the score of each edge computing node in at least one hardware indicator through a clustering algorithm (e.g., a K-means clustering algorithm) to determine a plurality of node units;

[0029] For each edge computing node, the score of the edge computing node in at least one remaining computing power resource indicator is obtained according to the remaining computing power resource information of the edge computing node, and the score of the edge computing node in the load fluctuation indicator and the score of the performance stability indicator are calculated according to the historical status information of the edge computing node, wherein the at least one remaining computing power resource indicator includes a CPU remaining utilization rate indicator, a memory remaining amount indicator, a network bandwidth remaining amount indicator, etc. For example, if the CPU remaining utilization rate is between 70% and 100%, the CPU remaining utilization rate indicator is scored with 5 points, if the CPU remaining utilization rate is between 30% and 70%, the CPU remaining utilization rate indicator is scored with 3 points, and if the CPU remaining utilization rate is between 0% and 30%, the CPU remaining utilization rate indicator is scored with 1 point.

[0030] For each node unit, the node similarity of any two edge computing nodes included in the node unit is calculated according to the score of at least one remaining computing resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of any two edge computing nodes included in the node unit. Based on the node similarity of any two edge computing nodes included in the node unit, a clustering algorithm (for example, a K-means clustering algorithm) is used to cluster the multiple edge computing nodes included in the node unit to determine the multiple node clusters corresponding to the node unit.

[0031] Specifically, the load fluctuation index measures the fluctuation of key resource utilization such as CPU utilization, memory utilization or network bandwidth of edge computing nodes over a period of time. The greater the fluctuation, the more unstable the load of the edge computing node. First, based on the historical status information of the edge computing node, determine the key resource utilization data of the edge computing node in the past period of time (such as a week or a month). For each key resource (such as CPU utilization), calculate the standard deviation of its utilization data, set a benchmark standard deviation (or fluctuation range), and compare the actual calculated standard deviation with the benchmark. If the actual standard deviation is lower than the benchmark, the score is higher; otherwise, the score is lower. Linear interpolation or piecewise function can be used to specifically calculate the score. For example, assuming that the benchmark standard deviation of CPU utilization is 5% and the actual calculated standard deviation is 3%, it can be considered that the load fluctuation is small and a higher score is given, such as 9 points (out of 10 points).

[0032] The performance stability index measures the stability and reliability of the key performance indicators (such as response time and throughput) of the edge computing node under long-term operation. First, based on the historical status information of the edge computing node, determine the key performance indicator data of the edge computing node under long-term operation, and calculate the coefficient of variation (standard deviation divided by the mean) for each key performance indicator. The smaller the coefficient of variation, the smaller the discreteness of the data, that is, the more stable the performance. Set a baseline coefficient of variation and compare the actual calculated coefficient of variation with the baseline. If the actual coefficient of variation is lower than the baseline, the score is higher; otherwise, the score is lower. For example, assuming that the baseline coefficient of variation of a key performance indicator is 0.1 and the actual calculated coefficient of variation is 0.08, it can be considered that the performance is relatively stable and a higher score is given, such as 8 points (out of 10 points).

[0033] The node similarity between two edge computing nodes can be calculated according to the following formula:

[0034]

[0035] in, is the node similarity between the i-th edge computing node and the j-th edge computing node, is the score of the i-th edge computing node at the k-th remaining computing power resource indicator, is the score of the jth edge computing node at the kth remaining computing power resource indicator, is the score of the load fluctuation index of the i-th edge computing node, is the score of the jth edge computing node in the load fluctuation index, is the score of the i-th edge computing node in the performance stability index, is the score of the jth edge computing node in the performance stability index, , and is the preset weight, , and are greater than 0, , is the preset parameter, Greater than 0.

[0036] Step 112: Acquire multiple training samples, and determine multiple training sample clusters based on the data features and model labels of the multiple training samples.

[0037] Specifically include:

[0038] According to the data features of any two training samples, the similarity of the data features of any two training samples is calculated;

[0039] According to the label information of any two training samples, calculate the label distance between any two training samples;

[0040] Calculate the sample similarity of any two training samples based on the data feature similarity and label distance of any two training samples;

[0041] A clustering algorithm (eg, K-means clustering algorithm) is used to cluster multiple training samples based on sample similarity between any two training samples to determine multiple training sample clusters.

[0042] The data feature of the training sample is a quantitative description of the training sample, and the data feature can be a numerical value (such as age, height, price, etc.). The cosine similarity of the data features of two training samples can be calculated as the data feature similarity of the two training samples.

[0043] For example, when the training samples include images, the data features of the training samples generally refer to visual information such as pixel values, color distribution, texture, shape, etc. in the images. The cosine similarity of the visual information such as pixel values, color distribution, texture, shape, etc. in the images included in the two training samples is calculated as the data feature similarity of the two training samples.

[0044] The label distances between different label information may be predefined, and the label distances between any two training samples may be calculated based on the predefined label distances between different label information.

[0045] Taking the target type recognition based on the image as an example, multiple label information is defined, label 1: cat, label 2: dog, label 3: bird, label 4: car, and the label distances between different label information are defined as shown in Table 1.

[0046] Table 1

[0047] Tag Category cat dog bird car cat 0 0.5 1.0 1.5 dog 0.5 0 0.8 1.2 bird 1.0 0.8 0 1.0 car 1.5 1.2 1.0 0

[0048] For example, the sample similarity of two training samples can be calculated according to the following formula:

[0049]

[0050] in, is the sample similarity between the e-th training sample and the f-th training sample, and is the preset weight, and are greater than 0, , is the data feature similarity between the e-th training sample and the f-th training sample, is the label distance between the e-th training sample and the f-th training sample, is the preset parameter, Greater than 0.

[0051] Step 113, establishing a sample model library.

[0052] Among them, the sample model library is used to record the model partitioning schemes and model training parameter groups of various sample models. The model training parameter groups at least include the batch size and the number of training rounds.

[0053] According to model functions, sample models can be divided into image classification models, natural language processing models, recommendation system models, target detection models, etc.

[0054] Batch size refers to the number of samples used in a gradient update during model training. During training, the entire dataset is divided into multiple batches, each containing a fixed number of samples. The model calculates gradients based on the data in each batch and updates the model weights. Small batch sizes (such as 1, 2, or a smaller number) can make the model more sensitive to small changes in the data and help the model generalize because each gradient update is based on a very small dataset. However, this may cause the training process to be slower because more gradient update steps are required to traverse the entire dataset. In addition, small batch sizes may also cause the gradient estimate to be noisy, affecting training stability. Large batch sizes can speed up training because each gradient update is based on more data, reducing the noise in the gradient estimate. However, if the batch size is too large, the model may fall into a local optimal solution in the early stages of training, affecting the model's generalization ability.

[0055] The number of training rounds refers to the number of times the entire training dataset is traversed. In each round of training, the model traverses every sample (or every batch) in the dataset and updates the model weights based on these samples. Too few training rounds may cause the model to not fully learn the features in the dataset, resulting in underfitting. An underfit model performs poorly on both the training set and the test set. Although too many training rounds can improve the performance of the model on the training set, it may also cause the performance of the model on the test set to decline, that is, overfitting. An overfit model is too sensitive to the training data and cannot generalize well to new data.

[0056] Step 114, obtaining the model to be trained.

[0057] The model to be trained can be an image classification model, a natural language processing model, a recommendation system model, an object detection model, etc.

[0058] Step 115: based on the structural information of the model to be trained, search for similar sample models from the sample model library.

[0059] Specifically include:

[0060] Based on the structural information of the model to be trained and the structural information of the sample model, the structural similarity between the model to be trained and the sample model is calculated, and the sample models whose structural similarity is greater than the structural similarity threshold are taken as similar sample models.

[0061] Specifically, the structural information of the model may include multiple structural features, such as the number of layers, layer type (e.g., the type of neural network layer used in each layer (e.g., convolutional layer, fully connected layer, pooling layer, etc.), connection mode (e.g., the connection method between layers (e.g., sequential connection, residual connection, branch connection, etc.), number of parameters (e.g., the total number of parameters for each layer or the entire model), activation function (e.g., the type of activation function used in each layer), input / output size (e.g., the size of input and output data), etc.

[0062] The structural similarity between the model to be trained and the sample model can be calculated according to the following formula:

[0063]

[0064] in, is the structural similarity between the model to be trained and the rth sample model, is the weight corresponding to the mth structural feature, is the preset parameter, greater than 0, is the mth structural feature of the rth sample model, is the mth structural feature of the model to be trained, is the total number of structural features.

[0065] Step 116, based on the model partitioning scheme of similar sample models, determine whether to partition the model to be trained.

[0066] For example, if the model partitioning scheme for more than 50% of similar sample models is no partitioning, it is determined that the model to be trained will not be partitioned.

[0067] Step 117, if it is determined that the model to be trained is to be divided, multiple candidate model division schemes for the model to be trained are generated based on the model division schemes of similar sample models and the structural information of the model to be trained, multiple candidate model training parameter groups for the model to be trained are determined based on the model training parameter groups of similar sample models, multiple node clusters are screened based on the data size of the training samples, multiple candidate model training parameter groups for the model to be trained and multiple candidate model division schemes for the model to be trained, multiple target node clusters are determined, the optimal training scheme is determined according to the multiple target node clusters, the data size of the training samples, the multiple candidate model training parameter groups for the model to be trained and the multiple candidate model division schemes for the model to be trained, and the model to be trained is trained according to the optimal training scheme and the multiple training sample clusters to obtain a trained AI model.

[0068] Preferably, based on the data size of the training sample, multiple candidate model training parameter groups of the model to be trained, and multiple candidate model partitioning schemes of the model to be trained, multiple node clusters are screened, including:

[0069] Determine the first node indicator requirement based on the data size of the training sample, multiple candidate model training parameter groups of the model to be trained, and multiple candidate model partitioning schemes of the model to be trained, wherein the first node indicator requirement includes a first hardware indicator requirement, a first remaining computing power resource indicator requirement, a first load fluctuation indicator requirement, and a first performance stability indicator requirement;

[0070] According to the first node indicator requirement, multiple node clusters are screened.

[0071] Specifically, the first node indicator requirement can be determined by the demand determination model based on the data size of the training sample, multiple candidate model training parameter groups of the model to be trained, and multiple candidate model division schemes of the model to be trained, wherein the demand determination model can be a convolutional neural network model.

[0072] Multiple edge computing nodes can be sampled from a node cluster. If more than a preset proportion (for example, 80%) of the sampled edge computing nodes meet the node indicator requirements in terms of the score of at least one hardware indicator, the score of at least one remaining computing resource indicator, the score of the load fluctuation indicator, and the score of the performance stability indicator, then the node cluster can be used as the target node cluster.

[0073] Preferably, determining the optimal training scheme according to multiple target node clusters, the data size of the training samples, multiple candidate model training parameter groups of the model to be trained, and multiple candidate model partitioning schemes of the model to be trained includes:

[0074] For each candidate model partitioning scheme, according to multiple target node clusters, data size of training samples and multiple candidate model training parameter groups of the model to be trained, calculate the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group;

[0075] According to the scheme adaptation parameters of each candidate model partitioning scheme under each candidate model training parameter group, determine the optimal model partitioning scheme from multiple candidate model partitioning schemes, for example, perform weighted summation of the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group, calculate the comprehensive scheme adaptation parameters of the candidate model partitioning schemes, and take the candidate model partitioning scheme with the largest comprehensive scheme adaptation parameters as the optimal model partitioning scheme;

[0076] According to the optimal model partitioning scheme, the model to be trained is divided into multiple sub-models to be trained;

[0077] According to the scheme adaptation parameters of the optimal model partitioning scheme under each candidate model training parameter group, the optimal model training parameter group is determined from multiple candidate model training parameter groups. For example, according to the scheme adaptation parameters of the optimal model partitioning scheme under each candidate model training parameter group, the candidate model training parameter group with the largest scheme adaptation parameter is taken as the optimal model training parameter group;

[0078] For each target node cluster, the sub-model to be trained corresponding to the target node cluster is determined based on the score of at least one hardware indicator, the score of at least one remaining computing power resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in the target node cluster, wherein the optimal training scheme includes the optimal model partitioning scheme, the optimal model training parameter group and the sub-model to be trained corresponding to each target node cluster.

[0079] Preferably, according to multiple target node clusters, data size of training samples and multiple candidate model training parameter groups of the model to be trained, the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group are calculated, including:

[0080] According to the candidate model division scheme, the model to be trained is divided into multiple candidate sub-models to be trained;

[0081] For each candidate model training parameter group, based on the structural information of each candidate sub-model to be trained, the data size of the training sample and the candidate model training parameter group, determine the second node indicator requirement corresponding to each candidate sub-model to be trained, wherein the second node indicator requirement includes a second hardware indicator requirement, a second remaining computing power resource indicator requirement, a second load fluctuation indicator requirement and a second performance stability indicator requirement;

[0082] According to the second node indicator requirement corresponding to each candidate sub-model to be trained and the score of at least one hardware indicator, the score of at least one remaining computing resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in each target node cluster, the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group are calculated.

[0083] Specifically, the adaptation prediction model can be used to calculate the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group according to the second node indicator requirement corresponding to each candidate sub-model to be trained and the score of at least one hardware indicator, the score of at least one remaining computing power resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in each target node cluster, wherein the adaptation prediction model can be a convolutional neural network model.

[0084] The sub-model to be trained corresponding to the target node cluster can be determined by the first cluster matching model based on the second node indicator requirement of each sub-model to be trained, the score of at least one hardware indicator of the edge computing nodes included in each target node cluster, the score of at least one remaining computing power resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator, wherein the first cluster matching model can be a convolutional neural network model.

[0085] Preferably, according to the optimal training scheme and multiple training sample clusters, the model to be trained is trained to obtain the trained AI model, including:

[0086] According to the sub-model to be trained corresponding to each target node cluster, each sub-model to be trained is arranged on the edge computing node included in the corresponding target node cluster;

[0087] For each target node cluster, multiple training samples are sampled from multiple training sample clusters according to the optimal model training parameter group to generate multiple batches of training sample sets for each edge computing node included in the target node cluster. The edge computing node trains and jointly optimizes the sub-model to be trained corresponding to the target node cluster based on the multiple batches of training sample sets to obtain the trained sub-model;

[0088] Merge multiple trained sub-models to obtain a trained AI model.

[0089] Preferably, according to the optimal model training parameter group, multiple training samples are sampled from multiple training sample clusters to generate multiple batches of training sample sets for each edge computing node included in the target node cluster, including:

[0090] According to the optimal model training parameter group, multiple training samples are sampled from multiple training sample clusters based on a distribution balancing strategy to generate multiple candidate training sample sets;

[0091] For each candidate training sample set, a first sample set similarity is calculated between the training sample set and the generated training sample set of the edge computing node, and a second sample set similarity is calculated between the training sample set and the generated training sample sets of other edge computing nodes included in the target node cluster. Based on the first sample set similarity and the second sample set similarity, it is determined whether to use the candidate training sample set as a batch of training sample sets for the edge computing node.

[0092] Specifically, the comprehensive similarity of the candidate training sample set can be calculated according to the first sample set similarity between the training sample set and the generated training sample set of the edge computing node, and the second sample set similarity between the training sample set and the generated training sample sets of other edge computing nodes included in the target node cluster. When the comprehensive similarity of the candidate training sample set is less than the comprehensive similarity threshold, the candidate training sample set can be used as a batch of training sample sets for the edge computing node:

[0093]

[0094] in, is the comprehensive similarity of the tth candidate training sample set, and is the preset weight, and are greater than 0, , is the first sample set similarity between the tth candidate training sample set and the generated training sample set of the edge computing node, is the total number of training sample sets generated by edge computing nodes, is the total number of other edge computing nodes included in the target node cluster, is the total number of training sample sets generated for the g-th other edge computing nodes included in the target node cluster, It is the second sample set similarity between the t-th candidate training sample set and the generated training sample set of the g-th other edge computing node included in the target node cluster.

[0095] Step 118, if it is determined that the model to be trained does not need to be divided, the candidate model training parameters of the model to be trained are determined based on the model training parameters of the similar sample models, and based on the data size of the training samples and the multiple candidate model training parameter groups of the model to be trained, multiple node clusters are screened to determine multiple target node clusters, and the model to be trained is trained through the multiple target node clusters to obtain a trained AI model.

[0096] Specifically, the model training parameters of the similar sample model can be used as a set of candidate model training parameters. Based on the data size of the training sample and multiple candidate model training parameter groups of the model to be trained, the third node indicator requirement is determined, wherein the third node indicator requirement includes a third hardware indicator requirement, a third remaining computing power resource indicator requirement, a third load fluctuation indicator requirement, and a third performance stability indicator requirement; according to the third node indicator requirement, multiple node clusters are screened. For more descriptions on determining multiple target node clusters, please refer to the relevant description of step 117, which will not be repeated here.

[0097] The parameter adaptation parameters corresponding to each candidate model training parameter group can be calculated based on the scores of at least one hardware indicator, at least one remaining computing power resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in the multiple target node clusters, the data size of the training samples and the multiple candidate model training parameter groups of the model to be trained, and the candidate model training parameter group with the largest parameter adaptation parameters is taken as the optimal model training parameter group.

[0098] The model to be trained is arranged on the edge computing node included in the corresponding target node cluster; for each target node cluster, multiple training samples are sampled from multiple training sample clusters according to the optimal model training parameter group, and multiple batches of training sample sets are generated for each edge computing node included in the target node cluster. Based on the multiple batches of training sample sets, the edge computing node trains and jointly optimizes the model to be trained to obtain a trained sub-model.

[0099] Step 119, establish a model label for the trained AI model.

[0100] For example, model labels for AI models help organize and identify different models. Model labels for AI models usually contain short words or phrases that describe information such as model characteristics, usage, performance, and version.

[0101] Step 120: Obtain a model call request initiated by the terminal, and call the target AI model according to the model call request and the model label of each trained AI model.

[0102] Figure 2 is a module diagram of an AI model training and calling system based on edge computing according to some embodiments of this specification, such as Figure 2 As shown, the AI ​​model training and calling system based on edge computing may include a data acquisition module, a model training module and a model calling module.

[0103] The data acquisition module can be used to obtain the hardware information, remaining computing resource information and historical status information of multiple edge computing nodes, and determine multiple node clusters based on the hardware information, remaining computing resource information and historical status information of multiple edge computing nodes; it is also used to obtain multiple training samples, and determine multiple training sample clusters based on the data features and model labels of multiple training samples; it is also used to establish a sample model library, wherein the sample model library is used to record the model partitioning schemes and model training parameter groups of multiple sample models, and the model training parameter groups include at least the batch size and the number of training rounds.

[0104] The model training module can be used to obtain the model to be trained, search for similar sample models from the sample model library based on the structural information of the model to be trained, and determine whether to divide the model to be trained based on the model division schemes of the similar sample models; if it is determined that the model to be trained is to be divided, multiple candidate model division schemes for the model to be trained are generated based on the model division schemes of the similar sample models and the structural information of the model to be trained, multiple candidate model training parameter groups for the model to be trained are determined based on the model training parameter groups of the similar sample models, multiple node clusters are screened based on the data size of the training samples, the multiple candidate model training parameter groups for the model to be trained and the multiple candidate model division schemes for the model to be trained, multiple target node clusters are determined, and according to the multiple target node clusters and the data size of the training samples , multiple candidate model training parameter groups of the model to be trained and multiple candidate model division schemes of the model to be trained, determine the optimal training scheme, train the model to be trained according to the optimal training scheme and multiple training sample clusters, and obtain the trained AI model; if it is determined that the model to be trained is not to be divided, determine the candidate model training parameters of the model to be trained based on the model training parameters of similar sample models, screen multiple node clusters based on the data size of the training samples and the multiple candidate model training parameter groups of the model to be trained, determine multiple target node clusters, determine the optimal training scheme according to the multiple target node clusters, the data size of the training samples and the multiple candidate model training parameter groups of the model to be trained, train the model to be trained according to the optimal training scheme and the multiple training sample clusters, and obtain the trained AI model.

[0105] The model calling module can be used to establish the model tag of the trained AI model, obtain the model calling request initiated by the terminal, and call the target AI model according to the model calling request and the model tag of each trained AI model.

[0106] The edge computing-based AI model training and calling system can be used to execute the edge computing-based AI model training and calling method. For more descriptions of the edge computing-based AI model training and calling system, please refer to the relevant descriptions of the edge computing-based AI model training and calling method, which will not be repeated here.

[0107] Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations may also fall within the scope of this specification. Therefore, as an example and not a limitation, alternative configurations of the embodiments of this specification may be considered consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to the embodiments explicitly introduced and described in this specification.

Claims

1. The AI ​​model training and calling method based on edge computing is characterized by: include: Obtaining hardware information, remaining computing resource information, and historical status information of multiple edge computing nodes, and determining multiple node clusters based on the hardware information, remaining computing resource information, and historical status information of the multiple edge computing nodes; Acquire multiple training samples, and determine multiple training sample clusters according to data features and model labels of the multiple training samples; Establishing a sample model library, wherein the sample model library is used to record model partitioning schemes and model training parameter groups of multiple sample models, and the model training parameter group at least includes a batch size and a number of training rounds; Get the model to be trained; Based on the structural information of the model to be trained, searching for similar sample models from the sample model library; Based on the model partitioning scheme of similar sample models, determine whether to partition the model to be trained; If it is determined that the model to be trained is to be divided, multiple candidate model division schemes for the model to be trained are generated based on the model division schemes of the similar sample models and the structural information of the model to be trained, multiple candidate model training parameter groups for the model to be trained are determined based on the model training parameter groups of the similar sample models, multiple node clusters are screened based on the data size of the training samples, multiple candidate model training parameter groups for the model to be trained and multiple candidate model division schemes for the model to be trained, multiple target node clusters are determined, an optimal training scheme is determined based on the multiple target node clusters, the data size of the training samples, multiple candidate model training parameter groups for the model to be trained and multiple candidate model division schemes for the model to be trained, and the model to be trained is trained based on the optimal training scheme and the multiple training sample clusters to obtain a trained AI model; If it is determined that the model to be trained is not to be divided, the candidate model training parameters of the model to be trained are determined based on the model training parameters of the similar sample model, the multiple node clusters are screened based on the data size of the training sample and the multiple candidate model training parameter groups of the model to be trained, and multiple target node clusters are determined, and the model to be trained is trained through the target node clusters to obtain a trained AI model; Establishing a model label for the trained AI model; Obtain a model call request initiated by the terminal, and call the target AI model according to the model call request and the model label of each trained AI model; Based on the data size of the training sample, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model partitioning schemes of the model to be trained, the multiple node clusters are screened, including: Determine a first node index requirement based on the data size of the training sample, the multiple candidate model training parameter groups of the model to be trained, and the multiple candidate model partitioning schemes of the model to be trained, wherein the first node index requirement includes a first hardware index requirement, a first remaining computing power resource index requirement, a first load fluctuation index requirement, and a first performance stability index requirement; Screening the multiple node clusters according to the first node indicator requirement; Determining an optimal training scheme according to the multiple target node clusters, the data size of the training samples, the multiple candidate model training parameter groups of the model to be trained, and the multiple candidate model partitioning schemes of the model to be trained includes: For each candidate model partitioning scheme, according to the multiple target node clusters, the data size of the training sample and the multiple candidate model training parameter groups of the model to be trained, calculate the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group; Determine an optimal model partitioning scheme from multiple candidate model partitioning schemes according to the scheme adaptation parameters of each candidate model partitioning scheme under each candidate model training parameter group; According to the optimal model division scheme, the model to be trained is divided into a plurality of sub-models to be trained; Determine an optimal model training parameter group from the multiple candidate model training parameter groups according to the scheme adaptation parameters of the optimal model partitioning scheme under each candidate model training parameter group; For each of the target node clusters, based on the scores of at least one hardware indicator, at least one remaining computing resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in the target node cluster, the sub-model to be trained corresponding to the target node cluster is determined, wherein the optimal training scheme includes an optimal model partitioning scheme, an optimal model training parameter group and the sub-model to be trained corresponding to each of the target node clusters.

2. The AI ​​model training and calling method based on edge computing according to claim 1 is characterized in that: According to the hardware information, remaining computing resource information and historical status information of multiple edge computing nodes, multiple node clusters are determined, including: For each of the edge computing nodes, obtaining a score of the edge computing node in at least one hardware indicator according to the hardware information of the edge computing node; Clustering the plurality of edge computing nodes based on a score of each edge computing node in at least one hardware indicator through a clustering algorithm to determine a plurality of node units; For each of the edge computing nodes, according to the remaining computing power resource information of the edge computing node, obtain the score of the edge computing node in at least one remaining computing power resource indicator, and according to the historical status information of the edge computing node, calculate the score of the edge computing node in the load fluctuation indicator and the score of the performance stability indicator; For each of the node units, the node similarity of any two edge computing nodes included in the node unit is calculated based on the score of at least one remaining computing resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of any two edge computing nodes included in the node unit. Based on the node similarity of any two edge computing nodes included in the node unit, a clustering algorithm is used to cluster the multiple edge computing nodes included in the node unit to determine the multiple node clusters corresponding to the node unit.

3. The AI ​​model training and calling method based on edge computing according to claim 2 is characterized in that: According to the data features and label information of multiple training samples, multiple training sample clusters are determined, including: Calculate the similarity of the data features of any two training samples according to the data features of any two training samples; Calculating the label distance between any two training samples according to the label information of any two training samples; Calculating the sample similarity of any two training samples based on the data feature similarity and label distance of any two training samples; The plurality of training samples are clustered based on the sample similarity between any two of the training samples by using a clustering algorithm to determine a plurality of training sample clusters.

4. The AI ​​model training and calling method based on edge computing according to claim 2 is characterized in that: Based on the structural information of the model to be trained, searching for a similar sample model from the sample model library includes: Based on the structural information of the model to be trained and the structural information of the sample model, the structural similarity between the model to be trained and the sample model is calculated, and the sample model whose structural similarity is greater than a structural similarity threshold is taken as a similar sample model.

5. The AI ​​model training and calling method based on edge computing according to claim 1 is characterized in that: According to the multiple target node clusters, the data size of the training samples and the multiple candidate model training parameter groups of the model to be trained, calculating the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group, including: According to the candidate model division scheme, the model to be trained is divided into a plurality of candidate sub-models to be trained; For each of the candidate model training parameter groups, based on the structural information of each of the candidate sub-models to be trained, the data size of the training samples and the candidate model training parameter groups, determining the second node indicator requirement corresponding to each of the candidate sub-models to be trained; According to the second node indicator requirement corresponding to each of the candidate sub-models to be trained and the score of at least one hardware indicator, the score of at least one remaining computing resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in each target node cluster, the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group are calculated.

6. The AI ​​model training and calling method based on edge computing according to claim 1 is characterized in that: According to the optimal training scheme and the multiple training sample clusters, training the model to be trained to obtain the trained AI model includes: According to the sub-model to be trained corresponding to each target node cluster, each sub-model to be trained is arranged on the edge computing node included in the corresponding target node cluster; For each of the target node clusters, sampling multiple training samples from the multiple training sample clusters according to the optimal model training parameter group, generating multiple batches of training sample sets for each edge computing node included in the target node cluster, and the edge computing node training and jointly optimizing the sub-model to be trained corresponding to the target node cluster based on the multiple batches of training sample sets to obtain a trained sub-model; Merge multiple trained sub-models to obtain a trained AI model.

7. The AI ​​model training and calling method based on edge computing according to claim 6 is characterized in that: According to the optimal model training parameter group, sampling multiple training samples from the multiple training sample clusters to generate multiple batches of training sample sets for each edge computing node included in the target node cluster includes: According to the optimal model training parameter group, sampling multiple training samples from the multiple training sample clusters based on a distribution balancing strategy to generate multiple candidate training sample sets; For each candidate training sample set, a first sample set similarity between the training sample set and a generated training sample set of the edge computing node is calculated, and a second sample set similarity between the training sample set and a generated training sample set of other edge computing nodes included in the target node cluster is calculated. Based on the first sample set similarity and the second sample set similarity, it is determined whether to use the candidate training sample set as a batch of training sample sets for the edge computing node.

8. AI model training and calling system based on edge computing, characterized by: include: A data acquisition module is used to obtain hardware information, remaining computing resource information and historical status information of multiple edge computing nodes, and determine multiple node clusters based on the hardware information, remaining computing resource information and historical status information of multiple edge computing nodes; it is also used to obtain multiple training samples, and determine multiple training sample clusters based on the data features and model labels of the multiple training samples; it is also used to establish a sample model library, wherein the sample model library is used to record model partitioning schemes and model training parameter groups of multiple sample models, and the model training parameter group includes at least a batch size and a number of training rounds; The model training module is used to obtain the model to be trained, search for similar sample models from the sample model library based on the structural information of the model to be trained, and determine whether to divide the model to be trained based on the model division schemes of the similar sample models; if it is determined that the model to be trained is to be divided, generate multiple candidate model division schemes for the model to be trained based on the model division schemes of the similar sample models and the structural information of the model to be trained, determine multiple candidate model training parameter groups for the model to be trained based on the model training parameter groups of the similar sample models, and screen the multiple node clusters based on the data size of the training samples, the multiple candidate model training parameter groups for the model to be trained, and the multiple candidate model division schemes for the model to be trained. A plurality of target node clusters, determining an optimal training scheme according to the plurality of target node clusters, the data size of the training samples, the plurality of candidate model training parameter groups of the model to be trained, and the plurality of candidate model partitioning schemes of the model to be trained, training the model to be trained according to the optimal training scheme and the plurality of training sample clusters, and obtaining a trained AI model; if it is determined that the model to be trained is not to be partitioned, determining the candidate model training parameters of the model to be trained based on the model training parameters of the similar sample models, screening the plurality of node clusters based on the data size of the training samples and the plurality of candidate model training parameter groups of the model to be trained, determining a plurality of target node clusters, training the model to be trained through the target node clusters, and obtaining a trained AI model; A model calling module, used to establish a model tag of the trained AI model, obtain a model calling request initiated by the terminal, and call the target AI model according to the model calling request and the model tag of each trained AI model; Based on the data size of the training sample, the multiple candidate model training parameter groups of the model to be trained and the multiple candidate model partitioning schemes of the model to be trained, the multiple node clusters are screened, including: Determine a first node index requirement based on the data size of the training sample, the multiple candidate model training parameter groups of the model to be trained, and the multiple candidate model partitioning schemes of the model to be trained, wherein the first node index requirement includes a first hardware index requirement, a first remaining computing power resource index requirement, a first load fluctuation index requirement, and a first performance stability index requirement; Screening the multiple node clusters according to the first node indicator requirement; Determining an optimal training scheme according to the multiple target node clusters, the data size of the training samples, the multiple candidate model training parameter groups of the model to be trained, and the multiple candidate model partitioning schemes of the model to be trained includes: For each candidate model partitioning scheme, according to the multiple target node clusters, the data size of the training sample and the multiple candidate model training parameter groups of the model to be trained, calculate the scheme adaptation parameters of the candidate model partitioning scheme under each candidate model training parameter group; Determine an optimal model partitioning scheme from multiple candidate model partitioning schemes according to the scheme adaptation parameters of each candidate model partitioning scheme under each candidate model training parameter group; According to the optimal model division scheme, the model to be trained is divided into a plurality of sub-models to be trained; Determine an optimal model training parameter group from the multiple candidate model training parameter groups according to the scheme adaptation parameters of the optimal model partitioning scheme under each candidate model training parameter group; For each of the target node clusters, based on the scores of at least one hardware indicator, at least one remaining computing resource indicator, the score of the load fluctuation indicator and the score of the performance stability indicator of the edge computing nodes included in the target node cluster, the sub-model to be trained corresponding to the target node cluster is determined, wherein the optimal training scheme includes an optimal model partitioning scheme, an optimal model training parameter group and the sub-model to be trained corresponding to each of the target node clusters.

Citation Information

Patent Citations

  • Model training method and device, equipment and storage medium

    CN114298329A

  • Deep learning model collaborative deduction method, device and equipment based on knowledge distillation

    CN116562364A