Task allocation method and device between Internet of Things equipment, equipment and medium
By obtaining resource data of IoT devices, generating hypervector sets and updating them in real time, the problem of inefficient task allocation between IoT devices is solved, efficient and reasonable task allocation is achieved, and resource utilization and system efficiency are improved.
Patent Information
- Application Number
- CN202411560909.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art is difficult to effectively allocate tasks between a large number of IoT devices that change dynamically, resulting in low resource utilization, waste of resources and overall system work efficiency.
By obtaining the resource data set of each IoT device, a hypervector set is generated, and the resource status is monitored in real time to update the resource data set, and task allocation is adjusted based on the updated resource data and hypervector set.
It realizes effective management of task allocation of a large number of IoT devices in a dynamically changing environment, improves resource utilization, reduces resource waste, and improves the overall working efficiency of the system.
Smart Images

Figure CN119520438A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of resource management technology, and in particular to a method, device, equipment and medium for allocating tasks between IoT devices. Background Art
[0002] With the rapid increase in the number of IoT devices, how to effectively manage task allocation among widely distributed IoT devices has become an important challenge. Existing task allocation methods, especially in distributed systems, are difficult to meet the needs of complex dynamic environments, resulting in low resource utilization of IoT devices, which leads to a series of problems such as resource waste and reduced overall system efficiency. Traditional task allocation management methods often lack accurate real-time analysis and optimization tools and cannot effectively handle the dynamic changes of a large number of heterogeneous IoT devices.
[0003] Therefore, how to effectively allocate tasks among a large number of dynamically changing IoT devices is a problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of this application is to provide a method, device, equipment and medium for task allocation between IoT devices, aiming to solve the technical problem of how to effectively allocate tasks among a large number of dynamically changing IoT devices.
[0005] To achieve the above objectives, the present application proposes a method for allocating tasks between IoT devices, the method comprising:
[0006] Acquire a resource data set of each IoT device, and generate a supervector set of each IoT device based on the resource data set;
[0007] Monitoring the resource status of each IoT device, and updating the resource data set according to the resource status;
[0008] Based on the updated resource data set and the supervector set, the task allocation of each IoT device is adjusted.
[0009] In one embodiment, the step of generating the supervector set of each IoT device based on the resource data set includes:
[0010] Normalizing the resource data set to obtain a normalized resource data set;
[0011] For any resource data subset of the Internet of Things device to be weighted in the normalized resource data set, weighting the resource data subset to obtain a weighted resource data subset of the Internet of Things device to be weighted;
[0012] After traversing each to-be-weighted Internet of Things device, each weighted resource data subset is used to form a weighted resource data set of each Internet of Things device, and the super vector set is generated based on the weighted resource data set.
[0013] In one embodiment, the step of generating the supervector set based on the weighted resource data set comprises:
[0014] Generating a candidate supervector set for each IoT device based on the weighted resource data set;
[0015] For a target candidate supervector of any IoT device in the candidate supervector set, weighting the target candidate supervector to obtain a weighted supervector of the IoT device;
[0016] After traversing each IoT device, the supervector set is constructed based on each weighted supervector.
[0017] In one embodiment, the supervector set includes each resource data and a weight corresponding to each resource data, and the step of generating the supervector set based on the weighted resource data set further includes:
[0018] Obtaining each candidate weight of the supervector set, and calculating a loss function value of the supervector set based on the each candidate weight;
[0019] The candidate weight corresponding to the minimum value in each loss function value is used as the target weight, and the weights in the supervector set are updated based on the target weight.
[0020] In one embodiment, the step of adjusting the task allocation of each IoT device based on the updated resource data set and the supervector set includes:
[0021] Based on the supervectors of the IoT devices in the supervector set, the relative distances between the IoT devices are calculated, and the IoT devices are clustered according to the relative distances to obtain a clustering result;
[0022] Optimizing the supervector set according to the updated resource data set to obtain a predicted supervector set for each IoT device;
[0023] Based on the clustering result, the updated resource data set and the predicted super vector set, the task allocation of each Internet of Things device is adjusted.
[0024] In one embodiment, the supervector set includes each resource data and a weight corresponding to each resource data, and the step of optimizing the supervector set according to the updated resource data set to obtain the predicted supervector set of each IoT device includes:
[0025] For any IoT device to be adjusted, extract the current load and historical load of the IoT device to be adjusted from the updated resource data set;
[0026] Calculating a load trend of the to-be-adjusted IoT device based on the current load and the historical load, and determining a resource demand prediction result of the to-be-adjusted IoT device according to the load trend;
[0027] After traversing each of the Internet of Things devices to be adjusted, each weight in the super vector set is adjusted based on each resource demand prediction result to obtain the predicted super vector set.
[0028] In one embodiment, the supervector set includes each resource data and a weight corresponding to each resource data, and the step of optimizing the supervector set according to the updated resource data set to obtain the predicted supervector set of each IoT device includes:
[0029] For any IoT device, extract the current load and historical load of the IoT device from the updated resource data set;
[0030] Calculating a load trend of the IoT device based on the current load and the historical load, and determining a resource demand prediction result of the IoT device according to the load trend;
[0031] After traversing each IoT device, each weight in the supervector set is adjusted based on each resource demand prediction result to obtain the predicted supervector set.
[0032] In addition, to achieve the above purpose, the present application also proposes a task allocation device between IoT devices, and the task allocation device between IoT devices includes:
[0033] A generation module, used to obtain a resource data set of each IoT device, and generate a super vector set of each IoT device based on the resource data set;
[0034] An updating module, used to monitor the resource status of each IoT device and update the resource data set according to the resource status;
[0035] The adjustment module is used to adjust the task allocation of each IoT device based on the updated resource data set and the super vector set.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the task allocation method between IoT devices as described above.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the task allocation method between IoT devices as described above are implemented.
[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the task allocation method between IoT devices as described above.
[0039] One or more technical solutions proposed in this application have at least the following technical effects:
[0040] The present application first obtains a resource data set of each IoT device, and generates a supervector set of each IoT device based on the resource data set, so as to collect data on the multi-dimensional resource status of the IoT device and convert the status information into a supervector form as a data basis for task allocation; monitors the resource status of each IoT device, and updates the resource data set according to the resource status, so as to ensure the real-time and accuracy of resource data through real-time monitoring and dynamic updating, and improve the system's adaptability to dynamic environments; based on the updated resource data set and the supervector set, adjusts the task allocation of each IoT device, so as to achieve effective management of task allocation of a large number of IoT devices in a dynamically changing environment.
[0041] This application performs supervector representation and dynamic update of resource data sets, so that the system can analyze the computing power, network load and other status data of each IoT device in real time, avoiding the problem that traditional task allocation methods cannot adapt to the dynamic changes in the resource status of IoT devices, and realizes efficient and reasonable allocation of tasks for each IoT device in a dynamically changing network environment, thereby improving resource utilization, reducing resource waste, and further improving the overall work efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 A flowchart of the first embodiment of the method for allocating tasks between IoT devices provided in this application;
[0045] Figure 2 A flowchart of the second embodiment of the method for allocating tasks between IoT devices provided in this application;
[0046] Figure 3 A brief flowchart of a method for allocating tasks between IoT devices provided in Example 2 of the present application;
[0047] Figure 4 This is a schematic diagram of the module structure of the task allocation device between IoT devices according to an embodiment of the present application;
[0048] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the task allocation method between IoT devices in the embodiment of the present application.
[0049] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0052] The main solution of the embodiment of the present application is: obtaining a resource data set of each IoT device, and generating a supervector set of each IoT device based on the resource data set; monitoring the resource status of each IoT device, and updating the resource data set according to the resource status; adjusting the task allocation of each IoT device based on the updated resource data set and the supervector set.
[0053] The existing task allocation methods, especially in distributed systems, are difficult to meet the needs of complex dynamic environments, resulting in low resource utilization of IoT devices, which leads to a series of problems such as resource waste and reduced overall system efficiency. Traditional task allocation management methods often lack accurate real-time analysis and optimization tools and cannot effectively handle the dynamic changes of a large number of heterogeneous IoT devices. Therefore, how to effectively allocate tasks among a large number of dynamically changing IoT devices is a problem that needs to be solved urgently.
[0054] The present application provides a solution, which enables the system to analyze the computing power, network load and other status data of each IoT device in real time by performing supervector representation and dynamic update of resource data sets, avoiding the problem that traditional task allocation methods cannot adapt to the dynamic changes in the resource status of IoT devices, and realizing efficient and reasonable allocation of tasks for each IoT device in a dynamically changing network environment, thereby improving resource utilization, reducing resource waste, and further improving the overall work efficiency of the system.
[0055] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device that can realize the above functions. The following takes an electronic device as an example to illustrate this embodiment and the following embodiments.
[0056] Based on this, the present application embodiment provides a method for allocating tasks between IoT devices. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for allocating tasks between IoT devices in the present application.
[0057] In this embodiment, the task allocation method between IoT devices includes steps S10 to S30:
[0058] Step S10, obtaining a resource data set of each IoT device, and generating a supervector set of each IoT device based on the resource data set;
[0059] It should be noted that the resource data set refers to a data set that records the usage of various resources of IoT devices during task execution, such as CPU (Central Processing Unit) usage, memory usage, network bandwidth, etc.; the supervector set refers to a vector set formed by mapping the resource data of IoT devices to a high-dimensional space.
[0060] It is understandable that, since the traditional task allocation method often fails to fully understand the resource status of IoT devices, step S10 is performed. By fully understanding the resource status of the device and converting complex resource data into an easy-to-process mathematical model, it is possible to avoid unreasonable task allocation due to incomplete resource information and the problem of computational complexity when directly processing raw data, thereby achieving systematic collection and management of resource information and providing comprehensive and effective data support for task allocation.
[0061] In a feasible implementation manner, the step of generating the supervector set of each IoT device based on the resource data set in step S10 may include steps S11 to S13:
[0062] Step S11, normalizing the resource data set to obtain a normalized resource data set;
[0063] It can be understood that in order to eliminate the influence of different dimensions and numerical ranges so that each resource data can be compared and analyzed at the same scale, step S11 is performed, which can avoid the problem of inaccurate comparison and analysis caused by differences in resource data dimensions and numerical ranges, thereby ensuring the consistency of resource data, facilitating subsequent weighted processing and comparative analysis, and improving the accuracy and fairness of task allocation.
[0064] Exemplarily, each resource data in the resource data set is normalized by the following formula:
[0065]
[0066] Among them, x i represents a resource data of any IoT device, min(X) represents the minimum value of the resource data of the IoT device, max(X) represents the maximum value of the resource data of the IoT device, x′ i The resource data of the IoT device is normalized after normalization, and the data is in the interval [0, 1]. After traversing each normalized resource data, a normalized resource data set is obtained.
[0067] Step S12, for any resource data subset of the Internet of Things device to be weighted in the normalized resource data set, weighting the resource data subset to obtain a weighted resource data subset of the Internet of Things device to be weighted;
[0068] It should be noted that the IoT devices to be weighted refer to the IoT devices whose resource data subsets have not been weighted among the IoT devices. The resource data subset refers to the part of a single IoT device in the resource data set, which includes the resource usage of the device at a specific point in time, such as CPU usage, memory usage, network bandwidth and other indicators.
[0069] It is understandable that different resource data have different degrees of influence on task execution, so step S12 is performed to reflect the influence of different resource data by weighting, which can avoid the problem of unreasonable task allocation caused by ignoring the difference in the importance of resource data, and more accurately reflect the impact of each resource data on task execution, thereby improving the pertinence and efficiency of task allocation.
[0070] Step S13, after traversing each to-be-weighted Internet of Things device, composing a weighted resource data set of each Internet of Things device from each weighted resource data subset, and generating the super vector set based on the weighted resource data set.
[0071] It can be understood that in order to integrate the weighted resource data subsets of all IoT devices to form a complete resource data view, so as to facilitate global task allocation decisions, step S13 is performed. This can avoid the problem of unbalanced resource allocation due to a local perspective. By providing a global resource data perspective, task allocation can be based on the resource status of the entire IoT system, thereby optimizing overall resource utilization and system performance.
[0072] In this implementation, normalization and weighting processing are performed to avoid the problem of inaccurate task allocation due to inconsistent dimensions and differences in importance of resource data of IoT devices, and the resource data of heterogeneous devices is converted into a comparable and quantifiable supervector set, which effectively improves the accuracy and efficiency of task allocation and ensures that the IoT system can reasonably allocate tasks according to the actual resource status of the device in a dynamic environment, thereby avoiding waste of resources and improving the overall operating performance and resource utilization of the system.
[0073] In a feasible implementation manner, the step of generating the supervector set based on the weighted resource data set in step S13 may include steps S131 to S133:
[0074] Step S131, generating a candidate supervector set of each IoT device based on the weighted resource data set;
[0075] It should be noted that the candidate supervector set refers to a set of vectors generated based on the weighted resource data set of the IoT device, which contains multiple vectors that may represent the resource status of the device, and each vector is a resource configuration or status that the device may take.
[0076] It can be understood that in order to extract possible resource status configurations from the resource data and provide more options for subsequent task allocation, step S131 is performed. This can avoid the problem of insufficient flexibility in task allocation due to lack of consideration of diverse resource states, and generate a set of possible resource status configurations for each IoT device, thereby increasing the flexibility and adaptability of task allocation.
[0077] Exemplarily, the candidate supervector v of each IoT device is generated by the following formula: j :
[0078] v j =(v1, v2, ..., v d )
[0079] Among them, v1, v2, ..., v d It represents the d-dimensional device resource data of IoT device j, which is the resource data after normalization and weighting. After traversing each IoT device, a candidate supervector set is obtained.
[0080] Step S132, for a target candidate supervector of any IoT device in the candidate supervector set, weighting the target candidate supervector to obtain a weighted supervector of the IoT device;
[0081] It should be noted that the target candidate supervector refers to the vector of the resource state of a specific IoT device when performing a task, which is selected from the candidate supervector set.
[0082] It can be understood that in order to evaluate the impact of each candidate supervector on task execution, that is, the impact of the IoT device on task execution, step S132 is performed. By weighting to reflect the relative importance of different IoT devices, it is possible to avoid unreasonable task allocation caused by not considering the importance of supervectors, and determine a more realistic resource state configuration for each IoT device, thereby further improving the accuracy and efficiency of task allocation.
[0083] Exemplarily, the target candidate supervector v of any IoT device in the candidate supervector set is obtained by the following formula: j To perform weighting:
[0084] v′ j =ω j *v j
[0085] Among them, ∑ω j =1,ω j v j The weight of v′ j Represents the weighted super vector of the IoT device after weighting.
[0086] Step S133, after traversing each IoT device, construct the supervector set based on each weighted supervector.
[0087] It can be understood that in order to integrate the weighted supervectors of all IoT devices and form a global supervector set so as to make system-level task allocation decisions, step S133 is performed. By constructing a global resource status view, i.e., a supervector set, the problem of unbalanced resource allocation due to lack of a global perspective can be avoided, ensuring that task allocation takes into account the resource status of the entire IoT system, thereby optimizing overall performance and resource utilization.
[0088] In this implementation, by generating a set of candidate supervectors, weighting the target candidate supervectors, and constructing a supervector set, the problems of inaccurate and inefficient task allocation due to the multi-dimensional and dynamic changes in the resource status of IoT devices are avoided, and the effect of fine-grained control of the resource status of IoT devices and optimized task allocation is achieved, that is, it can ensure that in a dynamically changing network environment, efficient and reasonable task allocation is performed according to the actual resource status and task requirements of each device, thereby improving the resource utilization and operation efficiency of the entire IoT system.
[0089] Step S20, monitoring the resource status of each IoT device, and updating the resource data set according to the resource status;
[0090] It should be noted that resource status refers to the resource usage of an IoT device at a certain moment, such as current CPU usage, memory usage, etc.
[0091] It is understandable that traditional task allocation methods often fail to grasp the operating status of IoT devices, that is, the resource status. Therefore, performing step S20 can avoid problems such as low task execution efficiency or waste of resources caused by the failure to grasp the operating status of IoT devices, and provide an effective allocation basis for dynamically adjusting task allocation strategies to ensure stable and efficient operation of the system.
[0092] Step S30: adjusting the task allocation of each IoT device based on the updated resource data set and the supervector set.
[0093] It is understandable that in traditional task allocation methods, it is usually difficult to achieve optimal utilization of a large number of IoT device resources, so step S30 is performed to avoid resource waste and overall low system efficiency by adjusting the task allocation between IoT devices according to the real-time resource status of the IoT devices and the supervector set, thereby optimizing the task allocation of IoT devices, improving resource utilization, ensuring the overall system operation efficiency, and reducing resource waste.
[0094] In a feasible implementation, step S30 may include steps S31 to S33:
[0095] Step S31, based on the supervector of each IoT device in the supervector set, calculating the relative distance between the IoT devices, and clustering the IoT devices according to the relative distances to obtain a clustering result;
[0096] It can be understood that in order to identify the similarities between IoT devices, devices with similar resource status are grouped together to facilitate collective management and task allocation, so step S31 is performed to classify similar IoT devices into one category through cluster analysis. This can avoid failing to consider the complexity of cross-cluster resource scheduling when performing task allocation or resource scheduling, and provides an effective data basis for achieving load balancing within the same cluster group, thereby optimizing the task allocation strategy and improving the overall work efficiency of the system.
[0097] For example, the density clustering algorithm DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is selected to perform clustering based on the parameters ∈ and MinPts, where ∈ is the preset distance and MinPts is the preset minimum number of devices. The core judgment formula of the algorithm is: N(v i )={v j ∣d(v i , v j )≤∈}, if |N(v i )|≥MinPts then the super vector v i The corresponding physical network device is the core point, where d(v i , v j ) is the super vector v i and the supervector v j The relative distance between them.
[0098] Step S32, optimizing the supervector set according to the updated resource data set to obtain a predicted supervector set of each IoT device;
[0099] It should be noted that the predicted super vector set refers to a vector set that predicts the resource status of each device in the future based on the current resource data set of the IoT device and the possible resource status change trend.
[0100] It is understandable that in order to predict the resource status of the IoT device in the future so as to make decisions on task allocation in advance, step S32 is performed. By predicting the supervector set, it is possible to avoid the problem of unreasonable task allocation caused by the inability to know the future resource status of the physical network device, provide forward-looking information for task allocation, and improve the adaptability and predictability of task allocation.
[0101] Exemplarily, a linear regression or ARIMA (auto regression moving average) model is used to predict the future resource requirements of each IoT device to obtain a prediction result, and the weights in the supervector set are adjusted according to the prediction result to minimize the prediction error of each supervector, thereby obtaining a predicted supervector set for each IoT device.
[0102] Step S33: adjusting the task allocation of each IoT device based on the clustering result, the updated resource data set and the predicted super vector set.
[0103] It can be understood that in order to dynamically adjust the task allocation based on the current resource status of the device, the prediction of the future resource status and the similarity between the devices, step S33 is performed. By comprehensively considering various factors, it is possible to avoid the problems of insufficient resource utilization or low task execution efficiency caused by static allocation strategies, and achieve more flexible and efficient task allocation, thereby improving the overall performance and resource utilization of the Internet of Things system.
[0104] In this implementation, by calculating relative distances to cluster devices, optimizing supervector sets to generate predicted supervector sets, and adjusting task allocation based on clustering results and predicted supervector sets, the problems of unreasonable and inefficient task allocation due to the uncertainty, heterogeneity and dynamic changes in the resource status of IoT devices are avoided, dynamic optimization of IoT device task allocation is achieved, flexibility and foresight of task allocation are ensured, and resource utilization and overall system performance are improved.
[0105] This embodiment provides a method for allocating tasks between IoT devices. By performing supervector representation and dynamic updating of resource data sets, the system can analyze the computing power, network load and other status data of each IoT device in real time, thereby avoiding the problem that traditional task allocation methods cannot adapt to the dynamic changes in the resource status of IoT devices, and realizing efficient and reasonable allocation of tasks for each IoT device in a dynamically changing network environment, thereby improving resource utilization, reducing resource waste, and further improving the overall work efficiency of the system.
[0106] In a feasible implementation, step S133 may include steps S101 to S102:
[0107] Step S101, after traversing each IoT device, a candidate supervector set is formed based on each weighted supervector;
[0108] It should be noted that the candidate supervector set refers to the global supervector that has not been denoised and smoothed.
[0109] Step S102: performing filtering, denoising and data smoothing processing on the candidate supervector set to obtain the supervector set.
[0110] It is understandable that since the supervector generated based on the collected resource data may have data points with large deviations and the data is often relatively rough, step S102 is performed to filter, denoise and smooth the supervector, which can avoid the problem of inaccurate task allocation adjustment caused by poor data quality, and provide a high-quality data foundation for subsequent task allocation adjustment.
[0111] Exemplarily, a Kalman filter K is used to filter and denoise the supervector set:
[0112] x k =x k-1 +K k (z k -x k-1 )
[0113] Among them, x k The candidate super vector after denoising represents the IoT device, z k represents the measurement value of IoT device k, i.e., the candidate supervector, x k-1 is the predicted value of IoT device k, which can be calculated by ARIMA model or linear regression method, that is, using past resource data to infer future demand. Then, the moving average method is used for the denoised candidate supervector, that is, data smoothing is performed by the following formula:
[0114]
[0115] in, represents the candidate supervector of IoT device k after filtering, denoising and data smoothing, x i represents the candidate supervector after denoising of IoT device i, and m is the window size. After traversing each candidate supervector after filtering, denoising and data smoothing, a supervector set is obtained.
[0116] In a feasible implementation manner, the supervector set includes each resource data and a weight corresponding to each resource data, and step S32 may include steps S321 to S323:
[0117] Step S321: for any IoT device to be adjusted, extract the current load and historical load of the IoT device to be adjusted from the updated resource data set;
[0118] It should be noted that the IoT devices to be adjusted refer to the IoT devices whose supervector weights have not been adjusted by the resource prediction results among all IoT devices; the current load refers to the resource usage of the IoT devices at the current moment, such as CPU usage, memory usage, etc.; the historical load refers to the resource usage record of the IoT devices in the past period of time.
[0119] It is understandable that in order to obtain the real-time and past resource usage of IoT devices and provide a data basis for subsequent load trend analysis and resource demand prediction, step S321 can avoid the problem of inaccurate resource demand prediction due to lack of detailed load information, thereby ensuring that the resource demand prediction is based on detailed load data and improving the accuracy of the prediction.
[0120] Step S322, calculating the load trend of the IoT device to be adjusted based on the current load and the historical load, and determining a resource demand prediction result of the IoT device to be adjusted according to the load trend;
[0121] It should be noted that load trend refers to the law or pattern of changes in the resource usage of IoT devices over time, reflecting the increase or decrease in device resource usage and possible future trends; resource demand forecast results refer to the predicted amount of resources that the device may need in the future based on the current load and historical load trends of the IoT device.
[0122] It is understandable that in order to analyze the future trend of resource usage of IoT devices and predict their future resource requirements, step S322 is performed. By predicting resource requirements, it is possible to avoid the problem of unreasonable resource allocation caused by not considering the load change trend or unclear future resource requirements of the device, thereby improving the predictability and efficiency of task allocation management.
[0123] For example, an exponentially weighted moving average (EWMA) is used: EWMA,t =αL t +(1-α)L EWMA,t-1 Calculate the load trend, where α is the smoothing coefficient, L t is the current load, L EWMA,t-1 For historical load, multiple L EWMA,t With L EWMA,t-1 Construct load trends and use linear regression or ARIMA models to predict future resource demand, i.e., resource demand forecast results vt , the prediction model is as follows:
[0124] v t =β0+β1v t-1 +β2v t-2 +……+β p v t-p
[0125] Among them, β i is the regression coefficient, v t-p Indicates load trend.
[0126] Step S323, after traversing each IoT device to be adjusted, adjust each weight in the super vector set based on each resource demand prediction result to obtain the predicted super vector set.
[0127] It should be noted that in the process of adjusting the weights in the supervector set, a constraint condition is set for the weight generation after the weights are updated based on the loss function value: minimizeE+λ‖ω-ω0‖ 2 , where ω0 is the weight after updating the weight based on the loss function value, ω is the weight adjusted based on the resource demand prediction result, λ is the regularization coefficient, and E is the weight that minimizes the prediction error (used to determine the optimal weight in the process of adjusting the weights in the supervector set, that is, the weight that minimizes E, in, is the prediction super vector after adjusting the weights based on the resource prediction results, v i The supervector before adjusting the weight based on the resource prediction result). This constraint condition limits the range of variation of the weight so that the weight will not deviate too far from the result of the first optimization, thereby ensuring the accuracy of the supervector representation.
[0128] It can be understood that in order to adjust the resource allocation weights of the device according to the predicted resource demand to adapt to future changes in resource usage, step S323 is performed. By dynamically adjusting the weights, it is possible to avoid the inability to adapt to dynamically changing resource demands due to static weight allocation, so that the supervector set can better reflect the future resource status of the device, thereby optimizing task allocation and resource utilization.
[0129] For example, the dimension with higher predicted resource demand can be weighted. For example, if the bandwidth demand of a certain IoT device increases in the future, the weight corresponding to the bandwidth dimension in the supervector of the IoT device will be increased, so that the device will be given priority in allocating resources when the bandwidth is sufficient. This adjustment can be achieved through the weight increment Δω j Achieve and satisfy ∑ω j =1.
[0130] In this implementation, by extracting the current and historical loads of IoT devices, calculating load trends, and adjusting the supervector set weights according to resource demand prediction results, the problems of unreasonable task allocation and low resource utilization due to the inability to accurately predict future resource requirements of devices are avoided, and dynamic prediction and adjustment of IoT device resource requirements are achieved, ensuring the flexibility and foresight of task allocation, improving the efficiency of resource management, and optimizing the working performance and resource utilization of the entire IoT system.
[0131] In a feasible implementation manner, step S33 may include steps S331 to S333:
[0132] Step S331, extracting the resource allocation amount and load status of each IoT device from the updated resource data set, and determining the task allocation amount of each IoT device according to each resource allocation amount;
[0133] It should be noted that the resource allocation amount refers to the amount of resources allocated to the IoT device, such as CPU time, memory space, network bandwidth, etc.; the load status refers to the resource usage of the IoT device when performing tasks, including but not limited to CPU usage, memory occupancy, network traffic, etc.; the task allocation amount refers to the number of tasks or task load allocated to the IoT device.
[0134] It is understandable that in order to understand the resource usage and task load of the device so as to reasonably allocate tasks, step S331 is performed to avoid uneven resource allocation and task overload, thereby ensuring that each device can receive an appropriate number of tasks according to its resource capabilities.
[0135] Exemplarily, the resource allocation amount R of each IoT device is obtained j , and determine the task allocation Ti of IoT device i by the following formula:
[0136]
[0137] Among them, R i represents the resource allocation of IoT device i, T total Indicates the total amount of tasks that need to be assigned.
[0138] Step S332: for any two first IoT devices and second IoT devices among the IoT devices, when the difference in load state between the first IoT device and the second IoT device is greater than a preset threshold, based on the clustering result and the predicted supervector set, calculating a task migration cost for adjusting task allocation between the first IoT device and the second IoT device;
[0139] It should be noted that the task migration cost refers to the price required to migrate a task from one device to another, including resource consumption, delay, network communication costs, etc. during the migration process.
[0140] It is understandable that in order to determine the cost of migrating tasks between devices so as to optimize task allocation when necessary, step S332 is performed. By calculating the task migration cost, unnecessary task migration and high migration costs can be avoided, thereby ensuring that task migration is cost-effective.
[0141] Exemplarily, the load state difference ΔL between the first IoT device i and the second IoT device j is calculated by the following formula: ij :
[0142] ΔL ij =L i -L j
[0143] Among them, L i Indicates the load state of the first IoT device i, L j represents the load state of the second IoT device j. ij When the value is greater than the preset threshold, the computational cost C is determined based on the clustering results and the predicted super vector set. compute The task migration cost ΔT for task allocation adjustment between the first IoT device i and the second IoT device j is calculated by the following formula: ij :
[0144] ΔT ij =C neteork -C compute
[0145] Among them, C network Indicates the data migration network cost.
[0146] Step S333, after traversing the IoT devices, sort the migration costs of the tasks in ascending order, obtain an execution sequence for task allocation adjustment, and adjust the task allocation of the IoT devices based on the execution sequence.
[0147] It should be noted that the execution sequence refers to a list of task migration operations arranged in order from low to high task migration costs.
[0148] It can be understood that in order to give priority to the task migration operation with the lowest cost and thus optimize the overall task allocation, step S333 is performed. By orderly migrating tasks and selecting low-cost migration paths, resource waste and inefficiency caused by disordered migration can be avoided, thereby ensuring the efficiency of load balancing and maximizing resource utilization and system performance.
[0149] Exemplarily, according to the size of the migration cost of each task, a priority is configured for each migration task, so that a higher priority is configured for a migration task with a low migration cost, thereby forming an execution sequence, and the task allocation adjustment with a low migration cost is preferentially performed according to the execution sequence. The goal of the task allocation is to minimize the load difference ΔL between IoT devices, and the ΔL is expressed as follows:
[0150]
[0151] Among them, L i Indicates the load state of the first IoT device i, L j Indicates the load status of the second IoT device j. At the same time, the migration process is recorded in the task migration log for subsequent tuning and resource monitoring.
[0152] In this implementation, by extracting the resource allocation amount and load status, calculating the task migration cost, and sorting and executing the task migration operation, the problems of high migration cost and system performance degradation caused by load imbalance and unreasonable task allocation among IoT devices are avoided, and task allocation is dynamically adjusted according to the actual load of the device and predicted resource demand, ensuring the efficiency and cost-effectiveness of task migration, optimizing the resource utilization and workload balance of the IoT system, and thus improving the overall performance and reliability of the system.
[0153] In a feasible implementation manner, after step S32, step S100 may also be included;
[0154] Step S100, identifying the load peak period of each IoT device based on the predicted supervector collection, and increasing the resource allocation of the IoT device corresponding to the load peak period at a preset time before the load peak period.
[0155] It should be noted that the peak load period refers to the period when the load condition of a specific IoT device is significantly higher than that of other periods.
[0156] It is understandable that traditional task allocation methods are often unable to pre-configure resources according to the load conditions of different IoT devices, so step S100 is performed to prepare computing resources in advance during the peak load period of the IoT device to ensure that the task requirements of the IoT device are met, thereby improving the overall work efficiency of the IoT system.
[0157] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , Figure 2This is a flow chart of the second embodiment of the method for allocating tasks between IoT devices in the present application.
[0158] The super vector set includes each resource data and the weight corresponding to each resource data. Before step S13, the task allocation method between the IoT devices further includes steps S01 to S02:
[0159] Step S01, obtaining each candidate weight of the supervector set, and calculating the loss function value of the supervector set based on the each candidate weight;
[0160] It should be noted that candidate weights refer to a set of possible weights used in a supervector set. These weights are to be selected and used to evaluate and optimize the performance of the supervector set. The loss function refers to an indicator used to measure the difference between the predicted results and the actual resource requirements after the candidate weights are applied in the supervector set. It reflects the effectiveness of the weight configuration. The mean square error (MSE) or absolute error (MAE) can be used as the loss function.
[0161] It can be understood that in order to evaluate whether different weight configurations are suitable for the supervector set, step S01 is performed to find the optimal weight configuration by calculating the loss function value, thereby avoiding the subjectivity and blindness of weight selection, ensuring the adaptability of the weight configuration, and thus improving the supervector set's close reflection of actual resource data.
[0162] Exemplarily, the loss function L(V) of the supervector set is calculated by the following formula:
[0163]
[0164] in, is the forecast value, which is calculated by ARIMA model or linear regression method, that is, using past resource data to infer future demand, v i is any supervector in the supervector set.
[0165] Step S02: taking the candidate weight corresponding to the minimum value in each loss function value as the target weight, and updating the weights in the supervector set based on the target weight.
[0166] It should be noted that the target weight refers to the candidate weight with the smallest loss function value after comparison. This weight is considered to be the optimal weight configuration and is used to update the weights in the supervector set.
[0167] It can be understood that in order to select the optimal weight configuration to update the supervector set to improve the accuracy of task allocation, step S02 is performed. By updating the weight to the optimal target weight, it is possible to avoid prediction bias and unreasonable task allocation caused by using suboptimal weights, improve the prediction ability of the supervector set, and further optimize the task allocation of IoT devices and improve the overall system performance.
[0168] In this embodiment, candidate weights are obtained and loss function values are calculated through an optimization algorithm, and the candidate weights corresponding to the minimum loss function value are selected as the target weights to update the supervector set, thereby avoiding the problems of inaccurate future demand forecasting and inefficient task allocation due to improper weight selection, and realizing dynamic optimization of the supervector set weight configuration, improving the prediction accuracy of task allocation of IoT devices and the utilization efficiency of system resources, thereby improving the overall performance and stability of the IoT system.
[0169] For example, in order to help understand the implementation process of the task allocation method between IoT devices obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A brief flowchart of a task allocation method among IoT devices is provided, specifically:
[0170] First, the resource data set of each IoT device is obtained, and the supervector set of each physical network device is generated based on the resource data set. At the same time, the resource status of each IoT device is monitored in real time to obtain an updated resource data set. Then, the weight of the generated supervector set is updated, and each IoT device is clustered based on the supervector set after the weight update to obtain the clustering result. The weight of the supervector set after the weight update is adjusted again to obtain the predicted supervector set. Finally, the task allocation between each IoT device is adjusted according to the updated resource data set, clustering results, and predicted supervector set. At the same time, the relevant logs of task allocation and the load curves of each IoT device can be generated for visual display, so that users can understand and adjust the relevant work content.
[0171] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the task allocation method between IoT devices of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0172] This application also provides a task allocation device between IoT devices, please refer to Figure 4 , the task allocation device between the IoT devices comprises:
[0173] A generating module 10 is used to obtain a resource data set of each IoT device, and generate a super vector set of each IoT device based on the resource data set;
[0174] An updating module 20, configured to monitor the resource status of each IoT device and update the resource data set according to the resource status;
[0175] The adjustment module 30 is used to adjust the task allocation of each IoT device based on the updated resource data set and the super vector set.
[0176] Optionally, the generating module 10 is further used for:
[0177] Normalizing the resource data set to obtain a normalized resource data set;
[0178] For any resource data subset of the Internet of Things device to be weighted in the normalized resource data set, weighting the resource data subset to obtain a weighted resource data subset of the Internet of Things device to be weighted;
[0179] After traversing each to-be-weighted Internet of Things device, each weighted resource data subset is used to form a weighted resource data set of each Internet of Things device, and the super vector set is generated based on the weighted resource data set.
[0180] Optionally, the generating module 10 is further used for:
[0181] Generating a candidate supervector set for each IoT device based on the weighted resource data set;
[0182] For a target candidate supervector of any IoT device in the candidate supervector set, weighting the target candidate supervector to obtain a weighted supervector of the IoT device;
[0183] After traversing each IoT device, the supervector set is constructed based on each weighted supervector.
[0184] Optionally, the super vector set includes each resource data and a weight corresponding to each resource data, and the generating module 10 is further used for:
[0185] Obtaining each candidate weight of the supervector set, and calculating a loss function value of the supervector set based on the each candidate weight;
[0186] The candidate weight corresponding to the minimum value in each loss function value is used as the target weight, and the weights in the supervector set are updated based on the target weight.
[0187] Optionally, the adjustment module 30 is further used for:
[0188] Based on the supervectors of the IoT devices in the supervector set, the relative distances between the IoT devices are calculated, and the IoT devices are clustered according to the relative distances to obtain a clustering result;
[0189] Optimizing the supervector set according to the updated resource data set to obtain a predicted supervector set for each IoT device;
[0190] Based on the clustering result, the updated resource data set and the predicted super vector set, the task allocation of each Internet of Things device is adjusted.
[0191] Optionally, the supervector set includes each resource data and a weight corresponding to each resource data, and the adjustment module 30 is further used for:
[0192] For any IoT device to be adjusted, extract the current load and historical load of the IoT device to be adjusted from the updated resource data set;
[0193] Calculating a load trend of the to-be-adjusted IoT device based on the current load and the historical load, and determining a resource demand prediction result of the to-be-adjusted IoT device according to the load trend;
[0194] After traversing each of the Internet of Things devices to be adjusted, each weight in the super vector set is adjusted based on each resource demand prediction result to obtain the predicted super vector set.
[0195] Optionally, the adjustment module 30 is further used for:
[0196] Extracting the resource allocation amount and load status of each IoT device from the updated resource data set, and determining the task allocation amount of each IoT device according to each resource allocation amount;
[0197] For any two first Internet of Things devices and second Internet of Things devices among the Internet of Things devices, when the difference in load state between the first Internet of Things device and the second Internet of Things device is greater than a preset threshold, based on the clustering result and the predicted supervector set, calculating a task migration cost for adjusting task allocation between the first Internet of Things device and the second Internet of Things device;
[0198] After traversing the IoT devices, the migration costs of the tasks are sorted in order from low to high to obtain an execution sequence for task allocation adjustment, and the task allocation of the IoT devices is adjusted based on the execution sequence.
[0199] Optionally, the generating module 10 is further used for:
[0200] After traversing each IoT device, a candidate supervector set is formed based on each weighted supervector;
[0201] The candidate supervector set is subjected to filtering, denoising and data smoothing processing to obtain the supervector set.
[0202] Optionally, the adjustment module 30 is further used for:
[0203] Based on the predicted supervector collection, the peak load period of each IoT device is identified, and at a preset time before the peak load period, resource allocation of the IoT device corresponding to the peak load period is increased.
[0204] The task allocation device between IoT devices provided by the present application adopts the task allocation method between IoT devices in the above-mentioned embodiment, which can solve the technical problem of how to effectively allocate tasks between a large number of dynamically changing IoT devices. Compared with the prior art, the beneficial effects of the task allocation device between IoT devices provided by the present application are the same as the beneficial effects of the task allocation method between IoT devices provided by the above-mentioned embodiment, and the other technical features of the task allocation device between IoT devices are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0205] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the task allocation method between IoT devices in the above-mentioned embodiment 1.
[0206] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0207] like Figure 5As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0208] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0209] The electronic device provided by the present application adopts the task allocation method between the IoT devices in the above embodiment, which can solve the technical problem of how to effectively allocate tasks between a large number of dynamically changing IoT devices. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the task allocation method between the IoT devices provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0210] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0211] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0212] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the task allocation method between IoT devices in the above-mentioned embodiment.
[0213] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0214] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0215] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: obtains a resource data set of each IoT device, and generates a supervector set of each IoT device based on the resource data set; monitors the resource status of each IoT device, and updates the resource data set according to the resource status; and adjusts the task allocation of each IoT device based on the updated resource data set and the supervector set.
[0216] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0217] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0218] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0219] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned task allocation method between IoT devices, and can solve the technical problem of how to effectively allocate tasks between a large number of dynamically changing IoT devices. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the task allocation method between IoT devices provided by the above-mentioned embodiment, and will not be elaborated here.
[0220] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for allocating tasks between IoT devices.
[0221] The computer program product provided by the present application can solve the technical problem of how to effectively allocate tasks among a large number of dynamically changing IoT devices. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the task allocation method among IoT devices provided by the above-mentioned embodiment, and will not be elaborated here.
[0222] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for allocating tasks between IoT devices, characterized in that: The task allocation method between the IoT devices includes: Acquire a resource data set of each IoT device, and generate a supervector set of each IoT device based on the resource data set; Monitoring the resource status of each IoT device, and updating the resource data set according to the resource status; Based on the updated resource data set and the supervector set, the task allocation of each IoT device is adjusted.
2. The task allocation method between IoT devices according to claim 1, characterized in that: The step of generating the supervector set of each IoT device based on the resource data set comprises: Normalizing the resource data set to obtain a normalized resource data set; For any resource data subset of the Internet of Things device to be weighted in the normalized resource data set, weighting the resource data subset to obtain a weighted resource data subset of the Internet of Things device to be weighted; After traversing each to-be-weighted Internet of Things device, each weighted resource data subset is used to form a weighted resource data set of each Internet of Things device, and the super vector set is generated based on the weighted resource data set.
3. The task allocation method between IoT devices as claimed in claim 2, characterized in that: The step of generating the supervector set based on the weighted resource data set comprises: Generating a candidate supervector set for each IoT device based on the weighted resource data set; For a target candidate supervector of any IoT device in the candidate supervector set, weighting the target candidate supervector to obtain a weighted supervector of the IoT device; After traversing each IoT device, the supervector set is constructed based on each weighted supervector.
4. The method for allocating tasks between IoT devices as claimed in claim 2, characterized in that: The super vector set includes each resource data and a weight corresponding to each resource data, and the step of generating the super vector set based on the weighted resource data set further includes: Obtaining each candidate weight of the supervector set, and calculating a loss function value of the supervector set based on the each candidate weight; The candidate weight corresponding to the minimum value in each loss function value is used as the target weight, and the weights in the supervector set are updated based on the target weight.
5. The method for allocating tasks between IoT devices as claimed in claim 1, characterized in that: The step of adjusting the task allocation of each IoT device based on the updated resource data set and the supervector set includes: Based on the supervectors of the IoT devices in the supervector set, the relative distances between the IoT devices are calculated, and the IoT devices are clustered according to the relative distances to obtain a clustering result; Optimizing the supervector set according to the updated resource data set to obtain a predicted supervector set for each IoT device; Based on the clustering result, the updated resource data set and the predicted super vector set, the task allocation of each Internet of Things device is adjusted.
6. The method for allocating tasks between IoT devices as claimed in claim 5, characterized in that: The super vector set includes each resource data and a weight corresponding to each resource data, and the step of optimizing the super vector set according to the updated resource data set to obtain the predicted super vector set of each IoT device includes: For any IoT device to be adjusted, extract the current load and historical load of the IoT device to be adjusted from the updated resource data set; Calculate the load trend of the to-be-adjusted IoT device based on the current load and the historical load, and determine the resource demand prediction result of the to-be-adjusted IoT device according to the load trend; After traversing each to-be-adjusted Internet of Things device, each weight in the supervector set is adjusted based on each resource demand prediction result to obtain the predicted supervector set.
7. The method for allocating tasks between IoT devices as claimed in claim 5, characterized in that: The step of adjusting the task allocation of each IoT device based on the clustering result, the updated resource data set and the predicted super vector set includes: Extracting the resource allocation amount and load status of each IoT device from the updated resource data set, and determining the task allocation amount of each IoT device according to each resource allocation amount; For any two first Internet of Things devices and second Internet of Things devices among the Internet of Things devices, when the difference in load state between the first Internet of Things device and the second Internet of Things device is greater than a preset threshold, based on the clustering result and the predicted supervector set, calculating a task migration cost for adjusting task allocation between the first Internet of Things device and the second Internet of Things device; After traversing the IoT devices, the migration costs of the tasks are sorted in order from low to high to obtain an execution sequence for task allocation adjustment, and the task allocation of the IoT devices is adjusted based on the execution sequence.
8. A task allocation device between IoT devices, characterized in that: The task allocation device between the Internet of Things devices includes: A generation module, used to obtain a resource data set of each IoT device, and generate a super vector set of each IoT device based on the resource data set; An updating module, used to monitor the resource status of each IoT device and update the resource data set according to the resource status; The adjustment module is used to adjust the task allocation of each IoT device based on the updated resource data set and the super vector set.
9. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for allocating tasks between IoT devices as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the task allocation method between Internet of Things devices as described in any one of claims 1 to 7 are implemented.