Task reliability guarantee method and system under edge network

CN115292037BActive Publication Date: 2025-12-23BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210872704.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2025-12-23
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

In edge networks, the reliability of federated learning tasks on mobile terminals is poor, resulting in long task execution times and high resource consumption.

Method used

By selecting highly reliable terminal devices for federated learning tasks, target terminal devices are selected based on their mobility, power consumption monitoring, and CPU utilization. Model parameters are trained locally, and finally, global parameter updates are performed on the edge server. Device selection is achieved by using the state transition matrix and CPU utilization prediction model, and the model parameter uploading process is monitored by a global timer.

Benefits of technology

It improves the reliability of federated learning tasks in edge networks, reduces the possibility of task abortion or termination, shortens task execution time, and reduces hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115292037B_ABST
    Figure CN115292037B_ABST
Patent Text Reader

Abstract

The application provides a task reliability guarantee method and system under an edge network, and relates to the technical field of edge networks. The method comprises the following steps: firstly, based on the mobility requirement, the power monitoring requirement and the CPU usage requirement of a terminal device, a target terminal device is selected. Then, each target terminal device receives an initial model issued by a target edge server, and performs local training on the initial model according to a locally stored sample data set. Finally, the target edge server receives the model parameters uploaded by each target terminal device after local training, and updates the global parameters in the target edge server. In the application, the target terminal device with the maximum reliability is selected based on multiple requirements in the device selection process, and the model parameter uploading process is monitored and constrained, so that the reliability of the task executed under the edge network is guaranteed.
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 network, and particularly relates to a task reliability guarantee method and system under an edge network. BACKGROUND

[0002] The federated learning task allows data collection and calculation to be decoupled in a central unit. That is, all data is not collected in the central unit for training, the federated learning directly brings the model to the terminal device for training, and only the trained parameters are sent to the edge server.

[0003] In the related art, in the execution process of the federated learning task of the mobile terminal under the edge network, the reliability of the entire task execution process is poor, so that a long time and a large amount of resources are consumed to complete the federated learning task. SUMMARY

[0004] The embodiments of the present application provide a task reliability guarantee method and system under an edge network, which aims to solve the problems in the background technology.

[0005] In order to solve the above technical problems, the present application is implemented as follows:

[0006] In a first aspect, the embodiments of the present application provide a task reliability guarantee method under an edge network, the method comprising:

[0007] determining a first terminal device located in a coverage range of a target edge server in a next period, and generating a first terminal device set;

[0008] selecting a second terminal device in an idle state in the next period from the first terminal device set, and generating a second terminal device set;

[0009] selecting a target terminal device satisfying a power requirement in the next period from the second terminal device set;

[0010] each target terminal device receives an initial model issued by the target edge server, and performs local training on the initial model according to a locally stored sample data set;

[0011] the target edge server receives the model parameters obtained by local training uploaded by each target terminal device, updates global parameters in the target edge server, and continues to perform the step of determining the first terminal device located in the coverage range of the target edge server in the next period, and generating the first terminal device set, until a preset global training round is reached.

[0012] Optionally, the step of determining the first terminal device located in the coverage range of the target edge server in the next period, and generating the first terminal device set, comprises:

[0013] determine a state transition matrix of each terminal device according to historical movement data of each terminal device in the total terminal device set, wherein the state transition matrix is used to represent a probability of the terminal device moving from the first edge server to the second edge server in a next period;

[0014] determine the associated edge server of each terminal device in a next period according to the position coordinate information of each terminal device in a current period and the state transition matrix;

[0015] determine the terminal device with the associated edge server as the target edge server as the first terminal device.

[0016] Optionally, in the first terminal device set, the second terminal device in an idle state is selected, and the step of generating the second terminal device set comprises:

[0017] determine a CPU occupancy rate time sequence of each first terminal device according to historical CPU usage data of each first terminal device;

[0018] predict the CPU occupancy rate of each first terminal device in a next period according to the CPU occupancy rate time sequence;

[0019] determine the second terminal device according to the relationship between the CPU occupancy rate of each first terminal device in the next period and a preset CPU occupancy rate threshold.

[0020] Optionally, the step of selecting the target terminal device satisfying the power requirement in the second terminal device set comprises:

[0021] obtain power information of each second terminal device in the second device set in a current period;

[0022] determine power information of each second terminal device in a next period according to a pre-established power loss function;

[0023] determine the target terminal device according to the relationship between the power information of each second terminal device in the next period and a preset power threshold.

[0024] Optionally, the step that each target terminal device receives an initial model issued by the target edge server and locally trains the initial model according to a locally stored sample data set comprises:

[0025] update the parameters of the initial model in the target terminal according to the following formula,

[0026]

[0027] wherein, w i(t+1) is the model parameter of the next period of the target terminal device, η is a learning rate, f represents a local loss function, w i (t) is the model parameter of the current period of the target terminal device.

[0028] Optionally, the step of receiving the model parameters uploaded by each target terminal device after local training and performing aggregation by the target edge server comprises:

[0029] acquiring the model parameter uploading time recorded by the global timer;

[0030] If the model parameter uploading time is greater than the reasonable timeout time preset by the global timer, updating the global parameters in the target edge server according to the model parameters and the corresponding weight parameters of the target terminal devices that have been received, and continuing to perform the step of determining the first device set located within the coverage range of the target edge server in the next period.

[0031] Optionally, the step of updating the global parameters in the target edge server according to the model parameters and the corresponding weight parameters of the target terminal devices that have been received comprises:

[0032] updating the global parameters in the target edge server according to the following formula,

[0033]

[0034] wherein w is the global parameter of the target edge server, |D i | represents the number of training set samples of each terminal device, w i is the model parameter of the i-th target terminal device, |∪ i D i | represents the total number of samples of all target terminal devices, and k is the number of target terminal devices.

[0035] Optionally, the method further comprises:

[0036] If the model parameter uploading time is less than or equal to the reasonable timeout time preset by the global timer, determining the number of target terminal devices whose model parameters have been received by the target edge server;

[0037] If the number of target terminal devices whose model parameters have been received by the target edge server is less than the total number of target terminal devices, continuing to perform the step of acquiring the model parameter uploading time recorded by the global timer.

[0038] Optionally, the reasonable timeout time preset by the global timer is determined by the following steps:

[0039] acquiring the calculation time and the communication time of each target terminal device;

[0040] According to the calculation time and the communication time, a reasonable timeout time of each target terminal device is determined;

[0041] According to the reasonable timeout time of each target terminal device, a reasonable timeout time of a global timer is determined.

[0042] The second aspect of the embodiment of the application provides a task reliability guarantee system under an edge network, and the system comprises:

[0043] The first screening unit is configured to determine first terminal devices located in the coverage range of the target edge server in the next period and generate a first terminal device set;

[0044] The second screening unit is configured to select second terminal devices in an idle state in the next period from the first terminal device set and generate a second terminal device set;

[0045] The third screening unit is configured to select target terminal devices meeting the power requirement in the next period from the second terminal device set.

[0046] The local training unit is configured to receive an initial model issued by the target edge server by each target terminal device, and perform local training on the initial model according to a locally stored sample data set;

[0047] The updating unit is configured to receive model parameters obtained by local training uploaded by each target terminal device by the target edge server, update global parameters in the target edge server, and continue to perform the step of determining first terminal devices located in the coverage range of the target edge server in the next period and generating a first terminal device set until a preset global training round is reached.

[0048] The third aspect of the embodiment of the application provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;

[0049] The memory is configured to store a computer program.

[0050] The processor is configured to execute the program stored on the memory, and implement the method steps provided by the first aspect of the embodiment of the application.

[0051] The fourth aspect of the embodiment of the application provides a computer readable storage medium, which stores a computer program, and the program is executed by the processor to implement the method provided by the first aspect of the embodiment of the application.

[0052] The embodiments of the present application have the following advantages: first, based on the mobility requirements of the terminal device, the power monitoring requirements and the CPU usage requirements, the target terminal device is selected. Then, each target terminal device receives the initial model issued by the target edge server, and performs local training on the initial model according to the locally stored sample data set. Finally, the target edge server receives the model parameters uploaded by each target terminal device after local training, and updates the global parameters in the target edge server. In this application, by selecting the target terminal device with the maximum reliability in the device selection process based on multiple requirements, and monitoring and restricting the model parameter uploading process, the reliability of the task executed in the edge network is ensured.

[0053] In some embodiments of the present application, compared with the task results obtained by the traditional federated learning task in the edge network, the present application has shorter task execution time, lower hardware cost and higher task reliability, and the possibility of task interruption or termination due to other conditions is lower. BRIEF DESCRIPTION OF DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0055] Figure 1 is a device architecture diagram of the federated learning task in the edge network in the embodiments of the present application;

[0056] Figure 2 is a step flow chart of a task reliability guarantee method in the edge network in the embodiments of the present application;

[0057] Figure 3 is a step flow chart of a method for restricting the model parameters uploaded by the target terminal device in the embodiments of the present application;

[0058] Figure 4 is a module schematic diagram of a task reliability guarantee device in the edge network in the embodiments of the present application. DETAILED DESCRIPTION

[0059] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0060] In the related art, the federated learning task of the edge network faces the following reliability challenges: (1) network access uncertainty of the mobile terminal, such as frequent movement and network switching; (2) uncertainty of the mobile terminal itself, such as online and offline at any time and process termination caused by power consumption problems; and (3) packet loss or jitter of the edge network. If these terminals are selected as the training terminal of the current training round, the problems caused are: points (1) and (3) cause the trained model to fail when sent to the edge server, ultimately causing the edge server to fail to receive the required number of models on time, resulting in failure of this round of training. And point (2) will cause the training to be interrupted, and the training task will be re-executed after the terminal device is reconnected online. If the above situations occur frequently during the federated learning task, the entire federated learning task will fail to complete.

[0061] The above problems can be solved by greatly increasing the redundancy, such as the terminals participating in training, but the cost of the entire task will be increased accordingly.

[0062] Therefore, the inventors put forward the technical concept of the present application: based on the mobility of the terminal device, the power monitoring, and the usage rules of the terminal application, a terminal with high reliability is selected as the execution terminal of the federated learning task, thereby minimizing the unreliable factors of each training round, thereby ensuring the reliability of the federated learning task in the edge network.

[0063] First, the federated learning task in the edge network is introduced, and its specific structure is shown in Figure 1 , which mainly includes two kinds of nodes, namely the edge server A and the terminal device B, C is the local database of each terminal device, and the edge server can be multiple. The edge server is responsible for issuing a learning task to the terminal device, i.e., the process shown by reference numeral ②, executing the learning task on each terminal device, and sending the learning result to the edge server for aggregation, i.e., the process shown by reference numeral ①, and repeating the process to obtain the final training model.

[0064] As shown in Figure 2 , a flowchart of a task reliability guarantee method in an edge network is shown. Figure 2

[0065] S201: Determine the first terminal device located in the coverage range of the target edge server in the next period, and generate a first terminal device set.

[0066] ​In this embodiment, in the process of performing a federal learning task, a target edge server performing the task is selected from a plurality of edge servers, and then when determining the terminal device used in the next round of training, the determination can be made according to whether the terminal device is within the communication coverage range of the target edge server in the next round of training, and the specific steps include:

[0067] S201-1: According to the historical movement data of each terminal device in the total terminal device set, determine the state transition matrix of each terminal device, wherein the state transition matrix is used to represent the probability of the terminal device moving from the first edge server to the second edge server in the next period.

[0068] In this embodiment, the execution of the federal learning task is started, and the total terminal device set refers to the set of all terminal devices that can be selected as target terminal devices to perform the federal learning task, and the set is defined as Z. For each terminal device in the set Z, obtain its historical movement data, which can be the correspondence between the latitude and longitude position coordinates and the time scale within a certain period of time.

[0069] As an example, the historical movement data of the corresponding terminal device A can be: time scale: 12:05:45 on July 4, 2022, latitude and longitude position coordinates: 39°56'N, 116°20'E; time scale: 14:07:43 on July 4, 2022, latitude and longitude position coordinates: 39°57'N, 116°21'E.

[0070] After obtaining the historical movement data of each terminal device, the distance between the terminal device and each edge server can be determined according to the latitude and longitude position coordinate information, and the association state of the user device and the edge server is determined. In order to predict the edge server associated with the terminal device in the next period, the association refers to the distance between the terminal device and the edge server being less than the coverage range of the edge server, and the connection between the terminal device and the edge server is modeled as a Markov model, and the association between the terminal device and the edge server is regarded as the state of the Markov model, denoted as U={N1,N2,…,Ni}, if U=N i ,…}, if U=N i , it means that the device U is associated with the i-th edge server at this time. The historical movement data of each terminal device is used to train the Markov model, and the association between the device and the edge server is regarded as the state of the Markov model, so as to obtain the state transition matrix of each terminal device, and then the transition probability between states is represented by matrix P Markov , P Markov is the state transition matrix, which is represented as follows:

[0071]

[0072] where p ij represents the probability of the Markov model from state N i to state N j , and n represents the total number of Markov states.

[0073] As an example, if there are currently 5 edge servers, numbered 1-5, p 11 represents the probability that the terminal device, after moving, is still within the coverage range of the edge server numbered 1, p 21 represents the probability that the terminal device, after moving, moves from the coverage range of the edge server numbered 2 to the coverage range of the edge server numbered 1, and p 12 represents the probability that the terminal device, after moving, moves from the coverage range of the edge server numbered 1 to the coverage range of the edge server numbered 2. Based on this, a state transition matrix that predicts the probability of each terminal device moving to other edge servers in the next period can be obtained.

[0074] S201-2: Determine the associated edge server of each terminal device in the next period according to the position coordinate information of each terminal device in the current period and the state transition matrix.

[0075] In this embodiment, the above example is continued to be described. After obtaining the state transition matrix of the terminal device, the latitude and longitude position coordinate information of each terminal device in the current period can be used to determine which edge server the terminal device is in the coverage range of, i.e., which state the terminal device is in. If the terminal device is in state N i , the state with the maximum probability is found according to the state transition matrix, and is regarded as the edge server that the device is most likely associated with in the next moment. The calculation is as follows:

[0076] P Markov (N t+l =i|N t ,…,N2,N1)=P Markov (N t+l =i|N t )。 (1)

[0077] Use formula (1) for each terminal device in the set Z to calculate the edge server associated with each terminal device in the next period. If the edge server associated with the terminal device is within the communication coverage range, the device is regarded as being within the communication coverage range in the next moment. The edge server associated with the terminal device is within the communication coverage range, which means that the edge server is the selected target edge server.

[0078] As an example, if there are currently 5 edge servers, numbered 1-5, and the current state of terminal device A is N1, it indicates that the terminal device is currently within the coverage of the edge server numbered 1, and N1 is substituted into formula 2, and the state with the maximum probability is determined according to the state transition matrix, that is, p 13 , it indicates that the probability of terminal device A moving from the edge server numbered 1 to the edge server numbered 3 in the next period is the largest, and therefore the edge server numbered 3 is the associated edge server of terminal device A.

[0079] S201-3: Determine the terminal device whose associated edge server is the target edge server as the first terminal device.

[0080] In this embodiment, after determining the associated edge server of each terminal device, the associated edge server of each terminal device is screened according to whether it is the target edge server determined in advance. If the associated edge server of the terminal device is the target edge server, the terminal device is determined as the first terminal device. Based on this, g terminal devices that meet the mobility requirement can be selected from the set Z, and the first terminal devices are integrated, and the first terminal device set Q, Q = {Q1, Q2, …, Q g}, Q e Z.

[0081] S202: Select the second terminal device in the idle state in the next period in the first terminal device set to generate a second terminal device set.

[0082] In this embodiment, after obtaining the first terminal device set that meets the mobility requirement in the next period, it is also necessary for the terminal device to have sufficient device hardware capability to support the process of executing model training, that is, the CPU of the device needs to have sufficient redundancy, that is, in the idle state, and the step of selecting the second terminal device in the idle state from the first terminal device set Q to generate the second terminal device set R includes:

[0083] S202-1: Determine the CPU occupancy time sequence of each first terminal device according to the historical CPU usage data of each first terminal device.

[0084] In this embodiment, since the user's use of the terminal device has strong periodicity, based on the CPU occupancy rate in the historical use data of the user in each first terminal device, the CPU occupancy time sequence of the first terminal device can be constructed, and then the Holt-Winters model time sequence analysis method is used to predict the use of the first terminal device in the next period, and the specific calculation steps include:

[0085] Obtain the CPU utilization rate from the user's historical usage data in the first terminal device, and establish a two-dimensional data set (x, y), where x represents time and y represents the device's CPU utilization rate. t The value is divided into three components l t b t s t , representing residual data, trend data, and seasonal data, respectively, y t The calculation method is shown in formula (2):

[0086]

[0087] In the formula m is the seasonal cycle, h is the time point postponed in the forecast, and then the following formulas (3), (4) and (5) are continuously iterated to smooth the data:

[0088] l t =α(y t -s t-m )+(1-α)(l t-1 +b t-1 (3)

[0089] b t =β(l t -l t-1 )+(1-β)b t-1 (4)

[0090] s t =γ(y t -l t-1 -b t-1 )+(1-γ)s t-m (5)

[0091] S202-2: Based on the CPU utilization time series, predict the CPU utilization of each first terminal device in the next cycle.

[0092] S202-3: Determine the second terminal device based on the relationship between the CPU utilization rate of each first terminal device in the next cycle and the preset CPU utilization rate threshold.

[0093] In the embodiments of S102-2 to S102-3, for the selected first set of terminal devices Q = {Q1, Q2, ..., Q...} g}, Q∈Z, predict the next time point t for each device. y The probability of g devices being idle in time t y The CPU utilization information sequence at each moment is O = {O1, O2, ..., O} g If O nIf ≥0, the device is considered idle. Idle devices are selected from the device set Q to obtain a new device set R, R = {R1, R2, ..., R...}. j}={R n |R n ∈Q,O n ≥O0, n=1,2,…,g}. When predicting the CPU utilization of the first terminal device in the next cycle, let the time scale corresponding to the next cycle be t. y That is, let h = t y y is calculated according to formulas (2), (3), (4), and (5). ty That is, the next period t y The CPU utilization rate of the first terminal device at any given time is denoted as 0. n Calculate the time for each first terminal device at time t in sequence. y The CPU utilization rate at any given time is used to determine the first terminal device with a utilization rate less than 00, which is considered idle. This device is then selected from the device set Q to form a new device set R = {R1, R2, ..., R...}. j}

[0094] As an example, if the first terminal device set contains 5 first terminal devices numbered AE, then according to the CPU utilization time series, the CPU utilization rates A1, B1, C1, D1, and E1 of each first terminal device are calculated respectively. If the preset CPU utilization threshold is S, and A1 and C1 are less than S, then the first terminal devices numbered A and C can be determined as the second terminal devices that meet the CPU utilization requirements. Then A and C are integrated to obtain the second terminal device set R.

[0095] S203: Select the target terminal device that meets the power requirements for the next cycle from the second set of terminal devices.

[0096] In this embodiment, after obtaining the second set of terminal devices R, it is necessary to further filter the devices in the second set of terminal devices R based on the power monitoring requirements, that is, to select target terminal devices that meet the power requirements from the second set of terminal devices R. The specific process includes:

[0097] S203-1: Obtain the current cycle power information of each second terminal device in the second device set;

[0098] S203-2: Determine the power information of each second terminal device for the next cycle based on the pre-established power loss function;

[0099] S203-3: Determine the target terminal device based on the relationship between the power information of each second terminal device in the next cycle and the preset power threshold.

[0100] In the embodiments of S203-1 to S203-3, the current power information of each second terminal device is first obtained. The power loss function can be a simple linear relationship, which is not limited in this application. Therefore, based on the power information of the second terminal device in the current period and the power loss function, the power information of the second terminal device in the next period can be predicted. The target terminal device that meets the power requirements is selected according to the threshold of the power information. That is, a prediction model is generated based on historical power information. This prediction model can predict the power usage of the device in each time period, thereby filtering the target terminal device in each period.

[0101] As an example, if the set of second terminal devices contains 5 second terminal devices numbered AE, then according to the CPU utilization time series, the CPU utilization rates A1, B1, C1, D1, and E1 of each second terminal device are calculated respectively. If the preset CPU utilization threshold is P, and B1 and E1 are greater than P, then the second terminal devices numbered B and E can be identified as target terminal devices that meet the power requirements. Then A and C are integrated to obtain the target terminal device set S.

[0102] In one feasible implementation, the judgment can also be made based on the power information of the second terminal device in the current cycle. That is, under the premise of a short training cycle, the power loss of the device is relatively small. Therefore, it can be assumed that the power of the second terminal device in the next cycle is almost unchanged. Therefore, for the set of second terminal devices R = {R1, R2, ..., R...} j If the second set of terminal devices contains j devices, then the sequence of power information obtained from the j devices is E = {E1, E2, ..., E...}. j} Select devices with a battery level greater than E0 to obtain the target terminal device set S, S = {S1, S2, ..., S...} k}={S n |S n ∈R,E n ≥E0,n=1,2,…,j}.

[0103] S204: Each target terminal device receives the initial model from the target edge server and trains the initial model locally based on the locally stored sample dataset.

[0104] In this embodiment, reliable devices are selected through steps S201-S203 to reduce the possibility of termination or interruption of the federated learning task due to device problems, thereby improving the reliability of task execution under the edge network. Therefore, after obtaining the target terminal device set S, the federated learning task for this round is executed based on the target terminal set. The specific process includes:

[0105] S204-1: Update the parameters of the initial model in the target terminal according to the following formula.

[0106]

[0107] where w i (t+1) is the model parameter of the next period of the target terminal device, η is the learning rate, f represents the local loss function, and w i (t) is the model parameter of the current period of the target terminal device.

[0108] In this embodiment, first, the k target terminal devices in the set S are informed to perform local training, i.e., the target edge server issues the initial model to the k target terminal devices, and then each target terminal device trains the initial model according to the sample data set stored locally until the preset iteration condition is reached, and the parameters in the initial model are solidified, i.e., the target terminal downloads the global parameters w i (t) from the edge server, t represents the round of local training, and the parameter updating process is as follows: η represents the learning rate, and f represents the local loss function.

[0109] S205: The target edge server receives the model parameters obtained by the local training of each target terminal device, updates the global parameters in the target edge server, and continues to perform the step of determining the first terminal device located in the coverage range of the target edge server in the next period to generate the first terminal device set until the preset global training round is reached.

[0110] In this embodiment, after each target terminal completes the initial model training locally, the model parameters obtained by the training need to be uploaded to the target edge server, so that the target edge server can update the initial model parameters, i.e., update the global parameters. Then in the next round of training, the target terminal devices are selected according to the embodiments of S201-S203, and then the updated initial model is issued to the target terminal devices, and the embodiments of S204 are continued to be executed, and the above process is repeated until the preset global training round T is reached, so as to obtain the final model and complete the federated learning task.

[0111] When each target terminal device uploads the model parameters obtained by the local training to the target edge server, in order to avoid the system from being trapped in an infinite waiting state due to device or network failure, the entire uploading process needs to be constrained, and the specific steps are as shown in Figure 3 , which specifically include:

[0112] S301: Obtain the model parameter uploading time recorded by the global timer.

[0113] In the embodiment, when the model parameter uploading is performed, the parameter uploading is generally started at the same time, and the global timer is used to monitor the time for uploading the model parameters by all target terminal devices, so as to subsequently determine whether the preset reasonable timeout time is exceeded.

[0114] S302: If the model parameter uploading time is greater than the reasonable timeout time preset by the global timer, the global parameters in the target edge server are updated according to the model parameters and the corresponding weight parameters of the target terminal devices that have been received, and the step of determining the first device set located in the coverage range of the target edge server in the next period is continued.

[0115] In the embodiment, if the model parameter uploading time recorded by the global timer is greater than the preset reasonable timeout time, and the model parameters uploaded by all target terminal devices have not been received at this time, it can be considered that some target terminals may be unable to upload the model parameters to the target edge server due to network conditions or other conditions. Therefore, in order to avoid unnecessary waiting time, the target edge server needs to directly aggregate the model parameters that have been received, and the global timer is set to ensure the reliability of the parameter aggregation of the target terminal devices.

[0116] The reasonable timeout time is determined in the following manner:

[0117] The computing time and the communication time of each target terminal device are obtained.

[0118] The reasonable timeout time of each target terminal device is determined according to the computing time and the communication time.

[0119] The reasonable timeout time of the global timer is determined according to the reasonable timeout time of each target terminal device.

[0120] In the embodiment, the communication time of each target terminal device can be calculated based on the network bandwidth and the size of the model parameters to be transmitted, and the computing time of each target terminal device can be calculated in combination with the CPU performance of the device and the model training condition. Then, the reasonable timeout time of each target terminal device is determined according to the computing time and the communication time, and finally, the maximum value of the reasonable timeout time of the target terminal devices is taken as the reasonable timeout time of the global timer.

[0121] The step of updating the global parameters in the target edge server according to the model parameters and the corresponding weight parameters of the target terminal devices that have been received includes:

[0122] S302-1: The global parameters in the target edge server are updated according to the following formula,

[0123]

[0124] wherein w is a global parameter of the target edge server, |D i | represents the number of training set samples of each terminal device, w i is the model parameter of the i-th target terminal device, |∪ i D i | represents the total number of samples of all target terminal devices, and k is the number of target terminal devices.

[0125] The above embodiment gives a case where the model parameter upload time is greater than the reasonable timeout time preset by the global timer. In the case where the model parameter upload time is less than or equal to the reasonable timeout time preset by the global timer, the present application further includes:

[0126] If the model parameter upload time is less than or equal to the reasonable timeout time preset by the global timer, the number of target terminal devices whose model parameters have been received by the target edge server is determined.

[0127] If the number of target terminal devices whose model parameters have been received by the target edge server is less than the total number of target terminal devices, the step of acquiring the model parameter upload time recorded by the global timer is continued.

[0128] In the present embodiment, if the model parameter upload time is less than or equal to the reasonable timeout time preset by the global timer, the number of target terminal devices whose model parameters have been received by the target edge server is determined. If all target terminal devices have uploaded the model parameters to the target edge server, the target edge server directly aggregates the received model parameters. If the target terminal devices have not completed the upload of the model parameters at this time, the target edge server continues to wait for the target terminal devices to upload the model parameters until the model parameter upload time is greater than the reasonable timeout time preset by the global timer.

[0129] An application process of the task reliability guarantee method under the edge network of the present application will be given below. In the present application, the initial model can be various models to be trained, which can be an image classification model or a speech segmentation model, and the present application does not limit this. The following will be described taking the model to be trained as an image classification model as an example. That is, the task executed under the edge network is: training an image classification model based on the edge network federated learning task. If it is required to implement the federated learning task based on the edge network, an image classification model has been obtained, the global training round T is first initialized, the global parameter vector w(0) of the model at the T=0 moment is initialized as a random value, the loss function f(w) selected by the user is acquired, and the device set Z of all users is acquired. Then, based on the trajectory prediction algorithm, the first terminal device set Q is obtained at the target edge server in the next period, and for the device set Q={Q1, Q2, …, Q g}, Q∈Z, predict the probability of each device being idle in the next cycle, g device CPU occupancy information sequence at time t y g n If O j ≥O0, the device is considered idle. Select idle devices in the device set Q to obtain a new device second terminal device set R. For the device set R={R1, R2, …, R j}, select devices with power greater than E0 to obtain a target terminal device set S.

[0130] S={S1, S2, …, S k}={S n |S n ∈R, E n ≥E0, n=1, 2, …, j}, notify the target terminal devices in set S to perform local training. The initial image classification model is distributed to each target terminal device, and then each target terminal device trains the image classification model according to its local sample data set, i.e., the image data set used to train the image classification model, and then trains the image classification model according to the image data set. After completing a round of training, upload the model parameters of the image classification model trained by each target terminal device to the target edge server to complete a round of model parameter aggregation. In this process, a global timer is used to ensure the reliability of target terminal device parameter aggregation. Then repeat the above process until a preset number of iterations is reached to obtain the final image classification model. Compared with the prior art, the image classification model obtained based on the present application has shorter training time, lower hardware cost, and higher reliability of the entire task, and the possibility of task interruption or termination due to other conditions is lower.

[0131] The embodiment of the present application also provides a task reliability guarantee system under an edge network, referring to Figure 4 , an embodiment of a task reliability guarantee system under an edge network is shown, and the device comprises:

[0132] The first screening unit 401 is used to determine the first terminal device in the next cycle within the coverage range of the target edge server, and generate a first terminal device set;

[0133] The second screening unit 402 is used to select the second terminal device in the idle state in the next cycle in the first terminal device set, and generate a second terminal device set;

[0134] ​​The third screening unit 403 is configured to select, from the second terminal device set, a target terminal device that meets the power requirement in the next period;

[0135] The local training unit 404 is configured to receive, by each target terminal device, an initial model issued by the target edge server, and perform local training on the initial model according to a locally stored sample data set;

[0136] The updating unit 405 is configured to receive, by the target edge server, model parameters obtained by local training uploaded by each target terminal device, update global parameters in the target edge server, and continue to perform the steps of determining the first terminal device located in the coverage range of the target edge server in the next period and generating the first terminal device set until a preset global training round is reached.

[0137] In an available implementation, the first screening unit 401 includes:

[0138] The state transition matrix determination subunit is configured to determine, according to historical movement data of each terminal device in the total terminal device set, a state transition matrix of each terminal device;

[0139] The state prediction subunit is configured to determine, according to the position coordinate information of each terminal device in the current period and the state transition matrix, an associated edge server of each terminal device in the next period;

[0140] The first screening subunit is configured to determine, as the first terminal device, the terminal device whose associated edge server is the target edge server.

[0141] In an available implementation, the second screening unit 402 includes:

[0142] The time sequence determination subunit is configured to determine, according to historical CPU usage data of each first terminal device, a CPU occupancy rate time sequence of each first terminal device;

[0143] The CPU occupancy rate prediction subunit is configured to predict, according to the CPU occupancy rate time sequence, a CPU occupancy rate of each first terminal device in the next period;

[0144] The second screening subunit is configured to determine, according to a relationship between the CPU occupancy rate of each first terminal device in the next period and a preset CPU occupancy rate threshold, the second terminal device.

[0145] In an available implementation, the third screening unit 403 includes:

[0146] The power acquisition subunit is configured to acquire power information of each second terminal device in the second device set in the current period;

[0147] The power prediction subunit is configured to determine power information of each second terminal device in a next period according to a pre-established power loss function.

[0148] The third screening subunit is configured to determine a target terminal device according to a relationship between the power information of each second terminal device in the next period and a preset power threshold.

[0149] In an available implementation, the local training unit 304 includes:

[0150] The parameter updating subunit is configured to update the parameters of the initial model in the target terminal according to the following formula,

[0151]

[0152] wherein, w i (t+1) is the model parameter of the target terminal device in the next period, η is a learning rate, f represents the local loss function, w i (t) is the model parameter of the target terminal device in the current period.

[0153] In an available implementation, the updating unit 405 includes:

[0154] The time acquisition subunit is configured to acquire a model parameter uploading time recorded by a global timer.

[0155] The global parameter updating subunit is configured to, if the model parameter uploading time is greater than a reasonable timeout time preset by the global timer, update the global parameters in the target edge server according to the model parameters and the corresponding weight parameters of the target terminal devices that have been received, and continue to perform the step of determining the first device set in the next period located in the coverage range of the target edge server.

[0156] In an available implementation, the global parameter updating subunit includes:

[0157] The updating module is configured to update the global parameters in the target edge server according to the following formula,

[0158]

[0159] wherein, w is the global parameter of the target edge server, |D i | represents the number of training set samples of each terminal device, w i is the model parameter of the i-th target terminal device, |∪ i D i | represents the total number of samples of all target terminal devices, and k is the number of target terminal devices.

[0160] In an available implementation, the updating unit 405 further includes:

[0161] determining that the target edge server has received the number of target terminal devices of the model parameters if the model parameter upload time is less than or equal to the reasonable timeout time preset by the global timer;

[0162] continuing to perform the step of acquiring the model parameter upload time recorded by the global timer if the number of target terminal devices of the model parameters received by the target edge server is less than the total number of target terminal devices.

[0163] In a further embodiment provided by the present application, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.

[0164] The memory is configured to store a computer program.

[0165] The processor is configured to execute the program stored on the memory, and implement the method steps of the first aspect of the embodiments of the present application.

[0166] In a further embodiment provided by the present application, a computer readable storage medium is also provided, which stores instructions, and when the instructions are run on a computer, the computer executes the steps of the first aspect of the embodiments of the present application.

[0167] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, device or computer program product. Therefore, the embodiments of the present application can be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0168] The embodiments of the present application are described with reference to flowcharts and / or block diagrams of the method, terminal device (apparatus) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the computer or other programmable data processing terminal device produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks

[0169] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flow Figure 1 one or more flow or blocks and / or Figure 1 one or more blocks or blocks specified in the flow.

[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 one or more flow or blocks and / or Figure 1 one or more blocks or blocks specified in the flow.

[0171] Finally, it should be noted that the terms "first" and "second" and the like are used herein merely to distinguish one element from another, and do not necessarily have an ordinal or chronological significance. "And / or" means that either one or both of the items can be selected. Also, the terms "comprises", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.

[0172] The above describes in detail the task reliability guarantee method and system under the edge network provided by the present application, and the principles and implementation modes of the present application are described by using specific examples. The above example is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as a limitation of the present application.

Claims

1. A method for guaranteeing task reliability in an edge network, characterized in that, The method comprises: determining a first terminal device in a next cycle located in a coverage range of a target edge server, generating a first terminal device set; selecting a second terminal device in an idle state in the next cycle from the first terminal device set, generating a second terminal device set; selecting a target terminal device satisfying a power requirement in the next cycle from the second terminal device set; each target terminal device receives an initial model issued by the target edge server, and performs local training on the initial model according to a locally stored sample data set; the target edge server receives model parameters uploaded by each target terminal device after local training, updates global parameters in the target edge server, and continues to perform the step of determining a first terminal device in a next cycle located in a coverage range of a target edge server, generating a first terminal device set, until a preset global training round is reached; The step of determining a first terminal device in a next cycle located in a coverage range of a target edge server, generating a first terminal device set, comprises: determining a state transition matrix of each terminal device in a total terminal device set according to historical movement data of each terminal device, wherein the state transition matrix is used to represent a probability of the terminal device moving from a first edge server to a second edge server in a next cycle; determining an associated edge server of each terminal device in a next cycle according to position coordinate information of the terminal device in a current cycle and the state transition matrix; determining a terminal device of the associated edge server as a first terminal device when the associated edge server is the target edge server; The step of selecting a second terminal device in an idle state from the first terminal device set, generating a second terminal device set, comprises: determining a CPU occupancy time sequence of each first terminal device according to historical CPU usage data of each first terminal device; predicting a CPU occupancy of each first terminal device in a next cycle according to the CPU occupancy time sequence; determining the second terminal device according to a relationship between the CPU occupancy of each first terminal device in the next cycle and a preset CPU occupancy threshold value; The step of selecting a target terminal device satisfying a power requirement from the second terminal device set comprises: obtaining power information of each second terminal device in a current cycle in the second terminal device set; determining power information of each second terminal device in a next cycle according to a pre-established power loss function; determining the target terminal device according to a relationship between the power information of each second terminal device in the next cycle and a preset power threshold value.

2. The method of claim 1, wherein, The step of each target terminal device receiving an initial model issued by the target edge server, and performing local training on the initial model according to a locally stored sample data set comprises: updating parameters of the initial model in the target terminal according to the following formula, , In the formula, is the model parameter of the target terminal device in the next period, is a representative learning rate, is a local loss function, is the model parameter of the target terminal device in the current period.

3. The method of claim 1, wherein, The step of the target edge server receiving model parameters uploaded by each target terminal device after local training, and performing aggregation comprises: acquiring a model parameter uploading time recorded by a global timer; if the model parameter uploading time is greater than a reasonable timeout time preset by the global timer, updating global parameters in the target edge server according to the model parameters and corresponding weight parameters of the target terminal devices that have been received, and continuing to perform the step of determining the first device set located in the coverage range of the target edge server in the next period.

4. The method of claim 3, wherein, The step of updating the global parameters in the target edge server according to the model parameters and corresponding weight parameters of the target terminal devices that have been received comprises: updating the global parameters in the target edge server according to the following formula, In the formula, is a global parameter of the target edge server, represents the number of training set samples of each terminal device, is a model parameter of the i-th target terminal device, represents the total number of samples of all target terminal devices, is the number of target terminal devices.

5. The method of claim 3, wherein, The method further comprises: if the model parameter uploading time is less than or equal to the reasonable timeout time preset by the global timer, determining the number of target terminal devices whose model parameters have been received by the target edge server; if the number of target terminal devices whose model parameters have been received by the target edge server is less than the total number of target terminal devices, continuing to perform the step of acquiring the model parameter uploading time recorded by the global timer.

6. The method of claim 3, wherein, The reasonable timeout time preset by the global timer is determined by the following steps: acquiring the calculation time and communication time of each target terminal device; determining the reasonable timeout time of each target terminal device according to the calculation time and the communication time; determining the reasonable timeout time of the global timer according to the reasonable timeout time of each target terminal device. 7.A task reliability guarantee system under an edge network, characterized in that, The system comprises: a first screening unit configured to determine first terminal devices located in the coverage range of a target edge server in the next period and generate a first terminal device set; a second screening unit configured to select second terminal devices in an idle state in the next period from the first terminal device set and generate a second terminal device set; a third screening unit configured to select target terminal devices satisfying an electricity requirement in the next period from the second terminal device set; a local training unit configured to cause each target terminal device to receive an initial model issued by the target edge server and perform local training on the initial model according to a locally stored sample data set; an updating unit configured to cause the target edge server to receive model parameters uploaded by each target terminal device after local training, update global parameters in the target edge server, and continue to perform the step of determining first terminal devices located in the coverage range of the target edge server in the next period and generating a first terminal device set until a preset global training round is reached; The first screening unit comprises: a state transition matrix determination subunit configured to determine a state transition matrix of each terminal device according to historical movement data of each terminal device in a total terminal device set; a state prediction subunit configured to determine an associated edge server of each terminal device in the next period according to position coordinate information of each terminal device in the current period and the state transition matrix; a first screening subunit configured to determine terminal devices whose associated edge server is the target edge server as first terminal devices; The second screening unit comprises: The time sequence determining sub-unit is configured to determine a CPU occupancy time sequence of each first terminal device according to historical CPU usage data of each first terminal device; The CPU occupancy predicting sub-unit is configured to predict a CPU occupancy of each first terminal device in a next period according to the CPU occupancy time sequence; The second screening sub-unit is configured to determine a second terminal device according to a relationship between the CPU occupancy of each first terminal device in the next period and a preset CPU occupancy threshold. The third screening unit comprises: The power acquisition sub-unit is configured to acquire power information of each second terminal device in a current period in the second device set; The power predicting sub-unit is configured to determine power information of each second terminal device in a next period according to a pre-established power loss function; The third screening sub-unit is configured to determine a target terminal device according to a relationship between the power information of each second terminal device in the next period and a preset power threshold.

Citation Information

Patent Citations

  • Equipment evaluation and federated learning importance aggregation method, system and equipment based on edge intelligence and readable storage medium

    CN112181666A

  • Federated learning method and system based on parameter replacement algorithm

    CN112257105A