Task processing method and apparatus, and device, storage medium and program product
By performing multiple task allocation processes between the target cluster and the collaborative cluster, and using the encrypted public key and the total task volume to determine the task processing volume of each cluster, the problem of resource waste in enterprise computing clusters when the business volume is low is solved, and the efficient utilization of computing resources is achieved.
Patent Information
- Application Number
- PCT/IB2025/053170
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-07
- Filing Date
- 2025-03-26
- Publication Date
- 2025-11-13
AI Technical Summary
When business volume is low, enterprise computing clusters may have idle computing devices that are still running, resulting in a waste of computing resources and electricity.
By performing multiple task allocation processes between the target cluster and the collaborative cluster, and using the encrypted public key and the total task volume for collaborative processing, the task processing volume of each cluster is determined, making full use of the idle resources of the collaborative cluster.
It improved the utilization rate of computing resources, reduced the waste of computing resources and electricity, and reduced resource waste.
Smart Images

Figure IB2025053170_13112025_PF_FP_ABST
Abstract
Description
[0001] This disclosure claims priority to Chinese Patent Application No. 202410551381.6, filed on May 7, 2024, entitled "Task Processing Method, Apparatus, Device, Storage Medium, and Program Product," the entire contents of which are incorporated herein by reference. Technical Field This disclosure relates to the field of computers, and more particularly to a task processing method, apparatus, device, storage medium, and program product. Background Art Enterprises can establish computing clusters, which may include multiple computing devices to provide computing resources. In practice, the workload of any given enterprise varies at different times. Enterprises need to deploy the number of computing devices in the computing cluster according to the peak workload to provide sufficient computing resources. Enterprises can use computing clusters to process their business. However, when a company's business volume is low, computing devices in the computing cluster may be idle, yet still running and consuming electricity, resulting in wasted computing resources and energy. This invention discloses a task processing method, apparatus, device, storage medium, and program product to reduce resource waste. In a first aspect, embodiments of this disclosure provide a task processing method applied to a target cluster. The method includes: obtaining a task processing request, the task processing request being used to request the determination of a target task; sending an encrypted public key to at least one collaborative cluster based on the task processing request; and performing multiple task allocation processes with the at least one collaborative cluster based on the encrypted public key and the total task volume of the target task, obtaining the target task processing volume for the target cluster and each collaborative cluster, wherein the target cluster and the at least one collaborative cluster are used to collaboratively process the target task, and the target cluster and the at least one collaborative cluster belong to different entities. In one possible implementation, based on the encrypted public key and the total task volume of the target task, multiple task allocation processes are performed with the at least one collaborative cluster to obtain the target task volume of the target cluster and each collaborative cluster. This includes: performing the k-th task allocation process with the at least one collaborative cluster based on the encrypted public key to obtain the total k-th task allocation; wherein, k successively takes the values 1, 2, ..., until the convergence of the k-th task allocation process is determined based on the total task volume and the total k-th task allocation; and determining the target task volume of the target cluster and each collaborative cluster based on the k-th task allocation process, where K is an integer greater than 1.In one possible implementation, based on the encrypted public key, a k-th task allocation process is performed with the at least one collaborative cluster to obtain the total k-th task allocation, including: determining the target capacity of the target cluster; encrypting the target capacity using the encrypted public key to obtain target acceptance ciphertext, and sending the target acceptance ciphertext to the first collaborative cluster; receiving the total acceptance ciphertext sent by the Q-th collaborative cluster, wherein the total acceptance ciphertext is the sum of the target acceptance ciphertext and the acceptance ciphertext generated by each collaborative cluster, where Q is the number of the at least one collaborative cluster, and Q is an integer greater than or equal to 1; and decrypting the total acceptance ciphertext to obtain the total k-th task allocation. In one possible implementation, determining the target capacity of the target cluster includes: if k is 1, performing capacity prediction processing on the target cluster to obtain the target capacity; if k is greater than 1, obtaining the historical capacity of the target cluster during the (k-1)th task allocation process and the (k-1)th difference information corresponding to the (k-1)th task allocation process, and performing capacity prediction processing on the target cluster based on the historical capacity and the (k-1)th difference information to obtain the target capacity; wherein the difference information is used to indicate the difference between the expected task capacity and the actual task capacity of a single cluster. In one possible implementation, the q-th cooperative cluster is further configured to: determine the q-th acceptance quantity of the q-th cooperative cluster, the q-th acceptance quantity including the task acceptance quantity of the q-th cooperative cluster at multiple future moments; encrypt the q-th acceptance quantity using the encryption public key to obtain the q-th acceptance ciphertext; determine the sum of ciphertexts from the target acceptance ciphertext to the q-th acceptance ciphertext as the sum of q+1 acceptance ciphertexts; if q is less than Q, send the sum of q+1 acceptance ciphertexts to the q+1 cooperative cluster; if q is equal to Q, send the sum of Q+1 acceptance ciphertexts to the target cluster, the sum of Q+1 acceptance ciphertexts being the total acceptance ciphertext.In one possible implementation, when the Kth task allocation process converges based on the total task volume and the total Kth task allocation amount, the target task processing volume of the target cluster and each collaborative cluster is determined based on the Kth task allocation process. This includes: determining whether the Kth task allocation process has converged based on the total task volume and the total Kth task allocation amount; when the Kth task allocation process has converged, determining the target capacity determined by the target cluster during the Kth task allocation process as the target task processing volume of the target cluster, and determining the capacity determined by the collaborative cluster during the Kth task allocation process as the target task processing volume of the collaborative cluster. In one possible implementation, determining whether the Kth task allocation process has converged based on the total task volume and the total Kth task allocation includes: determining the Kth difference information corresponding to the Kth task allocation process based on the total task volume and the total Kth task allocation; obtaining the (K-1)th difference information and the (K-1)th task allocation volume corresponding to the (K-1)th task allocation process; if the difference between the total Kth task allocation volume and the (K-1)th task allocation volume is less than or equal to an allocation threshold, and / or, the difference between the Kth difference information and the (K-1)th difference information is less than or equal to a difference threshold, then determining that the Kth task allocation process has converged. In one possible implementation, for any collaborative cluster, the method further includes: determining a first task processing cost when the target cluster and the at least one collaborative cluster participate in processing the target task; determining a second task processing cost when the collaborative cluster does not participate in processing the target task; and determining the reward value for the collaborative cluster to collaboratively process the target task based on the second task processing cost and the first task processing cost. In one possible implementation, determining the return value of the collaborative cluster in collaboratively processing the target task based on the second task processing cost and the first task processing cost includes: determining the processing cost when the collaborative cluster participates in processing the target task; determining the cost difference between the first task processing cost and the processing cost; and determining the second task processing cost and the cost difference as the return value of the collaborative cluster in collaboratively processing the target task.Secondly, this disclosure provides a task processing apparatus applied to a target cluster. The apparatus includes an acquisition module, a sending module, and a processing module. The acquisition module is used to acquire a task processing request, which requests the determination of a target task. The sending module is used to send an encrypted public key to at least one collaborative cluster based on the task processing request. The processing module is used to perform multiple task allocation processes with the at least one collaborative cluster based on the encrypted public key and the total task volume of the target task, to obtain the target task processing volume for the target cluster and each collaborative cluster. The target cluster and the at least one collaborative cluster are used to collaboratively process the target task, and the target cluster and the at least one collaborative cluster belong to different entities. In one possible implementation, the processing module is specifically used to: perform the k-th task allocation process with the at least one collaborative cluster based on the encrypted public key, to obtain the total k-th task allocation; wherein, k successively takes the values 1, 2, ..., until it is determined that the k-th task allocation process converges based on the total task volume and the total k-th task allocation; and determine the target task processing volume of the target cluster and each collaborative cluster based on the k-th task allocation process, where K is an integer greater than 1. In another possible implementation, the processing module is specifically used to: determine the target capacity of the target cluster; encrypt the target capacity using the encrypted public key to obtain target ciphertext, and send the target ciphertext to the first collaborative cluster; receive the total ciphertext sent by the Q-th collaborative cluster, where the total ciphertext is the sum of the target ciphertext and the ciphertext generated by each collaborative cluster, where Q is the number of the at least one collaborative cluster, and Q is an integer greater than or equal to 1; and decrypt the total ciphertext to obtain the total k-th task allocation. In one possible implementation, the processing module is specifically used to: if k is 1, perform a task capacity prediction process on the target cluster to obtain the target task capacity; if k is greater than 1, obtain the historical task capacity of the target cluster during the (k-1)th task allocation process, and the (k-1)th difference information corresponding to the (k-1)th task allocation process, and perform a task capacity prediction process on the target cluster based on the historical task capacity and the (k-1)th difference information to obtain the target task capacity; wherein, the difference information is used to indicate the difference between the task capacity that a single cluster should undertake and the actual task capacity.In one possible implementation, the q-th cooperative cluster is further configured to: determine the q-th acceptance quantity of the q-th cooperative cluster, the q-th acceptance quantity including the task acceptance quantity of the q-th cooperative cluster at multiple future moments; encrypt the q-th acceptance quantity using the encryption public key to obtain the q-th acceptance ciphertext; determine the sum of ciphertexts from the target acceptance ciphertext to the q-th acceptance ciphertext as the sum of q+1 acceptance ciphertexts; if q is less than Q, send the sum of q+1 acceptance ciphertexts to the q+1 cooperative cluster; if q is equal to Q, send the sum of Q+1 acceptance ciphertexts to the target cluster, the sum of Q+1 acceptance ciphertexts being the total acceptance ciphertext. In one possible implementation, the processing module is specifically configured to: determine whether the Kth task allocation process has converged based on the total task volume and the total Kth task allocation; when the convergence of the Kth task allocation process is determined, the target capacity determined by the target cluster in the Kth task allocation process is determined as the target task processing volume of the target cluster, and the capacity determined by the collaborative cluster in the Kth task allocation process is determined as the target task processing volume of the collaborative cluster. In another possible implementation, the processing module is specifically configured to: determine the Kth difference information corresponding to the Kth task allocation process based on the total task volume and the total Kth task allocation; obtain the K-1 difference information and the K-1th task allocation volume corresponding to the (K-1)th task allocation process; if the difference between the total Kth task allocation volume and the K-1th task allocation volume is less than or equal to the allocation threshold, and / or, the difference between the Kth difference information and the K-1th difference information is less than or equal to the difference threshold, then the convergence of the Kth task allocation process is determined. Thirdly, embodiments of this disclosure provide another task processing apparatus applied to a collaborative cluster. The apparatus includes: a first determining module, a second determining module, and a third determining module. The first determining module is used to determine a first task processing cost when the target cluster and the at least one collaborative cluster participate in processing the target task. The second determining module is used to determine a second task processing cost when the collaborative cluster does not participate in processing the target task. The third determining module is used to determine the reward value for the collaborative cluster to collaboratively process the target task based on the second task processing cost and the first task processing cost.In one possible implementation, the third determining module is specifically used to: determine the processing cost when the collaborative cluster participates in processing the target task; determine the cost difference between the processing cost of the first task and the processing cost; and determine the cost difference between the processing cost of the second task and the processing cost as the return value of the collaborative cluster collaboratively processing the target task. In a fourth aspect, embodiments of this disclosure provide an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the method described in any one of the first aspects. In a fifth aspect, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in any one of the first aspects. In a sixth aspect, embodiments of this disclosure provide a computer program product, including a computer program, which, when executed by a processor, implements the method shown in any one of the first aspects. This disclosure provides a task processing method, apparatus, device, storage medium, and program product. A target cluster can obtain a task processing request and, based on the request, send an encrypted public key to at least one collaborative cluster. Then, based on the encrypted public key and the total task volume of the target task, it can perform multiple task allocation processes with at least one collaborative cluster to obtain the target task processing volume for both the target cluster and each collaborative cluster. In this technical solution, since the target cluster and at least one collaborative cluster belong to different entities, they can iteratively perform multiple task allocation processes to obtain the target task processing volume for each cluster. This allows the target cluster and at least one collaborative cluster to collaboratively process the target task, fully utilizing the idle computing resources of at least one collaborative cluster, improving computing resource utilization, and reducing the waste of computing resources and electrical energy, thus reducing resource waste. The accompanying drawings, which are included to provide a further understanding of this disclosure and constitute a part of this disclosure, illustrate exemplary embodiments of this disclosure and are used to explain this disclosure, but do not constitute an improper limitation of this disclosure.In the accompanying drawings: Figure 1 is a schematic diagram of a scenario provided by an exemplary embodiment of the present disclosure; Figure 2 is a flowchart of a task processing method provided by an exemplary embodiment of the present disclosure; Figure 3 is a flowchart of another task processing method provided by an exemplary embodiment of the present disclosure; Figure 4 is a process diagram of a task processing method provided by an exemplary embodiment of the present disclosure; Figure 5 is a flowchart of a method for determining a reward value by a collaborative cluster provided by an exemplary embodiment of the present disclosure; Figure 6 is a process diagram of determining a reward value by a collaborative cluster provided by an exemplary embodiment of the present disclosure; Figure 7 is a structural schematic diagram of a task processing device provided by an embodiment of the present disclosure; Figure 8 is a structural schematic diagram of another task processing device provided by an embodiment of the present disclosure; Figure 9 is a structural schematic diagram of an electronic device provided by an exemplary embodiment of the present disclosure. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with relevant laws, regulations, and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse. To make the objectives, technical solutions, and advantages of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure. Figure 1 is a schematic diagram of a scenario provided by an exemplary embodiment of this disclosure. Referring to Figure 1, the collaborative framework may include a target cluster and at least one collaborative cluster. The at least one collaborative cluster may be collaborative cluster 1, collaborative cluster 2, ..., collaborative cluster Q, where Q is an integer greater than or equal to 1. The target cluster and the at least one collaborative cluster belong to different entities, such as enterprises or institutions. For example, the target cluster may belong to a target entity, collaborative cluster 1 may belong to entity 1, collaborative cluster 2 may belong to entity 2, ..., collaborative cluster Q may belong to entity Q. When a target task exists, the target cluster and the at least one collaborative cluster can collaboratively process the target task. In practice, the workload of any given enterprise varies at different times. Enterprises need to deploy the number of computing devices in their computing clusters according to the peak workload to provide sufficient computing resources. Each enterprise can then use the computing clusters to process its business.However, when a company's business volume is low, the computing devices in the computing cluster may be idle, but they are still running and consuming electricity, wasting some computing resources and electricity, resulting in significant resource waste. In the embodiments of this disclosure, the target cluster and at least one collaborative cluster belong to different entities. The target cluster and at least one collaborative cluster can collaboratively process the target task, making full use of the idle computing resources of at least one collaborative cluster, improving the utilization rate of computing resources, reducing the waste of computing resources and electricity, and thus reducing resource waste. The technical solutions shown in this disclosure will be described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other. For the same or similar content, the description will not be repeated in different embodiments. Figure 2 is a flowchart illustrating a task processing method provided by an exemplary embodiment of this disclosure. Referring to Figure 2, the method may include:
[0002] S201. Obtain a task processing request. The execution entity in this embodiment can be a target cluster, a target device located within the target cluster, or a task processing device located within the target device. The task processing device can be implemented in software or a combination of software and hardware. The task processing device can be a processor in the target device. For ease of understanding, the following description uses a target cluster as the execution entity. A target cluster refers to the computing cluster of the target entity. A target cluster can include multiple sub-clusters. Each sub-cluster can include multiple computing devices. Any computing device can include multiple computing units. Optionally, a computing unit can be at least one of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), or a Tensor Processing Unit (TPU). The task processing request can be used to request the determination of a target task. The target task can include multiple tasks at future times within a preset duration. The target cluster can acquire task processing requests and predict the target tasks of the target entity within a preset time period based on these requests; that is, tasks at multiple future moments within the preset time period. Optionally, the preset time period can be represented by T, and the future moments can be represented by t, where T is a value greater than or equal to 0, and t can take the values 1, 2, ..., T. For example, the preset time period can be 24 hours, including 24 future moments, namely future moment 1, future moment 2, ..., future moment 24, then T equals 24, and t can take the values 1, 2, ..., 24. O The total workload of the target task can be represented by W. Since the target task can include tasks at multiple future moments within a preset time period, the total workload of the target task can include the workload of the target task at multiple future moments within the preset time period. If the workload of the target task at any future moment t can be represented as , then the total workload W of the target task can be represented as the following matrix:
[0003] W = [W1.W2.W3, ... Wt, ... WT] Optionally, the target cluster may include task allocation devices. For any future time t, assume that the time when each task j arrives at the task allocation device is t. J The occupancy rate of the computing unit of the task allocation device can be expressed as Vj; for any task j, the corresponding delay time can be expressed as...
[0004] If it is "D", then the task volume queue of the target task at the future time t can be expressed by the following formula (1): The nth task volume = f(n), n ∈ T. Formula (1) It should be noted that the unit of the task volume can be determined according to the specific situation of the target task in the actual work scenario, and the unit of the task volume is not limited in this disclosure. For example, the target cluster can obtain a task processing request 1, and predict the target task of the target cluster within a preset duration according to the task processing request 1. If the current time is 10:00 on April 10, 2024, and the preset duration T is 24 hours between 0:00 and 23:59 on April 11, 2024, if there are 24 future times, which are 0:00, 1:00, 2:00,..., 23:00 on April 11, 2024 respectively, then the total task volume of the target task can include 24 task volumes of the target task at these 24 future times. Suppose the total task volume of the target task can be expressed as W = [905, 868, 991,..., 1249].
[0005] S202. According to the task processing request, send the encryption public key to at least one collaborative cluster. The target cluster and the at least one collaborative cluster belong to different entities, and the entity can be an enterprise or an institution, etc. The number of the at least one collaborative cluster can be Q, and Q is an integer greater than or equal to 1. For any one collaborative cluster, the collaborative cluster refers to the computing cluster of the corresponding entity. The collaborative cluster can include multiple sub-clusters. Each sub-cluster can include multiple computing devices. Any one computing device can include multiple computing units. Optionally, the computing unit can be at least one of the following: CPU, GPU, TPU. The encryption public key can be used to encrypt data. In this disclosure, a homomorphic encryption algorithm can be used, and the data can be encrypted according to the encryption public key. The target cluster can determine the encryption public key according to the task processing request, and send the encryption public key to at least one collaborative cluster. Optionally, the encryption public key determined by the target cluster can be expressed as public key E0. For example, if Q is 4, that is, there are 4 collaborative clusters, which are Cluster 1, Cluster 2, Cluster 3, and Cluster 4 respectively, then the target cluster can determine the encryption public key as public key E0 according to the task processing request. o , then the target cluster can send public key E0 to these 4 collaborative clusters respectively.
[0006] S203. Based on the encrypted public key and the total workload of the target task, perform multiple task allocation processes with at least one cooperative cluster to obtain the target cluster and the target task processing capacity of each cooperative cluster. The target cluster and at least one cooperative cluster can be used to collaboratively process the target task; that is, both the target cluster and at least one cooperative cluster can handle a portion of the target task to complete the processing of the target task. Since the target cluster and at least one cooperative cluster need to collaboratively process the target task, the target cluster can perform multiple task allocation processes with at least one cooperative cluster based on the encrypted public key and the total workload of the target task to determine the target cluster and the target task processing capacity of each cooperative cluster. In an optional embodiment, the target task processing volume of the target cluster and each collaborative cluster can be obtained by performing multiple task allocation processes with at least one collaborative cluster based on the encrypted public key and the total task volume of the target task: Based on the encrypted public key, perform the k-th task allocation process with at least one collaborative cluster to obtain the total k-th task allocation volume; where k successively takes the values 1, 2, ..., until the convergence of the k-th task allocation process is determined based on the total task volume and the total k-th task allocation volume. Then, the target task processing volume of the target cluster and each collaborative cluster is determined based on the k-th task allocation process, where K is an integer greater than 1. The total k-th task allocation volume refers to the total task allocation volume of the target cluster and at least one collaborative cluster in the k-th task allocation process. Since the total task volume of the target task includes the task volume of multiple future moments within a preset time period, the corresponding total k-th task allocation volume includes the task allocation volume of the target cluster and at least one collaborative cluster at multiple future moments within the preset time period. The total k-th task allocation volume can be represented by W*. The k-th task allocation volume at any future time t can be expressed as... w,k The total allocation W* for the k-th task can be represented as the following matrix:
[0007] W fc =Network, M, w£ W& ..., w|] At any future time t, the allocation amount of the k-th task w<k The amount of work w for the target task t It must satisfy the following formula (2):
[0008] W t k = W l:Formula (2) For example, if the total task quantity of the target task is W = [905, 868, 991, …, 1249], and the encryption public key is public key E, and there are 4 collaborative clusters, then the target cluster can perform multiple task allocation processes with the 4 collaborative clusters based on public key E and the total task quantity W. If there are 24 future times, namely 0:00, 1:00, 2:00, 23:00 on 2024 / 4 / 11, assuming that after the 3rd task allocation process, the total task allocation W of the target cluster and the 4 collaborative clusters can be obtained. 3 = [905, 868, 991, …, 1249], then the total number of tasks allocated for the third task can include 24 task allocations. The target cluster can determine whether the Kth task allocation process has converged based on the total number of tasks and the total number of tasks allocated for the Kth task. If converged, the target cluster can determine the target task processing volume for the target cluster and each cooperative cluster based on the Kth task allocation process. For the target cluster or each cooperative cluster, the target task processing volume can include the task processing volume at multiple future times within a preset duration. Since there is 1 target cluster and Q cooperative clusters, there are a total of Q+1 clusters. Optionally, any cluster can be represented as cluster q, where q can take values of 0, 1, …, Qo. When q is 0, cluster 0 represents the target cluster; when q is 1, 2, …, Qo, clusters 1, 2, …, and cluster q are all cooperative clusters. For any cluster q, the target task processing volume of cluster q can be represented as W. qo Since the target task processing volume can include the task processing volume at multiple future moments within a preset duration, the task processing volume of the target cluster or each collaborative cluster at any future moment t can be expressed as W. q , t Then the target task processing capacity Wq of cluster q can be represented by the following matrix:
[0009] W q = [ W q , b W q , 2) VU …, W q , t) …, W q , TAt any future time t, the task processing volume of the target cluster and each collaborative cluster, and the total task volume of the target task, must satisfy the following formula (3): % = Formula (3) Formula (3) means that at future time t, the task processing volume of the target cluster plus the task processing volume of each collaborative cluster is equal to the task volume of the target task at future time t. For example, if there are 24 future times, namely 0:00, 1:00, 2:00, 23:00 on 2024 / 4 / 11, if the total task volume of the target task W = [905, 868, 991, …, 1249], and if the total task allocation of the target cluster and the 4 collaborative clusters is W 3 = [905, 868, 991, …, 1249], where the four collaborative clusters are cluster 1, cluster 2, cluster 3, and cluster 4. The target cluster can determine whether the third task allocation process has converged based on the total task volume W and the total allocation amount W' for the third task. Assuming the third task allocation process has converged, the target cluster can determine the target task processing volume for both the target cluster and each collaborative cluster based on the third task allocation process. For example, the target task processing volume for the target cluster can be determined as W based on the third task allocation process. o= [1 O5, 122, 101 , -, 80] : Determine the target task processing volume W of cluster 1 [180, 310, 290, -, 300] : The target task processing volume W2 of cluster 2 = [110, 126, 300, •••, 269]; The target task processing volume W3 of cluster 3 = [320, 200, 210, …, 430]; The target task processing volume of cluster 4 can be expressed as W4 = [190, 110, 90, …, 170]. At any future time, the sum of the target task processing volumes of the target cluster and the four cooperating clusters is equal to the task volume of the target task at that future time. For example, at a future time 2024 / 4 / 11 0:00, the total task volume of the target task at this future time 1 is 905. The target task processing volumes of the target cluster, cluster 1, cluster 2, cluster 3, and cluster 4 at this future time 1 are 105, 180, 110, 320, and 190 respectively. Therefore, at future time 1, the sum of the target task processing volumes of these five clusters is 105 + 180 + 110 + 320 + 190 = 905, which is equal to the target task volume of 905 at this future time 1. In this embodiment of the disclosure, the target cluster can obtain a task processing request and, based on the task processing request, send an encrypted public key to at least one cooperative cluster. Then, based on the encrypted public key and the total task volume of the target task, it can perform multiple task allocation processes with at least one cooperative cluster to obtain the target task processing volume of the target cluster and each cooperative cluster. In the technical solution of this disclosure, since the target cluster and at least one collaborative cluster belong to different entities, the target cluster and at least one collaborative cluster can iteratively perform multiple task allocation processes to obtain the target task processing volume of each cluster. This allows the target cluster and at least one collaborative cluster to collaboratively process the target task, fully utilizing the idle computing resources of at least one collaborative cluster, improving computing resource utilization, and reducing the waste of computing resources and electricity, thus reducing resource waste. Below, based on the embodiment shown in Figure 2, and in conjunction with Figure 3, the above task processing method will be described in detail. Figure 3 is a flowchart illustrating another task processing method provided by an exemplary embodiment of this disclosure. Referring to Figure 3, the method may include:
[0010] 5301. Obtain task processing request.
[0011] 5302. Send the encryption public key to at least one collaborative cluster according to the task processing request. It should be noted that the specific execution process of steps S301 to S302 can be referred to steps S201 to S202, and will not be elaborated here. 5303. Initialize k to 1 O The target cluster can initialize k to 1, indicating that it starts to execute from the first task allocation and processing.
[0012] 5304. In the kth task allocation and processing, determine the target acceptance volume of the target cluster. In an optional embodiment, the target acceptance volume of the target cluster can be determined in the following way: If k is 1, perform acceptance volume prediction processing on the target cluster to obtain the target acceptance volume; if k is greater than 1, obtain the historical acceptance volume of the target cluster during the (k - 1)th task allocation and processing, and the (k - 1)th difference information corresponding to the (k - 1)th task allocation and processing, and perform acceptance volume prediction processing on the target cluster based on the historical acceptance volume and the (k - 1)th difference information to obtain the target acceptance volume. The target acceptance volume refers to the amount of tasks that the target cluster can accept, that is, the amount of tasks that the target entity to which the target cluster belongs can accept. The target acceptance volume can include the task acceptance volumes of the target cluster at multiple future moments within a preset time period. Since there are Q + 1 clusters (i.e., 1 target cluster and Q collaborative clusters), and any one of the clusters can be represented as cluster q, therefore, for any one cluster q, the task acceptance volume of cluster q in the kth task allocation and processing can be expressed as W_q; at any future moment t, the acceptance volume of cluster q in the kth task allocation and processing can be expressed as w_q^t, then W_q can be expressed as the following matrix:
[0013] W_q^t = [W_q^1, W_q^2, W_q^3 …, W_q^t …, W_q^T] When q takes 0, cluster 0 represents the target cluster, then the target acceptance volume of the target cluster can be expressed as W_0^t
[0014] W孝 = [W租, W^2, W肱 …, W鑫,…, W&、] For any cluster q, if cluster q contains ni sub - clusters and each computing device in each sub - cluster has the same configuration (i.e., the number and model of computing units in each computing device are the same), then at any future moment t, the amount of tasks that can be processed by any sub - cluster can be expressed as d", and d" is limited by the available computing resources in the sub - cluster. For any sub - cluster, assuming that at any future moment t, the resource utilization rate of this sub - cluster is U", is the number of computing devices in this sub - cluster, and Num" is the number of computing units in each computing device, then the amount of tasks that can be processed by this sub - cluster at future moment t can be calculated by formula (4): di,t = Ui,tTTh*NumCu, 0 < u i t < l, VteT Formula (4) Since cluster q contains ni sub - clusters and the amount of tasks that can be processed by sub - cluster i at future moment t is d", then at any future moment t, the承接量时晶 (the amount of tasks received) of cluster q in the k - th task assignment process is equal to the sum of the amounts of tasks that can be processed by ni sub - clusters, which can be expressed by the following formula (5): When q = 0, the target cluster contains No sub - clusters, and the target承接量 WM = &炒。稣。 Optionally, the target task can be a delay - tolerant computing task. For any future moment t, the amount of blocked tasks of cluster q can be represented by Jqt, and Jqt can be calculated by the following formula (6) and needs to satisfy the constraint of the following formula (7): VteT Formula (7) where, Jqz represents the amount of blocked tasks at future moment t - 1; £旗虑 7 represents cluster q at future moment t - 1 For example, the blood can be adjusted manually. Optionally, determining the target acceptance volume of the target cluster may include the following two cases: Case 11: k is 1. In this case, the target cluster can perform acceptance volume prediction processing on the target cluster to obtain the target acceptance volume. In an optional embodiment, when k is equal to 1, the target cluster can determine the number No of sub-clusters included in the target cluster; determine the amount of tasks d" that each sub-cluster can process at multiple future times within a preset time period; and determine the acceptance volume *磴 i of the target cluster at multiple future times through formula (4), and obtain the target acceptance volume W / ' of the target cluster. Optionally, for any sub-cluster, the amount of tasks d耻 that the sub-cluster can process at multiple future times within a preset time period can be predicted based on the historical processing volume of the sub-cluster at multiple historical times. For example, if N。 is 3, that is, the target cluster includes 3 sub-clusters, and if there are 24 future times, which are 0:00, 1:00, 2:00,, 23:00 on April 11, 2024; when k is equal to 1, assume that the target cluster can predict the amount of tasks d" that the 3 sub-clusters can process at these 24 future times as shown in Table 1: Table 1 Then, the amount of tasks d" of each sub-cluster at 24 future times in Table 1 can be substituted into formula (5) to determine the acceptance volume w;L of the target cluster at multiple future times, and further obtain the target acceptance volume of the target cluster as
[0015] W* = [111, 117 / 102,, 82] Case 12: k is greater than 1. In this case, the target cluster can obtain the historical承接量 (the amount of tasks received in the (k - 1)-th task allocation process) of the target cluster and the (k - 1)-th difference information corresponding to the (k - 1)-th task allocation process, and perform a承接量 prediction process on the target cluster based on the historical承接量 and the (k - 1)-th difference information to obtain the target承接量. Optionally, the target cluster can use a distributed optimization algorithm to perform a承接量 prediction process on the target cluster based on the historical承接量 and the (k - 1)-th difference information to obtain the target承接量. Optionally, the distributed optimization algorithm can be the Alternating Direction Method of Multipliers (ADMM). The historical承接量 refers to the (k - 1)-th承接量 of the target cluster in the (k - 1)-th task allocation process. Since for any cluster q, the承接量 of cluster q in the k-th task allocation process can be expressed as W:, the (k - 1)-th承接量 of cluster q in the (k - 1)-th task allocation process can be expressed as腿 I. The difference information can be used to indicate the difference between the amount of tasks that a single cluster should receive and the actual amount of tasks received. Optionally, the difference information can include the first difference information and the second difference information. The first difference information and the second difference information can be global variables. Optionally, the first difference information can be the dual variable y in the ADMM algorithm, which can include sub-dual variables corresponding to multiple future time points within a preset time period. The first difference information corresponding to the (k - 1)-th task allocation process can be expressed as y k- It can be expressed as the following matrix: y k " ' = [伸 f语一 y*七 …, y¥, yi'' 5 In the present disclosure, for any cluster q, cluster q can use a distributed optimization algorithm to determine the承接量 W# in the k-th task allocation process based on the historical承接量 wf of cluster q in the (k - 1)-th task allocation process and the (k - 1)-th difference information. Optionally, cluster q can determine W? through the following formula (8):
[0016] It should be noted that there are some terms like "承接量" in the original text which seem to be specific to the context and might need to be further defined or refined for a more accurate translation. Also, the text contains some notations like "伸 f语一 y*七 …" which are not clear and might be incorrect in the original.W# = argmin(kJW) + |kJW - " + this)||:} Formula (8) Where, FJW) represents the cost corresponding to the amount of task assigned to cluster q in task allocation and processing; p is the penalty parameter, which can be manually adjusted; represents the second difference information corresponding to the (k-1)th task allocation and processing; " | | lb" represents the L2 norm operation. When q is 0, cluster 0 represents the target set q = argmin For example, when k=2, if the target cluster's capacity in the first task allocation process...
[0017] WJ = [111,117,102, -,82] If the second difference information h corresponding to the first task allocation process is... 1 = [1. 2, 0. 9,
[0018] 1. 7, -, 0. 5] , then in the second task allocation process, the target cluster can predict the target acceptance volume in the second task allocation process based on the historical acceptance volume W slices and the second difference information h', through formula (8). Assuming , 120, 100, - ,90].
[0019] S305. Encrypt the target acceptance quantity using the public key to obtain the target acceptance ciphertext, and send the target acceptance ciphertext to the first collaborative cluster. In the k-th task allocation process, after the target cluster determines the target acceptance quantity, it can encrypt the target acceptance quantity using the public key to obtain the target acceptance ciphertext, and send the target acceptance ciphertext to the first collaborative cluster. Optionally, the target acceptance ciphertext can be represented as E°(W). The target acceptance ciphertext can be in matrix form. For example, if k is 1, E. The target cluster can encrypt the target data using the public key E. to obtain the target data ciphertext W(W). If there are 4 cooperating clusters, with the first cooperating cluster being cluster 1, the target cluster can send the target data ciphertext to cluster 1. Since there is one target cluster and Q cooperative clusters, for any task allocation process, each cluster needs to determine its workload in that task allocation process. Therefore, among the Q cooperative clusters, the q-th cooperative cluster (i.e., cluster q, q ≠ 0) can also be used to: determine the q-th workload of the q-th cooperative cluster; encrypt the q-th workload using the public key to obtain the q-th workload ciphertext; determine the sum of the ciphertexts from the target workload ciphertext to the q-th workload ciphertext as the sum of q+1 workload ciphertexts; if q is less than Q, send the sum of q+1 workload ciphertexts to the q+1 cooperative cluster; if q equals Q, send the sum of Q+1 workload ciphertexts to the target cluster. The sum of Q+1 workload ciphertexts is the total workload ciphertext. The q-th workload can include the task workload of the q-th cooperative cluster at multiple future times. In the k-th task allocation process, the q-th capacity of the q-th collaborative cluster (i.e., cluster q, q ∈ 0) can be represented as the private... Optionally, the determination of the q-th collaborative cluster's q-th capacity can include the following two cases: Case 21: k is 1. In this case, the q-th collaborative cluster can perform capacity prediction processing on itself to obtain the q-th capacity. For example, if q=1 and k=1, then in the first task allocation process, the first collaborative cluster (i.e., cluster 1) can perform capacity prediction processing to obtain the first capacity in the first task allocation process, assuming W / = [124,105,95, --,135]. Case 22: k is greater than 1. In this case, the q-th collaborative cluster can obtain the historical capacity of itself in the (k-1)-th task allocation process and the (k-1)-th difference information corresponding to the (k-1)-th task allocation process, and perform capacity prediction processing on itself based on the historical capacity and the (k-1)-th difference information to obtain the q-th capacity. For example, if q=1, if k=2, and if the first collaborative cluster (i.e., cluster 1) has a first load capacity of W? = [124, 105, 95, -, 135] in the first task allocation process. ? If the second difference information h corresponds to the [ ]th task allocation process 1If the given values are [1. 2, 0. 9, 1. 7, -, 0. 5], then in the second task allocation process, the first collaborative cluster can be configured based on historical data. The target acceptance quantity W in the process is: , assuming the first acceptance quantity in the second task allocation process can be Wf = [115, 108, 105, -, 126]. It should be noted that the specific execution process of case 21 can be referred to case 11 in step S302, and the specific execution process of case 22 can be referred to case 12 in step S302, which will not be repeated here. Since the target cluster has sent the encryption public key to at least one cooperative cluster, the q-th cooperative cluster has the encryption public key, which can be used to encrypt the q-th acceptance quantity to obtain the q-th acceptance ciphertext. The q-th cooperative cluster can determine the sum of the ciphertexts from the target acceptance ciphertext to the q-th acceptance ciphertext as the sum of q+1 acceptance ciphertexts. Optionally, the q-th acceptance ciphertext can be in matrix form; the sum of q+1 acceptance ciphertexts can be in matrix form. In the k-th task allocation process, the sum of q+1 received ciphertexts can be represented as EO(WQ) + E0(W*). 5 ) + … ■ I- E0(Wq) For example, if q=1, k=1, if the first receiver of the first collaborative cluster (i.e., cluster 1) is W / = [124, 105.95, -, 135], the encryption public key is public key E o Then the first collaborative cluster can use public key E to encrypt the first data transfer. The first coordinating cluster can determine the sum of the target accepted ciphertext and the first accepted ciphertext as the sum of two accepted ciphertexts, i.e., the sum of the two accepted ciphertexts is (i) + (j). It should be noted that after the q-th coordinating cluster determines the q-th accepted ciphertext, when determining the sum of the target accepted ciphertext up to the q-th accepted ciphertext, it does not need to decrypt the sum of the q accepted ciphertexts sent by the (q-1)-th cluster. The q-th coordinating cluster cannot obtain the accepted data of the previous (q-1)-th clusters, thus protecting the data privacy of the target cluster and / or other coordinating clusters. Within the same cluster (i.e., cluster 2), the sum of two ciphertexts (i.e., the sum of the target ciphertext and the first ciphertext) is sent. This sum of two ciphertexts can be represented as E0(Wd!) + E0(Wj). 1Case 32: q equals Q. In this case, the sum of Q+1 accept ciphertexts can be sent to the target cluster, and the sum of Q+1 accept ciphertexts is the total accept ciphertext. In the k-th task allocation process, the total accept ciphertext can be represented as... For example, if Q=4 and q=4, since q equals Q, the fourth cooperating cluster (i.e., cluster 4) can send the sum of five ciphertexts to the target cluster (i.e., the sum of the target ciphertext, the first ciphertext, the second ciphertext, the third ciphertext, and the fourth ciphertext). This sum of five ciphertexts can be expressed as Eo(W()) + Ef / W 1 ) + E°(W;) + E()(Wg) + E O (W4)
[0020] S306. Receive the total acceptance ciphertext sent by the Qth cooperative cluster. The total acceptance ciphertext can be the sum of the target acceptance ciphertext and the acceptance ciphertext generated by each cooperative cluster. When q=Q, the Qth cooperative cluster can send the sum of Q+1 acceptance ciphertexts, i.e., the total acceptance ciphertext, to the target cluster, and the target cluster can receive the total acceptance ciphertext sent by the Qth cooperative cluster. For example, if Q=4, then when q=4, the 4th cooperative cluster (i.e., cluster 4) can send the total acceptance ciphertext (i.e., the sum of 5 acceptance ciphertexts) to the target cluster. The target cluster can receive the total acceptance ciphertext sent by the 4th cooperative cluster. The total acceptance ciphertext can be represented as Eo(W(D + E0(Wi) + E...) O (W2) + E n (W3) + E°(W:).
[0021] S307. Decrypt the total acceptance ciphertext to obtain the total allocation amount for the k-th task. The total acceptance ciphertext can be represented as 0(W*) + Eo(W:) + … + E°(WQ). After receiving the total acceptance ciphertext, the target cluster can decrypt it using a homomorphic encryption algorithm to obtain W* + W$ + •“ + W$, which is the total allocation amount for the k-th task. The total allocation amount for the k-th task includes the task allocation amounts for the target cluster and at least one cooperating cluster at multiple future times within a preset time period. The cluster can use a homomorphic encryption algorithm to decrypt the total ciphertext received, obtaining the total allocation for the first task. Assume the total allocation for the first task can be W. 1= [1000, 900, 956, …, 1453]. It should be noted that the total task allocation obtained by the target cluster after decrypting the total received ciphertext includes the task allocation of the Q+1 clusters at multiple future times. However, the target cluster cannot know the share of each of the Q cooperating clusters in the total task allocation, thus protecting the data privacy of the Q cooperating clusters.
[0022] S308. Determine whether the Kth task allocation process has converged based on the total task volume and the total Kth task allocation. When k is K, the target cluster can determine whether the Kth task allocation process has converged based on the total task volume and the total Kth task allocation. In an optional embodiment, the convergence of the Kth task allocation process can be determined as follows: Determine the Kth difference information corresponding to the Kth task allocation process based on the total task volume and the total Kth task allocation; Obtain the K-1 difference information and the K-1th task allocation volume corresponding to the (K-1)th task allocation process; If the difference between the total Kth task allocation volume and the K-1th task allocation volume is less than or equal to a first threshold, and / or, the difference between the Kth difference information and the K-1th difference information is less than or equal to a second threshold, then the Kth task allocation process is determined to have converged. Where yi is the first difference information corresponding to the (K-1)th task allocation process; p is the penalty parameter; K is the average task allocation amount of each cluster in the Kth task allocation process; W represents the total task amount of the target task; and is the task amount that a single cluster should be able to handle. WK can be calculated using the following formula (10): [Formula (10)] The target cluster can obtain the K-1 difference information and the total K-1 task allocation amount corresponding to the K-1th task allocation process, and then determine whether the Kth task allocation process has converged based on the K-1 difference information and the Kth difference information, and / or the total K-1 task allocation amount and the Kth task allocation amount. Optionally, determining whether the Kth task allocation process has converged can include the following two methods: Method 1: If the difference between the total Kth task allocation amount and the total K-1 task allocation amount is less than or equal to the allocation threshold, then the Kth task allocation process can be determined to have converged. Optionally, the allocation threshold can be preset by humans. For example, the allocation threshold can be 10°. Optionally, the target cluster can determine the allocation difference between the total K task allocation amount and the total K-1 task allocation amount, and calculate the norm result by performing L2 norm calculation on the allocation difference, and then determine the norm result as the difference value. For example, if K=3, the total W of the 3rd task allocation amount is... 3 = [905, 868, 991, …, 1249], Total amount of task 2 allocated W 2 = [905, 858, 985, …, 1242] , then the allocation difference between the total allocation of the third task and the total allocation of the second task can be determined as W. 3 -W 2 = [o, 10, 6,・", 7], and then the L2 norm can be calculated for this allocation difference to obtain the norm result. Assuming the norm result is 9, which is less than the allocation threshold of 10, then the convergence of the 3rd task allocation process can be determined. Method 2: If the difference between the Kth difference information and the (K-1)th difference information is less than or equal to the difference threshold, then the convergence of the Kth task allocation process can be determined. Since the difference information includes the first difference information and the second difference information, Method 2 can include Method 21 and Method 22. Method 21: If the difference between the first difference information corresponding to the Kth task allocation process and the first difference information corresponding to the (K-1)th task allocation process is less than or equal to the first difference threshold, then the convergence of the Kth task allocation process can be determined. Optionally, the first difference threshold can be preset by humans. For example, the first difference threshold can be 0.5. oOptionally, the target cluster can determine the first difference information corresponding to the Kth task allocation process, and the difference between the first difference information corresponding to the Kth task allocation process, and calculate the norm result by performing L2 norm calculation on the difference value, and then determine the norm result as the difference value. For example, if K=3, if the first difference information y3 corresponding to the 3rd task allocation process is [1.2, 0.9, 1.5, …, 0.8], and the first difference information y3 corresponding to the 2nd task allocation process is [1.0, 0.8, 1.3, …, …], then the difference between the two first difference information values can be determined as y3. 3 -y 2 = [0.2, 0.1, 0.2, -, 0.4], and then the L2 norm can be calculated on this difference to obtain the norm result. Assuming the norm result is 0.4, which is less than the first difference threshold of 0.5, then the convergence of the 3rd task allocation process can be determined. Method 22: If the difference between the second difference information corresponding to the Kth task allocation process and the second difference information corresponding to the (K-1)th task allocation process is less than or equal to the second difference threshold, then the convergence of the Kth task allocation process can be determined. Optionally, the second difference threshold can be preset manually. For example, the second difference threshold can be 0.6. O Optionally, the target cluster can determine the second difference information corresponding to the Kth task allocation process, and the difference between the second difference information corresponding to the Kth task allocation process, and calculate the norm result by performing L2 norm calculation on the difference value, which can then be determined as the difference value. For example, if K=3, if the second difference information h corresponding to the 3rd task allocation process... 3 =[1.0, 0.8, 1.3, …, 0.6], the first difference information corresponding to the second task allocation is h =[0.9, 0.8, 1.0, …, …]. Therefore, the difference between these two first difference information values can be determined as h. 3 -h 2 =[0.1,0,0.3, -,0.2], and then the L2 norm can be calculated on this difference to obtain the norm result. Assuming the norm result is 0.4, which is less than the second difference threshold of 0.6, then it can be determined that the third task allocation process has converged. In this disclosure, the convergence of the Kth task allocation process can be determined according to at least one of the methods 1, 21, and 22. If it does not converge, then step S309 is executed; if it converges, then step S310 is executed. o
[0023] 5309. Update k to k+1 o For example, if k is 3, then k can be updated to 4. O
[0024] 5310. When determining the convergence of the Kth task allocation process, the target capacity determined by the target cluster during the Kth task allocation process is defined as the target task processing capacity of the target cluster, and the capacity determined by the collaborative cluster during the Kth task allocation process is defined as the target task processing capacity of the collaborative cluster. Optionally, for any collaborative cluster, the collaborative cluster can send the capacity determined during the Kth task allocation process to the target cluster. The target cluster can define this capacity as the target task processing capacity of the collaborative cluster. For example, if K is 3, and the target cluster determines that the 3rd task allocation process has converged, and the target capacity W^=[105, 122, 101, •-, 80] determined by the target cluster during the 3rd task allocation process... ? Therefore, the target throughput can be defined as the target task processing capacity W of the target cluster. o =[1O5, 122, 101, -,80] o If there are four collaborative clusters, namely cluster 1, cluster 2, cluster 3, and cluster 4, and cluster 1 sends the first receiving quantity determined during the third task allocation process to the target cluster... W -i 5 = [:! 80,310,290, -300] ? Then the target cluster can determine the first receiving quantity as the target task processing quantity of cluster 1, i.e., Wi = [180, 310, 290, ..., 300]; If cluster 2 sends the second receiving quantity W1 determined in the third task allocation process to the target cluster, i.e., W2 = [110, 126, 300, ..., 269], then the target cluster can determine the second receiving quantity W2 as the target task processing quantity of cluster 2, i.e., W2 = [110, 126, 300, ..., 269]; If cluster 3 sends the third receiving quantity W1 determined in the third task allocation process to the target cluster, then the target cluster can determine the second receiving quantity W2 as the target task processing quantity of cluster 2, i.e., W2 = [110, 126, 300, ..., 269]; If cluster 3 sends the third receiving quantity W1 determined in the third task allocation process to the target cluster... WIf 3 = [320,200,210, …, 430], then the target cluster can determine the third load capacity as the target task processing capacity W3 of cluster 3, i.e., W3 = [320,200,210, …, 430]. If cluster 4 sends the third load capacity determined in the third task allocation process to the target cluster, [190,110,90,-170], ?The target cluster can then determine the third receiving quantity 2 as the target task processing quantity W4 of cluster 4, i.e., W4 = [190, 110, 90, …, 170]. It should be noted that the various processing steps (S301~S310) shown in the embodiment of Figure 3 do not constitute a specific limitation on the task processing procedure. In other embodiments of this disclosure, the task processing procedure may include more or fewer steps than in the embodiment of Figure 3. For example, the task processing procedure may include some steps from the embodiment of Figure 3, or some steps from the embodiment of Figure 3 may be replaced by steps with the same function, or some steps from the embodiment of Figure 3 may be split into multiple steps, etc. In this embodiment of the disclosure, the target cluster can obtain a task processing request and, according to the task processing request, send an encrypted public key to at least one collaborative cluster. The target cluster can initialize k to 1, and in the k-th task allocation process, determine the target receiving quantity of the target cluster, encrypt the target receiving quantity using the encrypted public key to obtain the target receiving ciphertext, and send the target receiving ciphertext to the first collaborative cluster. The target cluster can receive the total acceptance ciphertext sent by the Qth cooperating cluster and decrypt it to obtain the total task allocation amount for the kth task. The target cluster can determine whether the kth task allocation process has converged based on the total task amount and the total task allocation amount for the kth task. If not, k can be updated to k+1, and the (k+1)th task allocation process can be executed; if so, the target acceptance amount determined by the target cluster in the kth task allocation process can be determined as the target task processing amount of the target cluster, and the acceptance amount determined by the cooperating cluster in the kth task allocation process can be determined as the target task processing amount of the cooperating cluster. In the technical solution of this disclosure, since the target cluster and at least one cooperating cluster belong to different entities, the target cluster and at least one cooperating cluster can iteratively perform multiple task allocation processes to obtain the target task processing amount of each cluster. This allows the target cluster and at least one cooperating cluster to collaboratively process the target task, fully utilizing the idle computing resources of at least one cooperating cluster, improving computing resource utilization, and reducing the waste of computing resources and electricity, thus reducing resource waste. Below, based on any of the above embodiments and in conjunction with FIG4, the task processing method described above will be further explained. FIG4 is a schematic diagram of a task processing method provided by an exemplary embodiment of this disclosure. Referring to FIG4, steps ①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑮⑰⑱ are included. In step ①, the target cluster can obtain a task processing request and determine the total task volume W and the public key E of the target task based on the task processing request.The target cluster can send public key E to Q cooperating clusters. Optionally, in the first task allocation process, the target cluster can initialize k to 1. The target cluster can also initialize first difference information y' and second difference information h', and send the first difference information y' and second difference information h' to the Q cooperating clusters. 1 o In step ②, the target cluster can internally update the target capacity to < 0. Specifically, if k equals 1, the target cluster can determine the target capacity in the first task allocation process as 0. In the next task, the target data is processed and updated to W. In step ③, the target cluster can use the public key E to encrypt the target data, obtaining the target data ciphertext E(L). Specifically, if k equals 1, then collaborative cluster 1 can determine the first receiving quantity wg in the first task allocation process; if k is greater than 1, then collaborative cluster 1 can determine the first receiving quantity wg in the k-th task processing based on the historical receiving quantity wp and the difference information of the (k-1)th task, and update wg to wg. In step ⑥, collaborative cluster 1 can use the public key E to encrypt the first receiving quantity wg to obtain the first receiving encrypted message (wg). In step ⑦, cooperative cluster 1 can determine the sum of two ciphertexts, namely the target ciphertext R" (R') + the first ciphertext EQ (R'). In step ⑧, cooperative cluster 1 can send the target ciphertext to cooperative cluster 2. Similarly, for any cooperative cluster q, when cooperative cluster q updates the qth ciphertext R' to its current value internally, it can use the public key E to encrypt the qth ciphertext, obtain the qth ciphertext Eg, and determine the sum of q+1 ciphertexts (i.e., R'(R') + ... + R')), and then send the sum of q+1 ciphertexts to cooperative cluster q+1. The Q-th ciphertext E is obtained. (Sigh) In step (1), the coordinating cluster Q can send the sum of Q+1 received ciphertexts to the target cluster. In step (2), the target cluster can decrypt the sum of Q+1 received ciphertexts to obtain the total task allocation W* for the kth task. In step (3), the target cluster can determine the kth difference information (i.e., yFD h) based on the total task amount W and the total task allocation W* for the kth task. 1 o This means that k can be updated to k+1, so that the target cluster and the Q cooperating clusters can begin the k+1th task allocation process. The target cluster can perform step® \ global update of the difference information (i.e., more by If so, then step ® is executed, that is, based on the k-th task allocation process, the target task processing volume of the target cluster and each collaborative cluster is determined. In the technical solution of this disclosure, the ADMM distributed optimization algorithm and homomorphic encryption are combined to realize privacy-preserving task allocation processing, enabling task allocation to be achieved among clusters without sharing core parameters; it realizes the collaborative processing of target tasks by multiple clusters across subjects, making full use of the idle computing resources of other subjects (i.e., the subjects to which the collaborative clusters belong), reducing resource waste, and thus reducing carbon emissions. In the embodiments of this disclosure, the target cluster can obtain a task processing request and send an encrypted public key to at least one collaborative cluster according to the task processing request. The target cluster can initialize k to 1, determine the target capacity of the target cluster in the k-th task allocation process, encrypt the target capacity using the encrypted public key to obtain the target capacity ciphertext, and send the target capacity ciphertext to the first collaborative cluster. The target cluster can receive the total capacity ciphertext sent by the Q-th collaborative cluster and decrypt the total capacity ciphertext to obtain the total task allocation volume of the k-th task. The target cluster can determine whether the Kth task allocation process has converged based on the total task volume and the total allocation of the Kth task. If not, k can be updated to k+1, and the (k+1)th task allocation process can be executed; if so, the target capacity determined by the target cluster in the Kth task allocation process can be determined as the target task processing volume of the target cluster, and the capacity determined by the collaborative cluster in the Kth task allocation process can be determined as the target task processing volume of the collaborative cluster. In the technical solution of this disclosure, since the target cluster and at least one collaborative cluster belong to different entities, the target cluster and at least one collaborative cluster can iteratively perform multiple task allocation processes to obtain the target task processing volume of each cluster, so that the target cluster and at least one collaborative cluster can collaboratively process the target task, making full use of the idle computing resources of at least one collaborative cluster, improving the utilization rate of computing resources, reducing the waste of computing resources and power, and thus reducing resource waste. The embodiments shown in Figures 2-4 are all task processing methods initiated by the target cluster and involving multiple task allocation processes with at least one collaborative cluster. In practice, at least one collaborative cluster collaborates with the target cluster to process the target task and needs to receive a corresponding reward. Therefore, each collaborative cluster needs to determine the reward value corresponding to the amount of target task processed. Optionally, any collaborative cluster may include collaborative devices.In this disclosure, the collaborative cluster (or collaborative device) can employ a Vikrey-Clark-Groves (VCG) mechanism to determine the reward value for each collaborative cluster handling the target task processing volume. Below, referring to Figures 5 and 6, taking collaborative cluster q as an example, the process of the collaborative cluster determining the reward value corresponding to the target task processing volume is described. Figure 5 is a flowchart illustrating a method for determining the reward value of a collaborative cluster according to an exemplary embodiment of this disclosure. Referring to Figure 5, the method may include:
[0025] S501. The collaborative cluster determines the first task processing cost when the target cluster and at least one collaborative cluster participate in processing the target task. The execution subject of this embodiment can be a collaborative cluster, a collaborative device set in the collaborative cluster, or a task processing device set in the collaborative device. The task processing device can be implemented by software or by a combination of software and hardware. The task processing device can be a processor in the collaborative device. For ease of understanding, the following description takes the collaborative cluster as the execution subject. The first task processing cost refers to the total cost of the target cluster and at least one collaborative cluster jointly processing the target task. Since the target task processing volume when the target cluster and each collaborative cluster jointly process the target task has been determined in the embodiments of Figures 2-4, the target cluster and each collaborative cluster can determine their respective costs based on the target task processing volume, and thus determine the first task processing cost. Optionally, the first task processing cost can be represented by Fmm, and Fmm can be represented by the following formula (12): Wherein, ... Where Nq represents the number of sub-clusters included in cluster q; i represents sub-cluster i among the Nq sub-clusters; t represents the power generation cost of sub-cluster i; N represents the power purchase cost of sub-cluster i; M_sun_R represents the data transmission cost of sub-cluster i; C_j- arb,J!1 Let Ct represent the carbon cost of sub-cluster i. Optionally, the power generation cost Ct can be calculated using the following formula (14): Where, represents the power generation of sub-cluster i at future time t; ai, bi, and G are all power generation cost factors. Optionally, for any sub-cluster i, the power generation must satisfy the constraints of the following formulas (15) and (16): Among them, \(P_{min}\) represents the minimum power generation; \(P_{max}\) represents the maximum power generation; AP i amii , which represents from the future time \(t - 1\) to the future Optionally, the electricity purchase cost can be expressed by the following formula (17): \(C_{ep}^i = p_{ep}^t\times q_{ep}^i\), \(\forall i\in N_q, t\in T\) Formula (17) Among them, \(p_{ep}^t\) represents the unit price of electricity purchase at the future time \(t\); \(q_{ep}^i\) represents the electricity purchase volume corresponding to the sub - cluster \(i\) at the future time \(t\). Optionally, for any sub - cluster \(i\), the electricity purchase volume \(q_{ep}^i\) needs to meet the constraints of the following formula (18): Among them, \(r_i\) represents the data transmission rate corresponding to the sub - cluster \(i\); \(d_i\) represents the data transmission task volume. Optionally, the carbon cost \(C_{c}^i\) can be expressed by the following formula (20):
[0026] \(C_{c}^i = n_{ce}^t\times e_{c}^i\) Formula (20) Among them, \(e_{c}^i\) represents the carbon emission volume corresponding to the sub - cluster \(i\) at the future time \(t\); \(n_{ce}^t\) represents the average daily transaction unit price of carbon emission rights in the area where the sub - cluster \(i\) is located on that day. Optionally, the carbon emission volume \(e_{c}^i\) can be expressed by the following formula (21):
[0027] \(e_{c}^i=\alpha_i P_{e}^i\), \(\forall i\in N\) q? \(t\in T\) Formula (21) Among them, \(P_{e}^i\) represents the electricity consumption volume of the sub - cluster \(i\) at the future time \(t\); \(\alpha_i\) represents the electricity consumption emission factor of the regional power grid corresponding to the sub - cluster \(i\), with the unit of kilograms per kilowatt - hour (kg / kWh). From Formula (13) to Formula (21), it can be seen that when determining the cost \(F_a(W_q)\) corresponding to the processing target task volume \(W_q\) of the cluster \(q\), it is necessary to consider the power generation volume \(P_{g}^i\), the electricity purchase volume \(q_{ep}^i\), and the electricity consumption volume \(P_{e}^i\) of each sub - cluster in the cluster \(q\), etc. For any sub - cluster, the sub - cluster can also include energy storage devices. The energy storage devices can be charged and discharged. Therefore, the sub - cluster \(i\) has corresponding charging volume \(q_{ch}^i\) and discharging volume \(q_{dch}^i\). Therefore, for the sub - cluster \(i\), the following formula (22) can be satisfied:
[0028] < \(q_{ch}^i+q_{ep}^i + q_{dch}^i = P_{e}^i+q_{g}^i\), \(\forall i\in N_q, t\in T\) Formula (22) Optionally, the charging volume \(q_{ch}^i\) needs to meet the conditional constraints of the following formula (23): The volume. \(p(i\) Optionally, the discharging volume needs to meet the following formula (24): \(p_{dch}^{min}<q_{dch}^i < p_{dch}^{max}\) Vj €The Nq / t e T formula (2 makes where P_严物 represents the minimum discharge amount at the future time t;?_严心 represents the maximum discharge amount at the future time t. Therefore, the stored power ES" of the energy storage device in sub-cluster i at the future time t can satisfy the following formula (25):
[0029] E$i,t = ES*r + (the only feed) mass, Vi e Nq, t e T formula (25) where ES, E represents the stored power of the energy storage device in sub-cluster i at the future time t-1; the box represents the charging amount of the energy storage device in sub-cluster i at the future time t; 珥 represents the discharge amount of the energy storage device in sub-cluster i at the future time t; AT represents the charge and discharge duration. The idle power of sub-cluster i; Uj (t) that is U" represents the resource utilization rate of the computing devices in the sub-cluster. Optionally, since formula (26) is non-linear, a special ordered set of type 2 (Special Ordered Set of Type 2, S0S2) can be used to linearly constrain P", resulting in a linear result. It should be noted that in the above formulas (12) - formula (26), when q takes 0, it represents the target cluster; when q takes 1, 2,..., Q, it represents the collaborative clusters. For the target cluster, the processing cost Fo (Wo) corresponding to the processing target task processing amount W can be determined through the above formulas (13) - formula (26): For collaborative cluster 1, the processing cost F, (W,) corresponding to the processing target task processing amount called can be determined through the above formulas (13) - formula (26):...; For collaborative cluster Q, the processing cost F corresponding to the processing target task processing amount M can be determined through the above formulas (13) - formula (26) Q (W Q ) Then each collaborative cluster can send its respective processing cost to the target cluster so that the target cluster can determine the first task processing cost F through formula (12) min oOptionally, after the target cluster determines the first task processing cost, it can send the first task processing cost to each cooperating cluster, so that any cooperating cluster can determine the first task processing cost when the target cluster and at least one cooperating cluster participate in processing the target task. For example, if Q equals 4, meaning there are 4 cooperating clusters, and if the target cluster determines the first task processing cost to be 1 million, then the target cluster can send the first task processing cost of 1 million to the 4 cooperating clusters. All 4 cooperating clusters can then determine the first task processing cost to be 1 million.
[0030] S502. The collaborative cluster determines the second task processing cost when the collaborative cluster does not participate in processing the target task. The second task processing cost refers to the total cost of the target cluster and other collaborative clusters processing the target task when the collaborative cluster does not participate in processing the target task. Optionally, the second task processing cost can be represented by F_q. If there are Q collaborative clusters, then collaborative cluster q can determine the second task processing cost when the target cluster and Q-1 collaborative clusters collaboratively process the target task when q does not participate in processing the target task. Optionally, collaborative cluster q needs to initiate multiple task allocation processes so that the target cluster and QT collaborative clusters can determine the target task processing volume of the target cluster and QT collaborative clusters when collaborative cluster q does not participate in processing the target task. Then, the target cluster and Q-1 collaborative clusters can determine their respective costs according to their respective target task processing volumes through formulas (13)-(26), and thus determine the second task processing cost. Since Figures 3-4 both introduce the process of the target cluster initiating multiple task allocation processes, the process of collaborative cluster q initiating multiple task allocation processes can be found in the specific execution process of Figures 3-4. It should be emphasized that the difference from the embodiments shown in Figures 3-4 is as follows:
[0031] (1) The collaborative cluster q can determine the encryption public key and send the encryption public key to the target cluster and Q-1 collaborative clusters;
[0032] (2) For the kth task allocation process, the collaborative cluster q-1 does not need to send the sum of q received ciphertext to the collaborative cluster q, but instead bypasses the collaborative cluster q and sends the sum of q received ciphertext to the collaborative cluster q+1;
[0033] (3) The collaborative cluster q does not need to determine the q-th capacity;
[0034] (4) After the last cooperative cluster Q determines the total acceptance ciphertext, it sends the sum of the total acceptance ciphertexts to cooperative cluster q. After receiving the total acceptance ciphertext, cooperative cluster q can decrypt it to obtain the total number of tasks allocated to the Kth task, and determine whether the kth task allocation process has converged based on the total number of tasks and the total number of tasks allocated to the Kth task. When it is determined that the Kth task allocation process has converged, the target acceptance amount determined by the target cluster in the Kth task allocation process is determined as the target task processing amount of the target cluster, and the acceptance amount determined by the cooperative cluster in the Kth task allocation process is determined as the target task processing amount of the cooperative cluster. If Q is 4, there are 4 cooperative clusters. The following describes the process of cooperative cluster 2 initiating multiple task allocation processes, taking cooperative cluster 2 as an example: Cooperative cluster 2 can determine the encryption public key E2 and send the encryption public key E2 to the target cluster and 3 cooperative clusters (i.e., cooperative cluster 1, cooperative cluster 3 and cooperative cluster 4). Cooperative cluster 2 can initialize k to 1. In the k-th task allocation process, the target cluster can determine the target acceptance quantity W*, encrypt the target acceptance quantity using the encryption public key to obtain the target acceptance ciphertext, and send the target acceptance ciphertext to cooperative cluster 1. Cooperative cluster 1 can determine the first acceptance quantity, encrypt the first acceptance quantity using the encryption public key to obtain the first acceptance ciphertext, and then determine the sum of the target acceptance ciphertext and the first acceptance ciphertext as the sum of two acceptance ciphertexts. Cooperative cluster 1 can send this sum of two acceptance ciphertexts to cooperative cluster 2. Cooperative cluster 3 can determine the third acceptance quantity, encrypt the second acceptance quantity using the encryption public key to obtain the third acceptance ciphertext, and then determine the sum of three acceptance ciphertexts (i.e., target acceptance ciphertext + first acceptance ciphertext + third acceptance ciphertext). Cooperative cluster 3 can send this sum of three acceptance ciphertexts to cooperative cluster 4. Collaborative cluster 4 can determine the fourth acceptance quantity and encrypt it using the public key to obtain the fourth acceptance ciphertext, which is then determined as the sum of four acceptance ciphertexts (i.e., the target acceptance ciphertext + the first acceptance ciphertext + the third acceptance ciphertext + the fourth acceptance ciphertext). Collaborative cluster 4 can send this sum of four acceptance ciphertexts to collaborative cluster 2, i.e., the total acceptance ciphertext. After receiving the total acceptance ciphertext, collaborative cluster 2 can decrypt it to obtain the total allocation amount for the kth task. Collaborative cluster 2 can determine whether the kth task allocation process has converged based on the total task amount and the total allocation amount for the kth task.When the convergence of the k-th task allocation process is determined, the target capacity determined by the target cluster in the k-th task allocation process is defined as the target task processing capacity of the target cluster, and the capacity determined by other collaborative clusters in the k-th task allocation process is defined as the target task processing capacity of other collaborative clusters. The target cluster and QT collaborative clusters can determine their respective processing costs according to their respective target task processing capacities using the above formulas (13)-(26), and send their respective processing costs to collaborative cluster 2 so that collaborative cluster 2 can determine the second task processing cost Fp using formula (12). For example, collaborative cluster 2 can determine the second task processing cost FF as 1.5 million.
[0035] S503. The collaborative cluster determines the return value for collaboratively processing the target task based on the processing cost of the second task and the processing cost of the first task. In an optional embodiment, the return value for collaboratively processing the target task can be determined based on the processing cost of the second task and the processing cost of the first task as follows: Determine the processing cost when the collaborative cluster participates in processing the target task; Determine the cost difference between the processing cost of the first task and the processing cost; Determine the return value for collaboratively processing the target task by taking the processing cost of the second task and the cost difference. The processing cost refers to the cost corresponding to the processing volume Wq of the target task when the collaborative cluster participates in processing the target task.
[0036] (27) The calculation yields: For CG(Wq) = J - Fq(Wq)) Formula (2) Where, FF represents the processing cost of the second task; Fmin represents the processing cost of the first task; F"Wq) represents the processing cost corresponding to the amount of target task processed by the collaborative cluster q; F min -F q (W) qThe difference between the processing cost of the first task and the processing cost is the cost difference between the processing cost of the first task and the processing cost. Formula (27) can be expressed as: the total cost of the target cluster and other collaborative clusters when collaborative cluster q does not participate in processing the target task (i.e., the processing cost of the second task), minus the total cost of the target cluster and other collaborative clusters when collaborative cluster q participates in processing the target task (i.e., the cost difference between the processing cost of the first task and the processing cost of the second task), is the return value that collaborative cluster q can obtain. For example, if there is 1 target cluster and 4 collaborative clusters, if the processing cost of the first task Fmm is 1 million, the processing cost of collaborative cluster 2 F2 (W2) is 200,000, and the processing cost of the second task F-2 is 1.2 million, then the return value of collaborative cluster 2 can be determined as CG (W2) = 1.2 million - (1 million - 200,000) = 400,000. Optionally, for any collaborative cluster, the collaborative cluster can determine its own return value through the process of the embodiment shown in Figure 5. Therefore, if there are Q collaborative clusters, the process of determining the return value needs to be performed Q times. The Q processes can be executed in parallel. In this embodiment, the collaborative cluster can determine the first task processing cost when the target cluster and at least one collaborative cluster participate in processing the target task, and determine the second task processing cost when the collaborative cluster does not participate in processing the target task. Then, based on the second task processing cost and the first task processing cost, the reward value for the collaborative cluster to collaboratively process the target task is determined. In the technical solution of this disclosure, VCG and privacy-preserving ADMM mechanisms are combined to achieve data privacy protection and improve the confidentiality of determining the reward value. Below, based on the embodiment shown in Figure 5, and in conjunction with Figure 6, the method for determining the reward value of the collaborative processing target task will be further described. Figure 6 is a schematic diagram of a collaborative cluster determining the reward value provided by an exemplary embodiment of this disclosure. Please refer to Figure 6. In step ①, the collaborative cluster q can determine the public key E and send the public key E to the target cluster and other collaborative clusters. qo Optionally, in the first task allocation process, the cooperative cluster q can initialize k to 1. The cooperative cluster q can also initialize the first difference information y' and the second difference information h', and send the first difference information y' to the target cluster and other cooperative clusters. 1 Second difference information h 1 o In step ②, the target cluster can internally update the target capacity W / i to W#. Specifically, if k equals 1, the target cluster can determine the target capacity M in the first task allocation process; The target acceptance volume sulfur in the service processing, and update w / 'T to the mockery. Specifically, if k is equal to 1, the collaborative cluster 1 can determine the first acceptance volume in the first task assignment processing.
[0037] W;; if k is greater than 1, the collaborative cluster 1 can determine the first acceptance volume na in the kth task processing according to the historical acceptance volume na-' and the (k - 1)th difference information, and update na~' to WF. In step ⑥, the collaborative cluster 1 can use the public key 巳 to encrypt the first acceptance volume砒, obtaining the first acceptance ciphertext品伽打. In step ⑦, the collaborative cluster 1 can determine the sum of two acceptance ciphertexts, that is, the target acceptance ciphertext Eq(W<b + the first acceptance ciphertext Eq(W^). In step ⑧, the collaborative cluster 1 can send the target acceptance ciphertext to the collaborative cluster 2. Similarly, the collaborative clusters 2, ……, collaborative cluster q - 1, and collaborative cluster q + 1 can all adapt to execute steps ⑤①⑦⑧. The collaborative cluster q does not need to adapt to execute steps ⑤⑥⑦⑧. In step ⑨, the collaborative cluster Q can internally update the Qth acceptance volume幡-' to幡. In step ⑩, the collaborative cluster Q can use the public key 巳 to encrypt the Qth acceptance volume毗, obtaining the Qth acceptance ciphertext E<M). In step 智, the collaborative cluster Q can determine the sum of Q acceptance ciphertexts, that is In step '⑫, the collaborative cluster Q can send the sum of Q acceptance ciphertexts to the collaborative cluster q. In step (坦), the collaborative cluster q can decrypt the sum of Q acceptance ciphertexts, obtaining the total volume W* of the kth task assignment. In step ⑭, the collaborative cluster q can determine the kth difference information (i.e., yFD h 1 ") o In step ⑮, the collaborative cluster q can determine whether the kth task assignment processing converges. If not, then execute step 姬\ that is, update k to k + 1, so that the target cluster and other collaborative clusters start to execute the (k + 1)th task assignment processing. After executing step ⑯, the collaborative cluster q can execute step ⑰, globally update the difference information (i.e., update产'). If so, then step 18 is executed, that is, based on the k-th task allocation processing, the target task processing volume of the target cluster and other collaborative clusters is determined. In step 19, the collaborative cluster q can determine the first task processing cost and the second task processing cost, and determine the reward value based on the first task processing cost and the second task processing cost. In the technical solution of this disclosure, the output results of VCG and privacy-preserving ADMM mechanism are combined to realize a privacy-preserving pricing method and achieve optimal allocation of target tasks. In the embodiment of this disclosure, the collaborative cluster can determine the first task processing cost when the target cluster and at least one collaborative cluster participate in processing the target task, and determine the second task processing cost when the collaborative cluster does not participate in processing the target task, and then determine the reward value of the collaborative cluster cooperating in processing the target task based on the second task processing cost and the first task processing cost. In the technical solution of this disclosure, the combination of VCG and privacy-preserving ADMM mechanism realizes data privacy protection and improves the confidentiality of determining the reward value. Figure 7 is a schematic diagram of the structure of a task processing device provided in an embodiment of this disclosure. Please refer to Figure 7. Applied to a target cluster, the task processing device 10 includes: an acquisition module 11, a sending module 12, and a processing module 13. The acquisition module 11 is used to acquire a task processing request, which is used to request the determination of a target task. The sending module 12 is used to send an encrypted public key to at least one collaborative cluster according to the task processing request. The processing module 13 is used to perform multiple task allocation processes with the at least one collaborative cluster based on the encrypted public key and the total task volume of the target task, to obtain the target task processing volume of the target cluster and each collaborative cluster. The target cluster and the at least one collaborative cluster are used to collaboratively process the target task, and the target cluster and the at least one collaborative cluster belong to different entities. The task processing device provided in this embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here. In one possible implementation, the processing module 13 is specifically used to: perform the k-th task allocation process with the at least one collaborative cluster based on the encrypted public key to obtain the total k-th task allocation; wherein, k takes values of 1, 2, ..., until the convergence of the k-th task allocation process is determined based on the total task amount and the total k-th task allocation; and determine the target task processing amount of the target cluster and each collaborative cluster based on the k-th task allocation process, wherein K is an integer greater than 1.In one possible implementation, the processing module 13 is specifically configured to: determine the target capacity of the target cluster; encrypt the target capacity using the encryption public key to obtain target ciphertext, and send the target ciphertext to the first collaborative cluster; receive the total ciphertext sent by the Qth collaborative cluster, wherein the total ciphertext is the sum of the target ciphertext and the ciphertext generated by each collaborative cluster, where Q is the number of the at least one collaborative cluster, and Q is an integer greater than or equal to 1; and decrypt the total ciphertext to obtain the total allocation amount for the kth task. In one possible implementation, the processing module 13 is specifically configured to: if k is 1, perform a task capacity prediction process on the target cluster to obtain the target task capacity; if k is greater than 1, obtain the historical task capacity of the target cluster during the (k-1)th task allocation process, and the (k-1)th difference information corresponding to the (k-1)th task allocation process, and perform a task capacity prediction process on the target cluster based on the historical task capacity and the (k-1)th difference information to obtain the target task capacity; wherein, the difference information is used to indicate the difference between the task capacity that a single cluster should undertake and the actual task capacity. In one possible implementation, the q-th cooperative cluster is further configured to: determine the q-th acceptance quantity of the q-th cooperative cluster, the q-th acceptance quantity including the task acceptance quantity of the q-th cooperative cluster at multiple future moments; encrypt the q-th acceptance quantity using the encryption public key to obtain the q-th acceptance ciphertext; determine the sum of ciphertexts from the target acceptance ciphertext to the q-th acceptance ciphertext as the sum of q+1 acceptance ciphertexts; if q is less than Q, send the sum of q+1 acceptance ciphertexts to the q+1 cooperative cluster; if q is equal to Q, send the sum of Q+1 acceptance ciphertexts to the target cluster, the sum of Q+1 acceptance ciphertexts being the total acceptance ciphertext. In one possible implementation, the processing module 13 is specifically configured to: determine whether the Kth task allocation process has converged based on the total task volume and the total Kth task allocation amount; when it is determined that the Kth task allocation process has converged, determine the target capacity determined by the target cluster in the Kth task allocation process as the target task processing volume of the target cluster, and determine the capacity determined by the collaborative cluster in the Kth task allocation process as the target task processing volume of the collaborative cluster.In one possible implementation, the processing module 13 is specifically configured to: determine the Kth difference information corresponding to the Kth task allocation process based on the total task volume and the total Kth task allocation amount; obtain the K-1th difference information and the K-1th task allocation amount corresponding to the (K-1)th task allocation process; if the difference between the total Kth task allocation amount and the K-1th task allocation amount is less than or equal to the allocation threshold, and / or, the difference between the Kth difference information and the K-1th difference information is less than or equal to the difference threshold, then determine that the Kth task allocation process has converged. The task processing device provided in this disclosure embodiment can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, and will not be repeated here. Figure 8 is a schematic diagram of another task processing device provided in this disclosure embodiment. Please refer to Figure 8. The task processing device 20 is applied to a collaborative cluster. The task processing device 20 includes: a first determining module 21, a second determining module 22, and a third determining module 23. The first determining module 21 is used to determine a first task processing cost when the target cluster and the at least one collaborative cluster participate in processing the target task. The second determining module 22 is used to determine a second task processing cost when the collaborative cluster does not participate in processing the target task. The third determining module 23 is used to determine the reward value for the collaborative cluster to collaboratively process the target task based on the second task processing cost and the first task processing cost. The task processing device provided in this embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here. In one possible implementation, the third determining module 23 is specifically used to: determine the processing cost when the collaborative cluster participates in processing the target task; determine the cost difference between the first task processing cost and the processing cost; and determine the second task processing cost and the cost difference as the reward value for the collaborative cluster to collaboratively process the target task. The task processing device provided in this disclosure can execute the technical solutions shown in the above method embodiments. Its implementation principle and beneficial effects are similar, and will not be repeated here. Figure 9 is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this disclosure. Referring to Figure 9, the electronic device 30 may include a processor 31 and a memory 32. Exemplarily, the processor 31 and the memory 32 are interconnected via a bus 33.The memory 32 stores computer-executable instructions; the processor 31 executes the computer-executable instructions stored in the memory 32, causing the processor 31 to perform the method as shown in the above method embodiments. The electronic device shown in FIG9 can be a target device in the target cluster described in any of the above embodiments, or a collaborative device in the collaborative cluster. Accordingly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the above method embodiments. Accordingly, embodiments of this disclosure may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the method shown in the above method embodiments. Those skilled in the art should understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROQ, optical storage, etc.) containing computer-usable program code. This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions can also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent storage in computer-readable media, random access memory (RAQ), and / or non-volatile memory such as read-only memory (ROQ) or flash memory (flash RAQ). O Memory is an example of computer-readable media. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAQ), static random access memory (SRAQ), dynamic random access memory (DRAQ), other types of random access memory (RAQ), read-only memory (ROQ), electrically erasable programmable read-only memory (EEPROQ), flash memory or other memory technologies, optical disc read-only memory (CD-ROQ), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media, such as modulated data signals and carrier waves. It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The above description is merely an embodiment of this disclosure and is not intended to limit this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.
Claims
Claims 1. A task processing method, wherein, The method, applied to a target cluster, includes: obtaining a task processing request, the task processing request being used to request the determination of a target task; sending an encrypted public key to at least one collaborative cluster based on the task processing request; performing a k-th task allocation process with the at least one collaborative cluster based on the encrypted public key to obtain a total k-th task allocation; wherein, k sequentially takes the values 1, 2, ..., until the convergence of the k-th task allocation process is determined based on the total task volume of the target task and the total k-th task allocation, and the target task processing volume of the target cluster and each collaborative cluster is determined based on the k-th task allocation process, where K is an integer greater than 1; the target cluster and the at least one collaborative cluster are used to collaboratively process the target task, and the target cluster and the at least one collaborative cluster belong to different entities; performing a k-th task allocation process with the at least one collaborative cluster to obtain a total k-th task allocation includes: determining the target capacity of the target cluster; encrypting the target capacity using the encrypted public key to obtain a target capacity ciphertext, and sending the target capacity ciphertext to the first collaborative cluster; The process involves receiving the total acceptance ciphertext sent by the Qth collaborative cluster, where the total acceptance ciphertext is the sum of the target acceptance ciphertext and the acceptance ciphertext generated by each collaborative cluster, and Q is the number of the at least one collaborative cluster, where Q is an integer greater than or equal to 1; decrypting the total acceptance ciphertext to obtain the total allocation amount of the kth task; and further, the qth collaborative cluster is configured to: determine the qth acceptance amount of the qth collaborative cluster, where the qth acceptance amount includes the task acceptance amount of the qth collaborative cluster at multiple future times; encrypt the qth acceptance amount using the encryption public key to obtain the qth acceptance ciphertext; determine the sum of the ciphertexts from the target acceptance ciphertext to the qth acceptance ciphertext as the sum of q+1 acceptance ciphertexts; if q is less than Q, send the sum of q+1 acceptance ciphertexts to the q+1th collaborative cluster; if q is equal to Q, send the sum of Q+1 acceptance ciphertexts to the target cluster. The sum of the Q+1 inherited ciphertexts is the total inherited ciphertext.
2. The method according to claim 1, wherein, Determining the target capacity of the target cluster includes: if k is 1, performing capacity prediction processing on the target cluster to obtain the target capacity; if k is greater than 1, obtaining the historical capacity of the target cluster during the (k-1)th task allocation process and the (k-1)th difference information corresponding to the (k-1)th task allocation process, and performing capacity prediction processing on the target cluster based on the historical capacity and the (k-1)th difference information to obtain the target capacity; wherein, the difference information is used to indicate the difference between the expected and actual task capacity of a single cluster.
3. The method according to claim 1 or 2, wherein, Based on the total task volume and the total allocation of the Kth task, when the Kth task allocation process converges, the target task processing volume of the target cluster and each collaborative cluster is determined according to the Kth task allocation process, including: determining whether the Kth task allocation process has converged based on the total task volume and the total allocation of the Kth task; when the Kth task allocation process has converged, the target capacity determined by the target cluster in the Kth task allocation process is determined as the target task processing volume of the target cluster, and the capacity determined by the collaborative cluster in the Kth task allocation process is determined as the target task processing volume of the collaborative cluster. 29 4. The method according to claim 3, wherein, Determining whether the Kth task allocation process has converged based on the total task volume and the total Kth task allocation includes: determining the Kth difference information corresponding to the Kth task allocation process based on the total task volume and the total Kth task allocation; obtaining the (K-1)th difference information and the (K-1)th task allocation volume corresponding to the (K-1)th task allocation process; if the difference between the total Kth task allocation volume and the total K-1th task allocation volume is less than or equal to an allocation threshold, and / or, the difference between the Kth difference information and the (K-1)th difference information is less than or equal to a difference threshold, then the Kth task allocation process is determined to have converged.
5. The method according to any one of claims 1-4, wherein, For any given collaborative cluster, the method further includes: determining a first task processing cost when the target cluster and the at least one collaborative cluster participate in processing the target task; determining a second task processing cost when the collaborative cluster does not participate in processing the target task; and determining a reward value for the collaborative cluster to collaboratively process the target task based on the second task processing cost and the first task processing cost.
6. The method according to claim 5, wherein, Determine the return value of the collaborative cluster for collaboratively processing the target task according to the second task processing cost and the first task processing cost, including: determining the processing cost when the collaborative cluster participates in processing the target task; determining the cost difference between the first task processing cost and the processing cost; and determining the second task processing cost and the cost difference as the return value of the collaborative cluster for collaboratively processing the target task.
7. A task processing device, wherein, The device includes: an acquisition module, a sending module, and a processing module. Among them, the acquisition module is used to acquire a task processing request for requesting to determine a target task; the sending module is used to send an encryption public key to at least one collaborative cluster according to the task processing request; the processing module is used to perform the k-th task allocation processing with the at least one collaborative cluster according to the encryption public key to obtain the total amount of the k-th task allocation. Among them, k sequentially takes 1, 2, until it is determined that the k-th task allocation processing converges according to the total amount of the target task and the total amount of the k-th task allocation, and the target task processing amounts of the target cluster and each collaborative cluster are determined according to the k-th task allocation processing. K is an integer greater than 1. The target cluster and the at least one collaborative cluster are used to collaboratively process the target task, and the target cluster and the at least one collaborative cluster belong to different entities. The processing module is specifically further used to determine the target acceptance amount of the target cluster; encrypt the target acceptance amount through the encryption public key to obtain a target acceptance ciphertext, and send the target acceptance ciphertext to the first collaborative cluster; receive the total acceptance ciphertext sent by the Q-th collaborative cluster, where the total acceptance ciphertext is the sum of the target acceptance ciphertext and the acceptance ciphertext generated by each collaborative cluster. Q is the number of the at least one collaborative cluster, and Q is an integer greater than or equal to 1. Decrypt the total acceptance ciphertext to obtain the total amount of the k-th task allocation. The q-th collaborative cluster is further used to: determine the q-th acceptance amount of the q-th collaborative cluster, where the q-th acceptance amount includes the task acceptance amounts of the q-th collaborative cluster at multiple future times; encrypt the q-th acceptance amount through the encryption public key to obtain a q-th acceptance ciphertext; determine the sum of the ciphertexts from the target acceptance ciphertext to the q-th acceptance ciphertext as the sum of the q + 1 acceptance ciphertexts; if q is less than Q, then send the sum of the q + 1 acceptance ciphertexts to the (q + 1)-th collaborative cluster; if q is equal to Q, then send the sum of the Q + 1 acceptance ciphertexts to the target cluster, and the sum of the Q + 1 acceptance ciphertexts 30 is the total acceptance ciphertext.
8. An electronic device, wherein, Includes: At least one processor; The electronic device also includes a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the electronic device to perform the method according to any one of claims 1-6.
9. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, wherein, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Product design task allocation method and device
CN109636097A
Cluster task distribution method, device and equipment and storage medium
CN111338793A
Distributed computing system task allocation method and related equipment
CN111782359A
Data sharing method and device, terminal and storage medium
CN113536336A
Big data cleaning task processing method based on artificial intelligence and cloud computing system
CN114844901A