A method and device for constructing a global perception model based on adaptive task scheduling
By adopting adaptive task scheduling and edge node distributed perception technology in the construction of global perception model, the problems of uneven and unreliable perceived data are solved, and the reliable construction of global perception model and efficient resource utilization are achieved.
Patent Information
- Application Number
- CN202111550535.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2041-12-17
AI Technical Summary
The prior art is difficult to realize the reliable construction of global perception models through incomplete and incompletely reliable perceptual information, especially in the case of perceptual data inhomogeneity and distributional differences.
The global perception model construction method based on adaptive task scheduling is adopted, and the iterative correction of parallel training and training quality of perceptual models is realized through distributed perception technology of edge nodes and task allocation method of perceptual models. Based on the training of local models, the construction of the global model is realized through parameter interaction, and the transmission pressure of the front-haul link is reduced through adaptive task allocation, thereby improving resource utilization.
It realizes the reliable construction of the global perception model, reduces the transmission pressure of the front-haul link, and improves resource utilization.
Smart Images

Figure CN114398160B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of global perception technology, and in particular to a method and device for constructing a global perception model based on adaptive task scheduling. Background Art
[0002] Global perception has a wide range of applications in environmental protection, user positioning, intelligent transportation, smart cities, etc. In view of the problem of uneven perception data, how to assign perception tasks to appropriate data collectors, use edge nodes to generate local models, and then interact with the parameters of the local models to achieve dynamic updates of global model parameters is one of the most important issues in global perception research.
[0003] At present, scholars use a large number of devices to obtain perception data, and integrate the above perception data to realize the construction of a global perception model. Since perception data is easily affected by random factors, the local model is unreliable; in addition, due to the unevenness of data and the differences in the distribution of perception data, the parameters of each local model have large differences. Therefore, how to realize the perception of the global perception model through incomplete and not completely reliable perception information is an urgent problem to be solved. Using the interaction of local parameters to infer the real perception information and then ensure the reliability of the global model parameters has become a problem to be solved. Summary of the invention
[0004] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a global perception model construction method and device based on adaptive task scheduling, so as to utilize the distributed perception technology of edge nodes, combined with the task allocation method of the perception model, to achieve adaptive task allocation that minimizes parallel training of the perception model and continuously iteratively corrects the training quality, and based on the training of local models, the construction of the global model is realized through the interaction of parameters, thereby achieving the purpose of reducing the transmission pressure of the fronthaul link and improving resource utilization.
[0005] To achieve the above object, the present invention proposes a method for constructing a global perception model based on adaptive task scheduling, comprising the following steps:
[0006] Step S1, fix the sampling time interval and randomly select K servers;
[0007] Step S2, let K server nodes build a local model, use the distributed perception technology of edge nodes, and combine the task allocation method of the perception model to achieve adaptive task allocation that minimizes the parallel training of the perception model and continuously iterates and corrects the training quality, so as to select the appropriate node through adaptive task allocation to achieve the selection of the local model;
[0008] Step S3, define an intelligent agent system, based on the training of the local model, adopt the strategy of maximum estimated utility to select execution parameter transmission, and realize the construction of the global model through the interaction of the local agent and the central agent parameters.
[0009] Preferably, step S2 further comprises:
[0010] Step S200, instructing K server nodes to construct local models, and based on the local models, using an ensemble learning method to form an initial global model;
[0011] Step S201, randomly selecting a number of samples and inputting them into the initial global model and each local model respectively, comparing the analysis result of the initial global model with the analysis result of each local model, and eliminating bad models according to the comparison result;
[0012] Step S202, adjusting the sampling time interval according to the result of step S201;
[0013] Step S203, at time T, randomly select n server nodes and place them on K server nodes to execute the modeling of the perception model, and continuously iterate to achieve the output of the local model of the server node at each moment.
[0014] Preferably, in step S201, the accuracy of the analysis results of the local models of each server node is estimated. If the accuracy of the local model of a server node is less than a set accuracy threshold, the local model of the server node is discarded; otherwise, the local model of the server node is retained.
[0015] Preferably, in step S201, some samples are randomly selected and input into the initial global model and the local model respectively. If in multiple tests, the probability that the judgment result obtained by the initial global model is consistent with the judgment result of the local model of a server node is less than a set accuracy threshold, the local model of the server node is eliminated; otherwise, the local model of the server node is retained.
[0016] Preferably, in step S202, if it is found that the accuracy of the local models of the multiple server nodes does not meet the threshold requirement, the sampling interval is adjusted by reinforcement learning.
[0017] Preferably, if the sampling time interval is increased, whether the decision is reasonable is determined by accumulating the accuracy rate.
[0018] Preferably, if the decision is reasonable, the system accuracy should gradually increase with the number of iterations, but each increment should be smaller than the previous increment.
[0019] Preferably, in step S3, the strategy for maximum estimated utility includes transmitting only non-redundant parameters in the current local model to reduce transmission costs and using a random strategy to cover parameters of some nodes to maintain the stability of central agent parameter training.
[0020] Preferably, step S3 further comprises:
[0021] The central agent takes action a 0 Select a subset from it, and the selected subset is recorded as a 0 ⊙w, where ⊙ represents the product of two elements, and the selected subset is broadcast to the local agent through broadcasting;
[0022] The local model parameters of the kth selected local agent are obtained from w k Updated to It means that only the local model parameters of the corresponding position are covered, and after covering, the calculation gradient of the current data is calculated through the local model;
[0023] The local agent selects a subset with a larger absolute value of the gradient to interact with the central agent, and this process is repeated over and over again to update the global model.
[0024] To achieve the above object, the present invention also provides a global perception model construction device based on adaptive task scheduling, comprising:
[0025] The node selection unit is used to randomly select K servers at a fixed sampling time interval;
[0026] An adaptive task allocation unit is used to enable K server nodes to build a local model, and utilize the distributed perception technology of edge nodes, combined with the task allocation method of the perception model, to achieve adaptive task allocation that minimizes the parallel training of the perception model and continuously iterates and corrects the training quality, thereby selecting the appropriate node through adaptive task allocation to achieve the selection of the local model;
[0027] The global model generation unit is used to define an intelligent agent system. Based on the training of the local model, the strategy of maximum estimated utility is adopted to select the execution parameter transmission, and the construction of the global model is realized through the interaction of the local agent and the central agent parameters.
[0028] Compared with the prior art, the present invention provides a method and device for constructing a global perception model based on adaptive task scheduling. By utilizing the distributed perception technology of edge nodes and combining the task allocation method of the perception model, the adaptive task allocation for minimizing the parallel training of the perception model and continuously iteratively correcting the training quality is realized. Based on the training of the local model, the construction of the global model is realized through the interaction of parameters, thereby achieving the purpose of reducing the transmission pressure of the fronthaul link and improving resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flowchart of the steps of a method for constructing a global perception model based on adaptive task scheduling according to the present invention;
[0030] Figure 2 This is a system architecture diagram of a global perception model building device based on adaptive task scheduling according to the present invention;
[0031] Figure 3 is a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following describes the implementation of the present invention through specific examples and in conjunction with the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific examples, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.
[0033] Figure 1 FIG. 1 is a flowchart of a method for constructing a global perception model based on adaptive task scheduling according to the present invention. Figure 1 As shown, the present invention provides a method for constructing a global perception model based on adaptive task scheduling, comprising the following steps:
[0034] Step S1, fix the sampling time interval and randomly select K servers.
[0035] Generally speaking, information perception technology includes terminal perception, user perception, service perception, resource perception and QoS perception. The present invention focuses on user-perceived information and mainly studies the perception of information such as user behavior trajectory, user interests and hobbies, and user social relationships, that is, using K servers to collect initial data.
[0036] In step S2, K server nodes are ordered to construct a local model, and the distributed perception technology of the edge nodes is used in combination with the task allocation method of the perception model to realize adaptive task allocation that minimizes the parallel training of the perception model and continuously iterates and corrects the training quality. Thus, the local model is selected by selecting appropriate nodes through adaptive task allocation. The local model is used to eliminate some bad models caused by uncontrollable factors such as uneven data distribution, thereby ensuring the accuracy of the local model.
[0037] Specifically, step S2 further includes:
[0038] Step S200, instructs K server nodes to construct local models, and based on the local models, uses an ensemble learning method to form an initial global model.
[0039] Specifically, a local model is constructed for the first server node, a local model is constructed for the second server node,…, a local model is constructed for the Kth server node. After the K server nodes have constructed the local models, an initial global model is obtained based on the K local models constructed by the K server nodes using an ensemble learning method.
[0040] In a specific embodiment of the present invention, all local models are constructed as initial models according to the business. Generally speaking, if the local model is constructed by a neural network model, the most classic network structure is adopted, such as 10-5-1 (indicating 10 input neurons, 5 hidden layer neurons and 1 output neuron), and K servers all use this structure to train the network parameters to obtain the local model.
[0041] When K servers build K local models, the ensemble learning method is used to obtain the initial full model. For example, K neural networks have already trained the network parameters, but since the data corresponding to each network is different, it is likely that the trained parameters are different, and it is necessary to identify which are good trainers and which are general trainers. Specifically, m samples are randomly selected and input into k local models. The judgment result of each local model for each sample is calculated by voting. Finally, the accuracy of the m samples is counted, and the accuracy is used as the weight of each local model to form an initial global model.
[0042] Step S201 , randomly selecting a number of samples and inputting them into the initial global model and each local model respectively, comparing the analysis result of the initial global model with the analysis result of each local model, and eliminating bad models according to the comparison result.
[0043] Specifically, the accuracy of the analysis results of the local models of each server node is estimated (when the judgment result of the local model of a server node is consistent with the judgment result obtained by the initial global model, the local model is considered to be accurate, and the accuracy is the probability that the judgment result is accurate in multiple judgments). If the accuracy of the local model of a server node is less than the set accuracy threshold, the local model of the server node is eliminated; otherwise, the local model of the server node is retained, thereby eliminating some bad models among the K local models caused by uncontrollable factors such as uneven data distribution.
[0044] According to step S200, an initial global model has been obtained, but this model is likely to be mixed with some "bad" local models, because step S200 puts some "local" models with cross-accuracy into the initial global model according to the accuracy as the weight. Therefore, in this step, some samples are randomly selected and put into the global model and the local model respectively. If in multiple tests, the judgment result obtained by the initial global model is inconsistent with the judgment result of the local model of a server node, the local model is considered to be "bad". For example, if 40% of the results are inconsistent, the "bad" model should be eliminated.
[0045] Step S202, adjusting the sampling time interval according to the result of step S201.
[0046] The accuracy of the local model may be caused by different data distributions or by unreasonable sampling interval settings. In terms of data distribution, considering that some servers themselves have uneven data distribution, inappropriate data collection range selection, or too few data, node replacement (for example, replacing the parameters of the global model with the model parameters of the "bad" node) is used to solve the problem; and for the problem of unreasonable sampling interval settings, the sampling interval needs to be adjusted.
[0047] In a specific embodiment of the present invention, if it is found that the accuracy of the local models of multiple server nodes does not meet the threshold requirements, the sampling interval is adjusted by reinforcement learning. If the system increases the time interval, the decision is judged to be reasonable by the cumulative accuracy. Generally, when the sampling interval is increased at the beginning, the purpose is to gradually increase the system accuracy as time goes by. The cumulative accuracy refers to the increment of the accuracy. Generally speaking, if the decision is reasonable, the system accuracy should gradually increase with the number of iterations, but each increment should be less than the previous increment.
[0048] Reinforcement learning works as follows:
[0049] System state: In reinforcement learning, the agent learns effectively by extracting useful information from the state. For this model problem, the state design is as shown in Formula 1
[0050] s={A,F,G} (Formula 1)
[0051] Where A is the adjustment time interval vector, F is the computing resource allocation vector, G is the remaining computing resource vector
[0052] System action: The action a taken by the task needs to include all possible decisions.
[0053] a={a i , f i} (Formula 2)
[0054] where a i is the time interval adjustment strategy, f i is the calculation strategy for the adjusted allocation of time intervals.
[0055] System Reward: The reward function is generally related to the optimization goal. In a specific embodiment of the present invention, the reward function aims to maximize the accuracy of the local model, specifically:
[0056]
[0057] Among them, k is the total number of servers, and n is the appropriate server selected from k.
[0058] The optimal Q corresponding to state s in each round * The values are:
[0059]
[0060] Where γ (0 < γ < 1) is the discount factor, which is related to time decay, s' represents the choice of tasks and actions in the i-th round, and N represents the total number of training rounds in reinforcement learning
[0061] Step S203, at time T, randomly select n server nodes and place them on K server nodes to execute the modeling of the perception model, and continuously iterate to achieve the output of the local model of the server node at each moment.
[0062] Step S3, define an intelligent agent system, based on the training of the local model, adopt the strategy of maximum estimated utility to select execution parameter transmission, and realize the construction of the global model through the interaction of the local agent and the central agent parameters.
[0063] In the present invention, a method for constructing global model parameters with lightweight parameter exchange is designed. It is defined as a multi-agent system including K local agents and a central agent, and a mechanism for partial parameter transmission is designed based on this multi-agent system to reduce the transmission cost, wherein each server node is defined as a local agent as an edge node, and the parameter server is defined as a central agent (generally a general server in the cloud, responsible for building a global model); since each local agent (edge node) obtains local parameters, the present invention adopts the strategy of maximum estimated utility to select and execute parameter transmission, that is, only the non-redundant parameters in the current model (local model of K server nodes) are transmitted to reduce the transmission cost; in order to maintain the stability of the parameter training of the central agent (global model), a random strategy is adopted to cover the parameters of some nodes.
[0064] Since the local agent can only obtain partial information, when estimating the utility of parameter optimization, the parameters of each local agent are partially covered, and the utility is estimated by the absolute value of the performance impact of the local agent. (That is, after some parameters are covered, the update is performed in the direction with a larger gradient, thereby improving the performance of the local model)
[0065] Since the interaction cost of local model parameters is limited, the behavior of the central agent a 0 is defined as selecting a subset of the global model parameters to broadcast; the kth local agent behavior a k It is defined as selecting a subset of the best performance to transmit to the central agent.
[0066] Assume that the global parameter of the central agent is w and it takes action a 0 Select a subset from it, and the selected subset is recorded as a 0 ⊙w, where ⊙ represents the product of two elements. The selected subset is broadcasted to the local agent through broadcasting. At this time, the local agent does not receive all the data, but randomly selects a part of the local agent to update the subset. Assume that the local model parameters of the kth selected local agent are updated from w k Updated to Indicates that only the local model parameters of the corresponding position are overwritten. After overwriting, the current data s is calculated through the local model k The calculation formula of the gradient is:
[0067]
[0068] Among them, L is the loss function and g(·) is the gradient of the model.
[0069] For the kth local agent, it is very likely to be selected by K parameter updates, or it may be selected only a few times. In this case, the utility of the kth agent is measured by the absolute value of the gradient in the subset. In the above gradient, the local agent usually selects the subset with the larger absolute value of the gradient to interact with the central agent, and so on, iterating continuously to update the global model.
[0070] Figure 2 This is a system architecture diagram of a global perception model building device based on adaptive task scheduling in the present invention. Figure 2 As shown, the present invention provides a global perception model construction device based on adaptive task scheduling, comprising:
[0071] The node selection unit 201 is used to randomly select K servers at a fixed sampling time interval.
[0072] Generally speaking, information perception technology includes terminal perception, user perception, service perception, resource perception and QoS perception. The present invention focuses on user-perceived information and mainly studies the perception of information such as user behavior trajectory, user interests and hobbies, and user social relationships, that is, using K servers to collect initial data.
[0073] The adaptive task allocation unit 202 is used to enable K server nodes to build a local model, and utilize the distributed perception technology of the edge nodes, combined with the task allocation method of the perception model, to achieve adaptive task allocation that minimizes the parallel training of the perception model and continuously iterates and corrects the training quality, so as to select the appropriate node through adaptive task allocation to achieve the selection of the local model, and eliminate some bad models caused by uncontrollable factors such as uneven data distribution through the local model, so as to ensure the accuracy of the local model.
[0074] Specifically, the adaptive task allocation unit 202 further includes:
[0075] The local model building module is used to enable K server nodes to build local models, and based on the local models, an initial global model is formed using an ensemble learning method.
[0076] Specifically, a local model is constructed for the first server node, a local model is constructed for the second server node,…, a local model is constructed for the Kth server node. After the K server nodes have constructed the local models, an initial global model is obtained based on the K local models constructed by the K server nodes using an ensemble learning method.
[0077] In a specific embodiment of the present invention, all local models are constructed as initial models according to the business. Generally speaking, if the local model is constructed by a neural network model, the most classic network structure is adopted, such as 10-5-1 (indicating 10 input neurons, 5 hidden layer neurons and 1 output neuron), and K servers all use this structure to train the network parameters to obtain the local model.
[0078] When K servers build K local models, the ensemble learning method is used to obtain the initial full model. For example, K neural networks have already trained the network parameters, but since the data corresponding to each network is different, it is likely that the trained parameters are different, and it is necessary to identify which are good trainers and which are general trainers. Specifically, m samples are randomly selected and input into k local models. The judgment result of each local model for each sample is calculated by voting. Finally, the accuracy of the m samples is counted, and the accuracy is used as the weight of each local model to form an initial global model.
[0079] The model elimination module is used to randomly select a number of samples and input them into the initial global model and each local model respectively, compare the analysis results of the initial global model with the analysis results of each local model, and eliminate bad models according to the comparison results.
[0080] Specifically, the accuracy of the analysis results of the local models of each server node is estimated (when the judgment result of the local model of a server node is consistent with the judgment result obtained by the initial global model, the local model is considered to be accurate, and the accuracy is the probability that the judgment result is accurate in multiple judgments). If the accuracy of the local model of a server node is less than the set accuracy threshold, the local model of the server node is eliminated; otherwise, the local model of the server node is retained, thereby eliminating some bad models among the K local models caused by uncontrollable factors such as uneven data distribution.
[0081] An initial global model has been obtained according to the local model construction module, but this model is likely to be mixed with some "bad" local models, because the local model construction module uses accuracy as the weight to put some "local" models with cross-accuracy into the initial global model. Therefore, in this step, some samples are randomly selected and put into the global model and the local model respectively. If the judgment result obtained by the initial global model is inconsistent with the judgment result of the local model of a server node in multiple tests, the local model is considered to be "bad". For example, if 40% of the results are inconsistent, the "bad" model should be eliminated.
[0082] The sampling time interval adjustment module is used to adjust the sampling time interval according to the result of the model elimination module.
[0083] The accuracy of the local model may be caused by different data distributions or by unreasonable sampling interval settings. In terms of data distribution, considering that some servers themselves have uneven data distribution, inappropriate data collection range selection, or too few data, node replacement (for example, replacing the parameters of the global model with the model parameters of the "bad" node) is used to solve the problem; and for the problem of unreasonable sampling interval settings, the sampling interval needs to be adjusted.
[0084] In a specific embodiment of the present invention, if it is found that the accuracy of the local models of multiple server nodes does not meet the threshold requirements, the sampling interval is adjusted through reinforcement learning. If the system increases the time interval, the rationality of the decision is determined by accumulating the accuracy.
[0085] Reinforcement learning works as follows:
[0086] System state: In reinforcement learning, the agent learns effectively by extracting useful information from the state. For this model problem, the state design is as shown in Formula 1
[0087] s={A,F,G} (Formula 1)
[0088] Where A is the adjustment time interval vector, F is the computing resource allocation vector, G is the remaining computing resource vector
[0089] System action: The action a taken by the task needs to include all possible decisions.
[0090] a={a i , f i} (Formula 2)
[0091] where a i is the time interval adjustment strategy, f i is the calculation strategy for the adjusted allocation of time intervals.
[0092] System Reward: The reward function is generally related to the optimization goal. In a specific embodiment of the present invention, the reward function aims to maximize the accuracy of the local model, specifically:
[0093]
[0094] Among them, k is the total number of servers, and n is the appropriate server selected from k.
[0095] The optimal Q corresponding to state s in each round * The values are:
[0096]
[0097] Where γ (0 < γ < 1) is the discount factor, which is related to time decay, s' represents the choice of tasks and actions in the i-th round, and N represents the total number of training rounds in reinforcement learning.
[0098] The iterative processing module is used to randomly select n server nodes at time T, place them on K server nodes to execute the modeling of the perception model, and continuously iterate to achieve the output of the local model of the server node at each moment.
[0099] The global model generation unit 203 is used to define an intelligent agent system, based on the training of the local model, adopt the strategy of maximum estimated utility to select execution parameter transmission, and realize the construction of the global model through the interaction of the local agent and the central agent parameters.
[0100] In the present invention, a method for constructing global model parameters with lightweight parameter exchange is designed. It is defined as a multi-agent system including K local agents and a central agent, and a mechanism for partial parameter transmission is designed based on this multi-agent system to reduce the transmission cost, wherein each server node is defined as a local agent as an edge node, and the parameter server is defined as a central agent (generally a general server in the cloud, responsible for building a global model); since each local agent (edge node) obtains local parameters, the present invention adopts the strategy of maximum estimated utility to select and execute parameter transmission, that is, only the non-redundant parameters in the current model (local model of K server nodes) are transmitted to reduce the transmission cost; in order to maintain the stability of the parameter training of the central agent (global model), a random strategy is adopted to cover the parameters of some nodes.
[0101] Since the local agent can only obtain partial information, when estimating the utility of parameter optimization, the parameters of each local agent are partially covered, and the utility is estimated by the absolute value of the performance impact of the local agent. (That is, after some parameters are covered, the update is performed in the direction with a larger gradient, thereby improving the performance of the local model)
[0102] Since the interaction cost of local model parameters is limited, the behavior of the central agent a 0 is defined as selecting a subset of the global model parameters to broadcast; the kth local agent behavior a k It is defined as selecting a subset of the best performance to transmit to the central agent.
[0103] Assume that the global parameter of the central agent is w and it takes action a 0 Select a subset from it, and the selected subset is recorded as a 0 ⊙w, where ⊙ represents the product of two elements. The selected subset is broadcasted to the local agent through broadcasting. At this time, the local agent does not receive all the data, but randomly selects a part of the local agent to update the subset. Assume that the local model parameters of the kth selected local agent are updated from w k Updated to Indicates that only the local model parameters of the corresponding position are overwritten. After overwriting, the current data s is calculated through the local model k The calculation formula of the gradient is:
[0104]
[0105] Among them, L is the loss function and g(·) is the gradient of the model.
[0106] For the kth local agent, it is very likely to be selected by K parameter updates, or it may be selected only a few times. In this case, the utility of the kth agent is measured by the absolute value of the gradient in the subset. In the above gradient, the local agent usually selects the subset with the larger absolute value of the gradient to interact with the central agent, and so on, iterating continuously to update the global model.
[0107] Example
[0108] Figure 3 is a flow chart of an embodiment of the present invention. In this embodiment, a method for constructing a global perception model based on adaptive task scheduling includes:
[0109] Step 1: Adaptive task allocation of perception model
[0110] ① Randomly select K servers and let K servers perform modeling of perception tasks.
[0111] ② K server nodes build local models. Based on the local models, an initial global model is formed using an ensemble learning method (in the initial stage, the accuracy of each model is set to 1 by default). The analysis results of the global model are then compared with the analysis results of the local model. If the accuracy of the local model is less than the set accuracy threshold, it is eliminated; otherwise, the server node is retained.
[0112] ③ Adjust the sampling time interval according to the accuracy of the local model. The accuracy of the local model may be caused by different data distributions, or it may be caused by unreasonable sampling interval settings. In terms of data distribution, considering that some servers themselves have uneven data distribution, inappropriate collection range selection, or too few data, node replacement is used to solve the problem; and for the problem of unreasonable sampling interval settings, it is necessary to adjust the sampling interval. If it is found that multiple nodes do not meet the threshold requirements, the sampling interval is adjusted through reinforcement learning. If the system increases the time interval, the decision is judged by the cumulative accuracy. The reinforcement learning method is as follows:
[0113] System state: In reinforcement learning, the agent learns effectively by extracting useful information from the state. For this model problem, the state design is as follows:
[0114] s={A,F,G}
[0115] Where A is the adjustment time interval vector, F is the computing resource allocation vector, G is the remaining computing resource vector
[0116] System actions: The actions taken by the task need to include all possible decisions.
[0117] a={a i , f i}
[0118] where a i is the time interval adjustment strategy, f i is the calculation strategy for the adjusted allocation of time intervals
[0119] System reward: The reward function is generally related to the optimization goal. The accuracy of the local model
[0120]
[0121] The optimal Q corresponding to state s in each round * The values are:
[0122]
[0123] Among them, γ (0<γ<1) is the discount factor, which is related to time attenuation.
[0124] ④ At time T, randomly select n server nodes and place them on K nodes to execute the modeling of the perception model, and continuously iterate to achieve the output of the local model of the node at each moment.
[0125] Step 2: Based on the training of local models, the construction of global models is realized through the interaction of parameters.
[0126] Since the model parameter interaction cost is limited, the behavior of the central agent a 0 is defined as selecting a subset of the global model parameters to broadcast; the kth local agent behavior a k It is defined as selecting a subset of the best performance to transmit to the central agent.
[0127] Assume that the global parameter of the centrosome is w and that it takes action a 0 Select a subset from it, and the selected subset is recorded as a 0 ⊙w, where ⊙ represents the product of two elements. The selected subset is broadcasted to the local agent. At this time, the local agent does not receive all the data, but randomly selects a part of the agents to update the subset. Assume that the local model parameters of the kth selected agent are updated from w k Updated to Indicates that only the local model parameters of the corresponding position are overwritten. After overwriting, the current data s is calculated through the local model k The calculation formula of the gradient is:
[0128]
[0129] Among them, L is the loss function and g(·) is the gradient of the model.
[0130] For the kth agent, it is very likely to be selected by K parameter updates, or it may be selected only a few times. In this case, the utility of the kth agent is measured by the absolute value of the gradient in the subset. In the above gradient, the local agent usually selects the subset with the larger absolute value of the gradient to interact with the central agent, and so on, iterating continuously to update the global model.
[0131] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Any person skilled in the art may modify and alter the above embodiments without violating the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be as set forth in the claims.
Claims
1. A method for constructing a global perception model based on adaptive task scheduling, comprising the following steps: Step S1, fix the sampling time interval and randomly select K servers; Step S2, instructing K server nodes to construct K local models, using the distributed perception technology of edge nodes and combining the task allocation method of the perception model to achieve adaptive task allocation that minimizes the parallel training of the perception model and continuously iterates and corrects the training quality, thereby selecting appropriate nodes through adaptive task allocation to achieve the selection of the local model; Step S3, defining an agent system, based on the training of the local model, adopting the strategy of maximum estimated utility to select execution parameter transmission, and realizing the construction of the global model through the interaction of the parameters of the local agent and the central agent; wherein, The strategy of maximizing the estimated utility includes transmitting only the non-redundant parameters in the current local model to reduce the transmission cost and using a random strategy to cover the parameters of some nodes to maintain the stability of the central agent parameter training; Wherein, the step S2 comprises: Step S200, instructing K server nodes to construct K local models, and based on the K local models, using an ensemble learning method to form an initial global model; Step S201, randomly selecting a number of samples and inputting them into the initial global model and the K local models respectively, comparing the analysis results of the initial global model with the analysis results of the K local models, and eliminating bad models according to the comparison results; Wherein, the step S201 further includes: Estimate the accuracy of the analysis results of the local models of each server node. If the accuracy of the local model of a server node is less than the set accuracy threshold, the local model of the server node is eliminated; otherwise, the local model of the server node is retained; Randomly select some samples and input them into the initial global model and the local model respectively. If the probability that the judgment result obtained by the initial global model is consistent with the judgment result of the local model of a server node in multiple tests is less than the set accuracy threshold, the local model of the server node is eliminated; otherwise, the local model of the server node is retained; Step S202, adjusting the sampling time interval according to the result of step S201; Step S203, at time T, randomly select n server nodes and place them on K server nodes to perform modeling of the perception model, and continuously iterate to achieve the output of the local model of the server node at each moment; Wherein, the step S3 comprises: The central agent takes action a0 to select a subset from it. The selected subset is recorded as a0⊙w, where ⊙ represents the product of two elements. The selected subset is broadcast to the local agents through broadcasting. The local model parameters of the kth selected local agent are obtained from w k Update to w k ⊕(a0⊙w) means that only the local model parameters at the corresponding position are covered, and after covering, the calculation gradient of the current data is calculated through the local model; where ⊕ is used to indicate the operation of covering and updating the local model parameters by position; The local agent selects a subset with a larger absolute value of the gradient to interact with the central agent, and this process is repeated over and over again to update the global model.
2. A method for constructing a global perception model based on adaptive task scheduling as claimed in claim 1, characterized in that: In step S202, if it is found that the accuracy of the local models of the multiple server nodes does not meet the threshold requirement, the sampling interval is adjusted by reinforcement learning.
3. A method for constructing a global perception model based on adaptive task scheduling as claimed in claim 2, characterized in that: If the sampling time interval is increased, the increase in accuracy can be used to determine whether the decision is reasonable.
4. A method for constructing a global perception model based on adaptive task scheduling as claimed in claim 3, characterized in that: If the decision is reasonable, the system accuracy should gradually increase with the number of iterations, but the increase in accuracy each time should be smaller than the increase in the previous accuracy.
5. A global perception model construction device based on adaptive task scheduling, comprising: The node selection unit is used to randomly select K servers at a fixed sampling time interval; An adaptive task allocation unit is used to make K server nodes build K local models, and use the distributed perception technology of edge nodes, combined with the task allocation method of the perception model, to achieve adaptive task allocation that minimizes the parallel training of the perception model and continuously iterates and corrects the training quality, so as to select the appropriate node through adaptive task allocation to achieve the selection of the local model; The global model generation unit is used to define an intelligent agent system, based on the training of the local model, and adopts the maximum estimated utility strategy to select the execution parameter transmission, and realizes the construction of the global model through the interaction of the local agent and the central agent parameters; wherein the maximum estimated utility strategy includes only transmitting the non-redundant parameters in the current local model to reduce the transmission cost and using a random strategy to cover the parameters of some nodes to maintain the stability of the central agent parameter training Wherein, the adaptive task allocation unit is specifically used for: A local model building module, used to enable K server nodes to build K local models, and based on the K local models, form an initial global model using an ensemble learning method; A model elimination module is used to randomly select a number of samples and input them into the initial global model and the K local models respectively, compare the analysis results of the initial global model with the analysis results of the K local models, and eliminate bad models according to the comparison results; Wherein, the model elimination module is also used for: Estimate the accuracy of the analysis results of the local models of each server node. If the accuracy of the local model of a server node is less than the set accuracy threshold, the local model of the server node is eliminated; otherwise, the local model of the server node is retained; Randomly select some samples and input them into the initial global model and the local model respectively. If the probability that the judgment result obtained by the initial global model is consistent with the judgment result of the local model of a server node in multiple tests is less than the set accuracy threshold, the local model of the server node is eliminated; otherwise, the local model of the server node is retained; A sampling time interval adjustment module, used to adjust the sampling time interval according to the result of the model elimination module; The iterative processing module is used to randomly select n server nodes at time T, place them on K server nodes to perform modeling of the perception model, and continuously iterate to achieve the output of the local model of the server node at each moment; Wherein, the global model generation unit is specifically used for: The central agent takes action a0 to select a subset from it. The selected subset is recorded as a0⊙w, where ⊙ represents the product of two elements. The selected subset is broadcast to the local agents through broadcasting. The local model parameters of the kth selected local agent are obtained from w k Update to w k ⊕(a0⊙w) means that only the local model parameters at the corresponding position are covered, and after covering, the calculation gradient of the current data is calculated through the local model; where ⊕ is used to indicate the operation of covering and updating the local model parameters by position; The local agent selects a subset with a larger absolute value of the gradient to interact with the central agent, and this process is repeated over and over again to update the global model.
Citation Information
Patent Citations
Self-adaptive soft measurement modeling method based on online selective integration
CN113012766A