AI model training method and system based on edge calculation, related equipment and medium

By allocating and updating sub-training tasks in an edge device self-organizing network, the problem of low training efficiency in existing technologies is solved, achieving efficient AI model training suitable for offline scenarios.

CN121809722APending Publication Date: 2026-04-07SUNGROW POWER SUPPLY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing edge computing-based AI model training solutions rely on frequent interactions with the server, resulting in low training efficiency.

Method used

By implementing a self-organizing network at the edge device level, the main edge device allocates and updates sub-training tasks and aggregates local model adjustment parameters, reducing interaction with the server.

Benefits of technology

It improves the efficiency of AI model training, reduces latency caused by frequent interactions, and is suitable for offline training scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809722A_ABST
    Figure CN121809722A_ABST
Patent Text Reader

Abstract

The invention discloses an AI model training method and system based on edge calculation, related equipment and a medium. The AI model training method based on edge calculation comprises the following steps: sending a training instruction to at least one second edge device, wherein the training instruction comprises a to-be-trained model, target data set information and a total number of training times; collecting total training data from at least one second edge device based on the target data set information; obtaining a sub-training task according to the total training data, and distributing the sub-training task to each second edge device; and receiving local model adjustment parameters obtained after each second edge device executes a round of training task on the to-be-trained model, updating the sub-training tasks based on each local model adjustment parameter, distributing the sub-training tasks to each second edge device again, and receiving the updated local model adjustment parameters again until the total number of times of training is completed. The AI model training method based on edge calculation can improve the training efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of edge computing, and in particular to an AI model training method and system based on edge computing, related equipment and a medium. BACKGROUND

[0002] Edge computing is a new computing mode that can push data processing, storage and application execution process from traditional centralized data centers to edge locations closer to data sources. By using edge computing technology, data transmission delay can be reduced to a certain extent, and data processing efficiency and real-time performance can be improved.

[0003] In related technologies, an AI model training scheme based on edge computing completely relies on the service end to allocate training tasks, that is, after each round of training task is completed by the edge device, the service end needs to summarize and allocate the data obtained after each round of training again, which increases the time delay of the training process and makes the training efficiency low. SUMMARY

[0004] The embodiments of the present application provide an AI model training method and system based on edge computing, related equipment and a medium, which can improve the training efficiency.

[0005] In a first aspect, the embodiments of the present application provide an AI model training method based on edge computing, applied to a first edge device, the AI model training method based on edge computing comprising: receiving a training instruction sent by a service end and sending the training instruction to at least one second edge device, the training instruction comprising a to-be-trained model, target data set information and total training times; collecting total training data from the at least one second edge device based on the target data set information; obtaining a sub-training task according to the total training data, distributing the sub-training task to each second edge device; receiving local model adjustment parameters obtained by each second edge device after executing one round of the sub-training task on the to-be-trained model, updating the sub-training task based on each local model adjustment parameter and distributing it to each second edge device again, receiving the updated local model adjustment parameters again until the total training times are completed, wherein the updated local model adjustment parameters are obtained by the second edge device executing one round of the updated sub-training task on the to-be-trained model.

[0006] Secondly, embodiments of this application provide an AI model training method based on edge computing, applied to a second edge device. The AI ​​model training method based on edge computing includes: receiving a sub-training task distributed by a first edge device, the sub-training task being obtained based on total training data corresponding to the training instruction; the second edge device performing one round of training on the model to be trained according to the sub-training task, obtaining corresponding local model adjustment parameters and sending them to the first edge device; receiving an updated sub-training task distributed by the first edge device again, performing another round of training on the model to be trained according to the updated sub-training task, obtaining updated local model adjustment parameters and sending them to the first edge device, until the total number of training iterations is completed.

[0007] Thirdly, embodiments of this application provide an AI model training system based on edge computing, comprising a first edge device, at least one second edge device, and a server; the first edge device is configured to receive training instructions sent by the server and send the training instructions to at least one second edge device, the training instructions including a model to be trained, target dataset information, and a total number of training iterations; the first edge device collects total training data from the at least one second edge device based on the target dataset information; the first edge device obtains sub-training tasks based on the total training data and distributes the sub-training tasks to each of the second edge devices; the second edge device is configured to receive the sub-training tasks distributed by the first edge device; the second edge device obtains sub-training tasks based on the sub-training tasks distributed by the first edge device; and the second edge device obtains sub-training tasks based on the sub-training tasks distributed by the first edge device. The task performs one round of training on the model to be trained, obtains the corresponding local model adjustment parameters, and sends them to the first edge device; the first edge device receives the local model adjustment parameters obtained by each of the second edge devices after performing one round of the sub-training task on the model to be trained, updates the sub-training task based on the local model adjustment parameters, and redistributes it to each of the second edge devices; the second edge device receives the updated sub-training task again from the first edge device, performs another round of training on the model to be trained according to the updated sub-training task, obtains the updated local model adjustment parameters, and sends them to the first edge device; the first edge device updates the local model adjustment parameters until the total number of training iterations is completed.

[0008] Fourthly, embodiments of this application provide an edge device, comprising: a training instruction processing module, configured to receive a training instruction sent by a server and send the training instruction to at least one second edge device, the training instruction including a model to be trained, target dataset information, and a total number of training iterations; a training data acquisition module, configured to collect total training data from the at least one second edge device based on the target dataset information; a task allocation module, configured to obtain sub-training tasks based on the total training data and distribute the sub-training tasks to each of the second edge devices; and a module configured to receive local model adjustment parameters obtained by each of the second edge devices after performing one round of the sub-training tasks on the model to be trained, update the sub-training tasks based on the local model adjustment parameters and redistribute them to each of the second edge devices, and receive the updated local model adjustment parameters again until the total number of training iterations is completed, wherein the updated local model adjustment parameters are obtained by the second edge device performing one round of the updated sub-training tasks on the model to be trained.

[0009] Fifthly, embodiments of this application provide an edge device, comprising: a training module, configured to receive a sub-training task distributed by a first edge device, the sub-training task being obtained based on total training data corresponding to the training instruction; the training module being configured to perform one round of training on the model to be trained according to the sub-training task, obtain corresponding local model adjustment parameters, and send them to the first edge device; the training module being configured to receive the updated sub-training task distributed by the first edge device again, perform another round of training on the model to be trained according to the updated sub-training task, obtain the updated local model adjustment parameters, and send them to the first edge device, until the total number of training iterations is completed.

[0010] Sixthly, embodiments of this application provide an electronic device, the electronic device including a memory and at least one processor, the memory being electrically connected to the at least one processor, the memory storing instructions, and the at least one processor calling the instructions in the memory to cause the electronic device to execute an edge computing-based AI model training method according to any of the foregoing embodiments of the first or second aspect of this application.

[0011] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing instructions, characterized in that, when executed by a processor, the instructions implement an edge computing-based AI model training method according to any of the foregoing embodiments of the first or second aspect of this application.

[0012] According to the technical solution provided in the embodiments of this application, after the first edge device receives the training instruction sent by the server, it sends the training instruction to at least one second edge device. The training instruction includes the model to be trained, target dataset information, and total number of training iterations. The first edge device can collect the total training data from at least one second edge device based on the target dataset information. When the first edge device is the master edge device, it receives the local model adjustment parameters obtained by each second edge device (i.e., the slave edge device) after performing one round of sub-training tasks on the model to be trained. Then, it updates the sub-training tasks based on the local model adjustment parameters and redistributes them to each second edge device. After that, it receives the updated local model adjustment parameters again until the total number of training iterations is completed. The updated local model adjustment parameters are obtained by the second edge device performing one round of updated sub-training tasks on the model to be trained. In the above AI model training scheme, multiple edge devices are organized into an edge device self-organizing network. The sub-training tasks used for training in each round are allocated and updated by the main edge device, and the local model adjustment parameters obtained in each round of training are summarized by the main edge device. During the training process, the allocation and updating of sub-training tasks used for training, as well as the summarization of data obtained in each round of training, no longer depend on interaction with the server. The allocation and updating of sub-training tasks, the training of the AI ​​model based on sub-training tasks, and the summarization of local model adjustment parameters obtained in each round of training are all performed at the device level where the edge devices are located. This reduces excessive latency caused by frequent interaction with the server, thereby improving training efficiency and facilitating implementation in offline training scenarios. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of the edge computing device collaborative processing system provided in the first embodiment of this application; Figure 2 A flowchart illustrating the AI ​​model training method based on edge computing provided in the first embodiment of this application; Figure 3 A flowchart illustrating the AI ​​model training method based on edge computing provided in the second embodiment of this application; Figure 4 A flowchart illustrating the steps of building an edge device self-organizing network including a first edge device and determining the first edge device as the main edge device in the AI ​​model training method based on edge computing provided in the second embodiment of this application. Figure 5 A flowchart illustrating the AI ​​model training method based on edge computing provided in the third embodiment of this application; Figure 6 A flowchart illustrating the AI ​​model training method based on edge computing provided in the fourth embodiment of this application; Figure 7This is a flowchart illustrating the steps of building an edge device self-organizing network including a second edge device and determining the second edge device as a slave edge device in the AI ​​model training method based on edge computing provided in the fourth embodiment of this application. Figure 8 A timing diagram of inter-device instructions in an AI model training system based on edge computing provided in the first embodiment of this application; Figure 9 A timing diagram of inter-device instructions during master-slave edge device switching in the AI ​​model training system based on edge computing provided in the first embodiment of this application; Figure 10 This is a schematic diagram of the structure of the edge device provided in the first embodiment of this application; Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0014] This application provides an AI model training method, system, related equipment, and medium based on edge computing. It is used to distribute the training task of the algorithm model to each edge device, and the main edge device summarizes the model weights learned by each edge device in each round of training, and then redistributes them to achieve synchronous updating of model weights by each edge device, thereby improving the efficiency of algorithm update and optimization.

[0015] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] This application provides an AI model training system based on edge computing. Figure 1This is a schematic diagram of the edge computing device collaborative processing system provided in the first embodiment of this application. The edge computing device collaborative processing system includes a first edge device 110, at least one second edge device 120, and a server 130. In some embodiments, the first edge device 110 and at least one second edge device 120 are configured as an edge device self-organizing network, wherein the first edge device 110 is the master edge device, and the second edge device 120 is the slave edge device. In some embodiments, the edge device self-organizing network is configured as a star network structure including the master edge device and multiple slave edge devices, and the multiple slave edge devices are communicatively connected to the master edge device.

[0017] The first edge device 110 is used to receive training instructions sent by the server 130 and send training instructions to at least one second edge device 120. The training instructions include the model to be trained, target dataset information, and total number of training iterations.

[0018] The first edge device 110 collects total training data from at least one second edge device 120 based on the target dataset information. The first edge device 110 obtains sub-training tasks based on the total training data and distributes the sub-training tasks to each of the second edge devices 120.

[0019] The second edge device 120 is used to receive sub-training tasks distributed by the first edge device 110. The second edge device 120 performs one round of training on the model to be trained according to the sub-training task, obtains the corresponding local model adjustment parameters, and sends them to the first edge device 110.

[0020] The first edge device 110 receives local model adjustment parameters obtained by each of the second edge devices 120 after performing one round of sub-training tasks on the model to be trained. Based on these local model adjustment parameters, it updates the sub-training tasks and redistributes them to each of the second edge devices 120. The second edge device 120 then receives the updated sub-training tasks from the first edge device 110, performs another round of training on the model to be trained according to the updated sub-training tasks, obtains updated local model adjustment parameters, and sends them to the first edge device 110. The first edge device 110 updates the local model adjustment parameters until the total number of training iterations is completed.

[0021] In some embodiments, the first edge device 110 and the second edge device 120 are each connected to a corresponding end-side device 140.

[0022] According to the edge computing-based AI model training system provided in this application embodiment, after the first edge device 110 receives the training instruction sent by the server 130, it sends the training instruction to at least one second edge device 120. The training instruction includes the model to be trained, target dataset information, and total training iterations. The first edge device 110 can collect the total training data from at least one second edge device 120 based on the target dataset information. When the first edge device 110 is the master edge device, it receives the local model adjustment parameters obtained by each second edge device 120 (i.e., the slave edge device) after performing one round of sub-training tasks on the model to be trained. Then, it updates the sub-training tasks based on the local model adjustment parameters and redistributes them to each second edge device 120. After that, it receives the updated local model adjustment parameters again until the total training iterations are completed. The updated local model adjustment parameters are obtained by the second edge device 120 performing one round of updated sub-training tasks on the model to be trained. In the above AI model training scheme, multiple edge devices are organized into an edge device self-organizing network. The sub-training tasks used for training in each round are allocated and updated by the main edge device, and the local model adjustment parameters obtained in each round of training are summarized by the main edge device. During the training process, the allocation and updating of sub-training tasks used for training, as well as the summarization of data obtained in each round of training, no longer depend on the interaction with the server 130. The allocation and updating of sub-training tasks, the training of the AI ​​model based on the sub-training tasks, and the summarization of local model adjustment parameters obtained in each round of training are all performed at the device level where the edge devices are located. This reduces the excessive latency caused by the need for frequent interaction with the server 130, thereby improving training efficiency and facilitating implementation in offline training scenarios.

[0023] This application embodiment also provides an AI model training method based on edge computing, which can be applied to the first edge device 110 described above. Figure 2 This is a flowchart illustrating the AI ​​model training method based on edge computing provided in the first embodiment of this application. The AI ​​model training method based on edge computing includes steps S220 to S250.

[0024] like Figure 2 In step S220, a training instruction sent by the server 130 is received, and a training instruction is sent to at least one second edge device 120. The training instruction includes the model to be trained, target dataset information, and total number of training iterations.

[0025] In step S230, total training data is collected from at least one second edge device 120 based on the target dataset information.

[0026] In some embodiments, the training instruction sent by the first edge device 110 to at least one second edge device 120 includes target dataset information. After receiving the training instruction, the second edge device 120 can search its local dataset based on the target dataset information. When the second edge device 120 determines that there is an intersection between its local dataset and the target dataset information, it sends a first response message to the first edge device 110. The first response message includes at least the intersection portion of the local datasets. In some embodiments, when the second edge device 120 determines that there is no intersection between its local dataset and the target dataset information, it sends a first response message to the first edge device 110. The first response message includes information indicating that there is no intersection between the second edge device 120's local dataset and the target dataset information.

[0027] In some embodiments, step S230 of collecting total training data from at least one second edge device 120 based on target dataset information includes: receiving first response information from each second edge device 120, wherein the first response information is the search result of the second edge device 120 on the local dataset based on the target dataset information, wherein when the search result is that there is an intersection between the local dataset and the target dataset information, the first response information includes at least the intersection part of the local dataset; summarizing the intersection parts of the local dataset in all the first response information to obtain the total training data.

[0028] In step S240, sub-training tasks are obtained based on the total training data and distributed to each second edge device 120.

[0029] In one example, the total training data can be evenly divided to obtain sub-training tasks. In other embodiments, the total training data may not be evenly divided, but may be allocated in other ways, such as according to the second resource utilization of each second edge device 120.

[0030] In step S250, the local model adjustment parameters obtained by each second edge device 120 after performing one round of sub-training tasks on the model to be trained are received. The sub-training tasks are updated based on the local model adjustment parameters and redistributed to each second edge device 120. The updated local model adjustment parameters are received again until the total number of training times is completed. The updated local model adjustment parameters are obtained by the second edge device 120 performing one round of updated sub-training tasks on the model to be trained.

[0031] In some embodiments, after the second edge device 120 performs a round of sub-training tasks or updated sub-training tasks on the model to be trained, the obtained local model adjustment parameters or updated local model adjustment parameters are, for example, model weights. Accordingly, the sub-training tasks updated based on each local model adjustment parameter can be the model weights reallocated by the first edge device 110.

[0032] In some embodiments, step S250 may include: when it is determined that the execution time of the second edge device 120 performing a round of sub-training task or the updated sub-training task is within a first duration threshold, receiving the local model adjustment parameters or the updated local model adjustment parameters of the corresponding second edge device 120; when it is determined that the execution time of the second edge device 120 performing a round of sub-training task or the updated sub-training task exceeds the first duration threshold, sending a training termination instruction to the corresponding second edge device 120.

[0033] In some embodiments, step S250 may include: receiving local model adjustment parameters obtained by each second edge device 120 after performing one round of training tasks on the model to be trained; fusing the local model adjustment parameters to obtain global model adjustment parameters; updating sub-training tasks based on the allocation of global model adjustment parameters and redistributing them to each second edge device 120; receiving the updated local model adjustment parameters again; fusing the updated local model adjustment parameters to obtain updated global model adjustment parameters; until the total number of training iterations is completed.

[0034] In the above embodiments, the local model adjustment parameters and the updated local model adjustment parameters are, for example, local model weights, and the global model adjustment parameters and the updated global model adjustment parameters are, for example, global model weights.

[0035] According to the AI ​​model training method based on edge computing provided in this application embodiment, after the first edge device 110 receives the training instruction sent by the server 130, it sends the training instruction to at least one second edge device 120. The training instruction includes the model to be trained, target dataset information, and total training iterations. The first edge device 110 can collect the total training data from at least one second edge device 120 based on the target dataset information. When the first edge device 110 is the master edge device, it receives the local model adjustment parameters obtained by each second edge device 120 (i.e., the slave edge device) after performing one round of sub-training tasks on the model to be trained. Then, it updates the sub-training tasks based on the local model adjustment parameters and redistributes them to each second edge device 120. After that, it receives the updated local model adjustment parameters again until the total training iterations are completed. The updated local model adjustment parameters are obtained by the second edge device 120 performing one round of updated sub-training tasks on the model to be trained. In the above AI model training scheme, multiple edge devices are organized into an edge device self-organizing network. The sub-training tasks used for training in each round are allocated and updated by the main edge device, and the local model adjustment parameters obtained in each round of training are summarized by the main edge device. During the training process, the allocation and updating of sub-training tasks used for training, as well as the summarization of data obtained in each round of training, no longer depend on the interaction with the server 130. The allocation and updating of sub-training tasks, the training of the AI ​​model based on the sub-training tasks, and the summarization of local model adjustment parameters obtained in each round of training are all performed at the device level where the edge devices are located. This reduces the excessive latency caused by the need for frequent interaction with the server 130, thereby improving training efficiency and facilitating implementation in offline training scenarios.

[0036] Figure 3 This is a flowchart illustrating an edge computing-based AI model training method provided in the second embodiment of this application. This edge computing-based AI model training method can be applied to the first edge device 110 described above. In this embodiment, the edge computing-based AI model training method includes steps S310 to S3100. In this embodiment, steps S320 to S350 are the same as steps S220 to S250 in the first embodiment, and will not be described in detail again.

[0037] In this embodiment, step S310 is included before step S320.

[0038] In step S310, an edge device self-organizing network including the first edge device 110 is formed, and the first edge device 110 is determined to be the master edge device.

[0039] In some embodiments, when forming an edge device self-organizing network, multiple edge devices can negotiate to elect a master edge device, and the other edge devices are slave edge devices. Figure 4This is a flowchart illustrating the step of constructing an edge device ad hoc network, including a first edge device, and determining the first edge device as the master edge device in the AI ​​model training method based on edge computing provided in the second embodiment of this application. In some embodiments, step S310 includes steps S311 to S314.

[0040] In step S311, the first edge device 110 is initialized as a slave edge device, and a voting request is sent to at least one second edge device 120 used to form an ad hoc network.

[0041] In some embodiments, a voting request includes the voting round corresponding to the voting request, the first resource utilization rate of the first edge device 110, and the first Internet Protocol (IP) information of the first edge device 110. The voting round increments after each round of voting.

[0042] In some embodiments, the resource utilization of an edge device may include CPU utilization, memory utilization, and disk utilization. That is, the first resource utilization of the first edge device 110 includes the first CPU utilization, the first memory utilization, and the first disk utilization, and the second resource utilization of the second edge device 120 includes the second CPU utilization, the second memory utilization, and the second disk utilization.

[0043] In step S312, the voting response information of the second edge device 120 in response to the voting request is received, and the vote count is calculated based on the voting response information.

[0044] In step S313, when the counted votes exceed a first threshold, the first edge device 110 is switched to the main edge device, and the main edge device sends out a voting termination message. In one example, the first threshold is half the total number of edge devices in the edge device ad hoc network.

[0045] In step S314, if the number of votes counted does not exceed the first threshold, wait to receive end voting information sent by other main edge devices.

[0046] In some embodiments, the end-voting information includes the second IP information of the primary edge device. Step S311 may further include: after the first edge device 110 switches to the primary edge device, in response to the connection request of the second edge device 120, establishing an ad hoc network connection with the second edge device 120 corresponding to the connection request. After the first edge device 110 switches to the primary edge device, the first edge device 110 establishes connections with other slave edge devices.

[0047] In some embodiments, the end-voting information includes the second IP information of the master edge device. Step S311 may further include: in response to receiving end-voting information sent by other master edge devices, sending a connection request to the master edge device based on the second IP information. That is, when a master edge device already exists in the edge device ad hoc network, the first edge device 110 remains a slave edge device and establishes a connection with the existing master edge device.

[0048] In some embodiments, step S311 may further include: after the waiting time for receiving the end-voting information sent by other master edge devices exceeds a first time duration, sending a voting request corresponding to the next round of voting to at least one second edge device 120 used to form an ad hoc network, thereby avoiding the situation where a master edge device cannot be elected for a long time. The first time duration can be set randomly.

[0049] In the above embodiments, multiple edge devices can automatically form a network at the edge device level without manual configuration, thus obtaining an edge device self-organizing network. In the edge device self-organizing network, multiple edge devices can conduct master-slave negotiation to elect a master edge device, thereby determining the master edge device and slave edge devices in the edge device self-organizing network.

[0050] In step S320, a training instruction sent by the server 130 is received, and a training instruction is sent to at least one second edge device 120. The training instruction includes the model to be trained, target dataset information, and total number of training iterations.

[0051] In step S330, total training data is collected from at least one second edge device 120 based on the target dataset information.

[0052] In step S340, sub-training tasks are obtained based on the total training data, and the sub-training tasks are distributed to each second edge device 120.

[0053] In step S350, the local model adjustment parameters obtained by each second edge device 120 after performing one round of sub-training tasks on the model to be trained are received. The sub-training tasks are updated based on the local model adjustment parameters and redistributed to each second edge device 120. The updated local model adjustment parameters are received again until the total number of training times is completed. The updated local model adjustment parameters are obtained by the second edge device 120 performing one round of updated sub-training tasks on the model to be trained.

[0054] In this embodiment, the AI ​​model training method based on edge computing further includes steps S360 to S380.

[0055] In step S360, in response to the first resource utilization rate of the first edge device 110 exceeding the first resource threshold, a master-slave switch request is sent to at least one second edge device 120.

[0056] In step S370, the second response information of each second edge device 120 in response to the master-slave switch request is received. The second response information includes the second resource utilization rate of the corresponding second edge device 120.

[0057] In step S380, based on the second response information, one of the second edge devices 120 is determined as the updated master edge device, the first edge device 110 is switched to a slave edge device, and the first edge device 110 sends the updated master edge device information to the other slave edge devices.

[0058] In this embodiment, the AI ​​model training method based on edge computing further includes steps S390 and S3100.

[0059] In step S390, after the first edge device 110 switches to a slave edge device, it sends the local model adjustment parameters obtained from the latest round of training tasks to the updated master edge device.

[0060] In step S3100, the updated sub-training task distributed by the updated main edge device is received and a round of training is performed. The updated local model adjustment parameters are then sent back to the main edge device until the total number of training iterations is completed.

[0061] When the first resource utilization rate of the first edge device 110 exceeds the first resource threshold, the actual remaining available resources of the first edge device 110 are relatively low, which may affect training efficiency. In the above embodiment, when the first resource utilization rate of the first edge device 110 exceeds the first resource threshold, a master-slave edge device switching process can be initiated, thereby switching other edge devices with more actual remaining available resources to the master edge device, ensuring efficient training.

[0062] According to the AI ​​model training method based on edge computing provided in this application embodiment, after the first edge device 110 receives the training instruction sent by the server 130, it sends the training instruction to at least one second edge device 120. The training instruction includes the model to be trained, target dataset information, and total training iterations. The first edge device 110 can collect the total training data from at least one second edge device 120 based on the target dataset information. When the first edge device 110 is the master edge device, it receives the local model adjustment parameters obtained by each second edge device 120 (i.e., the slave edge device) after performing one round of sub-training tasks on the model to be trained. Then, it updates the sub-training tasks based on the local model adjustment parameters and redistributes them to each second edge device 120. After that, it receives the updated local model adjustment parameters again until the total training iterations are completed. The updated local model adjustment parameters are obtained by the second edge device 120 performing one round of updated sub-training tasks on the model to be trained. In the above AI model training scheme, multiple edge devices are organized into an edge device self-organizing network. The sub-training tasks used for training in each round are allocated and updated by the main edge device, and the local model adjustment parameters obtained in each round of training are summarized by the main edge device. During the training process, the allocation and updating of sub-training tasks used for training, as well as the summarization of data obtained in each round of training, no longer depend on the interaction with the server 130. The allocation and updating of sub-training tasks, the training of the AI ​​model based on the sub-training tasks, and the summarization of local model adjustment parameters obtained in each round of training are all performed at the device level where the edge devices are located. This reduces the excessive latency caused by the need for frequent interaction with the server 130, thereby improving training efficiency and facilitating implementation in offline training scenarios.

[0063] Figure 5 This is a flowchart illustrating an edge computing-based AI model training method provided in the third embodiment of this application. This edge computing-based AI model training method can be applied to the aforementioned second edge device 120. The edge computing-based AI model training method includes steps S540 to S560.

[0064] In step S540, a sub-training task distributed by the first edge device 110 is received. The sub-training task is obtained based on the total training data corresponding to the training instruction.

[0065] In step S550, the second edge device 120 performs one round of training on the model to be trained according to the sub-training task, obtains the corresponding local model adjustment parameters, and sends them to the first edge device 110.

[0066] In step S560, the updated sub-training task distributed by the first edge device 110 is received again. The model to be trained is trained again according to the updated sub-training task to obtain the updated local model adjustment parameters and send them to the first edge device 110 until the total number of training times is completed.

[0067] In some embodiments, after the second edge device 120 performs a round of sub-training tasks or updated sub-training tasks on the model to be trained, the obtained local model adjustment parameters or updated local model adjustment parameters are, for example, model weights. Accordingly, the sub-training tasks updated based on each local model adjustment parameter can be the model weights reallocated by the first edge device 110.

[0068] According to the AI ​​model training method based on edge computing provided in this application embodiment, after the first edge device 110 receives the training instruction sent by the server 130, the second edge device 120 can receive the sub-training tasks distributed by the first edge device 110. The second edge device 120 performs one round of training on the model to be trained according to the sub-training tasks, obtains the corresponding local model adjustment parameters, and sends them to the first edge device 110. The first edge device 110 can update the sub-training tasks based on each local model adjustment parameter and redistribute them to each of the second edge devices 120. The second edge device 120 receives the updated sub-training tasks distributed by the first edge device 110 again, performs another round of training on the model to be trained according to the updated sub-training tasks, obtains the updated local model adjustment parameters, and sends them to the first edge device 110, until the total number of training iterations is completed. In the above AI model training scheme, multiple edge devices are organized into an edge device self-organizing network. The sub-training tasks used for training in each round are allocated and updated by the main edge device, and the local model adjustment parameters obtained in each round of training are summarized by the main edge device. During the training process, the allocation and updating of sub-training tasks used for training, as well as the summarization of data obtained in each round of training, no longer depend on the interaction with the server 130. The allocation and updating of sub-training tasks, the training of the AI ​​model based on the sub-training tasks, and the summarization of local model adjustment parameters obtained in each round of training are all performed at the device level where the edge devices are located. This reduces the excessive latency caused by the need for frequent interaction with the server 130, thereby improving training efficiency and facilitating implementation in offline training scenarios.

[0069] Figure 6 This is a flowchart illustrating an edge computing-based AI model training method provided in the fourth embodiment of this application. This edge computing-based AI model training method can be applied to the aforementioned second edge device 120. In this embodiment, the edge computing-based AI model training method includes steps S610 to S6100. In this embodiment, steps S640 to S660 are the same as steps S540 to S560 in the first embodiment, and will not be described in detail again.

[0070] In step S610, an edge device self-organizing network including the second edge device 120 is formed, and the second edge device 120 is determined to be a slave edge device.

[0071] Figure 7 This is a flowchart illustrating the steps of constructing an edge device ad hoc network, including a second edge device, and determining the second edge device as a slave edge device in the AI ​​model training method based on edge computing provided in the fourth embodiment of this application. In some embodiments, step S610 includes steps S611 to S614.

[0072] In step S611, in response to receiving a voting request from the first edge device 110, it is determined whether a master edge device already exists in the network used for self-organizing network.

[0073] In some embodiments, step S611 of determining whether a master edge device already exists in the network used for ad hoc networking may include: determining whether a master edge device already exists in the network used for ad hoc networking based on an edge device information table, wherein the edge device information table stores at least the IP information, online status, and edge device role of each edge device, and the edge device role includes master edge device and slave edge device.

[0074] In step S612, if it is determined that a primary edge device already exists, the vote is rejected.

[0075] In step S613, when it is determined that there is no primary edge device, based on the comparison result between the voting information of the second edge device 120 and the voting request, it is determined whether to generate voting response information, which is used as the number of valid votes.

[0076] In some embodiments, a voting request includes the voting round corresponding to the voting request and the first resource utilization rate of the first edge device 110.

[0077] The step of determining whether to generate voting response information based on the comparison result between the voting information of the second edge device 120 and the voting request may specifically include: if the voting round of the second edge device 120 is greater than the voting round corresponding to the voting request, then the vote is rejected; if the second resource utilization rate of the second edge device 120 is less than or equal to the first resource utilization rate of the voting request, then the vote is rejected; if the voting round of the second edge device 120 is less than or equal to the voting round corresponding to the voting request, and the second edge device 120 does not vote for the voting request, and the second resource utilization rate of the second edge device 120 is greater than the first resource utilization rate of the voting request, then voting response information is generated.

[0078] In step S614, when it is determined that voting response information has been generated, the voting response information is sent to the first edge device 110.

[0079] In the above embodiments, multiple edge devices can automatically form a network at the edge device level without manual configuration, thus obtaining an edge device self-organizing network. In the edge device self-organizing network, multiple edge devices can conduct master-slave negotiation to elect a master edge device, thereby determining the master edge device and slave edge devices in the edge device self-organizing network.

[0080] like Figure 5 In some embodiments, before performing step S640, the AI ​​model training method based on edge computing further includes steps S620 and S630.

[0081] In step S620, a training instruction sent by the first edge device 110 is received, and the local dataset is searched based on the target dataset information included in the training instruction. In step S630, when it is determined that there is an intersection between the local dataset and the target dataset information, a first response message is sent to the first edge device 110. The first response message includes at least the intersection part of the local dataset.

[0082] In step S640, a sub-training task distributed by the first edge device 110 is received. The sub-training task is obtained based on the total training data corresponding to the training instruction.

[0083] In step S650, the second edge device 120 performs one round of training on the model to be trained according to the sub-training task, obtains the corresponding local model adjustment parameters, and sends them to the first edge device 110.

[0084] In step S660, the updated sub-training task distributed by the first edge device 110 is received again. The model to be trained is trained again according to the updated sub-training task to obtain the updated local model adjustment parameters and send them to the first edge device 110 until the total number of training times is completed.

[0085] In this embodiment, the AI ​​model training method based on edge computing further includes steps S670 to S680.

[0086] In step S670, in response to receiving the master-slave switch request, a second response message is sent to the first edge device 110. The second response message includes the second resource utilization rate of the second edge device 120.

[0087] In step S680, in response to receiving the switching information, the second edge device 120 switches to the primary edge device, and the switching information is sent by the first edge device 110 to the primary edge device that has been determined to be updated.

[0088] In this embodiment, the AI ​​model training method based on edge computing further includes steps S690 to S6100.

[0089] In step S690, after the second edge device 120 switches to the master edge device, it receives the local model adjustment parameters obtained by each slave edge device after completing the latest round of training tasks, and merges the local model adjustment parameters to obtain the global model adjustment parameters.

[0090] In step S6100, the sub-training tasks are updated based on the allocation of global model adjustment parameters and redistributed to each edge device. The updated local model adjustment parameters obtained from each edge device are received again. The updated local model adjustment parameters are fused to obtain the updated global model adjustment parameters until the total number of training iterations is completed. The updated local model adjustment parameters are obtained by the edge device performing one round of updated sub-training tasks on the model to be trained.

[0091] In some embodiments, when the first resource utilization rate of the first edge device 110 exceeds a first resource threshold, the actual remaining available resources of the first edge device 110 are relatively low, which may affect training efficiency. In the above embodiments, when the first resource utilization rate of the first edge device 110 exceeds the first resource threshold, a master-slave edge device switching process can be initiated, and the first edge device 110 sends a master-slave switching request to the second edge device 120. In response to receiving the master-slave switching request, the second edge device 120 sends a second reply message to the first edge device 110. When the second edge device 120 receives the switching message, the second edge device 120 switches to the master edge device, and this switching message is used by the first edge device 110 to send to the determined updated master edge device. The above master-slave edge device switching process can switch other edge devices with more actual remaining available resources to the master edge device, ensuring efficient training.

[0092] According to the AI ​​model training method based on edge computing provided in this application embodiment, after the first edge device 110 receives the training instruction sent by the server 130, the second edge device 120 can receive the sub-training tasks distributed by the first edge device 110. The second edge device 120 performs one round of training on the model to be trained according to the sub-training tasks, obtains the corresponding local model adjustment parameters, and sends them to the first edge device 110. The first edge device 110 can update the sub-training tasks based on each local model adjustment parameter and redistribute them to each of the second edge devices 120. The second edge device 120 receives the updated sub-training tasks distributed by the first edge device 110 again, performs another round of training on the model to be trained according to the updated sub-training tasks, obtains the updated local model adjustment parameters, and sends them to the first edge device 110, until the total number of training iterations is completed. In the above AI model training scheme, multiple edge devices are organized into an edge device self-organizing network. The sub-training tasks used for training in each round are allocated and updated by the main edge device, and the local model adjustment parameters obtained in each round of training are summarized by the main edge device. During the training process, the allocation and updating of sub-training tasks used for training, as well as the summarization of data obtained in each round of training, no longer depend on the interaction with the server 130. The allocation and updating of sub-training tasks, the training of the AI ​​model based on the sub-training tasks, and the summarization of local model adjustment parameters obtained in each round of training are all performed at the device level where the edge devices are located. This reduces the excessive latency caused by the need for frequent interaction with the server 130, thereby improving training efficiency and facilitating implementation in offline training scenarios.

[0093] Figure 8 This is a timing diagram of inter-device instructions in the AI ​​model training system based on edge computing provided in the first embodiment of this application. The following will combine... Figure 8 The AI ​​model training system based on edge computing provided in the first embodiment of this application and the AI ​​model training method based on edge computing provided in the first to fourth embodiments of this application will be described.

[0094] like Figure 8The first edge device 110 receives a training instruction from the server 130 and sends a training instruction to at least one second edge device 120. The training instruction includes the model to be trained, target dataset information, and total training iterations. The second edge device 120 receives the training instruction from the first edge device 110 and searches its local dataset based on the target dataset information included in the training instruction. When the second edge device 120 determines that there is an intersection between the local dataset and the target dataset information, it sends a first response message to the first edge device 110. The first response message includes at least the intersection portion of the local datasets. When the second edge device 120 determines that there is no intersection between the local dataset and the target dataset information, it sends a first response message to the first edge device 110. This first response message includes information indicating that there is no intersection between the local dataset and the target dataset information of the second edge device 120. The first edge device 110 summarizes the intersection portions of the local datasets in all the first response messages to obtain the total training data. The first edge device 110 obtains sub-training tasks based on the total training data and distributes the sub-training tasks to each of the second edge devices 120. The second edge device 120 receives sub-training tasks distributed by the first edge device 110. The second edge device 120 performs one round of training on the model to be trained according to the sub-training task, obtains the corresponding local model adjustment parameters, and sends them to the first edge device 110. The first edge device 110 receives the local model adjustment parameters obtained by each of the second edge devices 120 after performing one round of sub-training tasks on the model to be trained, updates the sub-training tasks based on these local model adjustment parameters, and redistributes them to each of the second edge devices 120. The second edge device 120 then receives the updated sub-training tasks distributed by the first edge device 110 again, performs another round of training on the model to be trained according to the updated sub-training tasks, obtains the updated local model adjustment parameters, and sends them to the first edge device 110. The first edge device 110 updates the local model adjustment parameters until the total number of training iterations is completed.

[0095] Figure 9This is a timing diagram of inter-device instructions during master-slave edge device switching in the AI ​​model training system based on edge computing provided in the first embodiment of this application. When the first resource utilization rate of the first edge device 110 exceeds a first resource threshold, the first edge device 110 sends a master-slave switching request to at least one second edge device 120. In response to receiving the master-slave switching request, the second edge device 120 sends a second response message to the first edge device 110, the second response message including the second resource utilization rate of the second edge device 120. Based on the second response message, the first edge device 110 determines one of the second edge devices 120 as the updated master edge device and sends switching information to the determined master edge device 120. Thereafter, the first edge device 110 switches to a slave edge device. In response to receiving the switching information, the second edge device 120 switches to a master edge device. After the first edge device 110 switches to a slave edge device, it sends the local model adjustment parameters obtained from completing the latest round of training tasks to the updated master edge device. After the second edge device 120 switches to the master edge device, it receives the local model adjustment parameters obtained from the latest round of sub-training tasks completed by each slave edge device, and merges these local model adjustment parameters to obtain the global model adjustment parameters. The master edge device updates the sub-training tasks based on the allocation of the global model adjustment parameters and redistributes them to each slave edge device. It then receives the updated local model adjustment parameters from each slave edge device again, and merges these updated local model adjustment parameters to obtain the updated global model adjustment parameters. This process continues until the total number of training iterations is completed. The updated local model adjustment parameters are obtained by each slave edge device performing an updated round of sub-training tasks on the model to be trained.

[0096] This application embodiment also provides an edge device, such as the first edge device 110 in the AI ​​model training system based on edge computing provided in the first embodiment above. Figure 10 This is a schematic diagram of the structure of an edge device provided in the first embodiment of this application. The edge device includes a training instruction processing module 112, a training data acquisition module 113, and a task allocation module 114.

[0097] The training instruction processing module 112 is used to receive training instructions sent by the server 130 and send training instructions to at least one second edge device 120. The training instructions include the model to be trained, target dataset information, and total number of training iterations.

[0098] The training data acquisition module 113 is used to collect total training data from at least one second edge device 120 based on the target dataset information.

[0099] The task allocation module 114 is used to obtain sub-training tasks based on the total training data and distribute the sub-training tasks to each second edge device 120; and to receive the local model adjustment parameters obtained by each second edge device 120 after performing one round of sub-training tasks on the model to be trained, update the sub-training tasks based on the local model adjustment parameters and distribute them to each second edge device 120 again, and receive the updated local model adjustment parameters again until the total number of training times is completed, wherein the updated local model adjustment parameters are obtained by the second edge device 120 performing one round of updated sub-training tasks on the model to be trained.

[0100] According to the edge device provided in the embodiments of this application, the edge device is a first edge device 110, which includes a training instruction processing module 112, a training data acquisition module 113, and a task allocation module 114. The training instruction processing module 112 receives training instructions sent by the server 130 and sends training instructions to at least one second edge device 120. The training instructions include the model to be trained, target dataset information, and total training iterations. The training data acquisition module 113 can collect total training data from at least one second edge device 120 based on the target dataset information. When the first edge device 110 is the master edge device, the task allocation module 114 receives the local model adjustment parameters obtained by each second edge device 120 (i.e., the slave edge device) after performing one round of sub-training tasks on the model to be trained. Then, it updates the sub-training tasks based on the local model adjustment parameters and redistributes them to each second edge device 120. After that, it receives the updated local model adjustment parameters again until the total number of training iterations is completed. The updated local model adjustment parameters are obtained by the second edge device 120 performing one round of updated sub-training tasks on the model to be trained. In the above AI model training scheme, multiple edge devices are organized into an edge device self-organizing network. The sub-training tasks used for training in each round are allocated and updated by the main edge device, and the local model adjustment parameters obtained in each round of training are summarized by the main edge device. During the training process, the allocation and updating of sub-training tasks used for training, as well as the summarization of data obtained in each round of training, no longer depend on the interaction with the server 130. The allocation and updating of sub-training tasks, the training of the AI ​​model based on the sub-training tasks, and the summarization of local model adjustment parameters obtained in each round of training are all performed at the device level where the edge devices are located. This reduces the excessive latency caused by the need for frequent interaction with the server 130, thereby improving training efficiency and facilitating implementation in offline training scenarios.

[0101] This application also provides an edge device, such as the second edge device 120 in the AI ​​model training system based on edge computing provided in the first embodiment above. This edge device includes a training module.

[0102] The training module is used to receive sub-training tasks distributed by the first edge device 110. The sub-training tasks are obtained based on the total training data corresponding to the training instructions. The training module is used to perform one round of training on the model to be trained according to the sub-training tasks, obtain the corresponding local model adjustment parameters, and send them to the first edge device 110. The training module is used to receive updated sub-training tasks distributed by the first edge device 110 again, perform another round of training on the model to be trained according to the updated sub-training tasks, obtain the updated local model adjustment parameters, and send them to the first edge device 110, until the total number of training iterations is completed.

[0103] According to the edge device provided in this application embodiment, the edge device is a second edge device 120, which includes a training module. After the first edge device 110 receives the training instruction sent by the server 130, the training module of the second edge device 120 can receive sub-training tasks distributed by the first edge device 110. The second edge device 120 performs one round of training on the model to be trained according to the sub-training tasks, obtains the corresponding local model adjustment parameters, and sends them to the first edge device 110. The first edge device 110 can update the sub-training tasks based on each local model adjustment parameter and redistribute them to each of the second edge devices 120. The training module of the second edge device 120 then receives the updated sub-training tasks distributed by the first edge device 110, performs another round of training on the model to be trained according to the updated sub-training tasks, obtains the updated local model adjustment parameters, and sends them to the first edge device 110, until the total number of training iterations is completed. In the above AI model training scheme, multiple edge devices are organized into an edge device self-organizing network. The sub-training tasks used for training in each round are allocated and updated by the main edge device, and the local model adjustment parameters obtained in each round of training are summarized by the main edge device. During the training process, the allocation and updating of sub-training tasks used for training, as well as the summarization of data obtained in each round of training, no longer depend on the interaction with the server 130. The allocation and updating of sub-training tasks, the training of the AI ​​model based on the sub-training tasks, and the summarization of local model adjustment parameters obtained in each round of training are all performed at the device level where the edge devices are located. This reduces the excessive latency caused by the need for frequent interaction with the server 130, thereby improving training efficiency and facilitating implementation in offline training scenarios.

[0104] This application also provides an electronic device. Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device includes at least one processor 1101 and a memory 1102, with the memory 1102 electrically connected to at least one processor 1101. The memory 1102 stores machine-executable instructions that can be executed by the processor 1101. At least one processor 1101 calls the instructions in the memory 1102, causing the electronic device to execute the AI ​​model training method based on edge computing in any of the foregoing embodiments.

[0105] In some embodiments, the edge computing-based AI model training method is applied to a first edge device. The edge computing-based AI model training method includes: receiving a training instruction sent by a server and sending the training instruction to at least one second edge device. The training instruction includes a model to be trained, target dataset information, and a total number of training iterations. Based on the target dataset information, the method collects total training data from at least one second edge device. Based on the total training data, the method obtains sub-training tasks and distributes the sub-training tasks to each second edge device. The method receives local model adjustment parameters obtained by each second edge device after performing one round of sub-training tasks on the model to be trained. Based on the local model adjustment parameters, the method updates the sub-training tasks and redistributes them to each second edge device. The method receives the updated local model adjustment parameters again until the total number of training iterations is completed. The updated local model adjustment parameters are obtained by the second edge device performing one round of updated sub-training tasks on the model to be trained.

[0106] In some embodiments, the AI ​​model training method based on edge computing is applied to a second edge device. The AI ​​model training method based on edge computing includes: receiving a sub-training task distributed by a first edge device, wherein the sub-training task is obtained based on the total training data corresponding to the training instruction; the second edge device performs one round of training on the model to be trained according to the sub-training task, obtains the corresponding local model adjustment parameters, and sends them to the first edge device; receiving an updated sub-training task distributed by the first edge device again, performing another round of training on the model to be trained according to the updated sub-training task, obtaining the updated local model adjustment parameters, and sending them to the first edge device, until the total number of training iterations is completed.

[0107] Furthermore, Figure 11 The electronic device shown also includes a bus 1103 and a communication interface 1104. The processor 1101, the communication interface 1104 and the memory 1102 are connected via the bus 1103.

[0108] The memory 1102 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 1104 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 1103 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0109] The processor 1101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 1101 or by instructions in software form. The processor 1101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 1102. Processor 1101 reads information from memory 1102 and, in conjunction with its hardware, completes the method steps of the aforementioned embodiments.

[0110] This application also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed by a processor, implement the AI ​​model training method based on edge computing of any of the foregoing embodiments.

[0111] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0112] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0113] In the description of this application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0114] Finally, it should be noted that the above embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the technical scope disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. An AI model training method based on edge computing, applied to a first edge device, characterized in that, The AI ​​model training method based on edge computing includes: The system receives training instructions sent by the server and sends the training instructions to at least one second edge device. The training instructions include the model to be trained, target dataset information, and total number of training iterations. The total training data is collected from the at least one second edge device based on the target dataset information; Sub-training tasks are obtained based on the total training data, and the sub-training tasks are distributed to each of the second edge devices; The system receives local model adjustment parameters obtained by each of the second edge devices after performing one round of the sub-training task on the model to be trained. Based on the local model adjustment parameters, the sub-training task is updated and redistributed to each of the second edge devices. The updated local model adjustment parameters are received again until the total number of training iterations is completed. The updated local model adjustment parameters are obtained by the second edge devices performing one round of the updated sub-training task on the model to be trained.

2. The AI ​​model training method based on edge computing according to claim 1, characterized in that, The total training data collected from the at least one second edge device based on the target dataset information includes: Receive first response information from each of the second edge devices, wherein the first response information is the search result of the second edge device on the local dataset based on the target dataset information, wherein when the search result is that there is an intersection between the local dataset and the target dataset information, the first response information includes at least the intersection part of the local dataset; The intersection of all the local datasets mentioned in the first response information is summarized to obtain the total training data.

3. The AI ​​model training method based on edge computing according to claim 1, characterized in that, The process of receiving local model adjustment parameters obtained by each of the second edge devices after performing one round of the sub-training task on the model to be trained, updating the sub-training task based on each of the local model adjustment parameters and redistributing it to each of the second edge devices, and receiving the updated local model adjustment parameters again, until the total number of training iterations is completed, includes: When it is determined that the execution time of the second edge device performing one round of the sub-training task or the updated sub-training task is within a first time threshold, the local model adjustment parameters or the updated local model adjustment parameters corresponding to the second edge device are received. When it is determined that the execution time of the second edge device performing one round of the sub-training task or the updated sub-training task exceeds the first duration threshold, a training termination instruction is sent to the corresponding second edge device.

4. The AI ​​model training method based on edge computing according to claim 1, characterized in that, The process of receiving local model adjustment parameters obtained by each of the second edge devices after performing one round of the sub-training task on the model to be trained, updating the sub-training task based on each of the local model adjustment parameters and redistributing it to each of the second edge devices, and receiving the updated local model adjustment parameters again, until the total number of training iterations is completed, includes: Receive local model adjustment parameters obtained by each of the second edge devices after performing one round of the sub-training task on the model to be trained; The local model adjustment parameters are fused together to obtain the global model adjustment parameters; The sub-training tasks are updated based on the allocation of the global model adjustment parameters and redistributed to each of the second edge devices. The updated local model adjustment parameters are received again, and the updated local model adjustment parameters are fused to obtain the updated global model adjustment parameters, until the total number of training iterations is completed.

5. The AI ​​model training method based on edge computing according to claim 1, characterized in that, Also includes: In response to the first resource utilization rate of the first edge device exceeding the first resource threshold, a master-slave switch request is sent to at least one second edge device; Receive second response information from each of the second edge devices in response to the master-slave switch request, the second response information including the second resource utilization rate of the corresponding second edge device; Based on the second response information, one of the second edge devices is identified as the updated master edge device, the first edge device is switched to a slave edge device, and the first edge device sends the updated master edge device information to the other slave edge devices.

6. The AI ​​model training method based on edge computing according to claim 5, characterized in that, Also includes: After the first edge device switches to the slave edge device, the local model adjustment parameters obtained from the latest round of the sub-training task are sent to the updated master edge device. The updated sub-training task distributed by the main edge device is received and a round of training is performed. The updated local model adjustment parameters are then sent back to the main edge device until the total number of training iterations is completed.

7. An AI model training method based on edge computing, applied to a second edge device, characterized in that, The AI ​​model training method based on edge computing includes: Receive a sub-training task distributed by a first edge device, wherein the sub-training task is obtained based on the total training data corresponding to the training instruction; The second edge device performs one round of training on the model to be trained according to the sub-training task, obtains the corresponding local model adjustment parameters, and sends them to the first edge device; The updated sub-training task distributed by the first edge device is received again, and the model to be trained is trained again according to the updated sub-training task to obtain the updated local model adjustment parameters and send them to the first edge device until the total number of training times is completed.

8. The AI ​​model training method based on edge computing according to claim 7, characterized in that, Prior to the step of receiving the sub-training task distributed by the first edge device, the edge computing-based AI model training method further includes: Receive training instructions sent by the first edge device, and search the local dataset based on the target dataset information included in the training instructions; When it is determined that there is an intersection between the local dataset and the target dataset information, a first response message is sent to the first edge device, and the first response message includes at least the intersection portion of the local dataset.

9. The AI ​​model training method based on edge computing according to claim 7, characterized in that, Also includes: In response to receiving a master-slave switch request, a second response message is sent to the first edge device, the second response message including the second resource utilization rate of the second edge device; In response to receiving the switching information, the second edge device switches to the primary edge device, and the switching information is sent by the first edge device to the primary edge device that has been determined to be updated.

10. The AI ​​model training method based on edge computing according to claim 9, characterized in that, Also includes: After the second edge device switches to the main edge device, it receives the local model adjustment parameters obtained by each slave edge device after completing the latest round of the sub-training task, and merges the local model adjustment parameters to obtain the global model adjustment parameters. The sub-training tasks are updated based on the allocation of the global model adjustment parameters and redistributed to each of the edge devices. The updated local model adjustment parameters are received from each of the edge devices again. The updated local model adjustment parameters are then fused to obtain the updated global model adjustment parameters. This process continues until the total number of training iterations is completed. The updated local model adjustment parameters are obtained by the edge devices performing one round of updated sub-training tasks on the model to be trained.

11. An AI model training system based on edge computing, characterized in that, Includes a first edge device, at least one second edge device, and a server; The first edge device is used to receive the training instructions sent by the server and send the training instructions to at least one second edge device. The training instructions include the model to be trained, target dataset information, and total number of training iterations. The first edge device collects total training data from the at least one second edge device based on the target dataset information; The first edge device obtains sub-training tasks based on the total training data and distributes the sub-training tasks to each of the second edge devices; The second edge device is used to receive the sub-training task distributed by the first edge device; the second edge device performs one round of training on the model to be trained according to the sub-training task, obtains the corresponding local model adjustment parameters, and sends them to the first edge device; The first edge device receives local model adjustment parameters obtained by each of the second edge devices after performing one round of the sub-training task on the model to be trained. Based on the local model adjustment parameters, the first edge device updates the sub-training task and redistributes it to each of the second edge devices. The second edge device receives the updated sub-training task again from the first edge device, performs another round of training on the model to be trained according to the updated sub-training task, obtains the updated local model adjustment parameters, and sends them to the first edge device. The first edge device updates the local model adjustment parameters until the total number of training iterations is completed.

12. An edge device, characterized in that, include: The training instruction processing module is used to receive training instructions sent by the server and send the training instructions to at least one second edge device. The training instructions include the model to be trained, target dataset information, and total number of training iterations. The training data acquisition module is used to collect total training data from the at least one second edge device based on the target dataset information; The task allocation module is used to obtain sub-training tasks based on the total training data and distribute the sub-training tasks to each of the second edge devices; And for receiving local model adjustment parameters obtained by each of the second edge devices after performing one round of the sub-training task on the model to be trained, updating the sub-training task based on each of the local model adjustment parameters and redistributing it to each of the second edge devices, receiving the updated local model adjustment parameters again, until the total number of training times is completed, wherein the updated local model adjustment parameters are obtained by the second edge device performing one round of the updated sub-training task on the model to be trained.

13. An edge device, characterized in that, include: The training module is configured to receive sub-training tasks distributed by the first edge device, the sub-training tasks being obtained based on the total training data corresponding to the training instructions; the training module is configured to perform one round of training on the model to be trained according to the sub-training tasks, obtain the corresponding local model adjustment parameters, and send them to the first edge device; the training module is configured to receive the updated sub-training tasks distributed by the first edge device again, perform another round of training on the model to be trained according to the updated sub-training tasks, obtain the updated local model adjustment parameters, and send them to the first edge device, until the total number of training iterations is completed.

14. An electronic device, characterized in that, The electronic device includes a memory and at least one processor, the memory being electrically connected to the at least one processor, and the memory storing instructions. The at least one processor invokes the instructions in the memory, causing the electronic device to execute the AI ​​model training method based on edge computing according to any one of claims 1 to 10.

15. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the AI ​​model training method based on edge computing as described in any one of claims 1 to 10.