Task scheduling method and device
By acquiring task data and device attribute information, determining the level of data privacy and task complexity, and selecting appropriate devices, the problem of coordinating privacy and performance scheduling in the edge-cloud hybrid computing environment is solved, achieving efficient and secure task scheduling.
Patent Information
- Application Number
- CN202511589889.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-01-23
AI Technical Summary
In edge-cloud hybrid computing environments, task scheduling struggles to simultaneously meet the demands of both privacy and performance. Existing technologies often focus on either efficiency or privacy, lacking collaborative decision-making capabilities.
By acquiring task data and the attribute information of the execution device, the level of data privacy and task complexity are determined. Combined with the device's computing power, the most suitable execution device is selected to meet the dual requirements of privacy protection and inference efficiency.
It achieves a balance between privacy and processing efficiency in task scheduling in an edge-cloud hybrid computing environment, improving processing efficiency and data privacy security corresponding to task complexity.
Smart Images

Figure CN121387490A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to electronic information technology, and in particular, to a task scheduling method and device. BACKGROUND
[0002] In an end-cloud hybrid computing environment, as the demand for multi-modal data processing grows, task scheduling needs to not only adapt to the differentiated characteristics of different task types (such as images, speech, and text), but also have dynamic adjustment capabilities to cope with changes in runtime resources and security constraints. However, related technologies generally have single-dimensional optimization problems, that is, only one of efficiency or privacy is concerned, and lack the ability to make collaborative decisions between the two, resulting in scheduling results that are difficult to meet the needs of actual applications that place equal emphasis on privacy and performance. SUMMARY
[0003] Therefore, the embodiments of the present application provide at least a task scheduling method and device.
[0004] The technical solutions of the embodiments of the present application are implemented as follows: In a first aspect, the embodiments of the present application provide a task scheduling method, which comprises: obtaining task data of a target task and device attribute information of at least two execution devices; the device attribute information is used to represent the computing capability of the execution device; the privacy, the computing capability of different execution devices are different; determining the data privacy degree of the task data and the task complexity of the target task based on the task data; determining a target device for executing the target task among the at least two execution devices based on the device attribute information corresponding to each execution device, the data privacy degree of the task data, and the task complexity of the target task.
[0005] In a second aspect, the embodiments of the present application provide a task scheduling device, which comprises: an obtaining module, configured to obtain task data of a target task and device attribute information of at least two execution devices; the device attribute information is used to represent the computing capability of the execution device; the privacy, the computing capability of different execution devices are different; a first confirming module, configured to determine the data privacy degree of the task data and the task complexity of the target task based on the task data; a second confirming module, configured to determine a target device for executing the target task among the at least two execution devices based on the device attribute information corresponding to each execution device, the data privacy degree of the task data, and the task complexity of the target task.
[0006] In a third aspect, an embodiment of the present application provides a task scheduling device, comprising a memory and a processor, the memory storing a computer program capable of running on the processor, and the processor implements some or all steps of the above method when executing the program.
[0007] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements some or all steps of the above method when executed by a processor.
[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, and the computer program or instructions implement some or all steps of the above method when executed by a processor.
[0009] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, but not limiting the technical solutions of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0010] The accompanying drawings incorporated in the description below and forming a part of it illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the present application.
[0011] Figure 1 An implementation flowchart of a task scheduling method provided by an embodiment of the present application Figure 1 ; Figure 2 An implementation flowchart of a task scheduling method provided by an embodiment of the present application Figure 2 ; Figure 3 An implementation flowchart of a task scheduling method provided by an embodiment of the present application Figure 3 ; Figure 4 A component structure diagram of a double-constraint dynamic scheduling model provided by an embodiment of the present application; Figure 5 A component structure diagram of a task scheduling device provided by an embodiment of the present application; Figure 6 A hardware entity diagram of a task scheduling device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0012] In order to make the purposes, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further described in detail below in combination with the drawings and embodiments, and the described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0013] In the following description, "some embodiments" are referred to, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0014] The terms "first / second / third" involved only distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first / second / third" can interchange the specific order or sequence as allowed, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein.
[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing the present application only and is not intended to be limiting of the present application.
[0016] To solve the technical problems in the related art, the embodiments of the present application provide a task scheduling method, which can be applied to an electronic device, exemplarily including but not limited to a smartphone, a tablet computer, a wearable device, a personal computer (PC), a netbook, a server, etc. The embodiments of the present application are not fixedly limited to the implementation forms.
[0017] In the embodiments of the present application, first, task data of a target task and device attribute information of at least two execution devices are acquired, wherein the privacy and the computing capability of different execution devices are different. Second, the data privacy degree of the task data and the task complexity of the target task are determined based on the task data. Finally, the target device is selected from the multiple execution devices in combination with the device attribute information, the data privacy degree, and the task complexity. In this way, by evaluating the data privacy degree of the task data and the task complexity of the target task in real time, the target device whose privacy matches the data privacy degree of the task data and whose computing capability matches the task complexity of the target task can be determined, thereby solving the problem that the data privacy degree and the task complexity are difficult to be considered in the related art, and effectively improving the processing efficiency corresponding to the task complexity and the processing security corresponding to the data privacy degree.
[0018] The technical solutions of the present application will be described in detail in conjunction with the embodiments as follows, for example, Figure 1 The task scheduling method can be implemented by steps S101 to S103 as shown in the following description: In step S101, task data of a target task and device attribute information of at least two execution devices are acquired. The device attribute information is used to represent the computing capability of the execution device. The privacy and the computing capability of different execution devices are different.
[0019] Here, the task data can be input data of the artificial intelligence model used to perform the target task, and the task type of the target task is related to the data type of the task data. For example, when the target task is an image recognition task, the task data is image data; when the target task is a speech recognition task, the task data is speech data; and when the target task is a text recognition task, the task data is text data.
[0020] The execution device refers to an electronic device in which the artificial intelligence model is deployed, and the device attribute information of the execution device can represent the computing capability of the execution device. The device attribute information of the execution device can include the residual computing power of the device. For example, the residual computing power can be represented by Tera Operations Per Second (TOPS). In some embodiments, the load information of the execution device and the change of the network capacity information can also affect the computing capability of the execution device, so the device attribute information of the execution device can also include the load rate of the device and the available bandwidth. For example, in the case where the execution device includes a cloud device and a local device, the device attribute information of the execution device includes the residual computing power of the local device, the load rate of the local device, the available bandwidth of the cloud device, and the load rate of the cloud device.
[0021] The privacy of the execution device refers to the possibility that the data of the execution device is leaked when the execution device performs a task. The data of the execution device when performing a task can include the input data (i.e., the task data) of the artificial intelligence model deployed on the execution device, the process data of the artificial intelligence model performing a task, and the output data of the artificial intelligence model. It can be understood that different execution devices have different data security levels, so different execution devices have different privacy. For example, the privacy of a local device is greater than that of a cloud device, the privacy of a local device capable of encryption is greater than that of a local device incapable of encryption, and the privacy of a private cloud device is greater than that of a public cloud device.
[0022] In the embodiments of the present application, the execution subject of steps S101 to S103 can be any one of at least two execution devices, or other devices that are not execution devices. After the electronic device performing steps S101 to S103 obtains the task data of the target task, it can send a request to each execution device or other execution devices except itself, and each execution device or other execution devices except itself will send real-time device attribute information to the electronic device in response to the request.
[0023] In step S102, the data privacy degree of the task data and the task complexity of the target task are determined based on the task data.
[0024] Here, the data privacy degree refers to a degree to which the task data can be disclosed. The task complexity of the target task can refer to a complexity of an artificial intelligence model deployed on an execution device for executing the target task.
[0025] In the embodiments of the present application, the task data can be subjected to semantic recognition, and the data privacy degree can be determined based on the semantic recognition result obtained by the recognition. For example, in the case where the task data is voice data or image data which is non-text data, the text information in the task data can be extracted, and then it is determined whether there is a sensitive word in the text information, and the data privacy degree of the task data is determined based on the number of sensitive words. For the text data, it can be directly determined whether there is a sensitive word in the text data, and the data privacy degree of the task data is determined based on the number of sensitive words.
[0026] In the embodiments of the present application, the model type of the artificial intelligence model for executing the target task can be determined according to the data type of the task data, and the task complexity of the target task is determined based on the model type. For example, when the data type of the task data is an image type, it can be determined that the artificial intelligence model is an image recognition model, so that a larger task complexity can be determined. This is because the input data of the image recognition model is image data, and the information contained in the image data is much larger than that of the text data, so when the artificial intelligence model is an image recognition model, a larger task complexity can be determined. When the data type of the task data is a text type, it can be determined that the artificial intelligence model is a text recognition model, so that a smaller task complexity can be determined.
[0027] In some embodiments, the task complexity of the target task can also be determined according to the task instruction triggering the target task and the data type of the task data. It can be understood that the more complex the task instruction is, the greater the task complexity of the target task is.
[0028] In step S103, the target device for executing the target task is determined in the at least two execution devices based on the device attribute information corresponding to each of the execution devices, the data privacy degree of the task data, and the task complexity of the target task.
[0029] In the embodiments of the present application, the task execution conditions corresponding to different execution devices can be obtained first, and the task execution conditions of different execution devices each include a data privacy degree range and a task complexity range. Based on the data privacy degree of the task data and the task complexity of the target task, a plurality of candidate execution devices satisfying the task execution conditions are determined. Based on the device attribute information corresponding to each of the plurality of candidate execution devices, the candidate execution device with the highest computing capability among the plurality of candidate execution devices is determined as the target device.
[0030] It can be understood that the current dynamic scheduling of artificial intelligence tasks needs to meet the dual requirements of privacy protection and inference efficiency. If only resource load or only data security is considered, there will be a contradiction between privacy and efficiency. For example, if data with high data privacy degree is only considered for data security, i.e., executed on an execution device with strong privacy and weak computing ability, the problem of high inference delay caused by insufficient computing power of the execution device will occur. If data with high data privacy degree is excessively dependent on privacy and computing ability of an execution device, data leakage risk will be caused. Therefore, in order to solve the contradiction between privacy and efficiency and improve the dynamic response capability of task scheduling, the task scheduling method provided in the embodiments of the present application can evaluate the data privacy degree of task data and the task complexity of a target task in real time, and determine a target device that meets the dual requirements of privacy protection and inference efficiency based on the computing ability of each execution device.
[0031] In the embodiments of the present application, the data privacy degree is determined based on the semantic recognition result obtained by performing semantic recognition on the task data. In this way, it can be determined whether there is a sensitive word in the task data by performing semantic recognition on the task data, thereby improving the accuracy of determining the data privacy degree. Then, the model type of the artificial intelligence model for executing the target task is determined according to the data type of the task data, and the task complexity of the target task is determined based on the model type. Since the data type of the task data matches the model type of the artificial intelligence model for executing the target task, the model type determines the task complexity of the target task, which can improve the accuracy of determining the task complexity of the target task. Finally, based on the data privacy degree of the task data and the task complexity of the target task, a plurality of candidate execution devices that meet the task execution condition are determined; based on the device attribute information corresponding to each of the plurality of candidate execution devices, the candidate execution device with the highest computing ability among the plurality of candidate execution devices is determined as the target device. In this way, the target device that meets the requirements of privacy protection and inference efficiency and has high computing ability can be selected from at least two execution devices, thereby effectively improving the processing efficiency corresponding to the task complexity and the processing security corresponding to the data privacy degree.
[0032] In some embodiments, the "determining the data privacy degree of the task data based on the task data" in the above step S102 can be implemented through steps S1021 and S1022: Step S1021, determining the sensitivity degree of the task data and the access permission of the task data based on the data type of the task data; the sensitivity degree is used to represent the disclosure degree of the task data to the outside; and the access permission is used to represent the qualification for processing the task data.
[0033] Here, the data type of the task data can represent a data source of the task data, and different data sources correspond to different sensitive degrees of the task data and different access permissions of the task data. Therefore, the sensitive degree of the task data and the access permission of the task data can be determined according to the data type of the task data. For example, the sensitive degree of task data of medical data from a hospital is greater than the sensitive degree of social data from a social software of a user, and the sensitive degree of the social data from the social software of the user is greater than the sensitive degree of public data from a public software. Meanwhile, the access permission of task data from personal exclusive data is greater than the access permission of task data from a department, and the access permission of the task data from the department is greater than the access permission of task data from a publicly accessible data source.
[0034] In the embodiments of the present application, a corresponding relationship between different sensitive degree scores and different access permission scores corresponding to different data types of the task data can be constructed in advance. The greater the data sensitivity corresponding to the data type of the task data, the higher the sensitive degree score, the fewer the number of users who have the qualification to process the task data, and the higher the access permission score. The sensitive degree score is taken as the sensitive degree of the task data, and the access permission score is taken as the access permission of the task data.
[0035] In step S1022, the data privacy degree of the task data is determined based on the sensitive degree and the access permission.
[0036] In the embodiments of the present application, the sensitive degree and the access permission can be analyzed by the analytic hierarchy process (AHP), and the data privacy degree is obtained. The data privacy degree is a value between 0 and 1.
[0037] In the embodiments of the present application, the sensitive degree and the access permission of the task data are determined based on the data type of the task data, and the data privacy degree is determined based on the sensitive degree and the access permission of the task data. In this way, the privacy characteristics of the task data can be more comprehensively reflected, and by taking the sensitive degree and the access permission as the basis for determining the data privacy degree, the privacy evaluation result can be more objective and quantifiable, thereby improving the accuracy of determining the data privacy degree of the task data.
[0038] In some embodiments, the execution device is at least one of a local device and a cloud device. Figure 2 As shown in the figure, the step S102 of determining the task complexity of the target task based on the task data can be implemented by steps S201 to S203: In step S201, the task type of the target task is determined based on the task data.
[0039] In the embodiments of the present application, the task data can be determined to determine the task attribute type, for example, image type data, text type data, and voice type data. Then, the task type of the target task is determined according to the task attribute type. For example, when the task data is image type data, the task type of the target task can be determined as image type task; when the task data is text type data, the task type of the target task can be determined as text type task; and when the task data is voice type data, the task type of the target task can be determined as voice type task.
[0040] In step S202, the first model parameter of the first processing model deployed on the local device and / or the second model parameter of the second processing model deployed on the cloud device are obtained based on the task type.
[0041] Here, the model parameter of the processing model refers to a learnable or preset variable in the processing model for mapping input to output. For example, the model parameter of the processing model can include at least one of the connection strength of each layer of neurons in the neural network, the offset of each neuron, and the hyperparameter.
[0042] In the embodiments of the present application, the first model parameter of the first processing model corresponding to the task type deployed on the local device and / or the second model parameter of the second processing model corresponding to the task type deployed on the cloud device can be obtained. For example, when the task data is image type data, the model parameter of the image processing model deployed on the local device and / or the cloud device can be obtained; when the task data is text type data, the model parameter of the text processing model deployed on the local device and / or the cloud device can be obtained; and when the task data is voice type data, the model parameter of the voice processing model deployed on the local device and / or the cloud device can be obtained.
[0043] In step S203, the task complexity of the target task is determined based on the first model parameter and / or the second model parameter. The parameter quantity of the first model parameter and the parameter quantity of the second model parameter are positively correlated with the task complexity.
[0044] In the embodiments of the present application, the parameter quantity of the first processing model can be determined based on the first model parameter, and / or the parameter quantity of the second processing model can be determined based on the second model parameter. Then, the task complexity of the target task is determined based on the parameter quantity of the first processing model and / or the parameter quantity of the second processing model.
[0045] In some embodiments, the average parameter quantity of the first processing model and the second processing model is determined, and the task complexity of the target task is determined based on the average parameter quantity. In other embodiments, the task complexity of the target task can also be determined based on only the parameter quantity of the first processing model or only the parameter quantity of the second processing model.
[0046] In some embodiments, the operation quantity of one forward inference or training of the first processing model and / or the second processing model can also be obtained first, and then the task complexity of the target task is determined based on the operation quantity of the first processing model and / or the operation quantity of the second processing model, and the first model parameter and / or the second model parameter. The operation quantity can be represented by the number of floating-point operations per second (FLOPs).
[0047] In the embodiments of the present application, the task type of the target task is determined according to the task data first, and then the first model parameter of the first processing model corresponding to the task type deployed on the local device and the second model parameter of the second processing model corresponding to the task type deployed on the cloud device are obtained. Finally, the task complexity of the target task is determined based on the first model parameter and / or the second model parameter through the positive correlation between the parameter quantity of the model parameter and the task complexity. Because the task complexity of the target task can be reflected by the model parameter quantity of the processing model for processing the target task, the task complexity of the target task is determined through the model parameter of the processing model, which can improve the accuracy of determining the task complexity of the target task. At the same time, because the accuracy of the task complexity is high, the inference efficiency requirement of the target task can be accurately located, so that the target device that can meet the inference efficiency requirement of the target task can be selected, and the processing efficiency corresponding to the task complexity is effectively improved.
[0048] In some embodiments, the above step S103 can be implemented by steps S1031 and S1032: In step S1031, the task state information of the target task is constructed based on the device attribute information corresponding to each of the execution devices, the data privacy degree, the task complexity, and the data type of the task data. The data privacy degree and / or the task complexity in the task state information correspond to the data type.
[0049] In some embodiments, initial state information of the target task can be constructed based on the device attribute information, the data privacy level, the task complexity and the data type of the task data of each execution device, and then the data privacy level and / or the task complexity in the initial state information can be adjusted based on the data type of the task data to obtain modified state information of the target task, and the modified state information is determined as the task state information of the target task.
[0050] In some embodiments, the data privacy level and / or the task complexity in the initial state information can be adjusted based on the data type of the task data in the process of constructing the task state information of the target task to obtain the task state information.
[0051] It can be understood that the requirements for privacy protection and the requirements for inference efficiency of different data types of task data are different, so the data privacy level and / or the task complexity need to be adjusted based on the data type of the task data, so as to preferentially meet the requirements for privacy protection or preferentially meet the requirements for inference efficiency when determining the target device. For example, when the task data is image data, because the complexity of image task is higher, the requirements for inference efficiency are preferred, so the task complexity can be increased, so that the execution device with higher computing power (such as a cloud device) can be used as the target device; when the task data is text data, because the data privacy of text task is stronger, the requirements for privacy protection are preferred, so the data privacy level of the task data can be improved, so that the execution device with stronger privacy (such as a local device) can be used as the target device; when the task data is voice data, because the data privacy and complexity of voice task are both moderate, the requirements for privacy protection are preferred, so the data privacy level of the task data can be improved, so that the execution device with stronger privacy (such as a local device) can be used as the target device.
[0052] In step S1032, the target device for executing the target task is determined from the at least two execution devices based on the task state information.
[0053] In the embodiments of the present application, the state value information of the task state information can be determined; the execution benefit information of executing the target task on at least one execution device under the task state information of the target task can be determined; for each execution device, the sum of the state value information and the execution benefit information corresponding to the execution device is determined as the total benefit information of the execution device; and the execution device corresponding to the maximum total benefit information is determined as the target device for executing the target task.
[0054] In the embodiments of the present application, by corresponding the data privacy degree and / or the task complexity to the data type, the task state information of the target task obtained finally can effectively cope with the differentiated needs of different types of tasks.
[0055] In some embodiments, as shown in FIG. 3, Figure 3 The step S1032 can be implemented by steps S301-S303. In step S301, the state value information of the task state information is determined; the state value information is used to represent the matching degree of the device attribute information and the data privacy degree, the task complexity in the task state information.
[0056] Here, the matching degree of the device attribute information and the data privacy degree in the task state information can represent whether the target task has the basis to meet the privacy protection requirement under the task state information. If the matching degree of the device attribute information and the data privacy degree is relatively high, it has the basis to meet the privacy protection requirement, and the value of the state value information is relatively high at this time. Similarly, the matching degree of the device attribute information and the task complexity in the task state information can represent whether the target task has the basis to meet the inference efficiency requirement under the task state information. If the matching degree of the device attribute information and the task complexity is relatively high, it has the basis to meet the inference efficiency requirement, and the value of the state value information is also relatively high at this time.
[0057] For example, the data privacy degree Pi in the task state information is equal to 9, which means that the task data belongs to high privacy data, and the device attribute information in the task state information represents that the remaining computing power of the local device is sufficient (for example, the remaining computing power is 4TOPS). This represents that the matching degree of the device attribute information and the data privacy degree in the task state information is relatively high, and has the basis of "easy to meet privacy protection", and the value of the state value information is relatively high at this time. If the device attribute information represents that the remaining computing power of the local device is insufficient (for example, the remaining computing power is 0.5TOPS), it does not have the basis of "easy to meet privacy protection", and the value of the state value information is relatively low at this time.
[0058] In the embodiments of the present application, the task state information of the target task can be input into a duel deep Q network (Dueling Deep Q-Network, Dueling DQN) to obtain the state value information of the task state information. At this time, the state value information can be represented by V(S'), wherein S' is the task state information described above.
[0059] In step S302, the execution benefit information of executing the target task on at least one execution device under the task state information of the target task is determined.
[0060] Here, the execution benefit information refers to an additional benefit of executing the target task on the current execution device compared with other execution devices under the task state information of the target task.
[0061] Exemplarily, in the case that the execution devices include a local device and a cloud device, the execution benefit information of the local device is an additional benefit of executing the target task on the local device compared with executing the target task on the cloud device under the task state information of the target task. The execution benefit information of the cloud device is an additional benefit of executing the target task on the cloud device compared with executing the target task on the local device under the task state information of the target task. The common execution benefit information of the cloud device and the local device is an additional benefit of executing the target task on the cloud device and the local device compared with executing the target task on the local device or the cloud device under the task state information of the target task.
[0062] It should be noted that, when determining the execution benefit information, the execution benefit information after the target task is executed on at least one execution device is not determined, but the execution benefit information of executing the target task on at least one execution device is predicted based on the task state information of the target task.
[0063] In the embodiment of the present application, the task state information of the target task can be input into a dueling deep Q-network (Dueling Deep Q-Network, Dueling DQN) to obtain the execution benefit information of executing the target task on at least one execution device. At this time, the execution benefit information can be represented by A(S, a), where a is an action of executing the target task on the execution device.
[0064] In step S303, the target device is determined based on the state value information and at least one execution benefit information.
[0065] In the embodiment of the present application, the total benefit corresponding to each execution action can be determined first, and at least one execution device corresponding to the execution action with the maximum total benefit is determined as the target device. The execution action is an action of executing the target task on at least one execution device, and the total benefit is the sum of the state value information and the execution benefit information of the execution action.
[0066] Exemplarily, the execution actions include an action a1 of executing the target task on the local device, an action a2 of executing the target task on the cloud device, and an action a3 of executing the target task on the cloud device and the local device. The total benefit of the action a1 is equal to the execution benefit information of the action a1 plus the state value information, the total benefit of the action a2 is equal to the execution benefit information of the action a2 plus the state value information, and the total benefit of the action a3 is equal to the execution benefit information of the action a3 plus the state value information.
[0067] If the data privacy degree Pi in the state value information is greater than or equal to 0.7, that is, a high privacy requirement needs to be met, and the residual computing power of the local device in the state value information meets the local computing power sufficient condition (the local computing power sufficient condition can be represented by formula (1)), at this time, V(S') is relatively high due to good privacy basis, and the computing power of the local device is sufficient, A(S', a1) is significantly positive due to efficiency standard, at this time, Q(S', a1) = V(S') + A(S', a1) is maximum, that is, the local device is the target device.
[0068] Formula (1); Wherein, is the residual computing power of the local device, is the task complexity, is the minimum residual computing power of the local device.
[0069] If the data privacy degree Pi in the state value information is less than or equal to 0.3, that is, a low privacy requirement needs to be met, and the residual computing power of the local device in the state value information does not meet the local computing power sufficient condition, the available bandwidth of the cloud device meets the cloud bandwidth sufficient condition (the cloud bandwidth sufficient condition can be represented by formula (2)), and the task complexity is greater than or equal to 0.6 (that is, the task is relatively complex), at this time, V(S') is relatively high due to small privacy pressure, and the computing power of the local device is insufficient but the cloud resource is adapted, A(S', a2) is significantly positive due to complexity adaptation, at this time, Q(S', a2) = V(S') + A(S', a2) is maximum, that is, the cloud device is the target device.
[0070] Formula (2); Wherein, is the available bandwidth of the cloud device, is the minimum available bandwidth of the cloud device.
[0071] If the data privacy degree 0.3 < Pi < 0.7 in the state value information, that is, a medium privacy requirement needs to be met, and 0.4 < Ci < 0.6, that is, the target task belongs to medium complexity, V(S') is at a medium level, A(S', a3) is integrated to be positive due to balancing privacy and efficiency, at this time, Q(S', a3) = V(S') + A(S', a3) is maximum, that is, the target device and the cloud device are jointly the target device.
[0072] In the embodiments of the present application, on the basis of the task state information, the state value information and the execution benefit information are determined, and the target device is determined by comprehensively determining the two. In this way, on the one hand, the matching degree of the device attribute and the task requirement is measured through the state value information, the rationality of the task scheduling is improved, and on the other hand, the actual effect of the different devices in executing the task is evaluated through the execution benefit information, and the accuracy of the scheduling decision is further improved.
[0073] In some embodiments, the device attribute information of the at least two execution devices includes computing power information of the local device and network information of the cloud device; and the step S301 can be implemented through steps S3011 to S3013. In step S3011, a plurality of first corresponding relationships between different computing power information and different task complexities, and a plurality of second corresponding relationships between different network information and different task complexities are obtained.
[0074] Here, the computing power information of the local device can be the residual computing power in the above embodiments, and the network information of the cloud device can be the available bandwidth in the above embodiments. In the embodiments of the present application, the corresponding relationship between the different residual computing power of the local device and the task complexity of the task can be constructed in advance, and the corresponding relationship between the different available bandwidth of the cloud device and the task complexity of the task can be constructed in advance.
[0075] It can be understood that the residual computing power of the local device restricts the data processing capability of the local device, so the residual computing power of the local device has a corresponding relationship with the task complexity. For example, when Re≥2TOPS, the local device can process a task with Ci≤0.4, and when Re<1TOPS, only a lightweight task with Ci≤0.2 is supported. Similarly, the available bandwidth of the cloud device restricts the transmission delay capability of the cloud device, so the available bandwidth of the cloud device has a corresponding relationship with the task complexity. For example, when Rc=100Mbps, the transmission delay of 100MB data is about 8 seconds, so a high task complexity task needs to be matched with a high available bandwidth to avoid transmission bottleneck.
[0076] In step S3012, a first matching degree between the computing power information of the local device and the task complexity is determined based on the plurality of first corresponding relationships, and a second matching degree between the network information of the cloud device and the task complexity is determined based on the plurality of second corresponding relationships.
[0077] In the embodiments of the present application, the current computing power information of the local device can be used to determine a first target correspondence relationship corresponding to the computing power information from a plurality of first correspondence relationships, and then the task complexity in the first target correspondence relationship is compared with the task complexity of the target task, and a first matching degree of the computing power information and the task complexity of the local device is determined based on the similarity of the two. In some embodiments, the task complexity of the target task can also be used to determine a second target correspondence relationship corresponding to the task complexity from a plurality of first correspondence relationships, and then the computing power information in the second target correspondence relationship is compared with the current computing power information of the local device, and the first matching degree of the computing power information and the task complexity of the local device is determined based on the similarity of the two.
[0078] In the embodiments of the present application, the current network information of the cloud device can be used to determine a third target correspondence relationship corresponding to the network information from a plurality of second correspondence relationships, and then the task complexity in the third target correspondence relationship is compared with the task complexity of the target task, and a second matching degree of the network information and the task complexity of the cloud device is determined based on the similarity of the two. In some embodiments, the task complexity of the target task can also be used to determine a fourth target correspondence relationship corresponding to the task complexity from a plurality of second correspondence relationships, and then the network information in the fourth target correspondence relationship is compared with the current network information of the cloud device, and the second matching degree of the network information and the task complexity of the cloud device is determined based on the similarity of the two.
[0079] In step S3013, the state value information of the task state information is determined based on the first matching degree, the second matching degree, and the data privacy degree.
[0080] In the embodiments of the present application, when the data privacy degree is within the first privacy range, the first matching degree is directly proportional to the state value information; and when the data privacy degree is within the second privacy range, the second matching degree is directly proportional to the state value information.
[0081] It can be understood that when the data privacy degree is within the first privacy range, it means that the data privacy degree is high, and the demand for high privacy protection needs to be met, that is, the target task is preferentially processed in the local device, and the first matching degree is also relatively high, which means that the computing power information of the local device and the complexity of the task are relatively matched, that is, the state value information is high. Similarly, when the data privacy degree is within the second privacy range, it means that the data privacy degree is low, and the privacy pressure is small, which can meet the demand for inference efficiency, and the second matching degree is relatively high, which means that the network information of the cloud device and the complexity of the task are relatively matched, that is, the state value information is high.
[0082] In the embodiments of the present application, by constructing a plurality of first and second corresponding relationships, the matching degree of the local and the cloud to the task is evaluated, and the state value information of the information of the task state is determined in combination with the data privacy degree. In this way, the feasibility and safety of the task can be comprehensively measured, so that more reasonable scheduling decisions can be made.
[0083] In some embodiments, the above step S1031 can be implemented by steps S11 and S12: Step S11, determining a weight allocation strategy of the data privacy degree and / or the task complexity based on the data type of the task data.
[0084] In the embodiments of the present application, a type one-hot vector can be generated based on the data type of the task data. For example, when the task data is image data, the type one-hot vector is [1, 0, 0]; when the task data is voice data, the type one-hot vector is [0, 1, 0]; and when the task data is text data, the type one-hot vector is [0, 0, 1]. Then, the weight allocation strategy of the data privacy degree and / or the task complexity is determined through the type one-hot vector. For example, the weight allocation strategy can be implemented by formula (3): Formula (3); wherein, is the weight allocation strategy of the data privacy degree and / or the task complexity, W is a learnable weight matrix (dimension 3x2), dk is 2, and T represents transposing the matrix.
[0085] In some embodiments, when the task data is image data, a weight allocation strategy is determined in which the weight of the data privacy degree is less than the weight of the task complexity; when the task data is voice data, a weight allocation strategy is determined in which the weight of the data privacy degree is equal to the weight of the task complexity; and when the task data is text data, a weight allocation strategy is determined in which the weight of the data privacy degree is greater than the weight of the task complexity.
[0086] It can be understood that for different types of task data, the requirements to be prioritized by the target task are different. For example, for an image task, the task complexity of the image task is large, so the weight is biased to the task complexity Ci (the weight ratio is 60%), that is, when the weight allocation strategy adjusts the data privacy degree and / or the task complexity, the influence of the task complexity needs to be enhanced. For a speech task, the data privacy degree and the task complexity of the image task are balanced, so the data privacy degree and the task complexity weight are balanced. For a text task, the data privacy degree of the text data of the text task is large, so the weight is biased to the data privacy degree Pi (the weight ratio is 70%), that is, when the weight allocation strategy adjusts the data privacy degree and / or the task complexity, the influence of the data privacy degree needs to be enhanced.
[0087] In step S12, the task state information of the target task is constructed based on the device attribute information corresponding to each execution device, the data privacy degree, the task complexity, and the data type of the task data through the weight allocation strategy; in the process of constructing the task state information, the weight allocation strategy is used to adjust the data privacy degree and / or the task complexity.
[0088] In the embodiments of the present application, the task state information of the target task can include the device attribute information corresponding to each execution device, the adjusted data privacy degree, the task complexity, and the data type of the task data; in some embodiments, the task state information of the target task can include the device attribute information corresponding to each execution device, the data privacy degree, the adjusted task complexity, and the data type of the task data. In other embodiments, the task state information of the target task can include the device attribute information corresponding to each execution device, the adjusted data privacy degree, the adjusted task complexity, and the data type of the task data. That is, the weight allocation strategy includes at least one of a first weight allocation strategy of adjusting only the data privacy degree, a second weight allocation strategy of adjusting only the task complexity, and a third weight allocation strategy of adjusting the data privacy degree and the task complexity.
[0089] For example, for a text task, the adjusted data privacy degree in the task state information is realized by formula (4): Formula (4); Wherein, is a modal influence factor. In the case that the weight of the data privacy degree is 0.7 and the data privacy degree is amplified by 1.14 times (1+0.2*0.7) when the data privacy degree is 0.2.
[0090] In the embodiments of the present application, the weight distribution strategy is determined based on the data type of the task data, and the weights of the task complexity and the data privacy level are adjusted through the strategy. In this way, the weight change is guided by the data type, so that the task state information is more in line with the priority requirements of different types of tasks.
[0091] In some embodiments, the above task scheduling method can also be implemented through steps S21 and S22: Step S21, obtaining the task processing condition of the target device when performing the target task, in the case that the target device has completed the target task.
[0092] Here, the task processing condition refers to the actual running state and performance indicators exhibited by the target device in the process of executing the target task, including but not limited to resource utilization, privacy leakage risk, and task processing delay.
[0093] In the embodiments of the present application, in the case that the task processing condition includes resource utilization, the resource utilization of the target device is collected through a computing power monitoring tool. In the case that the task processing condition includes privacy leakage risk, the privacy leakage risk of the target device when performing the target task can be determined based on a differential privacy budget algorithm. In the case that the task processing condition includes task processing delay, the task processing delay can be determined through a clock synchronization tool, wherein the task processing delay includes data transmission time consumption and time consumption of processing task data by a processing model deployed on the target device.
[0094] Step S22, adjusting the weight distribution strategy based on the task processing condition.
[0095] In the embodiments of the present application, it can be determined whether the task processing condition meets the weight adjustment condition, and in the case that the weight adjustment condition is met, the weight distribution strategy is adjusted.
[0096] In the embodiments of the present application, after the target device completes the target task, the task processing condition is obtained, and the weight distribution strategy is adjusted based on the task processing condition. In this way, on the one hand, the actual execution effect is fed back through the task processing condition, thereby improving the accuracy of weight adjustment; on the other hand, through the closed-loop feedback mechanism, the strategy can be continuously optimized according to historical experience, thereby improving the stability of task scheduling.
[0097] In some embodiments, the task processing condition includes at least one of the following: resource utilization, privacy leakage risk, and task processing delay; and the above step S22 can be implemented through at least one of steps S221 and S222: Step S221, adjusting the weight of the task complexity in the weight distribution strategy in the case that the resource utilization is greater than a preset utilization rate.
[0098] In the embodiments of the present application, if the target device is a local device, it indicates that the available computing power of the local device does not match the task complexity, and the weight of the task complexity can be increased in this case. In this way, in subsequent task scheduling, the task can be more inclined to be processed by a cloud device.
[0099] In step S222, if the privacy leakage risk is greater than the preset leakage risk, and / or the task processing delay is greater than the preset processing delay, the weight of the data privacy degree in the weight distribution strategy is adjusted.
[0100] In the embodiments of the present application, if the target device is a cloud device, it indicates that the available bandwidth of the cloud device does not match the task complexity, and the weight of the data privacy degree can be increased in this case. In this way, in subsequent task scheduling, the task can be more inclined to be processed by a local device.
[0101] In the embodiments of the present application, if the target device is a cloud device, it indicates that the cloud device has a relatively high possibility of leaking data. In order to meet the privacy protection requirements of the task, the weight of the data privacy degree can be increased in this case. In this way, in subsequent task scheduling, the task can be more inclined to be processed by a local device.
[0102] In the embodiments of the present application, by introducing the resource utilization rate, the privacy leakage risk and the task processing delay as evaluation indexes of the task processing condition, and dynamically adjusting the weights of the task complexity and the data privacy degree, adaptive scheduling under the double constraint conditions can be realized, so as to balance the requirements of privacy protection and inference efficiency.
[0103] In the end-cloud hybrid environment, the dynamic scheduling of the AI task flow needs to meet the dual requirements of privacy protection and inference efficiency. The existing technologies are mostly single-dimensional optimization (such as only considering resource load or only considering data security), which leads to the following problems: First, the contradiction between privacy and efficiency: if high-privacy data is forced to be processed locally, the inference delay may be too high due to insufficient end-side computing power; if low-privacy data relies too much on the cloud, it may cause data leakage risk.
[0104] Second, poor adaptability of multi-modal tasks: existing solutions are mostly for specific scenarios (such as video recognition, energy scheduling), and are difficult to adapt to the differentiated processing needs of multi-modal data such as images, voices and texts.
[0105] Third, insufficient dynamic response capability: lacking real-time evaluation mechanism for task complexity (such as model parameter quantity, calculation delay) and privacy level (such as data sensitivity, access permission), unable to realize adaptive adjustment of task flow.
[0106] In related technologies, the real-time performance of video recognition is improved through dynamic task scheduling, and computing resources are allocated to edge or cloud according to task complexity. However, this scheme has the following problems: First, single-dimensional optimization: only focusing on privacy or efficiency, without realizing collaborative decision-making under double constraints.
[0107] Second, scene limitation: mainly for specific fields (such as industrial manufacturing and video monitoring), lacking general AI task flow management capabilities.
[0108] Third, lack of dynamicity: relying on preset rules or static strategies, unable to respond to changes in task complexity and privacy level in real time.
[0109] Fourth, lack of negative feedback mechanism: users cannot know which data is being transmitted across the end, the decay of privacy encryption strength in cloud processing, and the correlation between inference result accuracy and scheduling strategy. Existing systems only execute scheduling instructions in one direction, without establishing a closed-loop mechanism of "execution effect-strategy correction". For example, when high-privacy data transmission risk increases due to sudden network attacks, the system cannot adjust to local processing mode based on real-time risk feedback; when low-complexity tasks cause resource contention in the cloud, resulting in time delay exceeding the limit, the system cannot trigger the end-side takeover mechanism in the opposite direction, causing the scheduling strategy to always lag behind the actual running state.
[0110] The embodiments of the present application provide a double-constraint dynamic scheduling model based on deep reinforcement learning (Deep Reinforcement Learning with Production Constraints for Dynamic Scheduling, DRL-PC), which has the following functions: First, state space construction: define the state vector S of the task as S=[P1, P2,..., Pn, C1, C2,..., Cn, Re, Rc], where Pi is the privacy level of the i-th task (quantized as 0-1, 1 for the highest), Ci is the inference complexity (normalized by model parameter quantity and FLOPs), Re is the remaining computing power of the local end, and Rc is the available bandwidth of the cloud.
[0111] Second, reinforcement learning decision mechanism: using Dueling DQN architecture, the action space A includes "end-side local execution", "cloud full-quantity execution", and "end-cloud split execution".
[0112] Third, multi-modal adaptation module: introduce task type embedding vector Ti (image / speech / text mapped to 1, 0, 0 / 0, 1, 0 / 0, 0, 1 respectively), and correct the state space through attention mechanism: S'=S+α Attention(Ti, [Pi, Ci]), which realizes differentiated scheduling of different modal tasks.
[0113] In the embodiments of the present application, the above model has the following advantages: 1. Compared with existing single-dimensional algorithms, dynamic weights can balance privacy and efficiency in real time. 2. Dynamic response speed is improved: through online policy iteration, the lag of static scheduling in existing solutions is solved, and the response speed is improved in the load fluctuation scenario. 3. Generalization ability breakthrough: the multi-modal embedding mechanism makes the model have higher adaptation accuracy in cross-scene task flow (such as processing video frames + voice instructions at the same time), breaking through the specific scene limitation of existing solutions.
[0114] As shown in Figure 4 The above double-constraint dynamic scheduling model includes a data input layer 401, a preprocessing layer 402, a core decision layer 403, an execution layer 404, and a feedback layer 405, forming a closed-loop mechanism of "data input-preprocessing-decision-execution-feedback".
[0115] In the embodiments of the present application, the function of the data input layer is to receive multi-modal AI task flow data, including images (such as medical images, monitoring screens), voice (such as call records, instruction audio), text (such as medical records, privacy documents), etc., and automatically label task type tags (Ti) through format recognition, which is the same as the task type embedding vector. The specific implementation method is: through the application programming interface (Application Programming Interface, API) interface to the end-side device (such as a smart phone, an industrial sensor) and a cloud-side data gateway, support HyperText Transfer Protocol (HyperText Transfer Protocol, HTTP) / HyperText Transfer Protocol Secure (HyperText Transfer Protocol Secure, HTTPS), Message Queuing Telemetry Transport (Message Queuing Telemetry Transport, MQTT) and other protocols, real-time receive streaming data and cache to local queue.
[0116] In the embodiments of the present application, the preprocessing layer includes a privacy level quantization module, an inference complexity calculation module, and a modal embedding module; wherein the privacy level quantization module is used to construct a double-layer evaluation model based on data sensitivity (such as medical data > social data > public data) and access permission (such as personal exclusive > department shared > public access), and the privacy level is quantized to a continuous value (Pi) between 0 and 1 through the analytic hierarchy process (Analytic Hierarchy Process, AHP). For example, medical image data contains patient privacy information, and Pi is set to 0.8-1.0 by default; the Pi of public news text is set to 0.1-0.3.
[0117] In the embodiments of the application, the inference complexity calculation module is used to extract the AI model parameters (such as ResNet-50 parameter quantity 25 million and BERT-base parameter quantity 110M) associated with the task, and convert the inference complexity into Ci values in the 0-1 interval through a normalization formula.
[0118] In the embodiments of the application, the modal embedding module is used to map the task type (image / speech / text) into a three-dimensional one-hot vector Ti, and generate a modal weight matrix through an attention mechanism. For example, for an image task, Ti=1, 0, 0, the attention weight is biased towards computational complexity; for a speech task, Ti=0, 1, 0, the attention weight balances privacy and real-time performance; and for a text task, Ti=0, 0, 1, the attention weight is biased towards privacy protection.
[0119] In the embodiments of the application, the core decision layer is a dynamic scheduling "intelligent hub", which realizes real-time decision-making under the dual constraints (privacy-efficiency) based on an improved deep reinforcement learning framework (DRL-PC), and forms a closed-loop decision chain through state perception, multi-modal adaptation and reinforcement learning inference; wherein the core decision layer comprises a state space construction module and an improved DuelingDQN decision engine.
[0120] In the embodiments of the application, the state space construction module is used to fuse the task attributes, resource states and modal features in real time, and construct a high-dimensional dynamic state vector, thereby providing a decision basis for reinforcement learning.
[0121] wherein the state vector S=[P1, P2, …, Pn, C1, C2, …, Cn, Re, Rc, Ti, Le, Lc], Pi (privacy level): 0-1 quantized value output by the preprocessing layer (such as medical image Pi=0.9, public text Pi=0.2); wherein Ci (inference complexity): normalized value output by the preprocessing layer (based on model FLOPs and parameter quantity, such as Ci=0.2 for MobileNet, Ci=0.9 for GPT-3); Re (remaining computing power on the edge side): collected in real time through the API interface of the edge side device, with the unit of TOPS (trillion operations per second), reflecting the current available processing capability on the edge side; Rc (available bandwidth on the cloud side): measured in real time through the cloud network monitoring tool (such as iftop), with the unit of Mbps, reflecting the carrying capacity of the data transmission channel (such as the current Rc=500Mbps); Ti (modality embedding vector): one-hot vector output by the preprocessing layer (image [1, 0, 0], speech [0, 1, 0], text [0, 0, 1]); Le (load rate on the edge side): used computing power on the edge side / total computing power on the edge side (0-1, such as 0.6 indicating that 60% of the computing power on the edge side has been occupied); wherein the used computing power=total computing power on the edge side minus the remaining computing power on the edge side; Lc (load rate on the cloud side): used bandwidth on the cloud side / total bandwidth on the cloud side (0-1, such as 0.3 indicating that 30% of the bandwidth on the cloud side has been occupied).
[0122] In the embodiments of the present application, the state space construction module is further used to associate the inference complexity Ci with the remaining computing power Re on the edge side, exemplarily, when Re≥2TOPS, tasks with Ci≤0.4 can be processed; when Re<1TOPS, only lightweight tasks with Ci≤0.2 are supported, and the association is transmitted into the decision engine in real time through the state vector as a hard constraint for action selection.
[0123] In the embodiments of the present application, the state space construction module is further used to associate the inference complexity Ci with the available bandwidth Rc on the cloud side, exemplarily, the lower the Rc, the higher the time delay for transmitting the same data amount (such as when Rc=100Mbps, the time delay for transmitting 100MB data is about 8 seconds), therefore, the Rc and Ci in the state vector are linked, and high-Ci tasks need to be matched with high-Rc to avoid transmission bottlenecks.
[0124] In the embodiments of the present application, the state space construction module is further used to collect Rc, Re, Le, Lc, Pi, Ci, Ti every 50ms to form a complete state vector S, ensuring millisecond-level response to dynamic loads.
[0125] In the embodiments of the present application, the state space construction module is further used to strengthen the differentiated needs of different modality tasks for privacy / inference complexity through attention mechanism, and correct the state vector S to S′. The attention weight is calculated for the modality embedding vector Ti and [P, Ci]. The attention weight can be realized through the above formula (3).
[0126] Exemplarily, for the image task (Ti=[1, 0, 0]): the attention weight is biased towards the inference complexity Ci (weight ratio 60%), that is, the influence of the inference complexity Ci in S' is enhanced (complexity is given priority); for the voice task (Ti=[0, 1, 0]): the privacy level Pi and the inference complexity Ci are balanced (each accounts for 50%); for the text task (Ti=[0, 0, 1]): the attention weight is biased towards the privacy level Pi (ratio 70%, privacy is given priority).
[0127] In the embodiment of the application, the state space construction module is further configured to obtain S' by correcting S by using the attention weight, and the correction manner can be realized by formula (5): Formula (5); Wherein, is the corrected state vector, is the element-wise multiplication. Exemplarily, the Pi value in S' of the text task is amplified by 1.14 times (1+0.2*0.7), and the weight of privacy in decision-making is strengthened.
[0128] In the embodiment of the application, the four aspects of "privacy-efficiency-resource-modal" are coupled to provide a complete feature basis for the dual-constraint decision-making, and the problem of "trade-off" in the existing scheme is solved. The "differentiated scheduling" of multi-modal tasks is realized for the first time, so that the system can adapt to different scenes such as image (heavy efficiency), voice (balance privacy and real-time), and text (heavy privacy), and the scene limitation of the existing scheme is broken. The mechanism first realizes the "differentiated scheduling" of multi-modal tasks, so that the system can adapt to different scenes such as image (heavy efficiency), voice (balance privacy and real-time), and text (heavy privacy), and breaks through the scene limitation of the existing scheme.
[0129] In the embodiment of the application, the improved Dueling DQN decision engine is used to adopt the classical Dueling DQN structure of "state value + action advantage" separation, to split the action value function into state value V(S') (reflecting the overall value of the corrected state S') and action advantage A(S', a) (reflecting the relative advantage of selecting action a under state S'), and finally the action value Q(S', a)=V(S')+A(S', a). The structure can more accurately evaluate the adaptability of different actions in the dual-constraint scene, and avoid the decision deviation caused by single value evaluation.
[0130] Among them, the state value V(S') measures the "current state S' (including privacy level Pi, reasoning complexity Ci, end-side remaining computing power Re, cloud-side bandwidth Rc, and modal Ti, etc.). It does not care about "whether to choose end-side execution or cloud-side execution", but only evaluates "whether this state is good now": for example, the state of "high privacy (Pi=0.9) + sufficient end-side computing power (Re=4TOPS)" itself has the basis of "easy to meet privacy protection", so the state value V(S') will be higher; and the state of "high privacy (Pi=0.9) + insufficient end-side computing power (Re=0.5TOPS)" has a poor basic condition (privacy and efficiency are difficult to balance), so V(S') will be lower.
[0131] The action advantage A(S',a) depends on the "relative income difference" of "current state S'" and "specific action a" - simply put, it measures the "additional income brought by choosing action a (such as 'end-side execution', 'cloud-side execution','split execution') compared to choosing other actions (such as a1, a2)" in the current state S'.
[0132] The final action value Q(S',a) can represent the "total income" brought by choosing a certain action a (such as "end-side execution" or "cloud-side execution") in the current state S'. The core of the final action value Q(S',a) is to add the "basic value of the state itself" and the "relative advantage of the action". For example, assume that the current state S' is "high privacy (Pi=0.8) + sufficient end-side computing power (Re=3TOPS)", at this time: the state value V(S')=0.7 (this state itself has a good basis and is easy to balance privacy and efficiency); if action a="end-side execution" is chosen, its action advantage A(S',a)=+0.2 (this action is more privacy-protective than "cloud-side execution" in this state, with high additional income); then Q(S',a=end-side execution)=0.7+0.2=0.9, representing "the total income of choosing end-side execution in this state is 0.9".
[0133] In the embodiments of the present application, since Q(S',a)=V(S')+A(S',a) has comprehensively evaluated the state basic value and the action adaptability, the selection of the execution layer is essentially "the landing of the optimal solution of the Q value". Among them, the execution layer includes an end-side execution unit, a cloud-side execution unit, and an end-cloud split execution unit; For the end-side execution unit, the corresponding action a1="end-side local execution". For example, the end-side execution unit executes the task under the condition that the modified state S' satisfies: Pi≥0.7 (high privacy requirement, V(S') is high due to good privacy basis), and Re≥Ci×Re_min (sufficient end-side computing power, A(S',a1) is significantly positive due to efficiency meeting the standard), at this time Q(S',a1)=V(S')+A(S',a1) is the maximum of the three.
[0134] For the cloud execution unit, the corresponding action a2 = "cloud full execution", exemplarily, the condition for the cloud execution unit to execute the task is: when the modified state S' satisfies: Pi≤0.3 (low privacy requirement, V(S') is high due to small privacy pressure), and Rc≥Ci×Rc_min, Ci≥0.6 (insufficient end-side computing power but cloud resource adaptation, A(S', a2) is significantly positive due to complexity adaptation), at this time Q(S', a2) is the maximum of the three.
[0135] For the end-cloud split execution unit, the corresponding action a3 = "end-cloud split execution", exemplarily, the condition for the end-cloud split execution unit to execute the task is: when the modified state S' satisfies: 0.3
[0136] In the embodiments of the present application, the feedback layer is a key link of the "execution-decision" closed loop, and connects the execution layer and the core decision layer. The core is to collect execution effect data and output a correction signal, solving the defect that the existing scheme lacks negative feedback. The action flow of the feedback layer is as follows: Step 1. Data collection: for different actions (end-side / cloud / split execution) of the execution layer, 3 types of core indicators are collected in a targeted manner - resource utilization rate η is collected through an end-side computing power monitoring tool (API), ΔP (privacy disclosure risk increment) is calculated through a cloud privacy monitoring module (based on differential privacy budget), and ΔT (total time delay of reasoning, including calculation + transmission time consumption) is calculated through an end-cloud clock synchronization tool.
[0137] Step 2. Data verification: compare the collected η, ΔP, and ΔT with the preset threshold (such as η≤80%, ΔP≤0.05, and ΔT≤100ms). If the indicators are out of limit (such as ΔT>100ms), generate correction labels such as "efficiency optimization" and "privacy reinforcement".
[0138] Step 3. Signal feedback: the labeled indicator data is transmitted to the core decision layer to update the DRL-PC model parameters - for example, when ΔP is out of limit, the attention weight of the privacy level Pi in the text task is adjusted to increase, so that the subsequent decision is more inclined to local execution, and the dynamic correction of the scheduling strategy is realized.
[0139] Figure 5 The composition structure of a task scheduling device provided in the embodiments of the present application is shown in FIG. 5. Figure 5 As shown in FIG. 5, the task scheduling device 500 includes an acquisition module 501, a first determination module 502, and a second determination module 503. The acquisition module 501 is configured to acquire task data of a target task and device attribute information of at least two execution devices; the device attribute information is used to represent the computing capability of the execution device; the privacy of different execution devices is different, and the computing capability is different. The first confirmation module 502 is configured to determine, based on the task data, a data privacy degree of the task data and a task complexity of the target task. The second confirmation module 503 is configured to determine, based on the device attribute information corresponding to each execution device, the data privacy degree of the task data and the task complexity of the target task, a target device for executing the target task from the at least two execution devices.
[0140] In some embodiments, the first confirmation module 502 is configured to determine, based on the data type of the task data, a sensitive degree of the task data and an access permission of the task data; the sensitive degree is used to represent the disclosure degree of the task data to the outside; the access permission is used to represent the qualification for processing the task data; and the data privacy degree of the task data is determined based on the sensitive degree and the access permission.
[0141] In some embodiments, the execution device is at least one of a local device and a cloud device; the first confirmation module 502 is configured to determine, based on the task data, a task type of the target task; based on the task type, acquire a first model parameter of a first processing model deployed on the local device and / or a second model parameter of a second processing model deployed on the cloud device; determine the task complexity of the target task based on the first model parameter and / or the second model parameter; and the parameter quantity of the first model parameter and the parameter quantity of the second model parameter are positively correlated with the task complexity.
[0142] In some embodiments, the second confirmation module 503 is configured to construct, based on the device attribute information corresponding to each execution device, the data privacy degree, the task complexity and the data type of the task data, task state information of the target task; the data privacy degree and / or the task complexity in the task state information correspond to the data type; and the target device for executing the target task is determined from the at least two execution devices based on the task state information.
[0143] In some embodiments, the second confirmation module 503 is configured to determine state value information of the task state information, the state value information being used to represent a matching degree between the device attribute information and the data privacy degree and the task complexity in the task state information, determine execution benefit information of the target task when executed on at least one of the execution devices under the task state information of the target task, and determine the target device based on the state value information and the execution benefit information of at least one of the execution devices.
[0144] In some embodiments, the second confirmation module 503 is configured to obtain a plurality of first corresponding relationships between different computing power information and different task complexities, and a plurality of second corresponding relationships between different network information and different task complexities, determine a first matching degree between the computing power information of the local device and the task complexity based on the plurality of first corresponding relationships, and determine a second matching degree between the network information of the cloud device and the task complexity based on the plurality of second corresponding relationships, and determine the state value information of the task state information based on the first matching degree, the second matching degree, and the data privacy degree.
[0145] In some embodiments, the second confirmation module 503 is configured to determine a weight distribution strategy of the data privacy degree and / or the task complexity based on a data type of the task data, and construct the task state information of the target task based on the device attribute information corresponding to each of the execution devices, the data privacy degree, the task complexity, and the data type of the task data through the weight distribution strategy, and adjust the data privacy degree and / or the task complexity in the process of constructing the task state information.
[0146] In some embodiments, the task scheduling apparatus 500 further includes a feedback module configured to obtain a task processing condition of the target device when executing the target task in a case where the target device has executed the target task, and adjust the weight distribution strategy based on the task processing condition.
[0147] In some embodiments, the task processing condition includes at least one of a resource utilization rate, a privacy leakage risk, and a task processing delay, and the feedback module is further configured to adjust a weight of the task complexity in the weight distribution strategy in a case where the resource utilization rate is greater than a preset utilization rate, and adjust a weight of the data privacy degree in the weight distribution strategy in a case where the privacy leakage risk is greater than a preset leakage risk and / or the task processing delay is greater than a preset processing delay.
[0148] The description of the above device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. In some embodiments, the device provided by the embodiments of the present application has functions or includes modules that can be used to perform the methods described in the above method embodiments. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application.
[0149] It should be noted that, in the embodiments of the present application, if the task scheduling method described above is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of the embodiments of the present application. The storage medium mentioned above includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various program code storage media. Thus, the embodiments of the present application are not limited to any specific hardware, software or firmware, or any combination of hardware, software and firmware.
[0150] The embodiments of the present application provide a computer device, including a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements part or all of the steps of the above method when executing the program.
[0151] The embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement part or all of the steps of the above method. The computer readable storage medium can be transitory or non-transitory.
[0152] The embodiments of the present application provide a computer program, which includes computer readable code, and when the computer readable code runs in a computer device, a processor in the computer device executes part or all of the steps of the above method.
[0153] The embodiment of the present application provides a computer program product, the computer program product comprises a non-transitory computer readable storage medium storing a computer program, and the computer program is read and executed by a computer to implement part or all of the steps in the above method. The computer program product can be specifically realized by means of hardware, software or combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in some other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
[0154] It should be noted that the above description of the various embodiments tends to emphasize the differences between the various embodiments, and the same or similar parts can be referred to each other. The above description of the device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the device, storage medium, computer program and computer program product embodiments of the present application, please refer to the description of the method embodiments of the present application.
[0155] Figure 6 A hardware entity diagram of a task scheduling device in the embodiment of the present application is shown in FIG. 6, which comprises a processor 601, a communication interface 602 and a memory 603. Figure 6 The hardware entity of the task scheduling device 600 comprises a processor 601, a communication interface 602 and a memory 603, wherein: The processor 601 generally controls the overall operation of the task scheduling device 600, and the overall operation can be to implement the task scheduling method provided by the embodiment of the present application.
[0156] The communication interface 602 can enable the task scheduling device 600 to communicate with other terminals or servers through a network.
[0157] The memory 603 is configured to store instructions and applications executable by the processor 601, and can also cache data to be processed by the processor 601 and modules in the task scheduling device 600 (for example, image data, audio data, voice communication data and video communication data) that have been processed or have been processed, which can be realized by FLASH or RAM. The processor 601, the communication interface 602 and the memory 603 can transmit data through the bus 604.
[0158] The embodiment of the present application provides a computer storage medium, and the computer storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the task scheduling method of any one of the above embodiments.
[0159] It should be noted that the above description of the storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments for understanding.
[0160] The processor can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, or a microprocessor. It can be understood that the electronic device implementing the functions of the processor can also be other devices, and the embodiments of the present application are not limited in this regard.
[0161] The computer storage medium / memory can be a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Ferromagnetic Random Access Memory (FRAM), a Flash Memory, a magnetic surface memory, an optical disc, or a Compact Disc Read-Only Memory (CD-ROM), etc. It can also be various terminals including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0162] It should be understood that the term "one embodiment" or "an embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, the appearances of the phrase "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the application, the order of the steps / processes can be changed without altering the essence of the application described. The sequence of the steps / processes should be determined by their functions and the inherent logic, and should not constitute any limitation on the implementation of the embodiments of the application. The sequence of the embodiments of the application is only for the purpose of description, and does not represent the advantages or disadvantages of the embodiments.
[0163] It should be noted that, as used in this document, the terms "includes," "including," "has," "having," "contains," "containing," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to only those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.
[0164] The above merely describes the embodiments of the application, but the protection scope of the application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the application, which should be covered within the protection scope of the application.
Claims
1. A task scheduling method, comprising: obtaining task data of a target task and device attribute information of at least two execution devices; the device attribute information is used to represent the computing capability of the execution device; the privacy, the computing capability of different execution devices are different; based on the task data, determining the data privacy degree of the task data and the task complexity of the target task; based on the device attribute information corresponding to each execution device, the data privacy degree of the task data and the task complexity of the target task, determining a target device for executing the target task from the at least two execution devices. 2.The method of claim 1, wherein based on the task data, determining the data privacy degree of the task data comprises: based on the data type of the task data, determining the sensitivity degree of the task data and the access permission of the task data; the sensitivity degree is used to represent the disclosure degree of the task data to the outside; the access permission is used to represent the qualification for processing the task data; based on the sensitivity degree and the access permission, determining the data privacy degree of the task data.
3. The method of claim 1, the execution device being at least one of a local device and a cloud device. based on the task data, determining the task complexity of the target task comprises: based on the task data, determining the task type of the target task; based on the task type, obtaining the first model parameter of a first processing model deployed on the local device and / or the second model parameter of a second processing model deployed on the cloud device; based on the first model parameter and / or the second model parameter, determining the task complexity of the target task; the parameter quantity of the first model parameter, the parameter quantity of the second model parameter and the task complexity are positively correlated. 4.The method of any one of claims 1 to 3, wherein based on the device attribute information corresponding to each execution device, the data privacy degree of the task data and the task complexity of the target task, determining a target device for executing the target task from the at least two execution devices comprises: based on the device attribute information corresponding to each execution device, the data privacy degree, the task complexity and the data type of the task data, constructing task state information of the target task; the data privacy degree and / or the task complexity in the task state information correspond to the data type; based on the task state information, determining a target device for executing the target task from the at least two execution devices. 5.The method of claim 4, wherein based on the task state information, determining a target device for executing the target task from the at least two execution devices comprises: determining state value information of the task state information; the state value information is used to represent the matching degree of the device attribute information and the data privacy degree, the task complexity in the task state information; determining execution benefit information when executing the target task on at least one execution device under the task state information of the target task. determine the target device based on the state value information and at least one of the execution benefit information.
6. The method of claim 5, wherein the device attribute information of the at least two execution devices comprises computing power information of a local device and network information of a cloud device. The state value information of the task state information is determined by: obtaining a plurality of first corresponding relationships between different computing power information and different task complexities, and a plurality of second corresponding relationships between different network information and different task complexities; determining a first matching degree between the computing power information of the local device and the task complexity based on the plurality of first corresponding relationships, and determining a second matching degree between the network information of the cloud device and the task complexity based on the plurality of second corresponding relationships; determine the state value information of the task state information based on the first matching degree, the second matching degree and the data privacy degree.
7. The method of claim 4, wherein the task state information of the target task is constructed based on the device attribute information of each execution device, the data privacy degree, the task complexity and the data type of the task data, comprising: determining a weight allocation strategy of the data privacy degree and / or the task complexity based on the data type of the task data; constructing the task state information of the target task based on the device attribute information of each execution device, the data privacy degree, the task complexity and the data type of the task data through the weight allocation strategy; in the process of constructing the task state information, the weight allocation strategy is used to adjust the data privacy degree and / or the task complexity.
8. The method of claim 7, further comprising: obtaining a task processing condition of the target device executing the target task in the case that the target device executes the target task; adjusting the weight allocation strategy based on the task processing condition.
9. The method of claim 8, wherein the task processing condition comprises at least one of resource utilization, privacy leakage risk and task processing delay; adjusting the weight allocation strategy based on the task processing condition, comprising: adjusting the weight of the task complexity in the weight allocation strategy in the case that the resource utilization is greater than a preset utilization; adjusting the weight of the data privacy degree in the weight allocation strategy in the case that the privacy leakage risk is greater than a preset leakage risk, and / or the task processing delay is greater than a preset processing delay.
10. A task scheduling apparatus, comprising: an acquisition module configured to acquire task data of a target task and device attribute information of at least two execution devices; the device attribute information is used to represent the computing power of the execution device; different execution devices have different privacy and computing power; a first confirmation module configured to determine a data privacy degree of the task data and a task complexity of the target task based on the task data. A second confirmation module is configured to determine a target device for executing the target task from the at least two execution devices based on the device attribute information corresponding to each of the execution devices, the data privacy degree of the task data, and the task complexity of the target task.