CN113141394B - Resource allocation method and device, electronic equipment and storage medium - Google Patents

Resource allocation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113141394B
CN113141394B CN202110322386.8A CN202110322386A CN113141394B CN 113141394 B CN113141394 B CN 113141394B CN 202110322386 A CN202110322386 A CN 202110322386A CN 113141394 B CN113141394 B CN 113141394B
Authority
CN
China
Prior art keywords
trust value
resource allocation
calculating
resource
comprehensive
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.)
Active
Application number
CN202110322386.8A
Other languages
Chinese (zh)
Other versions
CN113141394A (en
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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202110322386.8A priority Critical patent/CN113141394B/en
Publication of CN113141394A publication Critical patent/CN113141394A/en
Application granted granted Critical
Publication of CN113141394B publication Critical patent/CN113141394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Abstract

The resource allocation method, the resource allocation device, the electronic equipment and the storage medium are applied to the technical field of information, and a task request corresponding to a target task is received; acquiring a comprehensive trust value of each terminal device in the plurality of terminal devices; selecting corresponding terminal equipment of which the comprehensive trust value is greater than a preset threshold value, and generating a plurality of groups of resource allocation lists corresponding to the target task according to preset resource allocation coefficients; respectively calculating a plurality of performance parameters corresponding to each group of resource allocation lists in the plurality of groups of resource allocation lists; calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to a plurality of performance parameters corresponding to each group of resource list; and selecting and distributing the target task according to a group of resource classification lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource distribution lists. The method can avoid the reduction of the calculation efficiency caused by the faults of part of terminal equipment and improve the calculation efficiency.

Description

Resource allocation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of information technology, and in particular, to a resource allocation method and apparatus, an electronic device, and a storage medium.
Background
When the era of intelligent association comes, mass data is generated, great pressure is applied to the load of a data center, and meanwhile, the time delay of a return link is increased, so that the data center is more vulnerable. Edge computing is therefore gaining increasing attention through new computational models that perform computations at the edge of the network.
However, currently, in the edge computing process, the proxy server often distributes the received computing tasks to all devices associated with the proxy server, and when some terminal devices fail, the computing efficiency is often reduced.
Disclosure of Invention
An object of the embodiments of the present application is to provide a resource allocation method, a resource allocation device, an electronic device, and a storage medium, so as to solve the problem of reduced computational efficiency caused by a failure of a terminal device. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present application, a resource allocation method is first provided, where the resource allocation method is applied to a proxy server, where the proxy server is configured to detect multiple terminal devices, and the method includes:
receiving a task request corresponding to a target task;
acquiring a comprehensive trust value of each terminal device in the plurality of terminal devices;
selecting corresponding terminal equipment of which the comprehensive trust value is greater than a preset threshold value, and generating a plurality of groups of resource allocation lists corresponding to the target task according to preset resource allocation coefficients;
respectively calculating a plurality of performance parameters corresponding to each group of resource allocation lists in the plurality of groups of resource allocation lists;
calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to a plurality of performance parameters corresponding to each group of resource list;
and selecting and distributing the target task according to a group of resource classification lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource distribution lists.
In a second aspect of the embodiments of the present application, there is further provided a resource allocation apparatus, applied to a proxy server, where the proxy server is configured to detect multiple terminal devices, and the apparatus includes:
the request receiving module is used for receiving a task request corresponding to a target task;
a trust value obtaining module, configured to obtain a comprehensive trust value of each terminal device in the plurality of terminal devices;
the list generation module is used for selecting the corresponding terminal equipment of which the comprehensive trust value is greater than a preset threshold value and generating a plurality of groups of resource distribution lists corresponding to the target task according to preset resource distribution coefficients;
the parameter calculation module is used for calculating a plurality of performance parameters corresponding to each group of resource allocation lists in the plurality of groups of resource allocation lists respectively;
the time delay energy consumption calculation module is used for calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to a plurality of performance parameters corresponding to each group of resource list;
and the task allocation module is used for selecting and allocating the target task according to a group of resource allocation lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource allocation lists.
The embodiment of the application also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any resource allocation method when executing the program stored in the memory.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements any of the resource allocation methods described above.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform any of the above-mentioned resource allocation methods.
The embodiment of the application has the following beneficial effects:
according to the resource allocation method, the resource allocation device, the electronic equipment and the storage medium, the task request corresponding to the target task is received; acquiring a comprehensive trust value of each terminal device in the plurality of terminal devices; selecting corresponding terminal equipment of which the comprehensive trust value is greater than a preset threshold value, and generating a plurality of groups of resource allocation lists corresponding to the target task according to preset resource allocation coefficients; respectively calculating a plurality of performance parameters corresponding to each group of resource allocation lists in the plurality of groups of resource allocation lists; calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to a plurality of performance parameters corresponding to each group of resource list; and selecting and distributing the target task according to a group of resource distribution lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource distribution lists. The intelligent terminal equipment with the trust value larger than the preset threshold value can be selected according to the comprehensive trust value of each terminal equipment, and the task can be distributed by calculating the comprehensive time delay energy consumption and selecting the task distribution mode with the minimum comprehensive time delay energy consumption, so that the reduction of the calculation efficiency caused by the faults of part of the terminal equipment can be avoided, and the calculation efficiency is improved.
Of course, it is not necessary for any one product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a resource allocation method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an edge computing network according to an embodiment of the present application;
FIG. 3a is a diagram illustrating a mobile edge computing trust relationship according to an embodiment of the present application;
FIG. 3b is a diagram illustrating trust relationships provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a proxy-based resource allocation architecture according to an embodiment of the present application;
fig. 5 is a scenario diagram of multi-device task collaboration provided in an embodiment of the present application;
fig. 6 is a schematic flowchart of a process for obtaining a comprehensive trust value according to an embodiment of the present application;
FIG. 7 is a diagram illustrating an example of a task processing flow according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a resource allocation apparatus according to an embodiment of the present application;
fig. 9 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 that can be derived by one of ordinary skill in the art from the description herein are intended to be within the scope of the present disclosure.
In a first aspect of the embodiments of the present application, a resource allocation method is first provided, where the resource allocation method is applied to a proxy server, and the proxy server is configured to detect multiple terminal devices, where the method includes:
receiving a task request corresponding to a target task;
acquiring a comprehensive trust value of each terminal device in a plurality of terminal devices;
selecting terminal equipment with a corresponding comprehensive trust value larger than a preset threshold value, and generating a plurality of groups of resource allocation lists corresponding to the target tasks according to preset resource allocation coefficients;
respectively calculating a plurality of performance parameters corresponding to each group of resource allocation list in the plurality of groups of resource allocation lists;
calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to a plurality of performance parameters corresponding to each group of resource list;
and selecting and distributing the target task according to a group of resource distribution lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource distribution lists.
Therefore, according to the resource allocation method, the intelligent terminal equipment with the trust value larger than the preset threshold value can be selected according to the comprehensive trust value of each terminal equipment, and the task allocation mode with the minimum comprehensive time delay energy consumption can be selected for allocating the tasks by calculating the comprehensive time delay energy consumption, so that the reduction of the calculation efficiency caused by the faults of part of the terminal equipment can be avoided, and the calculation efficiency can be improved.
Specifically, referring to fig. 1, fig. 1 is a schematic flow chart of a resource allocation method provided in the embodiment of the present application, including:
step S11, a task request corresponding to the target task is received.
The resource allocation method provided by the embodiment of the application is applied to a proxy server in an edge computing network, and the proxy server is used for detecting a plurality of terminal devices. The above edge computing network can be referred to fig. 2, in the figure, a terminal device layer may be composed of various internet of things devices (such as a sensor, an RFID tag, a camera, a smart phone, and the like), and mainly completes functions of collecting and reporting raw data and processing a small task, and a proxy layer is located between the device layer and a network layer, and can implement forwarding of data between the network layer and the device layer, where the network layer may be a cloud or a cloud data center. The terminal layer takes the form of an event source as input for the application service. And after the terminal equipment layer node finishes the interactive action, submitting mutual evaluation information. The edge computing layer can be formed by network edge nodes and is distributed between the terminal equipment and the cloud computing center. The edge computing layer can realize basic service response through reasonable deployment and allocation of computing and storage capacity of the network edge side. The cloud computing layer is used as a data processing center, and the reported data of the edge computing layer is stored in the cloud computing center. When the analysis task which cannot be processed by the edge computing layer and the processing task of integrating the global information still need to be completed in the cloud computing center. In addition, the cloud computing center can dynamically adjust the deployment strategy and algorithm of the edge computing layer according to the network resource distribution.
The target task may be a task sent by a terminal device, or a task sent by a cloud computing center, and the like, which is not limited in the present application.
Step S12, acquiring a comprehensive trust value of each terminal device of the plurality of terminal devices.
The comprehensive trust value may be a pre-calculated value stored in the proxy server, or a value calculated by the proxy server after receiving the task request and obtaining the interaction record of each node.
And step S13, selecting the terminal equipment with the corresponding comprehensive trust value larger than the preset threshold value, and generating a multi-group resource allocation list corresponding to the target task according to the preset multi-group resource allocation coefficient.
The comprehensive trust value is used for representing the global reputation value of the terminal equipment, and the terminal equipment with the corresponding comprehensive trust value larger than the preset threshold value is selected, so that the swing attack can be effectively prevented.
The preset threshold value can be a certain numerical value set according to the current task, so that the terminal equipment with the corresponding comprehensive trust value larger than the preset threshold value can be selected to filter the terminal equipment which does not meet the requirement according to the requirement of the task to generate a high-reliability resource node list meeting the requirement of a user, an unloading strategy is formulated for the user, and the time delay energy consumption algebra is minimized and the system effectiveness is ensured to be optimal based on the multi-condition constraint condition.
Optionally, the method further includes: and updating the pre-stored trust value of each terminal device according to the currently calculated trust value.
Step S14, respectively calculating a plurality of performance parameters corresponding to each resource allocation list in the plurality of resource allocation lists.
Optionally, the calculating a plurality of performance parameters corresponding to each resource allocation list in the plurality of resource allocation lists respectively includes: respectively passing through a preset formula:
Figure BDA0002993294000000061
Figure BDA0002993294000000062
calculating the task processing time and energy consumption corresponding to each group of resource allocation list in the plurality of groups of resource allocation lists, wherein,
Figure BDA0002993294000000063
representing a resource node djIs completed by task tsThe amount of the task is such that,
Figure BDA0002993294000000064
size of calculation result of output data, 0<ξ<1,
Figure BDA0002993294000000065
Representing a resource node djThe ability to calculate per unit of time is,
Figure BDA0002993294000000066
which is indicative of the power transmitted and received,
Figure BDA0002993294000000067
indicating the transmission rate.
Step S15, calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to the multiple performance parameters corresponding to each group of resource list.
Optionally, calculating the comprehensive time delay energy consumption corresponding to each group of resource lists according to a plurality of performance parameters corresponding to each group of resource lists includes: according to the task processing time and energy consumption corresponding to each group of resource allocation list, through a preset formula:
Figure BDA0002993294000000068
calculating the comprehensive time delay energy consumption corresponding to each group of resource list, wherein lambda is the weight of time delay,
Figure BDA0002993294000000069
which represents the amount of energy consumed,
Figure BDA00029932940000000610
representing the integrated delay power consumption.
And step S16, selecting and distributing the target task according to a group of resource classification lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource distribution lists.
For example, referring to fig. 3a and 3b, for a certain working scenario, a trust relationship of a device layer is established, a proxy server completes trust evaluation, and all trust values are stored in a device side and the proxy server; and the proxy server filters out the nodes which do not meet the requirements according to the task request sent by the user, and finally unloads the task according to the node resource allocation strategy to finish the task processing. In fig. 3a, the device may interact with one-hop neighbor nodes, obtain a preset trust value, obtain a synthetic trust value by weighting the trust values, obtain a global trust value by performing joint combination on the synthetic trust value, and obtain the synthetic trust value from the global trust value by providing a minimum trust weight coefficient. In fig. 3b, the devices may obtain direct trust values therebetween, and the proxy server may also obtain feedback trust values fed back by the devices. The agent resource allocation architecture and the multi-device task cooperation scenario can be seen in fig. 4 and 5. In fig. 4, a user may send a service request to the proxy layer, and may also receive data fed back by the proxy layer through resource node detection, trust calculation, trusted resource filtering, and resource matching, and the virtual resource may perform resource management on the proxy layer data. In fig. 5, the agent layer may send a resource allocation policy to the user and receive a task request sent by the user, the user may perform task offloading on the device, the device may feed back a result to the user, and end-to-end connection may be performed between the devices.
Therefore, according to the resource allocation method, the intelligent terminal equipment with the trust value larger than the preset threshold value can be selected according to the comprehensive trust value of each terminal equipment, and the task allocation mode with the minimum comprehensive time delay and energy consumption can be selected according to the user requirement to allocate the tasks by calculating the comprehensive time delay and energy consumption, so that the reduction of the calculation efficiency caused by the faults of part of the terminal equipment can be avoided, and the calculation efficiency is improved.
Optionally, referring to fig. 6, the step S12 obtains a comprehensive trust value of each terminal device in the plurality of terminal devices, including:
step S121, acquiring interaction records of each terminal device;
step S122, according to the interaction record, obtaining and calculating a direct trust value between each two terminal devices according to the number of successful interaction times and the total interaction times of each two terminal devices within a preset time length;
and step S123, calculating to obtain a comprehensive trust value of each terminal device according to the direct trust value between every two terminal devices.
Optionally, obtaining and calculating a direct trust value between each two terminal devices according to the number of times of successful interaction and the total number of times of interaction of each two terminal devices within a preset time duration according to the interaction record, including:
according to the interaction record, through a preset formula:
Figure BDA0002993294000000071
φ(Δt)=σt-Δt,0<σ<1,1≤Δt≤t;
Figure BDA0002993294000000072
calculating to obtain a direct trust value between every two terminal devices, wherein diDenotes the ith node, djIndicating the jth node, and i ≠ j,
Figure BDA0002993294000000081
is diAnd djThe time within the time of at is recorded,
Figure BDA0002993294000000082
the ratio of successful interaction times to total interaction times in a time slot delta t is represented, t is the current time slot, delta t is any previous time slot, and sigma ist-ΔtFor coefficients calculated by the time length from the current time, DTi,j(t) is the direct confidence value, phi (delta t) time decay factor;
according to the direct trust value between every two terminal devices, calculating to obtain the comprehensive trust value of each terminal device, including:
according to the direct trust value between every two terminal devices, through a preset formula:
Figure BDA0002993294000000083
Figure BDA0002993294000000084
Figure BDA0002993294000000085
calculating to obtain the comprehensive trust value of each terminal device, wherein ltIndicating device d within time period tiAnd djThe number of interactions of (a) is,
Figure BDA0002993294000000086
in order to feed back the trust,
Figure BDA0002993294000000087
as a global trust value, ωi,jIs a predetermined weight.
Because the size of the trust value is related to the success rate, time and interaction times of the service provided by the evaluated node in the past, and meanwhile, the trust degree also expresses the capability of the evaluated terminal equipment for providing reliable resources and stably interacting in the network, the trust degree is used as an important parameter of the dynamic performance of the resources. With the lapse of time, the reference value of the trust information to the current trust evaluation is weaker and is in a monotonous decreasing trend, and the actual requirement is met.
Optionally, the pre-stored trust value of each terminal device is updated according to the currently calculated trust value. And updating the trust value stored by the proxy server according to the currently calculated trust value through the trust updating. And an amplitude coefficient can be set, the current trust value is updated based on the historical trust value, when the resource node has abnormal behavior, the resource node can be detected in time, and meanwhile, the swing attack can be effectively prevented. Specifically, the method comprises the following steps: according to the currently calculated trust value, through a preset formula:
Figure BDA0002993294000000091
updating the pre-stored trust value of each terminal device, wherein eta is the weight of the historical trust value,
Figure BDA0002993294000000092
in order to integrate the trust values,
Figure BDA0002993294000000093
the resulting composite trust value is calculated for the last time.
Wherein, the formula is as follows:
Figure BDA0002993294000000094
Figure BDA0002993294000000095
Figure BDA0002993294000000096
it can be seen that the trust value is updated each time based on the history.
Specifically, referring to fig. 7, fig. 7 is a diagram of an example of a task processing flow provided by an embodiment of the present application, including:
1. detecting node information in the domain by an agent implementation, and performing trust evaluation based on node behavior characteristics;
2. the agent receives a task request provided by a user;
3. the agent analysis task trusts and filters the nodes which do not meet the requirement according to the user requirement;
4. generating a highly reliable service node list meeting the user requirements;
5. and an optimization target is constructed, so that the system is optimal in utility.
In a second aspect of the embodiments of the present application, there is further provided a resource allocation apparatus, which is applied to a proxy server, where the proxy server is configured to detect multiple terminal devices, and with reference to fig. 8, the apparatus includes:
a request receiving module 801, configured to receive a task request corresponding to a target task;
a trust value obtaining module 802, configured to obtain a comprehensive trust value of each terminal device in the multiple terminal devices;
the list generating module 803 is configured to select a terminal device whose corresponding comprehensive trust value is greater than a preset threshold, and generate a multiple-group resource allocation list corresponding to the target task according to a preset multiple-group resource allocation coefficient;
a parameter calculating module 804, configured to calculate a plurality of performance parameters corresponding to each resource allocation list in the plurality of resource allocation lists respectively;
a time delay energy consumption calculating module 805, configured to calculate, according to a plurality of performance parameters corresponding to each group of resource lists, a comprehensive time delay energy consumption corresponding to each group of resource lists;
and the task allocation module 806 is configured to select and allocate the target task according to a group of resource allocation lists with the smallest comprehensive delay energy consumption in the multiple groups of resource allocation lists.
Optionally, the trust value obtaining module 802 includes:
the interactive record acquisition submodule is used for acquiring the interactive record of each terminal device;
the direct trust value operator module is used for obtaining and calculating a direct trust value between each two terminal devices according to the interaction records and the ratio of the successful interaction times of each two terminal devices in a preset time length to the total interaction times;
and the comprehensive trust value operator module is used for calculating the comprehensive trust value of each terminal device according to the direct trust value between every two terminal devices.
Optionally, the direct trust value operator module is specifically configured to:
according to the interaction record, according to a preset formula:
Figure BDA0002993294000000101
φ(Δt)=σt-Δt,0<σ<1,1≤Δt≤t;
Figure BDA0002993294000000102
calculating to obtain a direct trust value between every two terminal devices, wherein diDenotes the ith node, djIndicating the jth node, and i ≠ j,
Figure BDA0002993294000000103
is diAnd djThe time within the time of at is recorded,
Figure BDA0002993294000000104
the ratio of successful interaction times to total interaction times in a time slot delta t is represented, t is the current time slot, delta t is any previous time slot, and sigma ist-ΔtFor coefficients calculated by the time length from the current time, DTi,j(t) is the direct confidence value, phi (delta t) time decay factor;
the integrated trust value operator module is specifically configured to:
according to the direct trust value between every two terminal devices, through a preset formula:
Figure BDA0002993294000000111
Figure BDA0002993294000000112
Figure BDA0002993294000000113
calculating to obtain the comprehensive trust value of each terminal device, wherein ltIndicating device d within time period tiAnd djThe number of interactions of (a) is,
Figure BDA0002993294000000114
in order to feed back the trust,
Figure BDA0002993294000000115
as a global trust value, ωi,jIs a predetermined weight.
Optionally, the apparatus further comprises:
and the trust value updating module is used for updating the pre-stored trust values of the terminal equipment according to the currently calculated trust value.
Optionally, the trust value updating module is specifically configured to:
according to the currently calculated trust value, through a preset formula:
Figure BDA0002993294000000116
updating the pre-stored trust value of each terminal device, wherein eta is the weight of the historical trust value,
Figure BDA0002993294000000121
in order to integrate the trust values,
Figure BDA0002993294000000122
the resulting composite trust value is calculated for the last time.
Wherein, by the formula:
Figure BDA0002993294000000123
Figure BDA0002993294000000124
Figure BDA0002993294000000125
it can be seen that the trust value is updated each time based on the history.
Optionally, the parameter calculating module is specifically configured to:
respectively passing through a preset formula:
Figure BDA0002993294000000126
Figure BDA0002993294000000127
calculating the task processing time and energy consumption corresponding to each group of resource allocation list in the plurality of groups of resource allocation lists, wherein,
Figure BDA0002993294000000128
representing a resource node djIs completed by task tsThe amount of the task is such that,
Figure BDA0002993294000000129
size of calculation result of output data, 0<ξ<1,
Figure BDA00029932940000001210
Representing a resource node djThe ability to calculate per unit of time is,
Figure BDA00029932940000001211
which is indicative of the power transmitted and received,
Figure BDA00029932940000001212
indicating the transmission rate.
Optionally, the time delay energy consumption calculating module is specifically configured to:
according to the task processing time and energy consumption corresponding to each group of resource allocation list, through a preset formula:
Figure BDA00029932940000001213
calculating the comprehensive time delay energy consumption corresponding to each group of resource list, wherein lambda is the weight of time delay,
Figure BDA00029932940000001214
which represents the amount of energy consumed,
Figure BDA00029932940000001215
representing the integrated delay power consumption.
Therefore, by the resource allocation device in the embodiment of the application, the intelligent terminal device with the trust value larger than the preset threshold value can be selected according to the comprehensive trust value of each terminal device, and the task allocation mode with the minimum comprehensive time delay energy consumption can be selected for allocating the tasks by calculating the comprehensive time delay energy consumption, so that the reduction of the calculation efficiency caused by the faults of part of the terminal devices can be avoided, and the calculation efficiency can be improved.
The embodiment of the present application further provides an electronic device, as shown in fig. 9, which includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the following steps when executing the program stored in the memory 903:
receiving a task request corresponding to a target task;
acquiring a comprehensive trust value of each terminal device in the plurality of terminal devices;
selecting corresponding terminal equipment of which the comprehensive trust value is greater than a preset threshold value, and generating a plurality of groups of resource allocation lists corresponding to the target task according to preset resource allocation coefficients;
respectively calculating a plurality of performance parameters corresponding to each group of resource allocation lists in the plurality of groups of resource allocation lists;
calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to a plurality of performance parameters corresponding to each group of resource list;
and selecting and distributing the target task according to a group of resource classification lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource distribution lists.
The communication bus mentioned in the electronic device 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. Optionally, the memory may also 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.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above resource allocation methods.
In yet 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 perform any of the above-described resource allocation methods.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the storage medium, and the computer program product embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to part of the description of the method embodiment.
The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (8)

1. A resource allocation method is applied to a proxy server, the proxy server is used for detecting a plurality of terminal devices, and the method comprises the following steps:
receiving a task request corresponding to a target task;
acquiring a comprehensive trust value of each terminal device in the plurality of terminal devices, including:
acquiring interaction records of each terminal device;
according to the interaction record, acquiring and calculating a direct trust value between each two terminal devices according to the number of successful interaction times and the total interaction times of each two terminal devices within a preset time length;
calculating to obtain a comprehensive trust value of each terminal device according to the direct trust value between each two terminal devices;
the step of obtaining and calculating a direct trust value between every two terminal devices according to the interaction record and the number of successful interactions and the total interaction number of every two terminal devices within a preset time length comprises the following steps:
according to the interaction record, through a preset formula:
Figure FDA0003501270620000011
φ(Δt)=σt-Δt,0<σ<1,1≤Δt≤t;
Figure FDA0003501270620000012
calculating to obtain a direct trust value between every two terminal devices, wherein diDenotes the ith node, djIndicating the jth node, and i ≠ j,
Figure FDA0003501270620000013
is diAnd djThe time within the time of at is recorded,
Figure FDA0003501270620000014
the ratio of successful interaction times to total interaction times in a time slot delta t is represented, t is the current time slot, delta t is any previous time slot, and sigma ist-ΔtFor coefficients calculated by the time length from the current time, DTi,j(t) is the direct confidence value, phi (delta t) time decay factor;
the calculating to obtain the comprehensive trust value of each terminal device according to the direct trust value between every two terminal devices includes:
according to the direct trust value between every two terminal devices, through a preset formula:
Figure FDA0003501270620000021
Figure FDA0003501270620000022
Figure FDA0003501270620000023
calculating to obtain the comprehensive trust value of each terminal device, wherein ltIndicating device d within time period tiAnd djThe number of interactions of (a) is,
Figure FDA0003501270620000024
in order to feed back the trust,
Figure FDA0003501270620000025
as a global trust value, ωi,jIs a preset weight;
selecting corresponding terminal equipment of which the comprehensive trust value is greater than a preset threshold value, and generating a plurality of groups of resource allocation lists corresponding to the target task according to preset resource allocation coefficients;
respectively calculating a plurality of performance parameters corresponding to each group of resource allocation lists in the plurality of groups of resource allocation lists;
calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to a plurality of performance parameters corresponding to each group of resource list;
and selecting and distributing the target task according to a group of resource classification lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource distribution lists.
2. The method of claim 1, further comprising:
and updating the pre-stored trust value of each terminal device according to the currently calculated trust value.
3. The method according to claim 2, wherein the updating the pre-stored trust value of each terminal device according to the currently calculated trust value comprises:
according to the currently calculated trust value, through a preset formula:
Figure FDA0003501270620000031
updating the pre-stored trust value of each terminal device, wherein eta is the weight of the historical trust value,
Figure FDA0003501270620000032
in order to integrate the trust values,
Figure FDA0003501270620000033
the resulting composite trust value is calculated for the last time.
4. The method of claim 1, wherein the calculating the performance parameters corresponding to each resource allocation list of the resource allocation lists comprises:
respectively passing through a preset formula:
Figure FDA0003501270620000034
Figure FDA0003501270620000035
calculating the task processing time and energy consumption corresponding to each group of resource allocation list in the plurality of groups of resource allocation lists, wherein,
Figure FDA0003501270620000036
representing a resource node djIs completed by task tsThe amount of the task is such that,
Figure FDA0003501270620000037
size of calculation result of output data, 0<ξ<1,
Figure FDA0003501270620000038
Representing a resource node djThe ability to calculate per unit of time is,
Figure FDA0003501270620000039
which is indicative of the power transmitted and received,
Figure FDA00035012706200000310
indicating the transmission rate.
5. The method of claim 4, wherein the calculating the integrated latency energy consumption for each resource list according to the performance parameters for each resource list comprises:
according to the task processing time and energy consumption corresponding to each group of resource allocation list, through a preset formula:
Figure FDA00035012706200000311
calculating the comprehensive time delay energy consumption corresponding to each group of resource list, wherein lambda is the weight of time delay,
Figure FDA0003501270620000041
which represents the amount of energy consumed,
Figure FDA0003501270620000042
representing the integrated delay power consumption.
6. A resource allocation apparatus, applied to a proxy server, the proxy server being configured to detect a plurality of terminal devices, the apparatus comprising:
the request receiving module is used for receiving a task request corresponding to a target task;
a trust value obtaining module, configured to obtain a comprehensive trust value of each terminal device in the plurality of terminal devices;
the trust value obtaining module is specifically configured to: acquiring interaction records of each terminal device; according to the interaction record, acquiring and calculating a direct trust value between each two terminal devices according to the number of successful interaction times and the total interaction times of each two terminal devices within a preset time length; calculating to obtain a comprehensive trust value of each terminal device according to the direct trust value between each two terminal devices; the step of obtaining and calculating a direct trust value between every two terminal devices according to the interaction record and the number of successful interactions and the total interaction number of every two terminal devices within a preset time length comprises the following steps: according to the interaction record, through a preset formula:
Figure FDA0003501270620000043
φ(Δt)=σt-Δt,0<σ<1,1≤Δt≤t;
Figure FDA0003501270620000044
calculating a direct trust value between each two terminal devices, wherein,didenotes the ith node, djIndicating the jth node, and i ≠ j,
Figure FDA0003501270620000045
is diAnd djThe time within the time of at is recorded,
Figure FDA0003501270620000046
the ratio of successful interaction times to total interaction times in a time slot delta t is represented, t is the current time slot, delta t is any previous time slot, and sigma ist-ΔtFor coefficients calculated by the time length from the current time, DTi,j(t) is the direct confidence value, phi (delta t) time decay factor; the calculating to obtain the comprehensive trust value of each terminal device according to the direct trust value between every two terminal devices includes: according to the direct trust value between every two terminal devices, through a preset formula:
Figure FDA0003501270620000051
Figure FDA0003501270620000052
Figure FDA0003501270620000053
calculating to obtain the comprehensive trust value of each terminal device, wherein ltIndicating device d within time period tiAnd djThe number of interactions of (a) is,
Figure FDA0003501270620000054
in order to feed back the trust,
Figure FDA0003501270620000055
as a global trust value, ωi,jIs a preset weight;
the list generation module is used for selecting the corresponding terminal equipment of which the comprehensive trust value is greater than a preset threshold value and generating a plurality of groups of resource distribution lists corresponding to the target task according to preset resource distribution coefficients;
the parameter calculation module is used for calculating a plurality of performance parameters corresponding to each group of resource allocation lists in the plurality of groups of resource allocation lists respectively;
the time delay energy consumption calculation module is used for calculating the comprehensive time delay energy consumption corresponding to each group of resource list according to a plurality of performance parameters corresponding to each group of resource list;
and the task allocation module is used for selecting and allocating the target task according to a group of resource classification lists with the minimum comprehensive time delay energy consumption in the multiple groups of resource allocation lists.
7. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
8. 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 the claims 1-5.
CN202110322386.8A 2021-03-25 2021-03-25 Resource allocation method and device, electronic equipment and storage medium Active CN113141394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110322386.8A CN113141394B (en) 2021-03-25 2021-03-25 Resource allocation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110322386.8A CN113141394B (en) 2021-03-25 2021-03-25 Resource allocation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113141394A CN113141394A (en) 2021-07-20
CN113141394B true CN113141394B (en) 2022-04-01

Family

ID=76810733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110322386.8A Active CN113141394B (en) 2021-03-25 2021-03-25 Resource allocation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113141394B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110097226A (en) * 2019-05-06 2019-08-06 航天科工网络信息发展有限公司 A kind of resource regulating method, system, electronic equipment and readable storage medium storing program for executing
CN110399728A (en) * 2019-07-09 2019-11-01 北京邮电大学 A kind of edge calculations method for trust evaluation of nodes, device, equipment and storage medium
CN110417872A (en) * 2019-07-08 2019-11-05 深圳供电局有限公司 A kind of edge network resource allocation methods towards mobile block chain
CN111511028A (en) * 2020-04-13 2020-08-07 北京邮电大学 Multi-user resource allocation method, device, system and storage medium
CN111552570A (en) * 2020-04-29 2020-08-18 章稳建 Self-adaptive distribution method of data processing resources of Internet of things and cloud computing server
CN112422169A (en) * 2020-11-04 2021-02-26 中国空间技术研究院 Method, device and system for coordinating nodes of composite link

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11290375B2 (en) * 2019-01-18 2022-03-29 Rise Research Institutes of Sweden AB Dynamic deployment of network applications having performance and reliability guarantees in large computing networks
CN111275308B (en) * 2020-01-16 2023-04-18 北京邮电大学 Resource allocation method and device
CN111970323A (en) * 2020-07-10 2020-11-20 北京大学 Time delay optimization method and device for cloud-edge multi-layer cooperation in edge computing network
CN112416554B (en) * 2020-11-20 2022-12-02 北京邮电大学 Task migration method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110097226A (en) * 2019-05-06 2019-08-06 航天科工网络信息发展有限公司 A kind of resource regulating method, system, electronic equipment and readable storage medium storing program for executing
CN110417872A (en) * 2019-07-08 2019-11-05 深圳供电局有限公司 A kind of edge network resource allocation methods towards mobile block chain
CN110399728A (en) * 2019-07-09 2019-11-01 北京邮电大学 A kind of edge calculations method for trust evaluation of nodes, device, equipment and storage medium
CN111511028A (en) * 2020-04-13 2020-08-07 北京邮电大学 Multi-user resource allocation method, device, system and storage medium
CN111552570A (en) * 2020-04-29 2020-08-18 章稳建 Self-adaptive distribution method of data processing resources of Internet of things and cloud computing server
CN112422169A (en) * 2020-11-04 2021-02-26 中国空间技术研究院 Method, device and system for coordinating nodes of composite link

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Bi-TCCS: Trustworthy Cloud Collaboration Service Scheme Based on Bilateral Social Feedback;Chuanyi Liu; Xiaoyong Li; Minliang Sun; Yali Gao; Jie Yuan; Duan;《IEEE Transactions on Cloud Computing》;20200306;全文 *
Multi-step temperature prediction model based on surrounding cities and long-term memory neural networks;Zhenyue Huang; Lei Zhang; Xiajiong Shen; Liyang Hou; Yihua Gao;;《2019 14th International Conference on Computer Science & Education (ICCSE)》;20190923;全文 *

Also Published As

Publication number Publication date
CN113141394A (en) 2021-07-20

Similar Documents

Publication Publication Date Title
CN110049130B (en) Service deployment and task scheduling method and device based on edge computing
Yao et al. Fog resource provisioning in reliability-aware IoT networks
Hussain et al. Formulating and managing viable SLAs in cloud computing from a small to medium service provider's viewpoint: A state-of-the-art review
CN110399728B (en) Edge computing node trust evaluation method, device, equipment and storage medium
CN113037877B (en) Optimization method for time-space data and resource scheduling under cloud edge architecture
CN110138865B (en) Spatial crowdsourcing task allocation method, device, equipment and storage medium
CN112579194B (en) Block chain consensus task unloading method and device based on time delay and transaction throughput
Angela Jennifa Sujana et al. Trust model based scheduling of stochastic workflows in cloud and fog computing
CN108416665B (en) Data interaction method and device, computer equipment and storage medium
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
CN109787850A (en) Monitoring system, monitoring method and calculate node
Golshani et al. Proactive auto-scaling for cloud environments using temporal convolutional neural networks
CN113190417A (en) Microservice state detection method, model training method, device and storage medium
CN116302469A (en) Task processing method and device
CN110336813B (en) Access control method, device, equipment and storage medium
Smithamol et al. TMM: trust management middleware for cloud service selection by prioritization
CN109214192B (en) Application system-oriented risk processing method and device
JP2005128866A (en) Computer unit and method for controlling computer unit
KR101324850B1 (en) Ontology-based virtual machine allocation device for mobile cloud and method thereof
CN113141394B (en) Resource allocation method and device, electronic equipment and storage medium
CN111400045B (en) Load balancing method and device
El Kassabi et al. A multi-dimensional trust model for processing big data over competing clouds
CN111800291A (en) Service function chain deployment method and device
Lee et al. Detecting anomaly teletraffic using stochastic self-similarity based on Hadoop
Farooq et al. Adaptive and resilient revenue maximizing dynamic resource allocation and pricing for cloud-enabled IoT systems

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
GR01 Patent grant
GR01 Patent grant