CN115373821A - Internet of things service online reconfiguration method and device, electronic equipment and medium - Google Patents

Internet of things service online reconfiguration method and device, electronic equipment and medium Download PDF

Info

Publication number
CN115373821A
CN115373821A CN202211042197.6A CN202211042197A CN115373821A CN 115373821 A CN115373821 A CN 115373821A CN 202211042197 A CN202211042197 A CN 202211042197A CN 115373821 A CN115373821 A CN 115373821A
Authority
CN
China
Prior art keywords
reconfigured
internet
reconfiguration
task
user request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211042197.6A
Other languages
Chinese (zh)
Inventor
周长兵
李小翠
孙莎莎
施振生
刘利钊
张玉清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China University of Geosciences Beijing
Original Assignee
China University of Geosciences Beijing
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China University of Geosciences Beijing filed Critical China University of Geosciences Beijing
Priority to CN202211042197.6A priority Critical patent/CN115373821A/en
Publication of CN115373821A publication Critical patent/CN115373821A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y20/00Information sensed or collected by the things
    • G16Y20/30Information sensed or collected by the things relating to resources, e.g. consumed power

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides an Internet of things service online reconfiguration method and device, electronic equipment and media. The method comprises the steps that after current tasks of different service types corresponding to user requests are distributed to corresponding Internet of things equipment in an Internet of things network based on received user requests, historical user requests corresponding to unprocessed tasks on the current Internet of things equipment which do not meet execution resource amount of any current task are determined as user requests to be reconfigured, and the tasks to be reconfigured are determined; and according to the execution sequence of each task to be reconfigured corresponding to each user request to be reconfigured, reconfiguring the Internet of things equipment where the task to be reconfigured corresponding to the user request to be reconfigured is located by adopting a preset online reconfiguration algorithm to obtain a target reconfiguration strategy, wherein the preset reconfiguration algorithm is determined based on the resource utilization rate and the service execution benefit of the Internet of things equipment. The method can ensure the access delay of the user request, reduce the energy consumption of the Internet of things equipment and balance the working load of the Internet of things network.

Description

Internet of things service online reconfiguration method and device, electronic equipment and medium
Technical Field
The application relates to the technical field of Internet of things and communication, in particular to an Internet of things service online reconfiguration method, device, electronic equipment and medium.
Background
With the wide development of the internet of things and communication technology, some new applications with sensitive time delay, such as real-time video processing, online interactive games, augmented reality and the like, are promoted. The edge computing provides a real-time response paradigm, so that the service of the internet of things can be deployed on network-side equipment close to a user request, and further a complex request is realized in a combined form of function complementation and geographical adjacency. Most of internet of things equipment in an edge network is deficient in resources, so that the computing capacity is limited, meanwhile, in consideration of uncertainty of user request prediction, if some internet of things equipment is executing previous subtasks at the moment, a newly-introduced request with delay and space constraint is difficult to meet through a combined part (or all), namely, the access delay of a user is increased.
Disclosure of Invention
An object of the embodiments of the present application is to provide an internet of things service online reconfiguration method, an internet of things service online reconfiguration device, an electronic device, and a medium, so as to solve the above problems in the prior art and reduce access delay of a user.
In a first aspect, an internet of things service online reconfiguration method is provided, and the method may include:
distributing current tasks of different service types corresponding to the user request to corresponding Internet of things equipment in an Internet of things network based on the received user request, wherein the user request comprises execution resources required by each current task;
determining historical user requests corresponding to unprocessed tasks on current Internet of things equipment which do not meet the execution resource amount of any current task as user requests to be reconfigured, and determining tasks corresponding to the user requests to be reconfigured as tasks to be reconfigured;
and according to the execution sequence of each task to be reconfigured corresponding to each user request to be reconfigured, reconfiguring the Internet of things equipment where the task to be reconfigured corresponding to the user request to be reconfigured is located by adopting a preset online reconfiguration algorithm to obtain a target reconfiguration strategy, wherein the preset online reconfiguration algorithm is determined based on the resource utilization rate and the service execution benefit of the Internet of things equipment.
In an optional implementation, according to an execution sequence of each to-be-reconfigured task corresponding to each to-be-reconfigured user request, a preset online reconfiguration algorithm is adopted to reconfigure the internet of things device where the task corresponding to the to-be-reconfigured user request is located, so as to obtain a target reconfiguration strategy, which includes:
determining reconfiguration information of the tasks to be reconfigured according to an execution sequence of the tasks to be reconfigured corresponding to the user requests to be reconfigured, wherein the reconfiguration information comprises reconfiguration times, the tasks to be reconfigured each time and different reconfiguration strategies for migrating the tasks to be reconfigured to target Internet of things equipment; the target Internet of things equipment is current Internet of things equipment where the task to be reconfigured is located or any equipment which is not the current Internet of things equipment and has the same service type as the current Internet of things equipment;
according to the sequence of the reconfiguration times and corresponding different reconfiguration strategies, after the tasks to be reconfigured in each reconfiguration are reconfigured in sequence, calculating the resource utilization rate and the service execution benefit of each Internet of things device corresponding to the different reconfiguration strategies in each reconfiguration;
for each reconfiguration, calculating the resource utilization rate and the service execution benefit corresponding to the different reconfiguration strategies by adopting a preset reconfiguration benefit algorithm to obtain reconfiguration benefit values of the different reconfiguration strategies, and determining the reconfiguration strategy corresponding to the maximum reconfiguration benefit value as an optimized reconfiguration strategy of the reconfiguration;
and determining the target reconfiguration strategy based on the optimized reconfiguration strategy for each reconfiguration.
In an optional implementation, calculating the resource utilization rate and the service execution benefit of each piece of internet-of-things equipment corresponding to different reconfiguration policies in each reconfiguration includes:
for any reconfiguration strategy in each reconfiguration, acquiring the resource utilization rate of each piece of internet-of-things equipment after executing the reconfiguration, and determining the average value of the resource utilization rates of the pieces of internet-of-things equipment as the resource utilization rate corresponding to the reconfiguration strategy;
acquiring processing time delay and processing energy consumption of the user request to be reconfigured corresponding to each task to be reconfigured after reconfiguration is executed aiming at any reconfiguration strategy in each reconfiguration; the processing time delay comprises an execution time delay of each task to be reconfigured on corresponding target Internet of things equipment and a communication time delay of data output by a task to be reconfigured in the past, and the processing energy consumption comprises execution energy consumption generated by each task to be reconfigured on the corresponding target Internet of things equipment based on the processing time delay and communication energy consumption generated by the communication time delay;
and determining the service execution benefit corresponding to the reconfiguration strategy based on the processing time delay, the processing energy consumption and the configured service execution benefit weight of each user request to be reconfigured.
In an optional implementation, the method further comprises:
for any user request to be reconfigured, if the current task to be reconfigured is the first task in the user request to be reconfigured, determining that the communication delay of the current task to be reconfigured is 0;
and if the current task to be reconfigured is a non-first task in the user request to be reconfigured, determining the communication delay of the current task to be reconfigured as the time length of the current task to be reconfigured for receiving the output data of the previous task to be reconfigured.
In an optional implementation, the method further comprises:
aiming at any user request to be reconfigured, if two tasks to be reconfigured which are executed in parallel exist and are not the first task, the communication time delay of the two tasks to be reconfigured in the user request to be reconfigured selects the maximum communication time delay of the respective communication time delays of the two tasks to be reconfigured.
In an alternative implementation, the user request further includes an execution duration;
before determining the service execution benefit corresponding to the reconfiguration policy based on the processing delay, the processing energy consumption and the configured service execution benefit weight of each user request to be reconfigured, the method further comprises:
acquiring the maximum execution time length and the minimum execution time length in the execution time lengths requested by the users to be reconfigured, and a first difference value between the maximum execution time length and the minimum execution time length;
and for any user request to be reconfigured, determining the ratio of a second difference value and the first difference value of the maximum execution time length and the execution time length of the user request to be reconfigured as the service execution benefit weight of the user request to be reconfigured.
In an optional implementation, (1) an obtaining manner of the execution delay of each task to be reconfigured in the processing delay is represented as:
Figure BDA0003820797440000031
wherein s is l,n Representing the nth task to be reconfigured in the user request l to be reconfigured; t is a unit of e (s l,n ) Denotes s l,n The resulting execution delay; x is a radical of a fluorine atom l,n E {0,1} represents said s l,n A transition state of (b), wherein x l,n =0 represents said s l,n At the local internet of things device i, the migration state is not changed, x l,n =1 denotes said s l,n Migrating to a target Internet of things device j, wherein the migration state is changed;
Figure BDA0003820797440000041
representing the clock cycle of a CPU (central processing unit) for executing the nth task to be reconfigured in the user request l to be reconfigured on the local Internet of things device i; f i Representing the CPU clock period of the local Internet of things device i;
Figure BDA0003820797440000042
representing the data volume of the nth task to be reconfigured in the user request l to be reconfigured on the local Internet of things device i; r is a radical of hydrogen i,j Representing the transmission rate of the configured tasks to be reconfigured between the local Internet of things equipment i and the target Internet of things equipment j; f j Representing the CPU clock period of the target Internet of things device j;
Figure BDA0003820797440000043
representing the CPU clock cycle of the nth task to be reconfigured in the user request l to be reconfigured executed on the target Internet of things device j;
(2) The acquisition mode of the communication time delay of each task to be reconfigured in the processing time delay is represented as follows:
Figure BDA0003820797440000044
wherein, T c (s l,n′ ,s l,n ) Denotes s l,n Communication delay of s l,n′ Is represented by a and s l,n An adjacent previous task to be reconfigured; dt n′,n Denotes s l,n′ To s l,n The amount of output data transmitted.
In a second aspect, an online reconfiguration device for internet of things services is provided, and the device may include:
the distribution unit is used for distributing current tasks of different service types corresponding to the user request to corresponding Internet of things equipment in an Internet of things network based on the received user request, and the user request comprises execution resources required by each current task;
the device comprises a determining unit and a task resetting unit, wherein the determining unit is used for determining historical user requests corresponding to unprocessed tasks on current Internet of things equipment which do not meet the execution resource amount of any current task as user requests to be reconfigured, and determining tasks corresponding to the user requests to be reconfigured as tasks to be reconfigured;
and the reconfiguration unit is used for reconfiguring the Internet of things equipment where the tasks to be reconfigured corresponding to the user requests to be reconfigured are located by adopting a preset online reconfiguration algorithm according to the execution sequence of the tasks to be reconfigured corresponding to the user requests to be reconfigured, so as to obtain a target reconfiguration strategy, wherein the preset online reconfiguration algorithm is determined based on the resource utilization rate and the service execution benefit of the Internet of things equipment.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored therein a computer program which, when executed by a processor, performs the method steps of any of the above first aspects.
According to the method for online reconfiguration of the internet of things service, after current tasks of different service types corresponding to the user requests are distributed to corresponding internet of things equipment in an internet of things network based on the received user requests, the user requests comprise execution resources required by the current tasks, historical user requests corresponding to unprocessed tasks on the current internet of things equipment which do not meet the execution resource amount of any current task are determined as user requests to be reconfigured, and tasks corresponding to the user requests to be reconfigured are determined as tasks to be reconfigured; and according to the execution sequence of each task to be reconfigured corresponding to each user request to be reconfigured, reconfiguring the Internet of things equipment where the task to be reconfigured corresponding to the user request to be reconfigured is located by adopting a preset online reconfiguration algorithm to obtain a target reconfiguration strategy, wherein the preset online reconfiguration algorithm is determined based on the resource utilization rate and the service execution benefit of the Internet of things equipment. The method can balance the work load of the internet of things network and reduce the access delay of the user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram of a network structure of an internet of things for executing a user request according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an internet of things service online reconfiguration method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a network structure of the internet of things in which tasks to be reconfigured in a user request to be reconfigured are distributed according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an internet of things service online reconfiguration device provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the present application.
The method for online reconfiguration of the internet of things services can comprehensively consider the resource of the internet of things equipment in the internet of things network and the constraint condition of the user request, the constraint condition can comprise the execution time of the user request and the execution resource required by each task, the tasks on the local internet of things equipment are reconfigured in an optimal mode, so that some tasks corresponding to the previous user request are migrated to the target internet of things equipment with sufficient adjacent resources online, the resource constraint condition specified by the tasks is still met, and the resources released by the local internet of things equipment can be used for realizing the execution of the newly-transmitted tasks requested by the user. The method allows network resources in the Internet of things network to be optimally utilized so as to improve the corresponding throughput of the Internet of things network.
The target internet of things device may be any internet of things device which has the same service type as the local internet of things device in all internet of things devices related to the user request corresponding to the task to be migrated in the internet of things network, or may be any device in a neighbor set of the local internet of things device in the internet of things network, where the neighbor set is a set formed by neighbor internet of things devices intersecting or tangent with the communication range radius of the local internet of things device.
As shown in FIG. 1, the Internet of things network receives at least one historical user request, such as wf, during a historical time period 0 、wf 1 And wf 2 New user requests are currently received, e.g. wf 3
Because each user request corresponds to tasks of different service types and a certain execution sequence exists among the tasks of different service types, executing each user request requires the internet of things equipment of different service types to execute corresponding tasks according to the certain execution sequence.
wf 0 The execution sequence of the corresponding 4 tasks is as follows: s 0,0 、s 0,1 And s 0,2 And s 0,3 Wherein s is 0,2 And s 0,3 Tasks that are executed in parallel;
wf 1 the execution sequence of the corresponding 5 tasks is as follows: s 1,0 、s 1,1 、s 1,2 And s 1,3 And s and 1,4 wherein s1,2 and s1,3 are tasks executed in parallel;
wf 2 the execution sequence of the corresponding 3 tasks is as follows: s 2,0 、s 2,1 、s 2,2 And s 2,3
wf 3 The execution sequence of the corresponding 5 tasks is as follows: s 3,0 、s 3,1 、s 3,2 、s 3,3 And s 3,4
8 pieces of Internet of things equipment (sn) are deployed in the Internet of things network 0 ,sn 1 ,sn 2 ,……,sn 7 ) At time t, the internet of things device is executing 3 user requests (wf) 0 ,wf 1 ,wf 2 ). The task allocation situation requested by the user is shown as the figureShown by s 0,2 And s 1,2 By the internet of things device sn 0 Executing, and flooding a new user request wf at the moment of t +1 3 According to its constraint, s 3,1 、s 3,2 Is distributed to the Internet of things equipment sn 5 、sn 0 And (6) executing. Wherein, because sn among 8 thing networking equipment 0 And sn 5 New deployment wf of internet of things equipment 3 Resulting in an internet of things device sn 5 、sn 0 Capacity overload, user request for time t (wf) 0 ,wf 1 ,wf 2 ) The performance of the execution of (c) has an impact. Therefore, the internet of things equipment sn 0 And sn 5 Task s of last unprocessed 3 user requests 0,2 、s 1,2 、s 0,3 、s 1,3 Reconfiguration is required to ensure that the Internet of things equipment sn 0 And sn 5 The released network resources can be used to fulfill the user request wf 3 . The method can balance the work load of the Internet of things network, simultaneously meet the delay constraint of user requests at different moments, perform task reconfiguration in an optimal mode, optimize the resource utilization of the Internet of things network and improve the application throughput of the Internet of things network.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it should be understood that the preferred embodiments described herein are merely for illustrating and explaining the present application, and are not intended to limit the present application, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Fig. 2 is a schematic flow chart of an internet of things service online reconfiguration method provided in the embodiment of the present application. As shown in fig. 2, the method may include:
step S210, based on the received user request, allocating the current task of different service types corresponding to the user request to corresponding internet of things devices in the internet of things network.
The user request may include constraints on the execution duration of the request and constraints on the execution resources required for each current task. For example, the execution duration is
Figure BDA0003820797440000081
I.e. the user request requires completion within 10s and cannot be timed out. Constraints on execution resources may include constraints common to CPU resources, memory resources, and bandwidth resources.
In specific implementation, resources are allocated to each current task corresponding to the user request to obtain current tasks of different service types, the current tasks are allocated to corresponding internet of things devices in the internet of things network, the resources are packaged into internet of things services to execute the user task, and a candidate internet of things device set executed by the current task corresponding to the user request is obtained. E.g. s 3,0 Distributed to the internet of things device sn 6 Execution, s 3,1 、s 3,2 Respectively distributed to the Internet of things equipment sn 5 、sn 0 Execution, s 3,3 Is distributed to the Internet of things equipment sn 4 Execution, s 3,4 Distributed to the internet of things device sn 3 Executing the method, wherein the candidate Internet of things equipment set at the moment is { sn 0 ,sn 3 ,sn 4 ,sn 5 ,sn 6 }。
Step S220, determining the historical user request corresponding to the unprocessed task on the current Internet of things equipment which does not meet the execution resource amount of any current task as the user request to be reconfigured, and determining each task corresponding to each user request to be reconfigured as the task to be reconfigured.
In specific implementation, after the current tasks corresponding to the received user requests are distributed, whether tasks (namely existing tasks) without any unprocessed historical user requests are migrated exist on each current internet of things device in the candidate internet of things device set or not is checked according to constraint conditions of execution resources required by each current task, and then the current tasks are loaded. Under the condition that no task requested by any historical user is migrated on the current Internet of things equipment, if resources are not enough to load the current task, namely the current Internet of things equipment does not meet the resource constraint condition of the current task, selecting and migrating some tasks requested by the historical user on the current Internet of things equipment, and realizing network resource optimal allocation.
Specifically, whether the capacity overload phenomenon, namely the resource shortage phenomenon, occurs to the current internet of things equipment loaded with the current task is searched, and if not, it is indicated that the task needing to be migrated does not exist on the current internet of things equipment. If yes, recording a task set of historical user requests on the current Internet of things equipment, and determining the historical user requests corresponding to the set as user requests to be reconfigured; determining each task corresponding to each user request to be reconfigured as a task to be reconfigured; the tasks to be reconfigured can include tasks on the current internet of things equipment with resources insufficient for loading the current tasks, the migration state of the tasks is not changed, and tasks on the current internet of things equipment with resources sufficient for loading the current tasks, and the migration state of the tasks is changed.
Combined with s in FIG. 1 3,1 、s 3,2 Assigned to devices sn 5 、sn 0 Execute, resulting in the Internet of things device sn 5 、sn 0 Capacity overload, when user requests wf 0 And wf 1 Wf, for a user request to be reconfigured 0 Corresponding 4 tasks and wf 1 The corresponding 5 tasks are tasks to be reconfigured, wherein s 0,2 、s 1,2 、s 0,3 And s 1,3 The task on the current internet of things device with insufficient resources to load the current task is obtained.
And step S230, according to the execution sequence of each task to be reconfigured corresponding to each user request to be reconfigured, reconfiguring the Internet of things equipment where the task to be reconfigured corresponding to the user request to be reconfigured is located by adopting a preset online reconfiguration algorithm, and obtaining a target reconfiguration strategy.
The preset online reconfiguration algorithm is determined based on the resource utilization rate and the service execution benefit of the equipment of the Internet of things.
In specific implementation, the reconfiguration information of the tasks to be reconfigured is determined according to the execution sequence of the tasks to be reconfigured corresponding to the user requests to be reconfigured. The reconfiguration information may include reconfiguration times, tasks to be reconfigured each time, and different reconfiguration strategies for migrating the tasks to be reconfigured to the target internet of things device.
The target internet of things device is the current internet of things device where the task to be reconfigured is located or any device which is except the current internet of things device and has the same service type as the current internet of things device, namely when the migration state is not changed, the target internet of things device is the current internet of things device where the task to be reconfigured is located, and when the migration state is changed, the target internet of things device is other devices which have the same service type as the current internet of things device.
The times of reconfiguration and the tasks to be reconfigured in each reconfiguration are determined based on the execution sequence of the tasks to be reconfigured in each user request to be reconfigured, and the user request wf to be reconfigured is combined with the graph 1 0 And wf 1 The task to be reconfigured for the first time is s 0,0 ,s 1,0 The task to be reconfigured for the second reconfiguration is { s } 0,1 ,s 1,1 And the task to be reconfigured for the third reconfiguration is s 0,2 ,s 0,3 ,s 1,2 ,s 1,3 The task to be reconfigured for the fourth reconfiguration is { s } 1,4 }。
The different reconfiguration strategy for each reconfiguration refers to a strategy that the task to be reconfigured each time is migrated to different internet of things devices with corresponding service types in the internet of things network (including the local internet of things device where the task to be reconfigured is currently located). Each reconfiguration strategy comprises a migration state of a task to be reconfigured and the internet of things equipment after migration, wherein the migration state comprises a migration state change and a migration state unchanged.
And then, according to the sequence of the reconfiguration times and corresponding different reconfiguration strategies, after the tasks to be reconfigured in each reconfiguration are reconfigured in sequence, calculating the resource utilization rate and the service execution benefit of each Internet of things device corresponding to the different reconfiguration strategies in each reconfiguration.
Specifically, according to the sequence of the reconfiguration times and corresponding different reconfiguration strategies, after the tasks to be reconfigured in each reconfiguration are sequentially reconfigured, the following steps are executed for any reconfiguration strategy in each reconfiguration:
(1) And acquiring the resource utilization rate of each piece of internet-of-things equipment after executing the reconfiguration, and determining the average value of the resource utilization rates of the pieces of internet-of-things equipment as the resource utilization rate corresponding to the reconfiguration strategy.
In one example, the resource utilization obtaining expression corresponding to each reconfiguration policy may be expressed as:
Figure BDA0003820797440000101
where ζ (t) represents the reconfiguration strategy at time t, ks represents the number of devices involved in the user request to be reconfigured, cbR (sn) k ) And the resource utilization rate of the kth Internet of things equipment under the reconfiguration strategy at the moment t is shown, and k and Ks are integers. Z r The larger the value of (ζ (t)) is, the more sufficient the remaining resources of the internet of things devices in the internet of things network are.
Further, resource utilization rate cbR (sn) of each Internet of things device k ) The get expression of (a) may be expressed as:
Figure BDA0003820797440000102
wherein, C rmd (sn k ) Represent thing networking device sn k Sum of remaining resources, C cst (sn k ) Represent thing networking device sn k Running the sum of the resources occupied by all tasks thereon. cbR (sn) k ) The method and the device are used for ensuring that the Internet of things equipment executing the user request in the Internet of things network has enough residual capacity.
It can be understood that, since the resources include the CPU, the memory, and the bandwidth, the resource utilization rates corresponding to the CPU, the memory, and the bandwidth need to be calculated respectively, and the obtained resource utilization rates corresponding to the CPU, the memory, and the bandwidth are weighted to obtain the resource utilization rate cbR (sn) of the corresponding internet of things device k )。
(2) And acquiring the processing time delay and the processing energy consumption of the user request to be reconfigured corresponding to each task to be reconfigured after the reconfiguration is executed.
The processing time delay can include the execution time delay of each task to be reconfigured on corresponding target internet of things equipment and the communication time delay of receiving data output by the previous task to be reconfigured; the processing energy consumption may include execution energy consumption generated based on processing delay and communication energy consumption generated based on communication delay of each task to be reconfigured on the corresponding target internet of things device.
For the acquisition of the processing delay:
in some embodiments, the obtaining manner of the execution delay of each task to be reconfigured is represented as:
Figure BDA0003820797440000111
wherein s is l,n Representing the nth task to be reconfigured in the user request l to be reconfigured; t is a unit of e (s l,n ) Denotes s l,n The resulting execution latency; x is the number of l,n E {0,1} represents s l,n A transition state of (2), wherein x l,n =0 denotes s l,n In local Internet of things equipment, the migration state is not changed, x l,n =1 denotes s l,n Migrating to target Internet of things equipment, and changing the migration state;
Figure BDA0003820797440000112
representing the CPU clock period of executing the nth task to be reconfigured in the user request l to be reconfigured on the local Internet of things equipment; f i Representing the CPU clock period of the local Internet of things equipment;
Figure BDA0003820797440000113
representing the data volume of the nth task to be reconfigured in the user request l to be reconfigured on the local Internet of things equipment; r is a radical of hydrogen i,j The transmission rate of the configured tasks to be reconfigured between the local Internet of things equipment and the target Internet of things equipment is represented; f j Representing the CPU clock period of the target Internet of things equipment;
Figure BDA0003820797440000114
and the CPU clock period of the nth task to be reconfigured in the user request l to be reconfigured is executed on the target Internet of things equipment.
The data transmission rate between different internet of things devices and the internet of things devices can be expressed as follows:
Figure BDA0003820797440000115
in the formula, r i,j Represents the data transmission rate between the internet of things device i and the internet of things device j,
Figure BDA0003820797440000116
data transmission power g representing Internet of things device i i,j The channel gain of a transmission channel between the IOT equipment i and the IOT equipment j is represented, B represents the bandwidth of the transmission channel between the IOT equipment i and the IOT equipment j, and theta 2 Representing the channel background noise power.
In some embodiments, the manner of obtaining the communication delay of each task to be reconfigured is represented as:
Figure BDA0003820797440000117
wherein, T c (s l,n′ ,s l,n ) Denotes s l,n Communication delay of (c), s l,n′ Represents a sum of s l,n An adjacent previous task; dt n′,n Denotes s l,n′ To s l,n The amount of output data of the transmission.
The communication time delay of each task to be reconfigured has the following aspects:
1, if the current task to be reconfigured is the first task in the corresponding user request to be reconfigured, such as s in fig. 1 0,0 And s 1,0 If the task to be reconfigured is the first task, the first task is the first task to be executed, that is, the task to be reconfigured is not executed before the current task to be reconfigured, and the condition that the other task to be reconfigured transmits data to the current task to be reconfigured does not exist, so that the communication delay of the current task to be reconfigured is determined to be 0.
2, if the current task to be reconfigured is the non-first task in the user request to be reconfigured, such as s in FIG. 1 0,1 Or s 1,1 Then, because the task to be reconfigured is executed before the task to be reconfigured 0,0 Or s 1,0 That is, the execution of the current task to be reconfigured needs to receive the data output by the previous task to be reconfigured, so that the communication delay of the current task to be reconfigured is determined as the current communication delayAnd the time length of the previous task to be reconfigured receiving the output data of the previous task.
In one example, if the task currently to be reconfigured is s 0,1 Then s 0,1 Has a communication delay of s 0,0 To s 0,1 A duration of transmission of the output data; if the current task to be reconfigured is s 0,2 Then s 0,2 Has a communication delay of s 0,1 To s 0,2 The duration of the transmission of the output data.
3, if any user to be reconfigured requests that there are two tasks to be reconfigured executed in parallel, that is, two tasks to be reconfigured executed simultaneously according to the execution sequence of the tasks to be reconfigured, and both the two tasks to be reconfigured are non-first tasks, for example, s in fig. 1 0,2 And s 0,3 And selecting the maximum communication time delay in the communication time delays of the two tasks to be reconfigured in the user request to be reconfigured.
In one example, if two tasks to be reconfigured are s 0,2 And s 0,3 ,s 0,2 Has a communication delay of s 0,1 To s 0,2 A first duration, s, of transmitting the output data 0,3 Has a communication delay of s 0,1 To s 0,3 And transmitting a second time length of the output data, wherein the first time length is longer than the second time length, and the communication time delay of the two tasks to be reconfigured executed in parallel in the user request to be reconfigured at the moment is the first time length.
Based on the above embodiment, with wf in FIG. 1 0 For example, the user to be reconfigured asks wf 0 Of processing delay of (a) communication delay of s 0,1 Communication delay of, and s 0,3 Sum of communication time delay s 0,2 Of the communication delays of (1) is the sum of the maximum communication delays.
For the acquisition of processing energy consumption:
in some embodiments, the manner of acquiring the execution energy consumption of each task to be reconfigured is represented as:
Figure BDA0003820797440000131
wherein the content of the first and second substances,
Figure BDA0003820797440000132
power indicating that the internet of things device i (i.e., the local internet of things device) is in an idle state under the condition that the migration state is not changed;
Figure BDA0003820797440000133
power representing that the Internet of things device i is in an activated state;
Figure BDA0003820797440000134
represents the data transmission power of the internet-of-things device i,
Figure BDA0003820797440000135
representing the clock cycle of a CPU (central processing unit) executing the nth task to be reconfigured in the user request l to be reconfigured on the Internet of things device i; f i Represents the CPU clock cycle of the internet of things device i,
Figure BDA0003820797440000136
representing the data volume r of the nth task to be reconfigured in the user request l to be reconfigured on the Internet of things device i i,j Representing the transmission rate of the configured tasks to be reconfigured between the Internet of things equipment i and the Internet of things equipment j (namely the migrated target Internet of things equipment); f j Representing the CPU clock period of the Internet of things equipment j;
Figure BDA0003820797440000137
and the clock period of the CPU for executing the nth task to be reconfigured in the user request l to be reconfigured on the Internet of things device j is represented.
In some embodiments, the manner of acquiring the communication energy consumption of each task to be reconfigured is represented as:
Figure BDA0003820797440000138
wherein, E c (s l,n′ ,s l,n ) Denotes s l,n Energy consumption of communication, T c (s l,n′ ,s l,n ) Denotes s l,n When communicatingAnd the time delay is carried out,
Figure BDA0003820797440000139
and representing the data transmission power of the equipment i of the internet of things.
Further, based on the processing delay, the processing energy consumption and the configured service execution benefit weight of each user request to be reconfigured, the service execution benefit corresponding to the reconfiguration strategy is determined.
In specific implementation, normalization processing needs to be performed on processing time delay and processing energy consumption of each user request to be reconfigured so as to ensure that dimensions are uniform.
Then, based on the normalized processing delay and the corresponding processing energy consumption of each user request to be reconfigured, obtaining the service execution benefit of the corresponding user request to be reconfigured;
and weighting the service execution benefit requested by each user to be reconfigured and the corresponding configured service execution benefit weight to obtain the service execution benefit corresponding to the reconfiguration strategy.
The service execution benefit obtaining expression corresponding to any reconfiguration policy may be expressed as:
Figure BDA0003820797440000141
where ζ (t) represents the reconfiguration strategy at time t, ω l Weight, L, representing user request to be reconfigured m Indicating the number of user requests to be reconfigured, L m Is an integer, U sl (t)) represents the service execution benefit of the user request l to be reconfigured under the reconfiguration strategy at the time t.
Further, the service execution benefit U of the user request l to be reconfigured under the reconfiguration strategy at the time t sl (t)) the derived expression may be expressed as:
U sl (t))=β t T ll (t))+β e E ll (t))
wherein, T ll (t)) represents the place of the user request to be reconfigured l under the reconfiguration strategy at time tTime delay, E ll (t)) represents the energy consumption, beta, for processing the user request l to be reconfigured under the reconfiguration strategy at time t e A benefit weight, β, representing the energy consumption of the process t A benefit weight representing the processing delay. Beta is not less than 0 e ,β t Is less than or equal to 1, and the two can be changed according to the actual business requirements, and the application is not limited herein.
With reference to FIG. 1, a user request wf to be reconfigured 0 The service execution benefit of (a) may be expressed as: u shape s (wf 0 )=0.5*T 0 (wf 0 )+0.5*E 0 (wf 0 ) Wherein, T 0 (wf 0 ) Represents wf 0 Processing delay of (E) 0 (wf 0 ) Represents wf 0 The two 0.5 are respectively the weight of the configured processing delay and the weight of the processing energy consumption.
In some embodiments, the benefit weight of each user request to be reconfigured may be configured based on the urgency of the execution duration of each user request to be reconfigured, specifically:
acquiring the maximum execution time length and the minimum execution time length in the execution time lengths requested by the users to be reconfigured, and a first difference value between the maximum execution time length and the minimum execution time length;
and for any user request to be reconfigured, determining the ratio of a second difference value and a first difference value of the maximum execution time length and the execution time length of the user request to be reconfigured as the service execution benefit weight of the user request to be reconfigured.
For example, in connection with FIG. 1, with a user request wf to be reconfigured 0 Or wf 1 For example, wf 0 The configuration mode of the service execution benefit weight can be expressed as:
Figure BDA0003820797440000142
wherein, w 0 Represents wf 0 Service execution benefit weight of;
Figure BDA0003820797440000143
denotes wf 0 The execution time length of (c);
Figure BDA0003820797440000144
denotes wf 1 The execution duration of (c); max { } means taking the maximum; min { } denotes minimization.
And finally, aiming at each reconfiguration, calculating the resource utilization rate and the service execution benefit corresponding to different reconfiguration strategies by adopting a preset reconfiguration benefit algorithm to obtain the reconfiguration benefit values of the different reconfiguration strategies.
In one example, the calculation formula of the reconfiguration benefit value of each reconfiguration strategy can be expressed as:
R t =ρ r Z r (ζ(t))+ρ s Z s (ζ(t))
wherein R is t A reconfiguration profit value, Z, for the reconfiguration strategy at time t r (ζ (t)) represents the resource utilization rate of the reconfiguration policy at time t; z s (ζ (t)) represents the service execution benefit of the reconfiguration policy at time t; ρ is a unit of a gradient rs Are each Z r (ζ (t)) and Z s Weight of (ζ (t)), 0 ≦ ρ rs Is less than or equal to 1, and the two can be changed according to the actual business requirements, and the application is not limited herein.
In one example, the user request to be reconfigured is wf a And wf b For example, wf is shown in FIG. 3 a Contains 4 tasks to be reconfigured: 1. 2, 3 and 4, distributing corresponding tasks to be reconfigured to the Internet of things equipment: (0), (1), (2), (3), (4); wf b Contains 4 tasks to be reconfigured: 5. 6, 7, 8, 9, 10, the corresponding tasks to be reconfigured are distributed to the internet of things devices: (1), (2), (3), (4), (5), (5). wf a Is executed for a time period of
Figure BDA0003820797440000151
And wf b Is executed for a duration of
Figure BDA0003820797440000152
According to the execution sequence of each task to be reconfigured corresponding to each user request to be reconfigured, the obtained reconfiguration times are 4 times, and the sequence is as follows: sch (Sch) 0 ={1,5}、sch 1 ={2,3,6,7}、sch 2 ={4,8,9}、sch 3 ={10}。
If the resources are insufficient after the internet of things device (0) and the internet of things device (1) are allocated with the task requested by the new user, the migration states of the tasks to be reconfigured 1 and 5 for the first time need to be changed [1,1], and the tasks to be reconfigured 1 and 5 are migrated to the internet of things devices (2) and (6), namely, the current reconfiguration strategy is as follows: [1,1] tasks to be reconfigured are migrated to Internet of things devices (2) and (6). The Internet of things equipment (6) is the Internet of things equipment with sufficient resources in the Internet of things network.
Firstly, after the first reconfiguration, namely the task 1 to be reconfigured is migrated to the internet of things device (2), and the task 5 to be reconfigured is migrated to the internet of things device (6), wherein the related devices for executing the internet of things are { (1), (2), (3), (4), (5), (6) }.
Calculating a resource utilization ratio cbR (sn) of an Internet of things device (1) 1 )。
And (3) a task 2 operated by the equipment (1) of the Internet of things. cbR (sn) 1 ) And (3) the resource utilization rate of the CPU is not less than 0.4 × the memory utilization rate and not less than 0.2 × the bandwidth utilization rate, wherein 0.4,0.4 and 0.2 are self-defined weights according to actual traffic demands.
Figure BDA0003820797440000161
Figure BDA0003820797440000162
Figure BDA0003820797440000163
By the same way, the cbR (sn) of the other facilities can be obtained 2 )、cbR(sn 3 )、cbR(sn 4 )、cbR(sn 5 )、cbR(sn 6 ) If the resource utilization rate of the current reconfiguration policy for the first reconfiguration is: z r (ζ(t))=(cbR(sn 1 )+cbR(sn 2 )+…+cbR(sn 6 ))/6。
Calculating the processing time delay and the processing energy consumption of each task to be reconfigured:
after the current reconfiguration strategy is executed, the task 1 is on the internet of things device (2), and the task 5 is on the internet of things device (6), so that:
(1) Based on the acquisition mode of the execution time delay of each task to be reconfigured, the execution time delay of each task to be reconfigured can be obtained;
(2) Based on the acquisition mode of the communication time delay of each task to be reconfigured, the communication time delay of each task to be reconfigured can be obtained;
among them, task 1 and task 5 are task nodes to be executed initially, and therefore, there is no communication delay.
(3) Based on the acquisition mode of the execution energy consumption of each task to be reconfigured, the execution energy consumption of each task to be reconfigured can be obtained;
(4) And based on the acquisition mode of the communication energy consumption of each task to be reconfigured, the communication energy consumption of each task to be reconfigured can be obtained.
Thus, a user request wf to be reconfigured can be obtained a And wf b The service execution benefit of (a) is expressed as:
U s (wf a )=0.5*T a (wf a )+0.5*E a (wf a );
U s (wf b )=0.5*T b (wf b )+0.5*E b (wf b );
in summary, the sch is reconfigured for the first time 0 = {1,5}, and its service execution benefit is expressed as:
Z s (ζ(t))=w a *U s (wf a )+w b *U s (wf b ) Wherein:
Figure BDA0003820797440000171
Figure BDA0003820797440000172
correspondingly, the process of the remaining three reassortments is also similar to the above, and the details are not repeated herein.
Further, for each reconfiguration, the reconfiguration strategy corresponding to the maximum reconfiguration benefit value may be determined as the optimized reconfiguration strategy of the reconfiguration, and the target reconfiguration strategy is determined based on the optimized reconfiguration strategy of each reconfiguration. Specifically, each reconfiguration comprises reconfiguration benefit values corresponding to different reconfiguration strategies, the reconfiguration strategy corresponding to the maximum reconfiguration benefit value in each reconfiguration is searched and used as an optimized reconfiguration strategy, and then the optimized reconfiguration strategy in each reconfiguration is integrated to obtain a target reconfiguration strategy corresponding to each task to be reconfigured in each user request to be reconfigured.
In some embodiments, a timing difference learning framework is used, a reinforcement learning algorithm is used to learn the reconfiguration strategy of the system, and an average return function is set, so that the reconfiguration strategy is learned towards a direction of maximizing the long-term average return. The benefit update rule is as follows:
Figure BDA0003820797440000173
wherein, Q (S) t ,A t ) Represents the benefit value of the task to be reconfigured at the moment t, S t Representing the migration action of the reconfiguration strategy to the task to be reconfigured at the time t; a. The t Showing the internet of things equipment to which the reconfiguration strategy migrates the tasks to be reconfigured at the moment t, wherein alpha represents a learning rate parameter of a reinforcement learning algorithm, gamma represents a discount factor of the algorithm, and R t And representing the reconfiguration profit value of the reconfiguration strategy at the time t. Q (S) t+1 ,A t+1 ) Represents the benefit value of the task to be reconfigured at the moment of t +1, S t+1 Representing the migration action of the reconfiguration strategy to the task to be reconfigured at the moment of t + 1; a. The t+1 And indicating the Internet of things equipment to which the task to be reconfigured is migrated by the reconfiguration strategy at the moment t + 1.
In some embodiments, wf is requested with the user to be reconfigured 0 For example, wf 0 Is processed by a delay T 0 (wf 0 ) And energy consumption for disposal E 0 (wf 0 ) The normalization process of (a) can be expressed as:
Figure BDA0003820797440000174
of these, max { T } 0 (wf 0 ),T 1 (wf 1 )}≠Min{T 0 (wf 0 ),T 1 (wf 1 )}orT 0 (wf 0 )=1;
Figure BDA0003820797440000181
Of these, max { E { 0 (wf 0 ),E 1 (wf 1 )}≠Min{E 0 (wf 0 ),E 1 (wf 1 )}or E 0 (wf 0 )=1;
In the above, T 1 (wf 1 ) Represents wf 1 Processing delay of (2), T 1 (wf 1 ) Denotes wf 1 Energy consumption for treatment of, correspondingly, wf 1 Is processed by a delay T 1 (wf 1 ) And wf 1 Energy consumption for treatment of T 1 (wf 1 ) The normalization process is also similar to the above formula, and the embodiment of the present application is not limited herein.
Corresponding to the foregoing method, an embodiment of the present application further provides an internet of things service online reconfiguration device, and as shown in fig. 4, the device includes:
an allocating unit 410, configured to allocate, based on a received user request, current tasks of different service types corresponding to the user request to corresponding internet of things devices in an internet of things network, where the user request includes execution resources required by each current task;
a determining unit 420, configured to determine, as a to-be-reconfigured user request, a historical user request corresponding to an unprocessed task on a current internet of things device that does not satisfy an execution resource amount of any current task, and determine, as a to-be-reconfigured task, each task corresponding to each to-be-reconfigured user request;
the reconfiguration unit 430 is configured to reconfigure, according to an execution sequence of each to-be-reconfigured task corresponding to each to-be-reconfigured user request, an internet of things device where the to-be-reconfigured task corresponding to the to-be-reconfigured user request is located by using a preset online reconfiguration algorithm, so as to obtain a target reconfiguration policy, where the preset online reconfiguration algorithm is determined based on a resource utilization rate and a service execution benefit of the internet of things device.
The functions of the functional units of the online reconfiguration device for the internet of things services provided by the embodiment of the application can be realized through the method steps, and therefore, the specific working process and beneficial effects of the units in the online reconfiguration device for the internet of things services provided by the embodiment of the application are not repeated herein.
An electronic device is further provided in the embodiments of the present application, as shown in fig. 5, and includes a processor 510, a communication interface 520, a memory 530, and a communication bus 540, where the processor 510, the communication interface 520, and the memory 530 complete communication with each other through the communication bus 540.
A memory 530 for storing a computer program;
the processor 510, when executing the program stored in the memory 530, implements the following steps:
distributing current tasks of different service types corresponding to the user request to corresponding Internet of things equipment in an Internet of things network based on the received user request, wherein the user request comprises execution resources required by each current task;
determining historical user requests corresponding to unprocessed tasks on current Internet of things equipment which do not meet the execution resource amount of any current task as user requests to be reconfigured, and determining tasks corresponding to the user requests to be reconfigured as tasks to be reconfigured;
and according to the execution sequence of each task to be reconfigured corresponding to each user request to be reconfigured, reconfiguring the Internet of things equipment where the task to be reconfigured corresponding to the user request to be reconfigured is located by adopting a preset online reconfiguration algorithm to obtain a target reconfiguration strategy, wherein the preset online reconfiguration algorithm is determined based on the resource utilization rate and the service execution benefit of the Internet of things equipment.
The aforementioned communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Since the implementation manner and the beneficial effects of the problem solving of each device of the electronic device in the foregoing embodiment can be implemented by referring to each step in the embodiment shown in fig. 2, detailed working processes and beneficial effects of the electronic device provided in the embodiment of the present application are not repeated herein.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the method for online reconfiguration of an internet of things service in any one of the above embodiments.
In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, cause the computer to execute the method for online reconfiguration of internet of things services according to any one of the above embodiments.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present embodiments have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent to those skilled in the art that various changes and modifications can be made in the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are also intended to include such modifications and variations.

Claims (10)

1. An internet of things service online reconfiguration method is characterized by comprising the following steps:
distributing current tasks of different service types corresponding to the user request to corresponding Internet of things equipment in an Internet of things network based on the received user request, wherein the user request comprises execution resources required by each current task;
determining historical user requests corresponding to unprocessed tasks on current Internet of things equipment which do not meet the execution resource amount of any current task as user requests to be reconfigured, and determining tasks corresponding to the user requests to be reconfigured as tasks to be reconfigured;
and according to the execution sequence of each task to be reconfigured corresponding to each user request to be reconfigured, reconfiguring the Internet of things equipment where the task to be reconfigured corresponding to the user request to be reconfigured is located by adopting a preset online reconfiguration algorithm to obtain a target reconfiguration strategy, wherein the preset online reconfiguration algorithm is determined based on the resource utilization rate and the service execution benefit of the Internet of things equipment.
2. The method of claim 1, wherein the step of reconfiguring the internet of things device where the task corresponding to the user request to be reconfigured is located by using a preset online reconfiguration algorithm according to an execution sequence of each task to be reconfigured corresponding to each user request to be reconfigured to obtain a target reconfiguration strategy comprises the steps of:
determining reconfiguration information of the tasks to be reconfigured according to an execution sequence of the tasks to be reconfigured corresponding to the user requests to be reconfigured, wherein the reconfiguration information comprises reconfiguration times, the tasks to be reconfigured each time and different reconfiguration strategies for migrating the tasks to be reconfigured to target Internet of things equipment; the target Internet of things equipment is current Internet of things equipment where the task to be reconfigured is located or any equipment which is not the current Internet of things equipment and has the same service type as the current Internet of things equipment;
according to the sequence of the reconfiguration times and corresponding different reconfiguration strategies, after the tasks to be reconfigured in each reconfiguration are reconfigured in sequence, calculating the resource utilization rate and service execution benefits of the Internet of things equipment corresponding to the different reconfiguration strategies in each reconfiguration;
for each reconfiguration, calculating the resource utilization rate and the service execution benefit corresponding to the different reconfiguration strategies by adopting a preset reconfiguration benefit algorithm to obtain reconfiguration benefit values of the different reconfiguration strategies, and determining the reconfiguration strategy corresponding to the maximum reconfiguration benefit value as an optimized reconfiguration strategy of the reconfiguration;
and determining the target reconfiguration strategy based on the optimized reconfiguration strategy for each reconfiguration.
3. The method of claim 2, wherein calculating the resource utilization and service execution benefits of the internet of things devices corresponding to different reconfiguration policies in each reconfiguration comprises:
for any reconfiguration strategy in each reconfiguration, acquiring the resource utilization rate of each piece of internet-of-things equipment after executing the reconfiguration, and determining the average value of the resource utilization rates of the pieces of internet-of-things equipment as the resource utilization rate corresponding to the reconfiguration strategy;
acquiring processing time delay and processing energy consumption of the user request to be reconfigured corresponding to each task to be reconfigured after executing reconfiguration aiming at any reconfiguration strategy in each reconfiguration; the processing time delay comprises the execution time delay of each task to be reconfigured on corresponding target Internet of things equipment and the communication time delay of data output by a task to be reconfigured in the front, and the processing energy consumption comprises the execution energy consumption of each task to be reconfigured on corresponding target Internet of things equipment based on the processing time delay and the communication energy consumption based on the communication time delay;
and determining the service execution benefit corresponding to the reconfiguration strategy based on the processing time delay, the processing energy consumption and the configured service execution benefit weight of each user request to be reconfigured.
4. The method of claim 3, wherein the method further comprises:
for any user request to be reconfigured, if the current task to be reconfigured is the first task in the user request to be reconfigured, determining that the communication delay of the current task to be reconfigured is 0;
and if the current task to be reconfigured is a non-first task in the user request to be reconfigured, determining the communication delay of the current task to be reconfigured as the time length of the current task to be reconfigured for receiving the output data of the previous task to be reconfigured.
5. The method of claim 3, further comprising:
aiming at any user request to be reconfigured, if two tasks to be reconfigured which are executed in parallel exist and are not the first task, the communication time delay of the two tasks to be reconfigured in the user request to be reconfigured selects the maximum communication time delay of the respective communication time delays of the two tasks to be reconfigured.
6. The method of claim 3, wherein the user request further comprises an execution duration;
before determining the service execution benefit corresponding to the reconfiguration policy based on the processing delay, the processing energy consumption and the configured service execution benefit weight of each user request to be reconfigured, the method further comprises:
acquiring the maximum execution time length and the minimum execution time length in the execution time lengths requested by the users to be reconfigured, and a first difference value between the maximum execution time length and the minimum execution time length;
and for any user request to be reconfigured, determining the ratio of a second difference value of the maximum execution time length and the execution time length of the user request to be reconfigured to the first difference value as the service execution benefit weight of the user request to be reconfigured.
7. The method of claim 3,
(1) The acquisition mode of the execution time delay of each task to be reconfigured in the processing time delay is represented as follows:
Figure FDA0003820797430000031
wherein s is l,n Representing the nth task to be reconfigured in the user request l to be reconfigured; t is e (s l,n ) Denotes s l,n The resulting execution delay; x is the number of l,n E {0,1} represents said s l,n A transition state of (b), wherein x l,n =0 represents said s l,n At the local internet of things device i, the migration state is not changed, x l,n =1 represents said s l,n Migrating to a target Internet of things device j, wherein the migration state is changed;
Figure FDA0003820797430000041
representing the CPU clock cycle of the nth task to be reconfigured in the user request l to be reconfigured executed on the local Internet of things device i; f i Representing the CPU clock period of the local Internet of things device i;
Figure FDA0003820797430000042
representing the data volume of the nth task to be reconfigured in the user request l to be reconfigured on the local Internet of things device i; r is i,j Indicating the configurationThe transmission rate of the task to be reconfigured between the local Internet of things device i and the target Internet of things device j; f j Representing the CPU clock period of the target Internet of things device j;
Figure FDA0003820797430000043
representing the clock cycle of a CPU (central processing unit) for executing the nth task to be reconfigured in the user request l to be reconfigured on the target Internet of things device j;
(2) The acquisition mode of the communication time delay of each task to be reconfigured in the processing time delay is represented as follows:
Figure FDA0003820797430000044
wherein, T c (s l,n′ ,s l,n ) Denotes s l,n Communication delay of s l,n′ Represents a sum of s l,n An adjacent previous task to be reconfigured; dt is n′,n Denotes s l,n′ To s l,n The amount of output data transmitted.
8. An apparatus for reconfiguring a task, the apparatus comprising:
the distribution unit is used for distributing current tasks of different service types corresponding to the user request to corresponding Internet of things equipment in an Internet of things network based on the received user request, and the user request comprises execution resources required by each current task;
the device comprises a determining unit, a processing unit and a processing unit, wherein the determining unit is used for determining a historical user request corresponding to an unprocessed task on the current Internet of things device which does not meet the execution resource amount of any current task as a user request to be reconfigured, and determining each task corresponding to each user request to be reconfigured as a task to be reconfigured;
and the reconfiguration unit is used for reconfiguring the Internet of things equipment where the tasks to be reconfigured corresponding to the user requests to be reconfigured are located by adopting a preset online reconfiguration algorithm according to the execution sequence of the tasks to be reconfigured corresponding to the user requests to be reconfigured, so as to obtain a target reconfiguration strategy, wherein the preset online reconfiguration algorithm is determined based on the resource utilization rate and the service execution benefit of the Internet of things equipment.
9. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-7 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202211042197.6A 2022-08-29 2022-08-29 Internet of things service online reconfiguration method and device, electronic equipment and medium Pending CN115373821A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211042197.6A CN115373821A (en) 2022-08-29 2022-08-29 Internet of things service online reconfiguration method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211042197.6A CN115373821A (en) 2022-08-29 2022-08-29 Internet of things service online reconfiguration method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115373821A true CN115373821A (en) 2022-11-22

Family

ID=84069979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211042197.6A Pending CN115373821A (en) 2022-08-29 2022-08-29 Internet of things service online reconfiguration method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115373821A (en)

Similar Documents

Publication Publication Date Title
CN111444009B (en) Resource allocation method and device based on deep reinforcement learning
US20190394132A1 (en) System and Method for Network Slicing for Service-Oriented Networks
Souravlas et al. A fair, dynamic load balanced task distribution strategy for heterogeneous cloud platforms based on Markov process modeling
CN109189563B (en) Resource scheduling method and device, computing equipment and storage medium
CN110795226B (en) Method for processing task using computer system, electronic device and storage medium
CN117041330B (en) Edge micro-service fine granularity deployment method and system based on reinforcement learning
CN116680060B (en) Task allocation method, device, equipment and medium for heterogeneous computing system
CN108376103A (en) A kind of the equilibrium of stock control method and server of cloud platform
US20230037293A1 (en) Systems and methods of hybrid centralized distributive scheduling on shared physical hosts
CN115033340A (en) Host selection method and related device
CN114625500A (en) Method and application for scheduling micro-service application based on topology perception in cloud environment
CN112219191A (en) Self-configuration of services and servers in a data center
CN116467082A (en) Big data-based resource allocation method and system
CN110167031B (en) Resource allocation method, equipment and storage medium for centralized base station
CN114429195A (en) Performance optimization method and device for hybrid expert model training
CN114020469A (en) Edge node-based multi-task learning method, device, medium and equipment
CN110750363B (en) Computer storage management method and device, electronic equipment and storage medium
CN113452546A (en) Dynamic quality of service management for deep learning training communications
CN116915869A (en) Cloud edge cooperation-based time delay sensitive intelligent service quick response method
CN115373821A (en) Internet of things service online reconfiguration method and device, electronic equipment and medium
CN114138453B (en) Resource optimization allocation method and system suitable for edge computing environment
CN111143033A (en) Operation execution method and device based on scalable operating system
CN112286623A (en) Information processing method and device and storage medium
CN112156453B (en) Example adaptive adjustment method, apparatus, computer readable storage medium and device
CN115827178A (en) Edge calculation task allocation method and device, computer equipment and related medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination