Model sharing method and device for multiple edge servers and storage medium
By sharing model parameters and reward values between multiple edge servers, the model is achieved collaborative training and optimization, and the problem of low detection accuracy of artificial intelligence models in multiple scenarios is solved, improving detection accuracy and model training efficiency.
Patent Information
- Application Number
- CN202510465635.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-04-15
AI Technical Summary
In the prior art, it is difficult for artificial intelligence models to maintain high detection accuracy in multiple different scenarios, resulting in poor detection results.
By sharing model parameters among multiple edge servers, and using the training information of each edge server, the model is achieved collaborative training and optimization. The specific steps include issuing a benchmark model to the edge server, determining the shared edge server based on the reward value of each edge server, and performing model sharing and reward value updates.
It improves the detection accuracy of artificial intelligence models in multiple different scenarios, makes full use of the network advantages of edge server nodes, and improves model training efficiency.
Smart Images

Figure CN120128495A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model sharing method, device and storage medium for multiple edge servers. Background Art
[0002] With the rapid development of artificial intelligence technology, more and more scenarios are being tested for security through trained artificial intelligence models. In related technologies, when artificial intelligence models are used to perform security tests on multiple different scenarios, due to differences in detection data for different scenarios, it is difficult for artificial intelligence models to maintain high detection accuracy in multiple different scenarios.
[0003] Therefore, how to improve the detection accuracy of artificial intelligence models in multiple different scenarios is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a model sharing method, device and storage medium for multiple edge servers to at least solve the problem of low detection accuracy of artificial intelligence models in multiple different scenarios in related technologies.
[0005] On the one hand, the present application provides a model sharing method for multiple edge servers, including:
[0006] Send the benchmark model to multiple edge servers;
[0007] In response to receiving model training information for training a benchmark model reported by the first edge server, obtaining reward values corresponding to each of a plurality of second edge servers other than the first edge server among the plurality of edge servers;
[0008] Determine at least one shared edge server corresponding to the first edge server from the plurality of second edge servers according to the reward values corresponding to each of the plurality of second edge servers and a preset reward threshold;
[0009] Determine the address information corresponding to at least one shared edge server, and send the address information corresponding to at least one shared edge server to the first edge server; wherein the address information is used by the first edge server to send model sharing information to the shared edge server corresponding to the address information.
[0010] On the other hand, the present application provides a model sharing method for multiple edge servers, including:
[0011] In response to receiving the benchmark model sent by the central server, training the benchmark model to obtain a trained optimization model, and generating model training information for training the benchmark model;
[0012] Report model training information to the central server;
[0013] Generate model sharing information in response to receiving the address information corresponding to each of at least one shared edge server sent by the central server;
[0014] Send the model sharing information to the shared edge server based on the address information of each shared edge server.
[0015] On the other hand, the present application provides a model sharing method for multiple edge servers, including:
[0016] Update the benchmark model based on the model sharing information in response to receiving the model sharing information sent by the first edge server to obtain an optimized model;
[0017] Generate reward information corresponding to the first edge server and report the reward information to the central server.
[0018] On the other hand, the present application provides a model sharing method for multiple edge servers, including:
[0019] The central server sends a benchmark model to multiple edge servers;
[0020] In response to receiving the benchmark model sent by the central server, the first edge server generates model training information for training the benchmark model and reports the model training information to the central server;
[0021] In response to receiving the model training information for training the benchmark model reported by the first edge server, the central server obtains the reward values corresponding to each of the multiple second edge servers other than the first edge server among the multiple edge servers; determines at least one shared edge server corresponding to the first edge server from the multiple second edge servers according to the reward values corresponding to each of the multiple second edge servers and a preset reward threshold; determines the address information corresponding to each of the at least one shared edge server, and sends the address information corresponding to each of the at least one shared edge server to the first edge server;
[0022] In response to receiving the address information corresponding to each of at least one shared edge server sent by the central server, the first edge server generates model sharing information, and sends the model sharing information to the shared edge server based on the address information of each shared edge server;
[0023] In response to receiving the model sharing information sent by the first edge server, the shared edge server generates reward information corresponding to the first edge server and reports the reward information to the central server;
[0024] The central server receives the reward information reported by at least one shared edge server, determines the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by at least one shared edge server, and updates the reward value of the first edge server.
[0025] On the other hand, the present application also provides a model sharing device for multiple edge servers, including:
[0026] The first sending module is used to send a benchmark model to multiple edge servers;
[0027] The first obtaining module is used to obtain the respective reward values of multiple second edge servers other than the first edge server among the multiple edge servers in response to receiving the model training information for training the benchmark model reported by the first edge server;
[0028] The first determining module is used to determine at least one shared edge server corresponding to the first edge server from the multiple second edge servers according to the respective reward values of the multiple second edge servers and a preset reward threshold;
[0029] The first sending module is further used to determine the respective address information of at least one shared edge server, and send the respective address information of at least one shared edge server to the first edge server; wherein, the address information is used for the first edge server to send model sharing information to the shared edge server corresponding to the address information.
[0030] On the other hand, the present application provides a model sharing device for multiple edge servers, including:
[0031] The first receiving module is used to train the benchmark model in response to receiving the benchmark model sent by the central server, obtain the optimized model after training, and generate model training information for training the benchmark model;
[0032] The second sending module is used to report the model training information to the central server;
[0033] The first generating module is used to generate model sharing information in response to receiving the respective address information of at least one shared edge server sent by the central server;
[0034] The second sending module is further used to send the model sharing information to the shared edge server based on the address information of each shared edge server.
[0035] On the other hand, the present application provides a model sharing device for multiple edge servers, including:
[0036] A second receiving module, configured to update a benchmark model based on the model sharing information in response to receiving the model sharing information sent by the first edge server, so as to obtain an optimized model;
[0037] A second generating module, configured to generate reward information corresponding to the first edge server and report the reward information to the central server.
[0038] On the other hand, the present application provides a model sharing method for multiple edge servers, including:
[0039] A first sending module, configured to send a benchmark model from the central server to multiple edge servers;
[0040] A first receiving module, configured to generate model training information for training the benchmark model in response to the first edge server receiving the benchmark model sent by the central server, and report the model training information to the central server;
[0041] A first obtaining module, configured to obtain the respective reward values corresponding to multiple second edge servers other than the first edge server among the multiple edge servers in response to the central server receiving the model training information for training the benchmark model reported by the first edge server; determine at least one sharing edge server corresponding to the first edge server from the multiple second edge servers according to the respective reward values corresponding to the multiple second edge servers and a preset reward threshold; determine the respective address information corresponding to the at least one sharing edge server, and send the respective address information corresponding to the at least one sharing edge server to the first edge server;
[0042] The first receiving module is further configured to generate model sharing information in response to the first edge server receiving the respective address information corresponding to the at least one sharing edge server, and send the model sharing information to the sharing edge server based on the address information of each sharing edge server;
[0043] A second receiving module, configured to generate reward information corresponding to the first edge server in response to the sharing edge server receiving the model sharing information sent by the first edge server, and report the reward information to the central server;
[0044] A first determining module, configured to receive the reward information reported by at least one sharing edge server by the central server, and determine the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by at least one sharing edge server, and update the reward value of the first edge server.
[0045] The present application further provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any one of the above model sharing methods for multiple edge servers when executing the computer program.
[0046] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned model sharing methods for multiple edge servers are implemented.
[0047] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any one of the above-mentioned model sharing methods for multiple edge servers are implemented.
[0048] The present application provides a model sharing method, device and storage medium for multiple edge servers. Since each edge server trains an artificial intelligence model separately first, and then shares the model sharing information generated after the model training with other edge servers, each edge server can rely on the training information of other edge servers, make full use of the network advantages of each edge server node, improve the model training efficiency, and at the same time enable the trained model to maintain high detection accuracy in multiple different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0050] Figure 1 Schematic diagram of the application scenario of the model sharing method for multiple edge servers provided by the embodiments of the present application;
[0051] Figure 2 Flow of the model sharing method for multiple edge servers provided by the embodiments of the present application Figure 1 ;
[0052] Figure 3 Flow of the model sharing method for multiple edge servers provided by the embodiments of the present application Figure 2 ;
[0053] Figure 4 Flow of the model sharing method for multiple edge servers provided by the embodiments of the present application Figure 3 ;
[0054] Figure 5 Interaction flowchart of the model sharing method for multiple edge servers provided by the embodiments of the present application;
[0055] Figure 6 Schematic diagram of the structure of the model sharing device for multiple edge servers provided by the embodiments of the present application;
[0056] Figure 7 A structural schematic diagram of the electronic device provided for this application. Specific embodiments
[0057] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0058] It should be noted that in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0059] With the rapid development of artificial intelligence technology, more and more scenarios are performing security detections through trained artificial intelligence models. In related technologies, when using an artificial intelligence model to perform security detections on multiple different scenarios, due to the environmental differences of different scenarios, it is difficult for the artificial intelligence model to maintain a high detection accuracy in multiple different scenarios.
[0060] Therefore, how to improve the detection accuracy of the artificial intelligence model in multiple different scenarios is a technical problem that needs to be solved urgently at present.
[0061] Exemplarily, with the rapid development of artificial intelligence technology, more and more places, such as hospitals, factories, schools, etc., have started intelligent transformation and begun to deploy intelligent monitoring systems based on the same algorithm. These systems usually cover application scenarios such as smoke detection, personnel gathering detection, and electronic fences, aiming to improve safety and operational efficiency. However, due to the environmental differences, data characteristics, and device performance differences of different scenarios, traditional single models often have difficulty maintaining high precision and efficiency in all scenarios. Therefore, how to effectively improve the accuracy and robustness of these models in different scenarios and how to achieve collaborative work of edge servers between various scenarios have become problems that need to be solved urgently.
[0062] To address the above technical problems, the inventor's technical concept is as follows: By connecting edge computing devices in different scenarios into an intelligent training group, while protecting data privacy, sharing model parameters can integrate the local advantages of each scenario, perform separate training and centralized optimization of the model, and thereby improve the accuracy of the entire system. Accordingly, the specific steps may include: First, train the artificial intelligence model separately through each edge server, and then share the model sharing information generated after model training with other edge servers, so that each edge server can rely on the training information of other edge servers. It can be seen that this method can make full use of the network advantages of each edge server node, improve the model training efficiency, and enable the trained model to maintain high detection accuracy in multiple different scenarios.
[0063] To enable those skilled in the art of this technology to better understand the solution of this application, the following further elaborates on this application in conjunction with the accompanying drawings and specific implementation manners.
[0064] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the model sharing method of multiple edge servers depends, the specific application environment architecture or specific hardware architecture is described herein. Refer to Figure 1 , Figure 1 is a schematic diagram of the application scenario of the model sharing method of multiple edge servers provided in the embodiment of this application. The central server is networked with multiple edge servers (taking N edge servers as an example for illustration), so that the network can communicate between the central server and the edge servers pairwise.
[0065] The central server distributes a benchmark model to multiple edge servers; the first edge server, in response to receiving the benchmark model distributed by the central server, generates model training information for training the benchmark model and reports the model training information to the central server; the central server, in response to receiving the model training information for training the benchmark model reported by the first edge server, obtains the respective reward values of multiple second edge servers other than the first edge server among the multiple edge servers; determines at least one shared edge server corresponding to the first edge server from the multiple second edge servers according to the respective reward values of the multiple second edge servers and a preset reward threshold; determines the address information corresponding to each of the at least one shared edge server and distributes the address information corresponding to each of the at least one shared edge server to the first edge server; the first edge server, in response to receiving the address information corresponding to each of the at least one shared edge server distributed by the central server, generates model sharing information and sends the model sharing information to the shared edge servers based on the address information of each shared edge server; the shared edge server, in response to receiving the model sharing information sent by the first edge server, generates reward information corresponding to the first edge server and reports the reward information to the central server; the central server receives the reward information reported by at least one shared edge server, determines the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by at least one shared edge server, and updates the reward value of the first edge server.
[0066] The model sharing method for multiple edge servers provided by the embodiments of the present application effectively manages edge servers with different architectures, fully utilizes the network advantages of each edge server node to transfer model parameters while protecting data privacy, and formulates a reward strategy to encourage each server node to train and share model parameters, effectively improving the accuracy of the algorithm.
[0067] Figure 2 It is the flow of the model sharing method for multiple edge servers provided by the embodiments of the present application Figure 1 , and the execution subject of the model sharing method for multiple edge servers can be a terminal device or a server. When the execution subject is a server, it can be a central server. As Figure 2 shown, the embodiments of the present application provide a model sharing method for multiple edge servers. Taking the execution subject as a central server as an example, the method is described in detail as follows:
[0068] S201. Distribute a benchmark model to multiple edge servers.
[0069] In the embodiments of the present application, the central server and the edge servers are networked so that the network can communicate between the central server and the edge servers pairwise.
[0070] Optionally, the network transmission protocol between the central server and the edge servers is HTTP (Hypertext Transfer Protocol). When training an artificial intelligence model, the central server can send a benchmark model to multiple edge servers through the HTTP protocol.
[0071] In the embodiments of the present application, the benchmark model is an initial artificial intelligence model in a general format. Among them, the general format supports format conversion of multiple model training frameworks and is used to realize data transmission between different model training frameworks. Optionally, the general format can be the onnx format. The onnx format can support format conversion of multiple model training frameworks.
[0072] Exemplarily, the benchmark model is a yolov5 model. The training of the yolov5 model can adopt the pytorch framework or the tensorflow framework, and both can be converted into the onnx format for data transmission.
[0073] S202. In response to receiving the model training information for training the benchmark model reported by the first edge server, obtain the respective reward values of multiple second edge servers among the multiple edge servers excluding the first edge server.
[0074] In the embodiments of the present application, the first edge server can be any edge server that trains the benchmark model. Among them, the second edge servers are the other edge servers among the multiple edge servers excluding the first edge server.
[0075] Optionally, the central server stores the reward values of each edge server. The reward value can represent the contribution of each edge server to model training and is used to motivate each edge server to train and share model parameters.
[0076] S203. Determine at least one shared edge server corresponding to the first edge server from the multiple second edge servers according to the respective reward values of the multiple second edge servers and a preset reward threshold.
[0077] In the embodiments of the present application, the value of the preset reward threshold is not specifically limited and can be set and modified as needed.
[0078] In some embodiments, the preset reward threshold can be determined according to the respective reward values of the multiple second edge servers.
[0079] Optionally, the ratio of the number of second edge servers among multiple second edge servers whose reward value is greater than the preset reward threshold to the total number of multiple second edge servers is a preset ratio. In the embodiments of the present application, the value of the preset ratio is not specifically limited and can be set and modified as needed. Exemplarily, the preset ratio can be 0.7, 0.8, 0.9, etc.
[0080] Exemplarily, there are 100 second edge servers. Among them, the number of second edge servers with a reward value greater than 10 is 90; the number of second edge servers with a reward value greater than 15 is 80; the number of second edge servers with a reward value greater than 20 is 70. In this case, if the above preset ratio is set to 0.7, the preset reward threshold is 20. If the above preset ratio is set to 0.8, the preset reward threshold is 15. If the above preset ratio is set to 0.9, the preset reward threshold is 10.
[0081] S204. Determine the address information corresponding to each of at least one shared edge server, and send the address information corresponding to each of at least one shared edge server to the first edge server; wherein, the address information is used for the first edge server to send model sharing information to the shared edge server corresponding to the address information.
[0082] Optionally, the address information corresponding to each shared edge server is virtual address information after encryption processing. In this way, the data security of each shared edge server can be protected. Correspondingly, determining the address information corresponding to each of at least one shared edge server includes: obtaining the initial address information corresponding to each of at least one shared edge server; performing encryption processing on the initial address information corresponding to each of at least one shared edge server to obtain the address information corresponding to each of at least one shared edge server.
[0083] In the embodiments of the present application, first, each edge server trains the artificial intelligence model separately, and then shares the model sharing information generated after model training with other edge servers, so that each edge server can rely on the training information of other edge servers. It can be seen that this method can make full use of the network advantages of each edge server node, improve the model training efficiency, and enable the trained model to maintain high detection accuracy in multiple different scenarios.
[0084] Furthermore, the method for the reward value of each edge server stored in the central server is introduced in detail. Optionally, the method further includes:
[0085] S205. Receive the reward information reported by at least one shared edge server.
[0086] In the embodiments of the present application, the reward information includes at least one of the following: the model parameters of the benchmark model, the third accuracy rate of the benchmark model determined by the shared edge server, the fourth accuracy rate of the optimized model determined by the shared edge server, and the number of parameters of the model sharing information.
[0087] S206. Determine the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by at least one shared edge server.
[0088] In the embodiments of the present application, the model training information includes at least one of the following: the model parameters of the benchmark model, the training parameters of the optimized model, the first accuracy rate of the benchmark model determined by the first edge server, and the second accuracy rate of the optimized model determined by the first edge server; wherein, the optimized model is obtained by the first edge server training the benchmark model through the training data set and the validation data set.
[0089] Optionally, determining the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by at least one shared edge server may include the following steps (1) to (4):
[0090] (1) Determine the model contribution reward value of the first edge server according to the third accuracy rate of the benchmark model and the fourth accuracy rate of the optimized model reported by each shared edge server.
[0091] Optionally, this step may include:
[0092] (1a) Determine the first accuracy rate change value of each shared edge server according to the third accuracy rate of the benchmark model and the fourth accuracy rate of the optimized model reported by each shared edge server; determine the average accuracy rate change value according to the first accuracy rate change value of each shared edge server.
[0093] Exemplarily, the third accuracy rate may be expressed as mAP 1 , and the fourth accuracy rate may be expressed as mAP 2 .
[0094] Among them, the average accuracy rate change value may be expressed as:
[0095]
[0096] Among them, L represents the number of shared edge servers.
[0097] (1b) Obtain the optimized model from the target edge server, determine the fifth accuracy rate of the benchmark model and the sixth accuracy rate of the optimized model, and determine the second accuracy rate change value according to the fifth accuracy rate and the sixth accuracy rate, where the target edge server is the edge server with the largest network bandwidth.
[0098] In this step, the central server can calculate the network bandwidth information between all edge servers, pull the model from the edge server with the largest network bandwidth, and evaluate the model. Optionally, the central server stores model evaluation pool data for evaluating the model effect.
[0099] Exemplarily, the fifth accuracy rate can be expressed as mAP 1 0 , and the sixth accuracy rate can be expressed as mAP 2 0 .
[0100] Among them, the change value of the second accuracy rate can be expressed as:
[0101]
[0102] (1c) Perform a weighted sum on the average accuracy rate change value and the change value of the second accuracy rate to obtain the model contribution reward value of the first edge server.
[0103] Exemplarily, the model contribution reward value of the first edge server can be expressed as:
[0104]
[0105] Among them, r m represents the model contribution reward value, L represents the number of shared edge servers, the third accuracy rate can be expressed as mAP 1 , the fourth accuracy rate can be expressed as mAP 2 , the fifth accuracy rate can be expressed as mAP 1 0 , the sixth accuracy rate can be expressed as mAP 2 0 , represents the weight of the average accuracy rate change value, represents the weight of the change value of the second accuracy rate.
[0106] In this application, since the model contribution reward value determined by combining the central server and the model contribution reward values determined by each shared edge server is used to obtain the model contribution reward value of the first edge server, the accuracy of the determined model contribution reward value is improved.
[0107] (2) Determine the model training reward value of the first edge server according to the training parameters of the optimized model reported by the first edge server.
[0108] In the embodiments of the present application, the training parameters of the optimization model include: the number of training iterations, the number of training data sets, the number of validation data sets, and the computing power parameters of the edge server; correspondingly, this step may include: determining a first ratio between the number of training iterations and the maximum number of iterations, and determining a second ratio between the number of training data sets and the maximum number of training data sets, and determining a third ratio between the number of data sets and the maximum number of validation data sets, and determining the reciprocal of the computing power parameters of the edge server; performing a weighted sum on the first ratio, the second ratio, the third ratio, and the reciprocal to obtain the model training reward value of the first edge server.
[0109] Optionally, the weights corresponding to the first ratio, the second ratio, and the third ratio are the same. Correspondingly, the model training reward value can be expressed as:
[0110]
[0111] where r t represents the model training reward value, T c represents the first ratio between the number of training iterations and the maximum number of iterations; d t represents the second ratio between the number of training data sets and the maximum number of training data sets; d v represents the third ratio between the number of data sets and the maximum number of validation data sets; C represents the computing power parameters of the edge server, represents the weights corresponding to the first ratio, the second ratio, and the third ratio, represents the weight corresponding to the computing power parameters of the edge server.
[0112] Exemplarily, the maximum number of iterations is 100, the maximum number of training data sets is 5000, and the maximum number of validation data sets is 1000. Among them, the number of training iterations is 50, the number of training data sets is 4000, and the number of validation data sets is 800. At this time, the first ratio is 0.5, the second ratio is 0.8, and the third ratio is 0.8.
[0113] (3) Determine the model sharing reward value of the first edge server according to the number of parameters of the model sharing information reported by each shared edge server.
[0114] Optionally, this step may include: determining the sum of the number of parameters of the model sharing information downloaded by the shared edge server from the first edge server according to the number of parameters of the model sharing information reported by each shared edge server; determining the model sharing reward value of the first edge server according to the product of the sum of the number of parameters of the model sharing information downloaded by the shared edge server from the first edge server and a preset coefficient.
[0115] Exemplarily, the model sharing reward value of the first edge server can be expressed as:
[0116]
[0117] Among them, r c represents the model sharing reward value, P represents the sum of the parameter quantities of the model sharing information downloaded by the shared edge server from the first edge server, represents a preset coefficient.
[0118] (4) Determine the reward value of the first edge server according to the model contribution reward value, the model training reward value, and the model sharing reward value.
[0119] S206. Update the reward value of the first edge server.
[0120] Figure 3 is the process of the model sharing method for multiple edge servers provided by the embodiments of the present application Figure 2 As Figure 3 shown, the embodiments of the present application provide a model sharing method for multiple edge servers. Taking the first edge server as the execution subject, the method is described in detail as follows:
[0121] S301. In response to receiving the benchmark model sent by the central server, train the benchmark model to obtain the trained optimized model, and generate model training information for training the benchmark model.
[0122] In the embodiments of the present application, this step may include: in response to receiving the benchmark model sent by the central server, obtaining the model parameters of the benchmark model; obtaining the training data set and the validation data set, and training the benchmark model through the training data set and the validation data set to obtain the trained optimized model; obtaining the training iteration times for training the benchmark model, and based on the training iteration times, the training data set, and the validation data set, obtaining the training parameters of the optimized model; determining the first accuracy corresponding to the benchmark model, and determining the second accuracy corresponding to the optimized model; generating model training information for training the benchmark model according to one or more of the model parameters of the benchmark model, the training parameters of the optimized model, the first accuracy, and the second accuracy.
[0123] In the embodiments of the present application, the first edge server may extract model parameter information layer by layer according to the model architecture. For example, the yolov5-s model has 214 layers, and the parameter quantities of each layer are not all the same. The total parameter quantity of extracting model parameter information layer by layer is 7.2M.
[0124] Optionally, the model parameters of the benchmark model include: model update time, number of model layers, size of each layer, and detection object information; wherein, the detection object information includes the status information of at least one detection object in the monitoring scenario, and the benchmark model is used to determine the security warning information corresponding to the monitoring scenario based on the status information of at least one detection object in the monitoring scenario.
[0125] Optionally, the first accuracy rate and the second accuracy rate can be the values of mAP0.5 (mean Average Precision). Herein, 0.5 represents the IoU (Intersection over Union) between the model prediction value and the true value. Here, the method for determining mAP0.5 is not specifically limited.
[0126] It should be noted that the edge server can be a server supporting a multi-computing power architecture. For example, it can be a server supporting the GPU (Graphics Processing Unit) computing power architecture, a server supporting the CPU (Central Processing Unit) computing power architecture, a server supporting the NPU (Neural network Processing Unit) computing power architecture, a server supporting the TPU (Tensor Processing Unit) computing power architecture, etc.
[0127] In the embodiment of the present application, before the first edge server trains the benchmark model with the training dataset and the validation dataset to obtain the trained optimized model, it is necessary to convert the benchmark model into the model required by its respective architecture.
[0128] S302. Report the model training information to the central server.
[0129] Optionally, the reported model training information is as follows:
[0130] {Minfo; mAP1; mAP1; Training; computing}
[0131] Wherein, Minfo: model information, including model update time, number of model layers, size of each layer, detection target, etc.; mAP1: the mAP0.5 value of the original model in this environment before updating the model; mAP2: the mAP0.5 value of the new model in this environment after updating the model; Training: training information, total amount of training data, total amount of validation data, number of training iterations; computing: the computing power situation of this device.
[0132] S303. Generate model sharing information in response to receiving the address information corresponding to each of at least one shared edge server sent by the central server.
[0133] Optionally, this step may include: in response to receiving the address information corresponding to each of at least one shared edge server sent by the central server, generating model sharing information according to one or more of the model parameters of the benchmark model, the training parameters of the optimized model, the first accuracy rate, the second accuracy rate, and the address information corresponding to each of at least one shared edge server; and sending the model sharing information to the shared edge server based on the address information of each shared edge server.
[0134] S304. Send the model sharing information to the shared edge server based on the address information of each shared edge server.
[0135] In the embodiment of the present application, in order to improve the transmission efficiency of the model sharing information. Before the first edge server sends the model sharing information to the shared edge server, the optimized model can be converted into a standard model, and the model parameters of the converted standard model can be segmented layer by layer to obtain the model parameters corresponding to each layer. Then, the model sharing information can be sent to the shared edge server layer by layer.
[0136] Exemplarily, the sending of the model sharing information to the shared edge server is as follows:
[0137] {Minfo; mAP1; mAP1; parameter; sharenode}
[0138] Wherein, Minfo: model information, including model update time, number of model layers, size of each layer, detection target, etc.; mAP1: the mAP0.5 value of the original model in this environment before updating the model; mAP2: the mAP0.5 value of the new model in this environment after updating the model; parameter: the specific parameter values after converting the model into a standard model and segmenting the model parameters layer by layer; sharenode: shareable edge node information.
[0139] It should be noted that in the embodiment of the present application, when there are multiple shared edge servers, the model sharing information can be sent to the shared edge server according to the transmission bandwidth between the multiple edge servers.
[0140] In some embodiments, the steps for optimizing the transmission of model parameters are as follows:
[0141] Step 1. Calculate the total number of layers L of the model and the number of parameters M of each layer.
[0142] Among them, the model can be obtained by the first edge server training a benchmark model with a training dataset and a validation dataset to obtain an optimized model after training. Among them, the model sharing information includes the number of parameters of each layer of the model.
[0143] Step 2: Calculate the bandwidth information Bij of all edge servers.
[0144] Among them, Bij is the transmission bandwidth between edge server i and edge server j.
[0145] Optionally, when the number of parameters is M, the required transfer time between two edge servers is:
[0146]
[0147] Among them, the unit of M is MB, the unit of bandwidth Bij is Mbps (megabits per second), 1 byte is equal to 8 bits, so the total number of bits is M * 8, and the transfer time is the number of bits divided by the bandwidth.
[0148] Step 3: The edge server with the largest bandwidth requests to pull the model parameters from the shared device (i.e., the first edge server).
[0149] Step 4: The shared device (i.e., the first edge server) determines whether the requesting device (the edge server with the largest bandwidth in Step 3) has the largest bandwidth. If so, proceed to the next step; otherwise, continue to wait.
[0150] Step 5: Determine whether the requesting device (the edge server with the largest bandwidth in Step 4) has finished pulling a complete layer of model parameters. If so, proceed to the next step; otherwise, continue to wait.
[0151] Step 6: The requesting device (the edge server with the largest bandwidth in Step 4) continues to broadcast the model parameter information outward.
[0152] Step 7: The remaining edge servers calculate the bandwidth information with these two devices.
[0153] In the embodiments of the present application, these two devices refer to: the first edge server and the edge server with the largest bandwidth in Step 4.
[0154] Step 8: Select the device with the largest bandwidth information to pull the model information.
[0155] In some embodiments, when the bandwidth information is the largest, the corresponding transfer time is the smallest. That is, select the device with the smallest transfer time to pull the model information.
[0156] Step 9: The remaining devices successively follow this strategy to pull the model parameters from other devices.
[0157] Optionally, when splitting the model parameters of the converted standard model layer by layer to obtain the model parameters corresponding to each layer and sending model sharing information layer by layer to the shared edge servers, in the scenario where a pair of devices is selected for each layer of the model, the transmission time T ij is minimized. Among them, T ij represents the minimum transmission time corresponding to edge server i and edge server j. Then, the total transmission time of the model parameters of this layer is determined through the maximum transmission time of multiple shared edge servers.
[0158] Exemplarily, the standard model includes L layers of model parameters. For the model parameters of each layer of the standard model, a pair of devices (i, j) is selected to minimize the transfer time. When it is determined that the model parameters of all L layers have been transmitted, the total transmission time is calculated.
[0159] Exemplarily, the total transmission time is:
[0160]
[0161] Among them, A [i] represents the earliest available time of device i; A [j] represents the earliest available time of device j; T ij represents the minimum transmission time corresponding to edge server i and edge server j; among them, starttime i represents the time when device i completes the task being executed, where starttime j represents the time when device j completes the task being executed. Among them, the task being executed can be a model training task within the current device or a data transmission task between the current device and other devices.
[0162] Step 10: Determine whether the model parameters of each layer of each edge server have been pulled. If so, execute the next step; otherwise, return to step 7.
[0163] Step 11: Each edge server uploads the model parameters and node information pulled from the previous edge server to the central server.
[0164] In the embodiments of the present disclosure, since the two edge servers corresponding to the minimum transmission time are determined according to the network bandwidth between each edge server, and the model parameters are transmitted through the two edge servers corresponding to the minimum transmission time, the transmission efficiency of the model parameters is improved.
[0165] Figure 4 is the flow of the model sharing method for multiple edge servers provided by the embodiments of this application Figure 3 . As Figure 4As shown in the figure, an embodiment of the present application provides a model sharing method for multiple edge servers. Taking the shared edge server as the execution subject, the method is described in detail as follows:
[0166] S401. In response to receiving the model sharing information sent by the first edge server, update the benchmark model based on the model sharing information to obtain an optimized model.
[0167] Optionally, when the shared edge server receives the model sharing information sent by the first edge server, convert the model sharing information into the model parameters corresponding to the shared edge server, and then update the benchmark model based on the converted model parameters to obtain an optimized model.
[0168] S402. Generate the reward information corresponding to the first edge server and report the reward information to the central server.
[0169] Optionally, generating the reward information corresponding to the first edge server includes: obtaining the server identifier of the first edge server and the number of parameters of the model sharing information; determining the third accuracy rate corresponding to the benchmark model and the fourth accuracy rate corresponding to the optimized model; generating the reward information corresponding to the first edge server according to one or more of the model parameters of the benchmark model in the model sharing information, the third accuracy rate, the fourth accuracy rate, the server identifier of the first edge server, and the number of parameters of the model sharing information.
[0170] Exemplarily, the reported reward information is as follows:
[0171] {Minfo; mAP1; mAP1; Training; computing}
[0172] Among them, Minfo: model information, including model update time, number of model layers, size of each layer, detection target, etc.; mAP1: the mAP0.5 value of the original model in this environment before updating the model; mAP2: the mAP0.5 value of the new model in this environment after updating the model; Training: training information, total amount of training data, total amount of validation data, number of training iterations; computing: computing power situation of this device.
[0173] Figure 5 This is the interaction flowchart of the model sharing method for multiple edge servers provided by the embodiment of the present application. As Figure 5 shown, an embodiment of the present application provides a model sharing method for multiple edge servers, including:
[0174] S501. The central server distributes the benchmark model to multiple edge servers.
[0175] S502. The first edge server generates model training information for training the benchmark model in response to receiving the benchmark model sent by the central server.
[0176] S503. The first edge server reports the model training information to the central server.
[0177] S504. In response to receiving the model training information for training the benchmark model reported by the first edge server, the central server obtains the respective reward values of multiple second edge servers other than the first edge server among multiple edge servers; determines at least one shared edge server corresponding to the first edge server from the multiple second edge servers according to the respective reward values of the multiple second edge servers and a preset reward threshold; and determines the address information corresponding to each of the at least one shared edge server.
[0178] S505. The central server sends the address information corresponding to each of the at least one shared edge server to the first edge server.
[0179] S506. In response to receiving the address information corresponding to each of the at least one shared edge server sent by the central server, the first edge server generates model sharing information based on the address information of each shared edge server.
[0180] S507. The first edge server sends the model sharing information to the shared edge servers.
[0181] S508. In response to receiving the model sharing information sent by the first edge server, the shared edge server generates reward information corresponding to the first edge server.
[0182] S509. The shared edge server reports the reward information to the central server.
[0183] S510. The central server receives the reward information reported by at least one shared edge server, determines the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by at least one shared edge server, and updates the reward value of the first edge server.
[0184] In the model sharing method for multiple edge servers provided by the embodiments of the present application, since each edge server first trains the artificial intelligence model separately, and then shares the model sharing information generated after the model training with other edge servers, each edge server can rely on the training information of other edge servers, make full use of the network advantages of each edge server node, improve the model training efficiency, and at the same time, enable the trained model to maintain high detection accuracy in multiple different scenarios.
[0185] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0186] Figure 6 The following is a schematic structural diagram of a model sharing device for multiple edge servers provided by an embodiment of the present application. As Figure 6 shown, an embodiment of the present application also provides a model sharing device for multiple edge servers. The device 60 includes:
[0187] A first sending module 601, configured to send a benchmark model to multiple edge servers;
[0188] A first obtaining module 602, configured to obtain, in response to receiving model training information for training the benchmark model reported by a first edge server, the respective reward values of multiple second edge servers other than the first edge server among the multiple edge servers;
[0189] A first determining module 603, configured to determine at least one shared edge server corresponding to the first edge server from the multiple second edge servers according to the respective reward values of the multiple second edge servers and a preset reward threshold;
[0190] The first sending module 601 is further configured to determine the respective address information of at least one shared edge server, and send the respective address information of at least one shared edge server to the first edge server; wherein, the address information is used for the first edge server to send model sharing information to the shared edge server corresponding to the address information.
[0191] In some embodiments, it further includes: receiving reward information reported by at least one shared edge server; determining the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by at least one shared edge server; updating the reward value of the first edge server; wherein, the model training information includes at least one of the following: model parameters of the benchmark model, training parameters of the optimized model, a first accuracy rate of the benchmark model determined by the first edge server, a second accuracy rate of the optimized model determined by the first edge server; wherein, the optimized model is obtained by the first edge server training the benchmark model through a training data set and a validation data set; wherein, the reward information includes at least one of the following: model parameters of the benchmark model, a third accuracy rate of the benchmark model determined by the shared edge server, a fourth accuracy rate of the optimized model determined by the shared edge server, the number of parameters of the model sharing information.
[0192] In some embodiments, determining the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by at least one shared edge server includes: determining the model contribution reward value of the first edge server according to the third accuracy rate of the baseline model and the fourth accuracy rate of the optimized model reported by each shared edge server; and determining the model training reward value of the first edge server according to the training parameters of the optimized model reported by the first edge server; and determining the model sharing reward value of the first edge server according to the number of parameters of the model sharing information reported by each shared edge server; determining the reward value of the first edge server according to the model contribution reward value, the model training reward value, and the model sharing reward value.
[0193] In some embodiments, determining the model contribution reward value of the first edge server according to the third accuracy rate of the baseline model and the fourth accuracy rate of the optimized model reported by each shared edge server includes: determining the first accuracy rate change value of each shared edge server according to the third accuracy rate of the baseline model and the fourth accuracy rate of the optimized model reported by each shared edge server; determining the average accuracy rate change value according to the first accuracy rate change value of each shared edge server; obtaining the optimized model from the target edge server, determining the fifth accuracy rate of the baseline model and the sixth accuracy rate of the optimized model, and determining the second accuracy rate change value according to the fifth accuracy rate and the sixth accuracy rate, where the target edge server is the edge server with the largest network bandwidth; performing a weighted sum of the average accuracy rate change value and the second accuracy rate change value to obtain the model contribution reward value of the first edge server.
[0194] In some embodiments, the training parameters of the optimized model include: the number of training iterations, the number of training data sets, the number of validation data sets, and the computing power parameters of the edge server; correspondingly, determining the model training reward value of the first edge server according to the training parameters of the optimized model reported by the first edge server includes: determining the first ratio between the number of training iterations and the maximum number of iterations, and determining the second ratio between the number of training data sets and the maximum number of training data sets, and determining the third ratio between the number of data sets and the maximum number of validation data sets, and determining the reciprocal of the computing power parameters of the edge server; performing a weighted sum of the first ratio, the second ratio, the third ratio, and the reciprocal to obtain the model training reward value of the first edge server.
[0195] In some embodiments, determining the model sharing reward value of the first edge server according to the number of parameters of the model sharing information reported by each shared edge server includes: determining the sum of the number of parameters of the model sharing information downloaded by the shared edge server from the first edge server according to the number of parameters of the model sharing information reported by each shared edge server; and determining the model sharing reward value of the first edge server according to the product of the sum of the number of parameters of the model sharing information downloaded by the shared edge server from the first edge server and a preset coefficient.
[0196] On the other hand, the present application provides a model sharing device for multiple edge servers, including:
[0197] A first receiving module, configured to train the benchmark model in response to receiving the benchmark model sent by the central server, obtain the trained optimized model, and generate model training information for training the benchmark model;
[0198] A second sending module, configured to report the model training information to the central server;
[0199] A first generating module, configured to generate model sharing information in response to receiving the address information corresponding to each of at least one shared edge server sent by the central server;
[0200] The second sending module is further configured to send the model sharing information to the shared edge server based on the address information of each shared edge server.
[0201] In some embodiments, generating model training information for training the benchmark model in response to receiving the benchmark model sent by the central server includes: in response to receiving the benchmark model sent by the central server, obtaining the model parameters of the benchmark model; obtaining a training data set and a validation data set, and training the benchmark model through the training data set and the validation data set to obtain the trained optimized model; obtaining the number of training iterations for training the benchmark model, and obtaining the training parameters of the optimized model based on the number of training iterations, the training data set, and the validation data set; determining the first accuracy rate corresponding to the benchmark model, and determining the second accuracy rate corresponding to the optimized model; and generating model training information for training the benchmark model according to one or more of the model parameters of the benchmark model, the training parameters of the optimized model, the first accuracy rate, and the second accuracy rate.
[0202] In some embodiments, the model parameters of the benchmark model include: model update time, number of model layers, size of each layer, and detection object information; wherein, the detection object information includes the status information of at least one detection object in the monitoring scenario, and the benchmark model is used to determine the security alarm information corresponding to the monitoring scenario based on the status information of at least one detection object in the monitoring scenario.
[0203] In some embodiments, in response to receiving the address information corresponding to each of at least one shared edge server sent by the central server, model sharing information is generated, including: in response to receiving the address information corresponding to each of at least one shared edge server sent by the central server, model sharing information is generated according to one or more of the model parameters of the benchmark model, the training parameters of the optimized model, the first accuracy rate, the second accuracy rate, and the address information corresponding to each of at least one shared edge server; based on the address information of each shared edge server, the model sharing information is sent to the shared edge server.
[0204] On the other hand, the present application provides a model sharing device for multiple edge servers, including:
[0205] A second receiving module, configured to update the benchmark model based on the model sharing information in response to receiving the model sharing information sent by the first edge server, so as to obtain an optimized model;
[0206] A second generating module, configured to generate reward information corresponding to the first edge server and report the reward information to the central server.
[0207] In some embodiments, generating the reward information corresponding to the first edge server includes: obtaining the server identifier of the first edge server and the number of parameters of the model sharing information; determining the third accuracy rate corresponding to the benchmark model and the fourth accuracy rate corresponding to the optimized model; generating the reward information corresponding to the first edge server according to one or more of the model parameters of the benchmark model, the third accuracy rate, the fourth accuracy rate, the server identifier of the first edge server, and the number of parameters of the model sharing information.
[0208] On the other hand, the present application provides a model sharing method for multiple edge servers, including:
[0209] A first sending module, configured to send a benchmark model from the central server to multiple edge servers;
[0210] A first receiving module, configured to generate model training information for training the benchmark model in response to the first edge server receiving the benchmark model sent by the central server and report the model training information to the central server;
[0211] The first acquisition module is configured to, when the central server responds to receiving model training information for training a benchmark model reported by a first edge server, acquire the respective reward values of multiple second edge servers among the multiple edge servers excluding the first edge server; determine at least one shared edge server corresponding to the first edge server from the multiple second edge servers according to the respective reward values of the multiple second edge servers and a preset reward threshold; determine the respective address information of the at least one shared edge server, and send the respective address information of the at least one shared edge server to the first edge server.
[0212] The first receiving module is further configured to, when the first edge server responds to receiving the respective address information of the at least one shared edge server sent by the central server, generate model sharing information, and send the model sharing information to the shared edge servers based on the address information of each shared edge server.
[0213] The second receiving module is configured to, when the shared edge server responds to receiving the model sharing information sent by the first edge server, generate reward information corresponding to the first edge server, and report the reward information to the central server.
[0214] The first determination module is configured to, when the central server receives the reward information reported by the at least one shared edge server, determine the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by the at least one shared edge server, and update the reward value of the first edge server.
[0215] For the descriptions of the features in the embodiments corresponding to the model sharing device of multiple edge servers, reference can be made to the relevant descriptions in the embodiments corresponding to the model sharing method of multiple edge servers, which will not be elaborated here one by one.
[0216] Figure 7 This is a schematic structural diagram of the electronic device provided by this application. As Figure 7 shown, the electronic device 70 provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. Among them, the processor 701, the memory 702, and the communication component 703 are connected through a bus.
[0217] In a specific implementation process, at least one processor 701 executes the computer execution instructions stored in the memory 702, so that at least one processor 701 executes the above-mentioned embodiments of the model sharing method for multiple edge servers.
[0218] For the specific implementation process of the processor 701, reference can be made to the above method embodiments, and their implementation principles and technical effects are similar, which will not be elaborated here in this embodiment.
[0219] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by the execution of the hardware processor, or can be implemented by the combination of hardware and software modules in the processor.
[0220] The memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0221] The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.
[0222] The embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any of the above embodiments of the model sharing method for multiple edge servers when running.
[0223] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs and other media that can store computer programs.
[0224] The embodiments of the present application also provide a computer program product, the above computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the model sharing method for multiple edge servers are implemented.
[0225] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above-described embodiments of the model sharing method for multiple edge servers are implemented.
[0226] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0227] The above has introduced in detail a model sharing method, apparatus, device, and storage medium for multiple edge servers provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A model sharing method for multiple edge servers, characterized in that: include: Send the benchmark model to multiple edge servers; In response to receiving model training information for training the benchmark model reported by the first edge server, obtaining reward values corresponding to each of a plurality of second edge servers other than the first edge server among the plurality of edge servers; Determine at least one shared edge server corresponding to the first edge server from the plurality of second edge servers according to the reward values corresponding to the plurality of second edge servers respectively and a preset reward threshold; Determine the address information corresponding to each of the at least one shared edge servers, and send the address information corresponding to each of the at least one shared edge servers to the first edge server; wherein the address information is used by the first edge server to send model sharing information to the shared edge server corresponding to the address information.
2. The model sharing method according to claim 1, characterized in that: Also includes: Receiving reward information reported by the at least one shared edge server; Determining a reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by the at least one shared edge server; updating a reward value of the first edge server; The model training information includes at least one of the following: a model parameter of the benchmark model, a training parameter of the optimization model, a first accuracy rate of the benchmark model determined by the first edge server, and a second accuracy rate of the optimization model determined by the first edge server; wherein the optimization model is obtained by the first edge server training the benchmark model through a training data set and a verification data set; The reward information includes at least one of the following: a model parameter of the benchmark model, a third accuracy of the benchmark model determined by the shared edge server, a fourth accuracy of the optimization model determined by the shared edge server, and a parameter amount of the model sharing information.
3. The model sharing method according to claim 2, characterized in that: The determining, according to the model training information reported by the first edge server and the reward information reported by the at least one shared edge server, a reward value of the first edge server includes: Determine the model contribution reward value of the first edge server according to the third accuracy of the benchmark model and the fourth accuracy of the optimization model reported by each shared edge server; and determine the model training reward value of the first edge server according to the training parameters of the optimization model reported by the first edge server; and determine the model sharing reward value of the first edge server according to the parameter amount of the model sharing information reported by each shared edge server; A reward value of the first edge server is determined according to the model contribution reward value, the model training reward value, and the model sharing reward value.
4. The model sharing method according to claim 3, characterized in that: The determining the model contribution reward value of the first edge server according to the third accuracy of the benchmark model and the fourth accuracy of the optimization model reported by each shared edge server includes: Determine a first accuracy change value of each shared edge server according to the third accuracy of the benchmark model and the fourth accuracy of the optimization model reported by each shared edge server; Determine an accuracy change average value according to the first accuracy change value of each shared edge server; Acquire the optimization model from a target edge server, determine a fifth accuracy of the baseline model and a sixth accuracy of the optimization model, and determine a second accuracy change value according to the fifth accuracy and the sixth accuracy, wherein the target edge server is an edge server with the largest network bandwidth; A weighted sum is performed on the accuracy change average value and the second accuracy change value to obtain a model contribution reward value of the first edge server.
5. The model sharing method according to claim 3, characterized in that: The training parameters of the optimization model include: the number of training iterations, the number of training data sets, the number of verification data sets, and the computing power parameters of the edge server; Correspondingly, determining the model training reward value of the first edge server according to the training parameters of the optimization model reported by the first edge server includes: determining a first ratio between the number of training iterations and the maximum number of iterations, and determining a second ratio between the number of training data sets and the maximum number of training data sets, and determining a third ratio between the number of data sets and the maximum number of validation data sets, and determining a reciprocal of a computing power parameter of the edge server; A weighted sum is performed on the first ratio, the second ratio, the third ratio, and the reciprocal to obtain a model training reward value of the first edge server.
6. The model sharing method according to claim 3, characterized in that: The determining the model sharing reward value of the first edge server according to the parameter amount of the model sharing information reported by each shared edge server includes: Determine, according to the parameter quantity of the model sharing information reported by each shared edge server, the sum of the parameter quantities of the model sharing information downloaded by the shared edge server from the first edge server; The model sharing reward value of the first edge server is determined according to the product of the sum of the parameter quantities of the model sharing information downloaded by the sharing edge server from the first edge server and a preset coefficient.
7. The model sharing method according to claim 1, characterized in that: The determining the address information corresponding to each of the at least one shared edge servers includes: Acquire initial address information corresponding to each of the at least one shared edge servers; The initial address information corresponding to each of the at least one shared edge servers is encrypted to obtain the address information corresponding to each of the at least one shared edge servers.
8. The model sharing method according to any one of claims 1 to 7, characterized in that: The benchmark model is an initial artificial intelligence model in a universal format; wherein the universal format supports format conversion of multiple model training frameworks and is used to realize data transmission between different model training frameworks.
9. A model sharing method for multiple edge servers, characterized in that: include: In response to receiving the benchmark model sent by the central server, training the benchmark model to obtain a trained optimization model, and generating model training information for training the benchmark model; Reporting the model training information to the central server; In response to receiving the address information corresponding to at least one shared edge server sent by the central server, generating model sharing information; The model sharing information is sent to each shared edge server based on the address information of the shared edge server.
10. The model sharing method according to claim 9, characterized in that: The step of generating model training information for training the benchmark model in response to receiving the benchmark model sent by the central server includes: In response to receiving the benchmark model sent by the central server, obtaining model parameters of the benchmark model; Obtaining a training data set and a validation data set, and training the benchmark model using the training data set and the validation data set to obtain a trained optimization model; Obtaining the number of training iterations for training the benchmark model, and obtaining training parameters of the optimization model based on the number of training iterations, the training data set, and the verification data set; Determine a first accuracy rate corresponding to the benchmark model, and determine a second accuracy rate corresponding to the optimized model; Model training information for training the baseline model is generated according to one or more of the model parameters of the baseline model, the training parameters of the optimization model, the first accuracy rate, and the second accuracy rate.
11. The model sharing method according to claim 10, characterized in that: The model parameters of the benchmark model include: model update time, number of model layers, size of each layer and detection object information; The detection object information includes status information of at least one detection object in the monitoring scene, and the benchmark model is used to determine the security alarm information corresponding to the monitoring scene based on the status information of at least one detection object in the monitoring scene.
12. The model sharing method according to claim 11, characterized in that: The generating model sharing information in response to receiving the address information corresponding to at least one shared edge server sent by the central server comprises: In response to receiving the address information corresponding to each of at least one shared edge server sent by the central server, generating model sharing information according to one or more of the model parameters of the benchmark model, the training parameters of the optimization model, the first accuracy rate, the second accuracy rate, and the address information corresponding to each of the at least one shared edge server; The model sharing information is sent to each shared edge server based on the address information of the shared edge server.
13. A model sharing method for multiple edge servers, characterized in that: include: The central server sends the benchmark model to multiple edge servers; In response to receiving the benchmark model sent by the central server, the first edge server generates model training information for training the benchmark model, and reports the model training information to the central server; The central server obtains, in response to receiving model training information for training the benchmark model reported by the first edge server, a reward value corresponding to each of a plurality of second edge servers other than the first edge server among the plurality of edge servers; Determine at least one shared edge server corresponding to the first edge server from the plurality of second edge servers according to the reward values corresponding to the plurality of second edge servers respectively and a preset reward threshold; Determine the address information corresponding to each of the at least one shared edge servers, and send the address information corresponding to each of the at least one shared edge servers to the first edge server; The first edge server generates model sharing information in response to receiving the address information corresponding to at least one shared edge server sent by the central server, and sends the model sharing information to the shared edge server based on the address information of each shared edge server; The shared edge server generates reward information corresponding to the first edge server in response to receiving the model sharing information sent by the first edge server, and reports the reward information to the central server; The central server receives the reward information reported by the at least one shared edge server, determines the reward value of the first edge server according to the model training information reported by the first edge server and the reward information reported by the at least one shared edge server, and updates the reward value of the first edge server.
14. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the model sharing method for multiple edge servers as described in any one of claims 1 to 13 when executing the computer program.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the model sharing method for multiple edge servers as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Device maintenance method and system, server end and device maintenance end
CN109146097A
Intelligent decision model training method and device, equipment and storage medium
CN115648204A
Internet of Things edge collaborative caching method based on deep reinforcement learning
CN116346837A
Distributed model training system and gradient reduction method in edge scene
CN117010485A
Abnormal data classification identification method, model parameter determination method and storage medium
CN117749515A