A task coordination-based node selection method, device, equipment and medium
By calculating the trustworthiness of distributed nodes and utilizing a multi-objective particle swarm optimization algorithm, the problem of low efficiency in cloud node selection in cloud-edge collaborative environments is solved, achieving more efficient and secure task scheduling decisions.
Patent Information
- Application Number
- CN202311359464.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2043-10-19
AI Technical Summary
In a cloud-edge collaborative environment, existing technologies cannot accurately assess the collaborative service capabilities of edge nodes, leading to unscientific task scheduling decisions and inefficient cloud node selection.
By calculating the time credibility, behavior credibility, and resource credibility of distributed nodes, a set of nodes that meet the threshold is selected. A cloud node selection model is then established using a multi-objective particle swarm optimization algorithm to achieve comprehensive trust assessment and optimized allocation of cloud nodes.
It enhances the attack resistance of cloud nodes, optimizes resource balance and execution time, and improves the security and efficiency of cloud node task collaborative allocation.
Smart Images

Figure CN117354310B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network technology, and in particular to a node selection method, apparatus, device, and medium based on task collaboration. Background Technology
[0002] With the rapid development of the Internet of Things (IoT), the shortcomings of traditional cloud computing in terms of latency, bandwidth, energy consumption, data security, and privacy protection have become increasingly apparent, bringing edge computing into the spotlight. People are closely integrating cloud computing and edge computing, achieving the decentralization of cloud computing by rationally allocating tasks between the two, extending cloud computing and cloud analytics to the edge. With the development of edge computing, the importance of edge security has long been a priority. Within edge security, the security assessment of mobile terminals and wireless sensors is a core issue for the rapid application of edge computing. Therefore, in a cloud-edge collaborative environment, many trust assessment mechanisms for edge nodes have been proposed. However, due to the large number of edge nodes and their limited computing power, their inherent resistance to attacks is weak. Current task scheduling schemes based on trust assessment cannot accurately assess the collaborative service capabilities of edge nodes in providing various tasks, making it difficult to make scientific and reasonable task scheduling decisions. Summary of the Invention
[0003] This invention proposes a node selection method based on task collaboration. By accurately evaluating the collaborative service capabilities of cloud nodes in handling various tasks, the optimal distributed cloud node selection scheme is obtained, which solves the problem of task collaboration constraints in the cloud node allocation process and the problem of low efficiency in selecting the optimal cloud node.
[0004] To achieve the above objectives, embodiments of the present invention provide a node selection method based on task collaboration, comprising the following steps:
[0005] Obtain the distributed nodes performing the collaborative task and the execution parameters of the collaborative task, and calculate the time reliability, behavior reliability, and resource reliability of the distributed nodes;
[0006] Based on the calculation results of the time credibility, the behavior credibility, and the resource credibility, distributed nodes whose time credibility, behavior credibility, and resource credibility are all greater than the corresponding thresholds are selected to obtain the first set of distributed nodes.
[0007] The first set of distributed nodes and the set of collaborative tasks are input into a preset distributed cloud node selection model to obtain the distributed cloud node selection scheme output by the distributed cloud node selection model; wherein, the distributed cloud node selection model is trained using a multi-objective particle swarm optimization algorithm model.
[0008] As one optional embodiment, the step of obtaining the distributed nodes performing the collaborative task and the execution parameters of the collaborative task, and calculating the time reliability, behavior reliability, and resource reliability of the distributed nodes, specifically involves:
[0009] Obtain the distributed nodes performing the collaborative task and the execution parameters of the collaborative task;
[0010] The time reliability is calculated based on the task's transmission time and execution time in the execution parameters.
[0011] The credibility of the behavior is calculated based on the initial direct trust assessment value of the distributed node, the direct trust assessment time, the time decay factor, the number of recommenders in the historical collaboration records, and the initial trust level in the execution parameters.
[0012] The resource reliability is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters.
[0013] As one optional embodiment, the calculation of the time reliability based on the task's transmission time and execution time in the execution parameters specifically involves:
[0014] The transmission time is calculated based on the size of the task and the worst-case bandwidth of the transmission task in the execution parameters.
[0015] The execution time is calculated based on the number of CPU cycles required by the task and the number of CPU cycles of the candidate distributed nodes in the execution parameters.
[0016] The time reliability is obtained by adding the transmission time and the execution time together.
[0017] As one optional embodiment, the behavioral credibility is calculated based on the initial direct trust assessment value of the distributed node, the direct trust assessment time, the time decay factor, the number of recommenders in the historical collaboration records, and the initial trust level in the execution parameters, specifically as follows:
[0018] The direct trust level is calculated based on the initial direct trust assessment value of the distributed node, the direct trust assessment time, and the time decay factor in the execution parameters.
[0019] The recommendation trust level is calculated based on the direct trust level and the number of recommenders in the historical collaboration records of the distributed nodes in the execution parameters.
[0020] The credibility of the behavior is calculated based on the initial trust level of the distributed nodes, the direct trust level, and the recommended trust level in the execution parameters.
[0021] The formula for calculating the direct trust level is as follows: Where ρ0 is the initial direct trust assessment value, β is the time decay factor, and t i t represents the historical time point of the direct trust assessment, and t represents the current time point of the direct trust assessment.
[0022] The formula for calculating the recommendation trust level is: in, Let T be the recommendation trust level of distributed node A for candidate distributed node B in a type j collaborative task. A,i Let be the direct trust level of distributed node A towards the recommended distributed node i. This refers to the number of recommenders of historical collaboration records that the distributed node A and the candidate distributed node B possess on the j-type collaborative task. The number of historical collaboration records that the recommended distributed node i and the candidate distributed node B have on the collaborative j-type task within a specified evaluation period;
[0023] The formula for calculating the credibility of the behavior is as follows: in, Let ξ be the credibility of the behavior of distributed node A towards candidate distributed node B, and let ξ be the weight of candidate distributed node B when it first joins the collaborative task. Let β be the initial trust level of the candidate distributed node B, β be the time decay factor, t0 be the time point of the first behavioral trust assessment, t be the current time point of the behavioral trust assessment, and T be the initial trust level of the candidate distributed node B. A,B This represents the direct trust level of distributed node A towards candidate distributed node B. Let a and b be the recommendation trust of the distributed node A for the candidate distributed node B in the j-type collaborative task, where a and b are weight values and a + b = 1.
[0024] As one optional embodiment, the calculation of the resource reliability based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters specifically involves:
[0025] The supply-demand matching degree is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters; wherein, the remaining resources include the remaining computing resources and the remaining storage resources; and the resource requirements include the computing requirements and the storage requirements.
[0026] The resource balance is calculated based on the remaining computing power and the remaining storage power of the distributed nodes in the execution parameters.
[0027] The resource reliability is obtained based on the supply-demand matching degree and the resource balance degree.
[0028] The formula for calculating the supply-demand matching degree is as follows: in, This represents the remaining resources of the candidate distributed node B. Let J represent the resource requirements for task j.
[0029] The formula for calculating the resource balance is: in, The remaining computational resources for the candidate distributed node B. The remaining storage amount for the candidate distributed node B.
[0030] As one optional embodiment, the training method of the multi-objective particle swarm optimization algorithm model specifically includes the following steps:
[0031] Obtain the collaborative task set of the distributed cloud nodes, and obtain the task set to be processed as a particle swarm based on the collaborative task set; obtain the first distributed node set, and use the distributed nodes in the first distributed node set as the selectable positions of the particles;
[0032] Initialize the velocity and position of each particle in the particle swarm;
[0033] The fitness value of each particle is calculated according to a preset objective function;
[0034] The individual optimal position of each particle and the global optimal position of the particle swarm are updated based on the fitness value, and iterative training is performed.
[0035] If the number of iterations reaches the preset number of iterations, the iteration ends, the global optimal position of the particle swarm is output, and the optimal combination of distributed cloud nodes is obtained.
[0036] If the number of iterations does not reach the preset number of iterations, then update the velocity and position of each particle, and return to the step to calculate the fitness value of each particle according to the preset objective function.
[0037] As one optional embodiment, the objective function includes resource average load balancing and average execution time, and the objective function is specifically as follows:
[0038] minJ = [J1, J2]
[0039]
[0040]
[0041] The constraints of the objective function are as follows:
[0042] NC =N T N Type
[0043]
[0044] Where J1 represents the average load balancing degree of resources, and NV is the number of currently available distributed nodes. Let be the remaining computational resources for the i-th distributed node. Let J2 represent the remaining storage of the i-th distributed node, and J2 represent the average execution time. i Let N be the allocation scheme for the i-th distributed node; C N represents the total number of tasks that the edge cloud needs to process. T N represents the total number of tasks initiated by the distributed nodes. Type The number of subtasks that can be divided for each task; x ij These are decision variables.
[0045] This invention also provides a node selection device based on task collaboration, comprising:
[0046] The credibility calculation module is used to obtain the distributed nodes performing the collaborative task and the execution parameters of the collaborative task, and to calculate the time credibility, behavior credibility and resource credibility of the distributed nodes.
[0047] The trust assessment module is used to filter out distributed nodes whose time credibility, behavior credibility, and resource credibility are all greater than the corresponding thresholds based on the calculation results of the time credibility, behavior credibility, and resource credibility, and obtain a first set of distributed nodes.
[0048] The node selection module is used to input the first distributed node set and the collaborative task set into a preset distributed cloud node selection model to obtain the distributed cloud node selection scheme output by the distributed cloud node selection model; wherein, the distributed cloud node selection model is trained using a multi-objective particle swarm optimization algorithm model.
[0049] This invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program and the computer program is configured to be executed by the processor, and the processor executes the computer program to implement the task-cooperative node selection method described in any of the above embodiments.
[0050] This invention also provides a computer-readable storage medium storing a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the task-coordination-based node selection method described in any of the above embodiments.
[0051] Compared with existing technologies, the beneficial effects of the node selection method, apparatus, device, and medium based on task collaboration provided in this invention are as follows: By using service quality reliability, which includes time reliability, behavior reliability, and resource reliability, to measure the reliability of distributed cloud nodes, a comprehensive trust assessment of cloud nodes is achieved, improving the anti-attack capability of cloud nodes; by using a multi-objective particle swarm optimization algorithm with strong global search capability and fast convergence speed to establish a distributed cloud node selection model, the task collaboration constraint problem in the distributed cloud node allocation process is solved, and a node selection scheme with optimal resource balance and shortest execution time is obtained, improving the security and efficiency of cloud node selection during cloud node task collaboration allocation. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the task execution framework in the cloud-edge collaborative environment provided in an embodiment of the present invention;
[0053] Figure 2 This is a flowchart illustrating the node selection method based on task collaboration provided in an embodiment of the present invention.
[0054] Figure 3 This is a schematic diagram of the construction process of the trust assessment mechanism provided in the embodiments of the present invention;
[0055] Figure 4 This is a flowchart illustrating the multi-objective particle swarm optimization algorithm provided in an embodiment of the present invention;
[0056] Figure 5 This is a schematic diagram of the node selection device based on task collaboration provided in an embodiment of the present invention;
[0057] Figure 6 This is a schematic diagram of a preferred embodiment of a terminal device provided by the present invention. Detailed Implementation
[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] This invention applies to cloud-edge collaboration scenarios, which achieves synergistic interaction between edge computing and cloud computing to jointly unlock data value. The main advantages of cloud computing are massive computing and storage, high computing efficiency, and wide-area coverage. It is suitable for computationally intensive, non-real-time computing tasks and the parallel computing and storage of massive amounts of data. It excels in areas such as long-term maintenance and business decision support. Furthermore, computing hardware is centralized in cloud computing centers, implementing centralized management, thus eliminating the need for local maintenance of computing hardware, data storage, and related software. The main advantage of edge computing is that widely distributed edge nodes provide real-time data processing. Edge computing is a user- and application-centric process, compensating for the latency and mobility deficiencies of cloud computing. It is suitable for processing and analyzing non-computationally intensive, real-time, and mobile data, as well as real-time intelligent decision-making. Moreover, as a new network paradigm, it can meet both computing demands and user experience quality. The cloud-edge collaboration approach primarily involves the edge cloud determining the execution of data or task requests based on business rules after a terminal device generates data or a task request. For computationally intensive and complex tasks, the edge computing center migrates data upwards through the core network to the cloud computing center. Once the cloud computing center completes the big data analysis, the results and data are stored there, or the computation results, optimized business rules, and models are distributed to the edge computing center via the core network. The edge computing center then transmits the computation results downwards to the terminal device via the edge network. Conversely, for computationally intensive and less complex tasks, data is uploaded to the edge server via the edge network. The edge server, located at the edge computing center, executes the computation task. After the edge computing center completes the data analysis, the results and data are stored at the edge center, and the computation results are transmitted to the terminal device via the edge network.
[0060] See Figure 1 This is a schematic diagram of the task execution framework for a cloud-edge collaborative environment provided in this embodiment of the invention. Distributed cloud nodes can perform lightweight data processing, enabling real-time control and rapid decision-making for business operations. The edge cloud can optimize business execution based on new business rules issued by the cloud computing center, achieving cloud-edge collaboration. The cloud center mainly analyzes and processes large-scale data, realizing big data storage and organization, as well as managing distributed cloud nodes. When a task requires collaboration between distributed nodes, the edge cloud needs to evaluate the distributed cloud nodes and select suitable cloud nodes to handle the collaborative task.
[0061] See Figure 2 This is a flowchart illustrating a node selection method based on task collaboration provided in an embodiment of the present invention, including the following steps:
[0062] S1: Obtain the distributed nodes performing the collaborative task and the execution parameters of the collaborative task, and calculate the time reliability, behavior reliability, and resource reliability of the distributed nodes;
[0063] For example, the execution parameters of the obtained collaborative task include: node set, task set, task size, transmission time, execution time, number of CPU cycles required, worst bandwidth of the transmission task, historical collaboration records of distributed nodes, remaining resources of distributed cloud nodes, and resource requirements of the task.
[0064] See Figure 3 This is a schematic diagram illustrating the construction process of the trust evaluation mechanism provided in this embodiment of the invention. In this embodiment, a trust evaluation mechanism based on service quality reliability is constructed. In this trust evaluation mechanism, the edge cloud establishes a historical collaboration record queue for the execution status of different distributed cloud nodes under different collaborative tasks. Through this historical collaboration record queue, the edge cloud can more accurately record the performance of each distributed cloud node in different collaborative tasks. Because the deployment environment, individual hardware configuration, and current operating status of distributed cloud nodes differ, the constraints of the distributed cloud node's own configuration must be considered when evaluating the performance of distributed cloud nodes in collaborative tasks, i.e., the differences in the deployment environment, individual hardware configuration, and current operating status of the collaborating distributed cloud nodes. The differences in the current operating status include: throughput, latency, bandwidth, load balancing, and remaining resources. Since the individual differences of distributed cloud nodes are strongly correlated with the QoE (Quality of Experience) of collaborative service types, and are difficult to measure using a unified variable, this embodiment of the invention uses the service quality reliability of the collaboration queue to reflect the performance of distributed cloud nodes. Specifically, time reliability, behavioral reliability, and resource reliability are used to measure the performance of distributed cloud nodes in different collaborative tasks.
[0065] In one embodiment of the present invention, the time reliability refers to the time required for the edge cloud to migrate the collaborative task to the candidate distributed nodes, including the task transmission time and the task execution time. The task transmission time is affected by network bandwidth; therefore, it is calculated based on the task size and the worst-case bandwidth in the execution parameters. The task execution time is affected by the computing power required by the task and the computing power of the distributed cloud nodes; therefore, it is calculated based on the number of CPU cycles required by the task and the number of CPU cycles of the candidate distributed nodes in the execution parameters. The transmission time and execution time are added together to obtain the time reliability.
[0066] Furthermore, the formula for calculating time reliability is as follows:
[0067]
[0068] Among them, T tran For the transmission time of type j task, L task For the size of the j-type task, bwworst For the worst-case bandwidth of transmitting j-type tasks, T exe W represents the execution time of task type j. task C represents the number of CPU cycles required for a j-type task. B T represents the number of CPU cycles for candidate distributed node B. B,j This represents the time required for the edge cloud to migrate a type j task to candidate distributed node B.
[0069] In one embodiment of the present invention, the behavioral credibility is used to determine whether the edge cloud can efficiently complete the task when migrating it to a trusted distributed cloud node. Further, the behavioral credibility is determined by the initial trust level, direct trust level, and recommended trust level. Further, the behavioral credibility is calculated based on the initial direct trust evaluation value of the distributed node, the direct trust evaluation time, the time decay factor, the number of recommenders in historical collaboration records, and the initial trust level in the execution parameters.
[0070] In one embodiment of the present invention, the direct trust score is calculated by a direct trust algorithm. Since the task collaboration score of distributed cloud nodes changes over time, the direct trust algorithm uses a time decay function to evaluate the direct trust of distributed cloud nodes. Based on the initial direct trust evaluation value of the distributed node, the direct trust evaluation time, and the time decay factor, the direct trust score is calculated. Furthermore, the formula for calculating the direct trust score is: Where ρ0 is the initial direct trust assessment value, β is the time decay factor, and t i t represents the historical time point of the direct trust assessment, and t represents the current time point of the direct trust assessment.
[0071] As one embodiment of the present invention, the recommendation trust level is calculated based on the direct trust level and the number of recommenders in the historical collaboration records of the distributed nodes, and is used to evaluate the performance of other distributed cloud nodes in collaborating with candidate distributed cloud nodes on this type of task.
[0072] Furthermore, the formula for calculating recommendation trust level is as follows:
[0073]
[0074] in, Let T be the recommendation trust level of distributed node A for candidate distributed node B in a type j collaborative task. A,i Let be the direct trust level of distributed node A in recommending distributed node i. This represents the number of recommenders for historical collaboration records that distributed node A and candidate distributed node B have on type j collaborative tasks. This is to determine the number of historical collaboration records that distributed node i has with candidate distributed node B on collaborative task j within a specified evaluation period.
[0075] As one embodiment of the present invention, the initial trust level is preset to... The formula for calculating behavioral credibility is:
[0076]
[0077] in, Let ξ represent the credibility of distributed node A's behavior towards candidate distributed node B, and let ξ represent the weight of candidate distributed node B when it first joins the collaborative task. Let β be the initial trust level of candidate distributed node B, β be the time decay factor, t0 be the time point of the first behavioral trust assessment, t be the current time point of the behavioral trust assessment, and T be the initial trust level of candidate distributed node B. A,B This represents the direct trust level of distributed node A in candidate distributed node B. Let be the recommendation trust of distributed node A to candidate distributed node B in type j collaborative task, and let a and b be weight values, such that a + b = 1.
[0078] In one embodiment of the present invention, the resource reliability includes the resource balance and supply-demand matching degree of the candidate distributed cloud nodes. The supply-demand matching degree is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters. The resource balance is calculated based on the remaining computing power and storage capacity of the distributed nodes in the execution parameters. The remaining resources include remaining computing power and remaining storage capacity, and the resource requirements include computing power requirements and storage power requirements.
[0079] Furthermore, the formula for calculating the supply-demand matching degree of candidate distributed node B is as follows:
[0080]
[0081] in, This represents the remaining resources (including computing and storage) of candidate distributed node B. Let represent the resource (including computing and storage) requirements for task j.
[0082] Furthermore, the formula for calculating the resource balance of candidate distributed node B before it accepts the collaborative task is as follows:
[0083]
[0084] in, This represents the remaining computational resources for candidate distributed node B. This represents the remaining storage capacity of candidate distributed node B.
[0085] This invention establishes a historical collaboration queue for the execution of different distributed cloud nodes under different collaborative tasks. This allows the edge cloud to more accurately record the performance of each distributed cloud node in different collaborative tasks, thereby achieving a more comprehensive trust assessment of distributed cloud nodes. When assessing the trust of distributed cloud nodes in collaborative tasks, this invention considers the constraints of the distributed cloud nodes' own configurations, including differences in the deployment environment, individual hardware configuration, and current operating status. By using time reliability, behavioral feasibility, and resource reliability to reflect the performance of distributed cloud nodes, it can determine whether the edge cloud can efficiently complete tasks when migrating them to distributed cloud nodes. This improves the attack resistance of the trust assessment mechanism and achieves a more comprehensive trust assessment of distributed cloud nodes. In some existing trust assessment mechanisms, a fixed weight is usually set for direct trust value and recommended trust value to obtain a comprehensive trust value, which is then used as the behavioral reliability to assess the node. However, this fixed weighting method cannot effectively measure the trust value between nodes, making it difficult for newly connected cloud nodes to obtain the edge cloud's trustworthiness. For example, if the distributed cloud node to be evaluated is a newly added node, then the overall trust value will be entirely derived from its direct trust value. Conversely, if the distributed cloud node to be evaluated has a large number of collaborators, then other nodes are more inclined to collaborate with it on tasks, which can easily lead to system load imbalance. This embodiment of the invention considers the trustworthiness of newly added distributed cloud nodes, incorporating initial trust value and adding the influence of a time decay coefficient when calculating behavioral feasibility. This allows newly added distributed cloud nodes or those with lower load balancing to be prioritized, helping newly added nodes execute tasks quickly and reducing the overall system load.
[0086] S2: Based on the calculation results of the time credibility, the behavior credibility, and the resource credibility, filter out distributed nodes whose time credibility, behavior credibility, and resource credibility are all greater than the corresponding thresholds to obtain the first set of distributed nodes;
[0087] In this embodiment of the invention, the time reliability, behavior reliability, and resource reliability of each distributed node are obtained according to step S1; wherein the resource reliability specifically includes resource balance and supply-demand matching degree. Corresponding thresholds are preset, including a time reliability threshold, a behavior reliability threshold, a resource balance threshold, and a supply-demand matching degree threshold. The calculated results of the time reliability, behavior reliability, and resource reliability of each distributed node are compared with their corresponding thresholds, and distributed nodes whose time reliability, behavior reliability, and resource reliability are all greater than their respective thresholds are selected to obtain a first set of distributed nodes.
[0088] S3: Input the first distributed node set and the collaborative task set into a preset distributed cloud node selection model to obtain the distributed cloud node selection scheme output by the distributed cloud node selection model; wherein, the distributed cloud node selection model is trained using a multi-objective particle swarm optimization algorithm model.
[0089] See Figure 4 This is a flowchart illustrating the multi-objective particle swarm optimization algorithm provided in an embodiment of the present invention. As one implementation of the present invention, the multi-objective particle swarm optimization algorithm specifically includes the following steps:
[0090] S301: Obtain the collaborative task set of distributed cloud nodes, and obtain the task set to be processed as a particle swarm based on the collaborative task set; obtain the first distributed node set, and use the distributed nodes in the first distributed node set as the selectable positions of the particles;
[0091] S302: Initialize the velocity and position of each particle in the particle swarm;
[0092] S303: Calculate the fitness value of each particle according to the preset objective function;
[0093] S304: Update the individual optimal position of each particle and the global optimal position of the particle swarm based on the fitness value, and perform iterative training;
[0094] S305: Determine whether the preset number of iterations has been reached;
[0095] S306: If the preset maximum number of iterations has not been reached, update the velocity and position of each particle and return to step S303;
[0096] S307: If the preset maximum number of iterations is reached, the iteration ends, the global optimal position of the particle swarm is output, and the optimal combination of distributed cloud nodes is obtained.
[0097] Specifically, when training the multi-objective particle swarm optimization algorithm model, a set of collaborative tasks initiated by distributed cloud nodes is obtained. Each task is divided into different sub-tasks, resulting in a set of tasks to be processed by the distributed cloud nodes. This set of tasks to be processed is then used as the particle swarm. This can be represented by the distributed node set as V = {V1, V2, ..., V...}. NV The total number of available distributed nodes is NV. The set of tasks initiated by the distributed nodes is T = {T1, T2, ..., T}. NT}, where N T N represents the number of tasks initiated by distributed nodes, and each task can be divided into N subtasks. Type The total number of tasks that the edge cloud needs to process is N. C =N TN Type The set of tasks to be processed by the distributed cloud nodes is The particle swarm consists of a set of tasks to be processed by distributed cloud nodes, with each particle representing a task. The process involves initializing the velocity and position of each particle in the swarm; then calculating the fitness value of each particle based on a predefined objective function. This objective function includes average resource load balancing and average execution time; it must satisfy the conditions that every task is executed and that each task can only be executed by one distributed cloud node. Specifically, the objective function is as follows:
[0098]
[0099]
[0100] minJ = [J1, J2]
[0101] The constraints of the objective function are as follows:
[0102] N C =N T N Type
[0103]
[0104] Where J1 represents the average load balancing degree of resources, and NV is the number of currently available distributed nodes. Let be the remaining computational resources for the i-th distributed node. Let J2 represent the remaining storage of the i-th distributed node, and J2 represent the average execution time. i Let N be the allocation scheme for the i-th distributed node; C N represents the total number of tasks that the edge cloud needs to process. T N represents the total number of tasks initiated by the distributed nodes. Type The number of subtasks that can be divided for each task; x ij As a decision variable, when x ij = 0 indicates that the i-th distributed node was not selected to execute the j-th task, x ij =1 indicates that the i-th distributed node is selected to execute the j-th type of task.
[0105] Because the resource balance and execution time vary at different stages of task execution by distributed cloud nodes, the distribution scheme plan in the objective function is divided into multiple stages, which facilitates the selection of the optimal combination of distributed cloud nodes to process collaborative tasks. Specifically, in the objective function, distributed node V... i The task allocation scheme is represented as follows:
[0106]
[0107] Among them, plan i Let represent the allocation scheme for the i-th distributed cloud node. N represents the j-th stage in the allocation plan for the i-th distributed cloud node. mi This represents the total number of tasks on the i-th distributed cloud node. This indicates that the i-th distributed cloud node executes task j. This represents the resource balance of the i-th distributed cloud node executing type j task.
[0108] In this embodiment of the invention, the reliability of distributed cloud nodes is measured by using service quality reliability, which includes time reliability, behavior reliability, and resource reliability. This enables a comprehensive trust assessment of cloud nodes and improves their resistance to attacks. In existing technologies, cloud node selection after determining the objective function typically employs a greedy algorithm, which iterates through all cloud node sets to select a suitable node. This method is not only time-consuming and labor-intensive but also struggles to adapt to dynamic changes in cloud node states. However, this embodiment of the invention uses a multi-objective particle swarm optimization algorithm with strong global search capabilities and faster convergence speed to establish a distributed cloud node selection model. This solves the task coordination constraint problem in the cloud node allocation process, resulting in a distributed cloud node selection scheme with optimal resource balance and the shortest execution time. This improves the security and efficiency of cloud node selection during node task coordination allocation.
[0109] This invention also provides a node selection device based on task collaboration, capable of implementing all the processes of the node selection method based on task collaboration described in the above embodiments. See also Figure 5 This is a schematic diagram of a node selection device based on task collaboration provided in an embodiment of the present invention.
[0110] The node selection device based on task collaboration provided in this embodiment of the invention mainly includes:
[0111] The credibility calculation module 10 is used to obtain the distributed nodes performing the collaborative task and the execution parameters of the collaborative task, and to calculate the time credibility, behavior credibility and resource credibility of the distributed nodes.
[0112] The trust assessment module 20 is used to filter out distributed nodes whose time credibility, behavior credibility, and resource credibility are all greater than the corresponding thresholds based on the calculation results of the time credibility, behavior credibility, and resource credibility, and obtain a first set of distributed nodes.
[0113] The node selection module 30 is used to input the first distributed node set and the collaborative task set into a preset distributed cloud node selection model to obtain the distributed cloud node selection scheme output by the distributed cloud node selection model; wherein, the distributed cloud node selection model is trained using a multi-objective particle swarm optimization algorithm model.
[0114] In one embodiment of the present invention, the credibility calculation module 10 is used to obtain the distributed nodes performing the collaborative task and the execution parameters of the collaborative task, and to calculate the time credibility, behavior credibility, and resource credibility of the distributed nodes, specifically as follows:
[0115] Obtain the distributed nodes performing the collaborative task and the execution parameters of the collaborative task;
[0116] The time reliability is calculated based on the task's transmission time and execution time in the execution parameters.
[0117] The credibility of the behavior is calculated based on the initial direct trust assessment value of the distributed node, the direct trust assessment time, the time decay factor, the number of recommenders in the historical collaboration records, and the initial trust level in the execution parameters.
[0118] The resource reliability is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters.
[0119] As one embodiment of the present invention, in the credibility calculation module 10, the calculation of the time credibility based on the transmission time and execution time of the task in the execution parameters specifically involves:
[0120] The transmission time is calculated based on the size of the task and the worst-case bandwidth of the transmission task in the execution parameters.
[0121] The execution time is calculated based on the number of CPU cycles required by the task and the number of CPU cycles of the candidate distributed nodes in the execution parameters.
[0122] The time reliability is obtained by adding the transmission time and the execution time together.
[0123] As one embodiment of the present invention, in the credibility calculation module 10, the behavioral credibility is calculated based on the initial direct trust assessment value of the distributed node, the direct trust assessment time, the time decay factor, the number of recommenders in the historical collaboration records, and the initial trust level in the execution parameters, specifically as follows:
[0124] The direct trust level is calculated based on the initial direct trust assessment value of the distributed node, the direct trust assessment time, and the time decay factor in the execution parameters.
[0125] The recommendation trust level is calculated based on the direct trust level and the number of recommenders in the historical collaboration records of the distributed nodes in the execution parameters.
[0126] The credibility of the behavior is calculated based on the initial trust level of the distributed nodes, the direct trust level, and the recommended trust level in the execution parameters.
[0127] The formula for calculating the direct trust level is as follows: Where ρ0 is the initial direct trust assessment value, β is the time decay factor, and t i t represents the historical time point of the direct trust assessment, and t represents the current time point of the direct trust assessment.
[0128] The formula for calculating the recommendation trust level is: in, Let T be the recommendation trust level of distributed node A for candidate distributed node B in a type j collaborative task. A,i Let be the direct trust level of distributed node A towards the recommended distributed node i. This refers to the number of recommenders of historical collaboration records that the distributed node A and the candidate distributed node B possess on the j-type collaborative task. The number of historical collaboration records that the recommended distributed node i and the candidate distributed node B have on the collaborative j-type task within a specified evaluation period;
[0129] The formula for calculating the credibility of the behavior is as follows: in, Let ξ be the credibility of the behavior of distributed node A towards candidate distributed node B, and let ξ be the weight of candidate distributed node B when it first joins the collaborative task. Let β be the initial trust level of the candidate distributed node B, β be the time decay factor, t0 be the time point of the first behavioral trust assessment, t be the current time point of the behavioral trust assessment, and T be the initial trust level of the candidate distributed node B. A,B This represents the direct trust level of distributed node A towards candidate distributed node B. Let a and b be the recommendation trust of the distributed node A for the candidate distributed node B in the j-type collaborative task, where a and b are weight values and a + b = 1.
[0130] In one embodiment of the present invention, the reliability calculation module 10 calculates the resource reliability based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters, specifically as follows:
[0131] The supply-demand matching degree is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters; wherein, the remaining resources include the remaining computing resources and the remaining storage resources; and the resource requirements include the computing requirements and the storage requirements.
[0132] The resource balance is calculated based on the remaining computing power and the remaining storage power of the distributed nodes in the execution parameters.
[0133] The resource reliability is obtained based on the supply-demand matching degree and the resource balance degree.
[0134] The formula for calculating the supply-demand matching degree is as follows: in, This represents the remaining resources of the candidate distributed node B. Let J represent the resource requirements for task j.
[0135] The formula for calculating the resource balance is: in, The remaining computational resources for the candidate distributed node B. The remaining storage amount for the candidate distributed node B.
[0136] As one embodiment of the present invention, the training method of the multi-objective particle swarm optimization algorithm model in the node selection module 30 specifically includes the following steps:
[0137] Obtain the collaborative task set of the distributed cloud nodes, and obtain the task set to be processed as a particle swarm based on the collaborative task set; obtain the first distributed node set, and use the distributed nodes in the first distributed node set as the selectable positions of the particles;
[0138] Initialize the velocity and position of each particle in the particle swarm;
[0139] The fitness value of each particle is calculated according to a preset objective function;
[0140] The individual optimal position of each particle and the global optimal position of the particle swarm are updated based on the fitness value, and iterative training is performed.
[0141] If the number of iterations reaches the preset number of iterations, the iteration ends, the global optimal position of the particle swarm is output, and the optimal combination of distributed cloud nodes is obtained.
[0142] If the number of iterations does not reach the preset number of iterations, then update the velocity and position of each particle, and return to the step to calculate the fitness value of each particle according to the preset objective function.
[0143] In one embodiment of the present invention, in the node selection module 30, the objective function includes the average resource load balancing degree and the average execution time, and the objective function is specifically as follows:
[0144] minJ = [J1, J2]
[0145]
[0146]
[0147] The constraints of the objective function are as follows:
[0148] N C =N T N Type
[0149]
[0150] Where J1 represents the average load balancing degree of resources, and NV is the number of currently available distributed nodes. Let be the remaining computational resources for the i-th distributed node. Let J2 represent the remaining storage of the i-th distributed node, and J2 represent the average execution time. i Let N be the allocation scheme for the i-th distributed node; C N represents the total number of tasks that the edge cloud needs to process. T N represents the total number of tasks initiated by the distributed nodes. Type The number of subtasks that can be divided for each task; x ij These are decision variables.
[0151] In specific implementation, the working principle, control process and technical effects of the node selection device based on task collaboration provided in this embodiment of the invention are the same as those of the node selection method based on task collaboration in the above embodiments, and will not be repeated here.
[0152] This invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program and the computer program is configured to be executed by the processor, and the processor executes the computer program to implement the task-cooperative node selection method described in any of the above embodiments.
[0153] Please see Figure 6 , Figure 6This is a schematic diagram of a preferred embodiment of a terminal device provided by the present invention. The terminal device includes a processor 601, a memory 602, and a computer program stored in the memory 602 and configured to be executed by the processor 601. When the processor 601 executes the computer program, it implements the node selection method based on task collaboration described in any of the above embodiments.
[0154] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory 602 and executed by the processor 601 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
[0155] The processor 601 can be a central processing unit (CPU), or other general-purpose processors, 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, etc. The general-purpose processor can be a microprocessor, or the processor 601 can be any conventional processor. The processor 601 is the control center of the terminal device, connecting various parts of the terminal device through various interfaces and lines.
[0156] The memory 602 mainly includes a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc., while the data storage area can store related data, etc. Furthermore, the memory 602 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard drive, a smart media card (SMC), a secure digital card (SD), and a flash card, or it can be other volatile solid-state storage devices.
[0157] It should be noted that the aforementioned terminal devices may include, but are not limited to, processors and memory, as will be understood by those skilled in the art. Figure 6The structural diagram is merely an example of the terminal device described above and does not constitute a limitation on the terminal device described above. It may include more or fewer components than shown in the diagram, or combine certain components, or use different components.
[0158] This invention also provides a computer-readable storage medium storing a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the task-coordination-based node selection method described in any of the above embodiments.
[0159] The beneficial effects of the task-coordination-based node selection method, apparatus, device, and medium provided in this invention are as follows: By using service quality reliability, which includes time reliability, behavior reliability, and resource reliability, to measure the reliability of distributed cloud nodes, a comprehensive trust assessment of cloud nodes is achieved, improving the anti-attack capability of cloud nodes; by using a multi-objective particle swarm optimization algorithm with strong global search capability and fast convergence speed to establish a distributed cloud node selection model, the task coordination constraint problem in the distributed cloud node allocation process is solved, and a node selection scheme with optimal resource balance and shortest execution time is obtained, improving the security and efficiency of cloud node selection during task coordination allocation.
[0160] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0161] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A node selection method based on task collaboration, characterized in that, Includes the following steps: The process involves obtaining the distributed nodes performing the collaborative task and the execution parameters of the collaborative task, and calculating the time credibility, behavior credibility, and resource credibility of the distributed nodes. Specifically, this includes: obtaining the distributed nodes performing the collaborative task and the execution parameters of the collaborative task; calculating the time credibility based on the task's transmission time and execution time in the execution parameters; and calculating the behavior credibility based on the distributed node's initial direct trust assessment value, direct trust assessment time, time decay factor, number of recommenders for historical collaboration records, and initial trust level in the execution parameters. The resource reliability is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters. Based on the calculation results of the time credibility, the behavior credibility, and the resource credibility, distributed nodes whose time credibility, behavior credibility, and resource credibility are all greater than the corresponding thresholds are selected to obtain the first set of distributed nodes. The first set of distributed nodes and the set of collaborative tasks are input into a preset distributed cloud node selection model to obtain the distributed cloud node selection scheme output by the distributed cloud node selection model; wherein, the distributed cloud node selection model is trained using a multi-objective particle swarm optimization algorithm model.
2. The node selection method based on task collaboration as described in claim 1, characterized in that, The calculation of the time reliability based on the task's transmission time and execution time in the execution parameters is specifically as follows: The transmission time is calculated based on the size of the task and the worst-case bandwidth of the transmission task in the execution parameters. The execution time is calculated based on the number of CPU cycles required by the task and the number of CPU cycles of the candidate distributed nodes in the execution parameters. The time reliability is obtained by adding the transmission time and the execution time together.
3. The node selection method based on task collaboration as described in claim 1, characterized in that, The behavioral credibility is calculated based on the initial direct trust assessment value of the distributed node, the direct trust assessment time, the time decay factor, the number of recommenders in historical collaboration records, and the initial trust level in the execution parameters. Specifically: The direct trust level is calculated based on the initial direct trust assessment value of the distributed node, the direct trust assessment time, and the time decay factor in the execution parameters. The recommendation trust level is calculated based on the direct trust level and the number of recommenders in the historical collaboration records of the distributed nodes in the execution parameters. The credibility of the behavior is calculated based on the initial trust level of the distributed nodes, the direct trust level, and the recommended trust level in the execution parameters. The formula for calculating the direct trust level is as follows: ,in, This is the initial direct trust assessment value. The time decay factor, t represents the historical time point of the direct trust assessment, and t represents the current time point of the direct trust assessment. The formula for calculating the recommendation trust level is: ,in, Let A be the recommendation trust level of distributed node A towards candidate distributed node B in a type j collaborative task. Let be the direct trust level of distributed node A towards the recommended distributed node i. This refers to the number of recommenders of historical collaboration records that the distributed node A and the candidate distributed node B have on the j-type collaborative task. The number of historical collaboration records that the recommended distributed node i and the candidate distributed node B have on the j-type collaborative task within a specified evaluation period; The formula for calculating the credibility of the behavior is as follows: ,in, The credibility of the behavior of the distributed node A towards the candidate distributed node B. The weight for the candidate distributed node B when it is first added to the collaborative task. The initial trust level of the candidate distributed node B. The time decay factor, t represents the initial behavioral trust assessment time point, and t represents the current time point of the behavioral trust assessment. This represents the direct trust level of distributed node A towards candidate distributed node B. Let a and b be the recommendation trust of distributed node A for candidate distributed node B in the j-type collaborative task, and a and b be weight values that satisfy the following conditions: .
4. The node selection method based on task collaboration as described in claim 3, characterized in that, The resource reliability is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters, specifically as follows: The supply-demand matching degree is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters; wherein, the remaining resources include the remaining computing resources and the remaining storage resources; and the resource requirements include the computing requirements and the storage requirements. Based on the remaining computing power and the remaining storage power of the distributed nodes in the execution parameters, the resource balance is calculated. The resource reliability is obtained based on the supply-demand matching degree and the resource balance degree. The formula for calculating the supply-demand matching degree is as follows: ,in, This represents the remaining resources of the candidate distributed node B. Let J represent the resource requirements for task j. The formula for calculating the resource balance is: ,in, The remaining computational resources for the candidate distributed node B. The remaining storage amount for the candidate distributed node B.
5. The node selection method based on task collaboration as described in claim 1, characterized in that, The training method for the multi-objective particle swarm optimization algorithm model specifically includes the following steps: Obtain the collaborative task set of the distributed cloud nodes, and obtain the task set to be processed as a particle swarm based on the collaborative task set; obtain the first distributed node set, and use the distributed nodes in the first distributed node set as the selectable positions of the particles; Initialize the velocity and position of each particle in the particle swarm; The fitness value of each particle is calculated according to a preset objective function; The individual optimal position of each particle and the global optimal position of the particle swarm are updated based on the fitness value, and iterative training is performed. If the number of iterations reaches the preset number of iterations, the iteration ends, the global optimal position of the particle swarm is output, and the optimal combination of distributed cloud nodes is obtained. If the number of iterations does not reach the preset number of iterations, then update the velocity and position of each particle, and return to the step to calculate the fitness value of each particle according to the preset objective function.
6. The node selection method based on task collaboration as described in claim 5, characterized in that, The objective function includes the average load balancing of resources and the average execution time. Specifically, the objective function is as follows: The constraints of the objective function are as follows: Where J1 represents the average load balancing degree of resources, and NV is the number of currently available distributed nodes. Let be the remaining computational resources for the i-th distributed node. Let J2 represent the remaining storage of the i-th distributed node, and J2 represent the average execution time. i Let N be the allocation scheme for the i-th distributed node; C N represents the total number of tasks that the edge cloud needs to process. T This represents the total number of tasks initiated by the distributed nodes. The number of subtasks that can be divided for each task; x ij These are decision variables.
7. A node selection device based on task collaboration, characterized in that, include: The credibility calculation module is used to obtain the distributed nodes performing the collaborative task and the execution parameters of the collaborative task, and to calculate the time credibility, behavior credibility, and resource credibility of the distributed nodes. Specifically, it obtains the distributed nodes performing the collaborative task and the execution parameters of the collaborative task; calculates the time credibility based on the transmission time and execution time of the task in the execution parameters; and calculates the behavior credibility based on the initial direct trust assessment value, direct trust assessment time, time decay factor, number of recommenders of historical collaboration records, and initial trust level of the distributed nodes in the execution parameters. The resource reliability is calculated based on the remaining resources of the distributed nodes and the resource requirements of the task in the execution parameters. The trust assessment module is used to filter out distributed nodes whose time credibility, behavior credibility, and resource credibility are all greater than the corresponding thresholds based on the calculation results of the time credibility, behavior credibility, and resource credibility, and obtain a first set of distributed nodes. The node selection module is used to input the first distributed node set and the collaborative task set into a preset distributed cloud node selection model to obtain the distributed cloud node selection scheme output by the distributed cloud node selection model; wherein, the distributed cloud node selection model is trained using a multi-objective particle swarm optimization algorithm model.
8. An electronic device, characterized in that, The device includes a processor and a memory, wherein the memory stores a computer program and the computer program is configured to be executed by the processor, wherein the processor, when executing the computer program, implements the task-cooperative node selection method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the node selection method based on task collaboration as described in any one of claims 1 to 6.
