Resource allocation method, resource allocation device, storage medium and electronic equipment

CN119376905APending Publication Date: 2025-01-28CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310920041.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing cloud network resource allocation technology has problems with low accuracy and efficiency of resource allocation.

Method used

Through the processing task for task split analysis, obtain the sub -task, and distribute the resource allocation template in the resource allocation template database to allocate resource allocation of sub -tasks. The resource allocation template database stores the historical resource information and the execution performance of the historical resource information assigned to historical tasks and the execution performance of historical tasks. Based on this, it can improve the efficiency and accuracy of resource distribution.

Benefits of technology

Improve the accuracy and efficiency of resource allocation, through learning historical resource allocation experience, optimize resource allocation decision -making, and meet the target execution performance of the task to be handled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376905A_ABST
    Figure CN119376905A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to a resource allocation method and device, a computer readable storage medium and electronic equipment. The method comprises the steps of performing task splitting analysis on a to-be-processed task to obtain sub-tasks corresponding to the to-be-processed task; according to a resource allocation template in a resource allocation template database, performing resource allocation on the sub-tasks; the resource allocation template is used for indicating task information of historical sub-tasks, historical resource information allocated to the historical sub-tasks and a mapping relation among execution performance of the historical sub-tasks. According to the invention, the efficiency and accuracy of resource allocation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] The cloud network operating system is a system built to fully utilize various resources such as network, computing and storage. Reasonable allocation and control of cloud network resources can reduce the difficulty of operation and maintenance and improve the utilization rate of cloud network resources. Therefore, the allocation of cloud network resources is crucial.

[0003] Cloud network resource allocation in related technologies is focused on achieving optimal allocation of relevant resources for existing tasks. However, there are problems with low accuracy and efficiency of resource allocation.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present disclosure is to provide a resource allocation method, a resource allocation device, a computer-readable medium and an electronic device, thereby improving the accuracy and efficiency of resource allocation at least to a certain extent.

[0006] According to the first aspect of the present disclosure, a resource allocation method is provided, comprising: performing task splitting analysis on a task to be processed to obtain subtasks corresponding to the task to be processed; performing resource allocation on the subtasks according to a resource allocation template in a resource allocation template database; the resource allocation template is used to indicate a mapping relationship between task information of a historical subtask, historical resource information allocated to the historical subtask, and execution performance of the historical subtask.

[0007] In an exemplary embodiment, based on the aforementioned embodiment, after allocating resources to the subtask according to the resource allocation template, the method further includes: executing the subtask based on the resource allocation result of the subtask; and updating the resource allocation template database according to the execution performance of the subtask.

[0008] In an exemplary embodiment, based on the aforementioned embodiment, updating the resource allocation template database according to the execution performance of the subtask includes: updating the resource allocation template database according to the execution performance of the subtask when the execution performance of the subtask meets a preset execution performance cost.

[0009] In an exemplary embodiment, based on the aforementioned embodiment, updating the resource allocation template database according to the execution performance of the subtask includes: adding the mapping relationship between the task information of the subtask, the resource information allocated to the subtask, and the execution performance of the subtask to the resource allocation template database to update the resource allocation template database.

[0010] In an exemplary embodiment, based on the aforementioned embodiment, allocating resources to the subtask according to the resource allocation template in the resource allocation template database includes: matching the task information of the subtask with the task information of the historical subtask corresponding to the resource allocation template in the resource allocation template database; and allocating resources to the subtask based on the matching result.

[0011] In an exemplary embodiment, based on the above-mentioned embodiment, allocating resources to the subtask according to the matching result includes: in the case of successful matching, allocating resources to the subtask according to historical resource information corresponding to the historical subtask that successfully matched.

[0012] In an exemplary embodiment, based on the aforementioned embodiment, in the case of a successful match, resources are allocated to the subtask according to the historical resource information corresponding to the successfully matched historical subtask, including: in the case of a successful match, the successfully matched historical subtask is determined as the target historical subtask; resources are allocated to the subtask according to the historical resource information corresponding to the target historical subtask whose execution performance summary results meet the target execution performance of the task to be processed.

[0013] In an exemplary embodiment, based on the foregoing embodiment, allocating resources to the subtasks according to the matching results includes: in the case of a matching failure, allocating resources to the subtasks randomly or according to a preset resource allocation rule.

[0014] In an exemplary embodiment, based on the aforementioned embodiment, the task splitting analysis of the task to be processed to obtain the subtasks corresponding to the task to be processed includes: performing task splitting analysis on the task to be processed to obtain the subtasks corresponding to the task to be processed and the execution order of the subtasks; allocating resources to the subtasks according to the resource allocation template in the resource allocation template database includes: allocating resources to the subtasks according to the execution order of the subtasks, the target execution performance of the task to be processed and the resource allocation template in the resource allocation template database.

[0015] In an exemplary embodiment, based on the aforementioned embodiment, allocating resources to the subtasks according to the execution order of the subtasks, the target execution performance of the task to be processed and the resource allocation template in the resource allocation template database includes: while satisfying the execution order of the subtasks, determining a reference resource allocation template for each subtask from the historical subtasks in the resource allocation template database, so that the summary result of the execution performance in the reference resource allocation template of each subtask satisfies the target execution performance of the task to be processed; and allocating resources to the subtasks according to the resource allocation information in the reference resource allocation template of each subtask.

[0016] In an exemplary embodiment, based on the aforementioned embodiment, after allocating resources to the subtask according to the resource allocation template, the method further includes: executing the subtask based on the resource allocation result of the subtask; determining the execution performance of the task to be processed according to the execution performance of the subtask; and re-performing task splitting analysis on the task to be processed when the difference between the execution performance of the task to be processed and the target execution performance of the task to be processed is greater than a first preset value to regain the subtask corresponding to the task to be processed.

[0017] In an exemplary embodiment, based on the aforementioned embodiment, the method further includes: when the difference between the execution performance of the task to be processed and the target execution performance of the task to be processed is less than or equal to the first preset value and greater than a second preset value, redetermining the execution order of the subtasks to re-execute the subtasks based on the redetermined execution order, and the first preset value is greater than the second preset value.

[0018] In an exemplary embodiment, based on the aforementioned embodiment, the task splitting analysis of the task to be processed to obtain the subtask corresponding to the task to be processed includes: performing a task splitting analysis on the task to be processed according to the task splitting template in the task splitting template database to obtain the subtask corresponding to the task to be processed; wherein the task splitting template is used to indicate the mapping relationship between historical task information, the splitting status of historical tasks, and the execution performance of historical tasks.

[0019] In an exemplary embodiment, based on the aforementioned embodiment, the task to be processed is subjected to task splitting analysis according to the task splitting template in the task splitting template database to obtain the subtask corresponding to the task to be processed, including: matching the task information of the task to be processed with the historical task information in the task splitting template database; when the task information of the task to be processed and the historical task information match successfully, the task splitting analysis of the task to be processed is performed according to the historical task splitting corresponding to the successfully matched historical task to obtain the subtask corresponding to the task to be processed.

[0020] In an exemplary embodiment, based on the aforementioned embodiment, according to the historical task splitting corresponding to the historical tasks that have been matched successfully, a task splitting analysis is performed on the task to be processed to obtain the subtasks corresponding to the task to be processed, including: according to the historical task splitting corresponding to the historical tasks that have been matched successfully and whose execution performance meets the target execution performance of the task to be processed, a task splitting analysis is performed on the processing task to obtain the subtasks corresponding to the task to be processed.

[0021] In an exemplary embodiment, based on the aforementioned embodiment, the method further includes: in a case where the task information of the task to be processed and the historical task information fail to match, performing a task analysis on the task to be processed to obtain a task analysis result of the task to be processed, the task analysis result including one or more of a parallel relationship, a serial relationship, and an execution duration of different tasks in the task to be processed; according to the task analysis result, splitting the task to be processed to obtain subtasks corresponding to the task to be processed.

[0022] In an exemplary embodiment, based on the aforementioned embodiment, the pending tasks include pending tasks in the terminal, and the resource allocation for the subtasks according to the resource allocation template in the resource allocation template database includes: determining the current scenario of the terminal according to the current state of the terminal; predicting the subsequent occupation of resources by the terminal based on the current scenario of the terminal; and allocating resources to the subtasks according to the subsequent occupation of resources by the terminal and the resource allocation template in the resource allocation template database.

[0023] In an exemplary embodiment, based on the aforementioned embodiment, predicting the subsequent occupation of resources by the terminal based on the scenario in which the terminal is currently located includes: predicting subsequent tasks to be processed in the terminal based on the scenario in which the terminal is currently located; and predicting the subsequent occupation of resources by the terminal based on the resources required for the subsequent tasks to be processed.

[0024] In an exemplary embodiment, based on the aforementioned embodiment, allocating resources to the subtask according to the subsequent occupation of resources by the terminal and the resource allocation template in the resource allocation template database includes: determining reserved resources according to the subsequent occupation of resources by the terminal; determining remaining resources based on the reserved resources and currently used resources; and allocating resources to the subtask among the remaining resources according to the resource allocation template in the resource allocation template database.

[0025] In an exemplary embodiment, based on the aforementioned embodiment, allocating resources to the subtask according to the resource allocation template in the resource allocation template database includes: allocating resources to the subtask according to the resource allocation template in the historical allocation experience database so that the allocation result satisfies the preset resource usage configuration information; the preset resource usage configuration information is used to indicate the enabled state of the resource.

[0026] In an exemplary embodiment, based on the aforementioned embodiment, the pending tasks include pending tasks in the terminal, and the method further includes: determining the current scenario of the terminal based on the current state of the terminal; predicting the subsequent occupation of resources by the terminal based on the current scenario of the terminal; and determining the sleep and wake-up configuration information of the resources based on the subsequent occupation of resources by the terminal.

[0027] In an exemplary implementation, based on the above implementation, the historical resource information allocated to the historical subtask includes the number of historical resources allocated to the historical subtask.

[0028] In an exemplary implementation, based on the foregoing implementation, the execution performance includes one or more of quality of service and service level agreement information.

[0029] According to a second aspect of the present disclosure, a resource allocation device is provided, comprising: a task splitting and analysis module, configured to perform task splitting and analysis on a task to be processed, so as to obtain subtasks corresponding to the task to be processed; a resource allocation module, configured to perform resource allocation on the subtasks according to a resource allocation template in a resource allocation template database; the resource allocation template is used to indicate a mapping relationship between task information of a historical subtask, historical resource information allocated to the historical subtask, and execution performance of the historical subtask.

[0030] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the resource allocation method described in the first aspect is implemented.

[0031] According to a fourth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; and a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the resource allocation method described in the first aspect above.

[0032] According to a fifth aspect of the present disclosure, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the resource allocation method as described in the first aspect.

[0033] The technical solution disclosed in this disclosure has the following beneficial effects:

[0034] In the present disclosure, resources are allocated to subtasks corresponding to the task to be processed according to the resource allocation template in the resource allocation template database, and the resource allocation template database stores historical resource information allocated to historical subtasks and the execution performance of historical subtasks. Based on the experience in the resource allocation template database, the efficiency and accuracy of resource allocation can be improved.

[0035] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0037] Figure 1 A schematic diagram showing a flow chart of a resource allocation method in an exemplary embodiment of the present disclosure;

[0038] Figure 2 A flow chart showing a method for obtaining a subtask corresponding to a task to be processed in an exemplary embodiment of the present disclosure;

[0039] Figure 3 A schematic flow chart of a method for allocating resources to subtasks in an exemplary embodiment of the present disclosure is shown;

[0040] Figure 4 A flow chart showing another method for allocating resources to subtasks in an exemplary embodiment of the present disclosure;

[0041] Figure 5 A schematic diagram showing a flow chart of a method for predicting subsequent occupation of resources by a terminal in an exemplary embodiment of the present disclosure;

[0042] Figure 6 A schematic flow chart of a method for allocating resources to subtasks according to subsequent occupation of resources by a terminal in an exemplary embodiment of the present disclosure is shown;

[0043] Figure 7 A flowchart showing another resource allocation method in an exemplary embodiment of the present disclosure;

[0044] Figure 8 A schematic diagram showing a resource allocation system in an exemplary embodiment of the present disclosure;

[0045] Fig. 9 A schematic diagram showing the composition of a resource allocation device in an exemplary embodiment of the present disclosure;

[0046] Fig.10 A schematic diagram showing an electronic device to which the exemplary embodiments of the present disclosure can be applied. DETAILED DESCRIPTION

[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0048] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0049] With the development of cloud computing technology, edge computing and fog computing are getting closer to users. In turn, the ubiquity of the Internet and the ubiquity of demand for computing resources have led to the integration of cloud and Internet.

[0050] As for cloud-network integration, both the cloud and the network are relatively complex at the equipment level, and the two have a large span in terms of disciplines. Therefore, a cloud-network operating system is needed to reasonably manage and control cloud-network resources, reduce the difficulty of operation and maintenance, and improve the utilization rate of cloud-network resources.

[0051] In cloud network operating systems, the utilization of computing, network and storage resources is a relatively difficult problem. Current solutions mainly focus on edge computing and other fields. However, due to the diversity and time-varying nature of user needs in cloud networks, the QoS (Quality of Service) conditions such as task execution delays are different under different resources, resulting in low accuracy and efficiency in the current allocation of cloud network resources.

[0052] In view of the above problems, an exemplary embodiment of the present disclosure provides a resource allocation method.

[0053] Combine the following Figure 1 A resource allocation method in this exemplary embodiment is described. Figure 1 An exemplary process of the resource allocation method is shown, which may include:

[0054] Step S110, performing task splitting analysis on the task to be processed to obtain subtasks corresponding to the task to be processed;

[0055] Step S120, allocating resources to the subtasks according to the resource allocation template in the resource allocation template database;

[0056] The resource allocation template is used to indicate the mapping relationship between the task information of the historical subtask, the historical resource information allocated to the historical subtask, and the execution performance of the historical subtask.

[0057] Based on the above method, resources are allocated to the subtasks corresponding to the task to be processed according to the resource allocation template in the resource allocation template database, and the resource allocation template database stores the historical resource information allocated to historical subtasks and the execution performance of historical subtasks. Based on the experience in the resource allocation template database, the efficiency and accuracy of resource allocation can be improved.

[0058] Below Figure 1 The steps shown are explained in detail.

[0059] In step S110, task splitting and analysis is performed on the task to be processed to obtain subtasks corresponding to the task to be processed.

[0060] In an exemplary embodiment, the resource allocation method in the present disclosure may be applied to a cloud-network fusion operating system, that is, the resource allocation method in the present disclosure may include a cloud-network resource allocation method.

[0061] The so-called "cloud-network integration" means that cloud refers to cloud computing and network refers to communication network. Cloud computing includes computing power, storage capacity and related software and hardware. Communication network includes all aspects of telecommunication network, such as access network, bearer network and core network. In essence, cloud refers to computing and network refers to connection. From the perspective of enterprise entities, cloud refers to cloud service providers and network refers to telecommunication operators. Cloud-network integration is the introduction of network technology into cloud computing and the introduction of cloud computing technology into communication network.

[0062] In an exemplary implementation, the pending tasks include tasks in a user terminal. For example, when a pending task is generated in a user terminal, the user terminal may send the pending task to a cloud network operating system to request the cloud network operating system to allocate cloud network resources to the pending task, thereby executing the pending task according to the allocated cloud network resources.

[0063] In an exemplary embodiment, the pending task may include one or more of a service request and a general request. For example, a complete pending service request may be decomposed into sub-requests that can be executed by the lower-level system. Among them, a general request may include a request that the browser directly displays the response body data, refreshes, or jumps to a page.

[0064] Exemplarily, an exemplary implementation of step S110 may include: performing task analysis on the task to be processed to obtain a task analysis result of the task to be processed, the task analysis result including one or more of a parallel relationship, a serial relationship, and an execution duration of different tasks in the task to be processed; and splitting the task to be processed according to the task analysis result to obtain subtasks corresponding to the task to be processed.

[0065] For example, task analysis can be performed on the tasks to be processed to determine the nesting relationship, parallel execution relationship, serial execution relationship, execution duration and other information between different tasks in the tasks to be processed, and the tasks can be split according to the results of the task analysis to obtain the subtasks corresponding to the tasks to be processed and the execution order between the subtasks.

[0066] It should be noted that a pending task may include one or more subtasks. In other words, a splittable pending task may include multiple subtasks, while a non-split pending task may include one subtask, which is the pending task itself.

[0067] Exemplarily, another specific implementation of step S110 may include: performing task splitting analysis on the task to be processed according to the task splitting template in the task splitting template database to obtain subtasks corresponding to the task to be processed; wherein the task splitting template is used to indicate the mapping relationship between historical task information, the splitting status of historical tasks, and the execution performance of historical tasks.

[0068] For example, a task splitting template database can be generated based on the historical execution experience of processed tasks. For example, the mapping relationship between the processed tasks, i.e., the task information of historical tasks, the splitting results of historical tasks, and the execution performance of historical tasks can be stored in the task splitting template database, so as to perform task splitting analysis on the tasks to be processed based on the task splitting template database to obtain the subtasks corresponding to the tasks to be processed.

[0069] Among them, historical task information may include information such as the task type of historical tasks, task description, input data type processed by the task (such as the input image, input video, input audio, etc. of the task), and the amount of data processed by the task (such as the number of input images processed by the task, the length of the input video, and the length of the input audio); the splitting of historical tasks may include the subtasks obtained after the splitting of the historical tasks and the execution order of the subtasks; the execution performance of historical tasks may include QoS information after the execution of historical tasks, such as the delay and energy consumption of task execution. For historical tasks, their execution performance can be determined based on the sum of the execution performance indicator values ​​of all subtasks included.

[0070] For example, Figure 2 The following is a flow chart showing a method for obtaining subtasks corresponding to a task to be processed according to a task splitting template database in an exemplary embodiment of the present disclosure. Figure 2 The method may include steps S210 to S250. Wherein:

[0071] In step S210, the task information of the task to be processed is matched with the historical task information in the task splitting template database.

[0072] For example, the pending task may be analyzed to obtain task information of the pending task, or the pending task may carry the task information of the pending task, and the task information of the pending task is matched with the historical task information in the task splitting template database.

[0073] In step S220, it is determined whether the match is successful. If the match is successful, the process goes to step S230; otherwise, the process goes to step S240 to step S250.

[0074] For example, when the similarity between the task information of the task to be processed and the historical task information is greater than a similarity threshold, it is determined that the task information of the task to be processed and the historical task information are matched successfully; otherwise, it is determined that the two are not matched successfully.

[0075] In step S230, according to the historical task splitting conditions corresponding to the successfully matched historical tasks, the task to be processed is subjected to task splitting analysis to obtain subtasks corresponding to the task to be processed.

[0076] For example, when the task information of the pending task matches the historical task information successfully, it means that the situations of the pending task and the historical tasks are similar, so the task to be processed can be split with reference to the splitting of the historical tasks to obtain the subtasks corresponding to the pending task.

[0077] Exemplarily, a specific implementation of step S230 may include: performing task splitting analysis on the processing task according to the historical task splitting corresponding to the historical task that is successfully matched and whose execution performance meets the target execution performance of the task to be processed, so as to obtain the subtask corresponding to the task to be processed.

[0078] For example, there may be multiple historical tasks that successfully match the task information of the task to be processed, but the historical execution performance of these historical tasks may be different. Therefore, the target splitting method can be determined based on the historical task splitting corresponding to the historical tasks that successfully match and can meet the target execution performance of the task to be processed. According to the target splitting method, the task to be processed is split and analyzed to obtain the subtasks corresponding to the task to be processed.

[0079] In step S240, task analysis is performed on the task to be processed to obtain a task analysis result of the task to be processed.

[0080] The task analysis result includes one or more of the parallel relationship, serial relationship, and execution time of different tasks in the tasks to be processed.

[0081] In step S250, the task to be processed is split according to the task analysis result to obtain subtasks corresponding to the task to be processed.

[0082] For example, if the task information of the task to be processed and the task information of the historical tasks in the task splitting template database fail to match each other, it means that there are no historical tasks for reference by the task to be processed, so the task to be processed can be directly analyzed, and then the task to be processed can be split according to the task analysis results to determine the subtasks included in the task to be processed and the execution order between the subtasks.

[0083] Continue to refer Figure 1In step S120, resources are allocated to the subtasks according to the resource allocation template in the resource allocation template database.

[0084] In an exemplary implementation, the resource allocation template is used to indicate a mapping relationship between task information of a historical subtask, historical resource information allocated to the historical subtask, and execution performance of the historical subtask.

[0085] The task information of the historical subtask may include task description, task type, task data type, task data volume, execution order of the historical subtask, etc. The historical resource information allocated to the historical subtask includes the number of historical resources allocated to the historical subtask. The historical resource information allocated to the historical subtask may also include one or more resource types allocated to the subtask.

[0086] In an exemplary embodiment, the execution performance includes one or more of quality of service and service level agreement information. The quality of service is the above-mentioned QoS, which may include the user terminal's preference information on the subtask execution order, the delay of subtask execution, energy consumption and other information. The service level agreement information may be understood as SLA (Service Level Agreement).

[0087] For example, a mapping relationship can be generated for the task information of the executed historical subtask, the number of resources allocated to the historical subtask, the type of allocated resources, and the execution performance corresponding to the execution result of the historical subtask under the number of resources and resource type, and the mapping relationship can be stored in the resource allocation template database.

[0088] In an exemplary embodiment, for the initial resource allocation template database, that is, in the absence of a resource allocation template for a historical subtask, task information, task resource quantity, resource type, execution performance corresponding to the task execution results, and other information of some tasks can be manually collected based on experience and stored in the initial resource allocation template database for reference when allocating resources for tasks to be processed.

[0089] Alternatively, when there is no resource allocation template stored in the resource allocation template database, random resource allocation may be performed on the first pending task to be processed, and the resource allocation template database may be updated according to the random resource allocation result. Alternatively, resource allocation may be performed on the first pending task to be processed according to a preset default resource allocation rule, which is not particularly limited in this exemplary embodiment. The preset default resource allocation rule may also include a predefined resource allocation template determined in any manner.

[0090] In an exemplary implementation, for the current task to be processed, the mapping relationship between the task information of the historical subtask, the historical resource information allocated to the historical subtask, and the execution performance of the historical subtask can also be understood as a predefined resource allocation template.

[0091] Exemplarily, a specific implementation of step S120 may include: matching the task information of the subtask with the task information of the historical subtask corresponding to the resource allocation template in the resource allocation template database; and allocating resources to the subtask according to the matching result.

[0092] Based on this, Figure 3 A schematic diagram of a method for allocating resources to subtasks according to a resource allocation template database in an exemplary embodiment of the present disclosure is shown. Figure 3 , the method may include steps S310 to S330. Wherein:

[0093] In step S310, task information of a subtask is matched with task information of a historical subtask corresponding to a resource allocation template in the resource allocation template database.

[0094] For example, the resource allocation template database may be traversed to calculate similarity between the task information of the subtask and the task information of each historical subtask in the resource allocation template database to match the two.

[0095] In step S320, it is determined whether the match is successful. If the match is successful, the process goes to step S330; otherwise, the process goes to step S340.

[0096] For example, when the similarity between the task information of the subtask and the task information of the historical subtask is greater than a similarity threshold, it can be determined that the two are matched successfully; otherwise, it can be determined that the two are matched unsuccessfully.

[0097] In step S330, resources are allocated to the subtasks according to the historical resource information corresponding to the successfully matched historical subtasks.

[0098] Exemplarily, a specific implementation of step S330 may include: in the case of a successful match, determining the successfully matched historical subtask as the target historical subtask; and allocating resources to the subtask based on the historical resource information corresponding to the target historical subtask whose execution performance summary results meet the target execution performance of the task to be processed.

[0099] For example, for each subtask, there may be multiple historical subtasks in the resource allocation template database whose task information successfully matches the subtask. In order to ensure the execution performance of the task to be processed, it is possible to select from the target historical subtasks corresponding to each subtask based on the resource allocation algorithm, such as ADMM (Alternating Direction Method of Multipliers), so that the sum of the execution performance index values ​​corresponding to the execution performance of each target historical subtask finally selected can meet the execution performance index value of the target execution performance of the task to be processed, thereby allocating resources to the corresponding subtask according to the resource allocation information corresponding to the selected target historical subtask.

[0100] For example, taking the execution performance indicator as the latency in QoS as an example, the target latency of the task to be processed is less than or equal to 7 seconds, and the subtasks corresponding to the task to be processed include subtask 1, subtask 2, and subtask 3. The historical subtask a and the historical subtask b in the resource allocation template database are successfully matched with subtask 1, the historical subtask c is successfully matched with subtask 2, and the historical subtask d and the historical subtask e are successfully matched with subtask 3. The latency of historical subtask a is 2 seconds, the latency of historical subtask b is 3 seconds, the latency of historical subtask c is 2 seconds, the latency of historical subtask d is 4 seconds, and the latency of historical subtask e is 2 seconds. Then, resources are allocated to subtask 1 according to the resource allocation of historical subtask a, resources are allocated to subtask 2 according to the resource allocation of historical subtask c, and resources are allocated to subtask 3 according to the resource allocation of historical subtask e, so that the final latency of the task to be processed is 6 seconds, which meets the target of less than or equal to 7 seconds. For example, if the number of resources allocated to historical subtask a is 6 and the resource type is cloud resources, then the number of resources allocated to subtask 1 can also be 6 and the resource type can also be cloud resources.

[0101] For example, when multiple resource allocation methods for subtasks can meet the target execution performance index of the task to be processed, the optimal resource allocation method can be selected. For example, when multiple resource allocation methods for subtasks can meet the target delay of the task to be processed less than or equal to 7 seconds, the resource allocation method with the sum of the delays of the subtasks less than or equal to 7 seconds and the smallest sum of the delays can be selected to determine the final resource allocation result.

[0102] In an exemplary embodiment, the target execution performance of the task to be processed may be predetermined by the user terminal according to user requirements, and if not predetermined by the user terminal, the target execution performance of the task to be processed may be determined according to a pre-configured default preset execution performance. This exemplary embodiment does not specifically limit this.

[0103] Continue to refer Figure 3 In step S340, resources are allocated to the subtasks randomly or according to preset resource allocation rules.

[0104] In the case where the subtask and the historical subtask are not matched successfully, resources can be allocated to the subtask randomly or according to a preset resource allocation rule, wherein the preset resource allocation rule can be pre-configured according to demand, and this exemplary embodiment does not specifically limit this.

[0105] Exemplarily, as mentioned above, the task to be processed may be subjected to task splitting analysis to obtain subtasks corresponding to the task to be processed and the execution order of the subtasks.

[0106] Based on this, in an exemplary implementation, step S120 may include: allocating resources to the subtasks according to the execution order of the subtasks, the target execution performance of the task to be processed, and the resource allocation template in the resource allocation template database.

[0107] Exemplarily, allocating resources to the subtasks according to the execution order of the subtasks, the target execution performance of the task to be processed and the resource allocation templates in the resource allocation template database includes: determining a reference resource allocation template for each subtask from historical subtasks in the resource allocation template database while satisfying the execution order of the subtasks, so that the summary result of the execution performance in the reference resource allocation template of each subtask satisfies the target execution performance of the task to be processed; and allocating resources to the subtasks according to the resource allocation information in the reference resource allocation template of each subtask.

[0108] Among them, the task execution order in the historical task information in the reference resource allocation template of each subtask needs to be consistent with the execution order of the subtasks, and the sum of the performance indicator values ​​of the execution performance in the reference resource allocation template of each subtask needs to meet the target execution performance of the task to be processed.

[0109] In other words, when selecting a reference resource allocation template for a subtask from the resource allocation template database, the execution order of the subtasks and whether the sum of the execution performance of each subtask meets the target execution performance of the task to be processed can be used as constraint conditions at the same time.

[0110] The execution order of the subtasks may be determined after analyzing the tasks to be processed. If there is no strict requirement for the execution order of the subtasks, it may also be determined based on the user's preference. This exemplary embodiment does not impose any special limitation on this.

[0111] Exemplarily, after allocating resources to the subtask according to the resource allocation template, the method further includes: executing the subtask based on the resource allocation result of the subtask; determining the execution performance of the task to be processed according to the execution performance of the subtask; and re-performing task splitting analysis on the task to be processed when the difference between the execution performance of the task to be processed and the target execution performance of the task to be processed is greater than a first preset value, so as to regain the subtask corresponding to the task to be processed.

[0112] Exemplarily, when the difference between the execution performance of the task to be processed and the target execution performance of the task to be processed is less than or equal to the first preset value and greater than the second preset value, the execution order of the subtasks is redetermined to re-execute the subtasks based on the redetermined execution order, and the first preset value is greater than the second preset value.

[0113] For example, after executing the corresponding subtask according to the resource allocation result for each subtask, the current execution performance of each subtask can be obtained, and the current execution performance of the task to be processed can be determined according to the sum of the current execution performance of each subtask. If there is a gap between the current execution performance of the task to be processed and the target execution performance of the task to be processed, and the gap is large, it is necessary to split the task to be processed again, so as to split the task to be processed again according to the re-analysis result, so as to obtain the subtasks of the task to be processed again, and then re-execute step S120 to re-allocate resources for the newly obtained subtasks, and repeat the process until after a certain resource allocation, the sum of the current execution performance of the subtasks meets the target execution performance of the task to be processed, then the task to be processed is executed, and the processing result is returned to the user terminal. If there is a gap between the current execution performance of the task to be processed and the target execution performance of the task to be processed but the gap is not large, it indicates that there may be no problem with the task splitting, and the execution order may be the cause of a slight gap between the two. In this case, the execution order of the subtasks can be re-determined to redetermine the resource allocation results of the subtasks according to the re-determined execution order, thereby re-executing the subtasks. Alternatively, the subtasks can be directly re-executed according to the re-determined execution order until the difference between the current execution performance of the task to be processed and the target execution performance is less than or equal to the second preset value.

[0114] Exemplarily, the pending tasks may include pending tasks in the terminal. The resource allocation method in the present disclosure may be executed by a cloud-network fusion operating system. The terminal may send the pending tasks to the cloud-network fusion operating system so that the cloud-network fusion operating system may allocate resources to the pending tasks, and execute the pending tasks with corresponding resources according to the result of the resource allocation, and then return the execution result to the user terminal.

[0115] Based on this, Figure 4A flowchart showing another method for allocating resources to subtasks in an exemplary embodiment of the present disclosure is shown. Figure 4 , the method may include steps S410 to S430. Wherein:

[0116] In step S410, the scene in which the terminal is currently located is determined according to the current state of the terminal.

[0117] For example, whether the terminal is in a high-speed motion scene can be determined based on the current speed of the terminal, and the geographical location scene of the terminal can be determined based on the current location of the terminal, etc. This exemplary embodiment does not make any special limitations on this.

[0118] In step S420, based on the current scenario of the terminal, the subsequent occupation of resources by the terminal is predicted.

[0119] For example, Figure 5 A flow chart showing a method for predicting the subsequent occupation of resources by a terminal in an exemplary embodiment of the present disclosure is shown. Figure 5 The method may include steps S510 to S520. In step S510, based on the current scenario of the terminal, the subsequent tasks to be processed in the terminal are predicted; in step S520, based on the resources required by the subsequent tasks to be processed, the subsequent occupation of resources by the terminal is predicted.

[0120] For example, mapping relationships between different scenarios and candidate tasks can be generated in advance. For example, when a user is at home, he may need to turn on the TV, so a mapping relationship between the home scenario and the watching TV task can be generated. When a user is at the company and at 6 o'clock, he may need to take a taxi home, so a mapping relationship between the company scenario at 6 pm and taking a taxi can be generated.

[0121] Then, according to the current scenario of the terminal, the subsequent tasks to be processed of the terminal are predicted according to the candidate tasks corresponding to the scenario. The candidate resources required for different candidate tasks can also be determined in advance, so as to determine the resources required for the subsequent tasks to be processed according to the candidate resources corresponding to the candidate tasks, thereby predicting the subsequent occupation of resources by the terminal. For example, for scenario 1, candidate task 1 associated with scenario 1 is determined as the subsequent task to be processed in the terminal according to the current state of the terminal, and the candidate task requires 5 cloud resources, then the subsequent occupation of resources by the terminal may be that at least 5 cloud resources are required.

[0122] For example, the subsequent pending tasks in the terminal can also be predicted based on the correlation between tasks. For example, the correlation between tasks can be pre-generated based on user behavior habits. Usually, after task 1, the user will send task 2. For example, after taking a taxi, the user will check the surrounding food. Therefore, when the current task is taking a taxi, it can be predicted that the subsequent pending task is to check the surrounding food.

[0123] In step S430, resources are allocated to the subtasks according to the subsequent occupation of resources by the terminal and the resource allocation template in the resource allocation template database.

[0124] For example, an implementation of step S430 can refer to Figure 6 shown. Figure 6 FIG. 1 is a flow chart showing a method for allocating resources to subtasks according to the subsequent occupation of resources by a terminal in an exemplary embodiment of the present disclosure. Figure 6 As shown, the method may include steps S610 to S630. In step S610, the reserved resources are determined according to the subsequent occupation of the resources by the terminal; in step S620, the remaining resources are determined based on the reserved resources and the currently used resources; in step S630, the subtasks are allocated resources in the remaining resources according to the resource allocation template in the resource allocation template database.

[0125] If we continue to take the above example that the subsequent occupation of resources by the terminal requires at least 5 cloud resources, then 5 cloud resources are reserved resources. In the total cloud resources, the cloud resources other than the 5 reserved cloud resources and the cloud resources used by other terminals or tasks are the remaining cloud resources. If the number of cloud resources required by the subtask is 6, then 6 cloud resources are allocated to the subtask from the remaining cloud resources.

[0126] Exemplarily, another specific implementation of step S120 may include: allocating resources to the subtasks according to a resource allocation template in a historical allocation experience database so that the allocation result satisfies preset resource usage configuration information; the preset resource usage configuration information is used to indicate the enabled state of the resource.

[0127] For example, operators can configure the usage of different resources in advance according to demand, such as resource 1 can only be used for type A tasks, that is, resource 1 is turned on for type A tasks and turned off for other tasks, resource 2 is not open to the outside, resource 3 can only be used for type B tasks, etc. In this way, when allocating resources to subtasks, it is necessary to consider the operator's configuration of resource usage.

[0128] In an exemplary embodiment, when the tasks to be processed include tasks to be processed in a terminal, the resource allocation method in the present disclosure may further include: determining the current scenario of the terminal according to the current state of the terminal; predicting the subsequent occupation of resources by the terminal based on the current scenario of the terminal; and determining the sleep and wake-up configuration information of the resources according to the subsequent occupation of resources by the terminal.

[0129] Continuing with the above example, if the subsequent resource occupation of the terminal is predicted to require at least 5 cloud resources, the 5 cloud resources can be awakened in advance, so that the subsequent tasks can be processed faster. If the subsequent tasks of the terminal are predicted to require only network resources but not cloud resources, the network resources can be awakened in advance and the cloud resources can be configured to sleep.

[0130] Exemplarily, after allocating resources to the subtask according to the resource allocation template, the subtask may be executed based on the resource allocation result of the subtask; and the resource allocation template database may be updated according to the execution performance of the subtask.

[0131] Exemplarily, updating the resource allocation template database according to the execution performance of the subtask includes: updating the resource allocation template database according to the execution performance of the subtask when the execution performance of the subtask satisfies a preset execution performance cost.

[0132] For example, a preset execution performance cost can be determined in advance, such as the preset execution performance cost is an execution time of less than 1 minute, an energy consumption of less than A, etc. When the execution performance of the subtask meets the preset execution performance cost, the resource allocation template database is updated according to the execution performance of the subtask, thereby ensuring the quality of the resource allocation templates in the resource allocation template database and improving the accuracy of resource allocation.

[0133] Exemplarily, updating the resource allocation template database according to the execution performance of the subtask includes: adding the mapping relationship between the task information of the subtask, the resource information allocated to the subtask, and the execution performance of the subtask to the resource allocation template database to update the resource allocation template database.

[0134] In an exemplary embodiment, a training data set can also be generated based on the mapping relationship between the task information of existing subtasks, the resource information allocated to the subtasks, the execution performance of the subtasks, and the target execution performance of the overall task in which the subtasks are located, and then a neural network can be trained based on the training data set so that the neural network can predict the resource information allocated to the subtasks based on the task information of the subtasks and the target execution performance of the task to be processed. Thus, for subsequent subtasks, the task information of the subtasks and the target execution performance of the task to be processed can be input, and the resources allocated to the subtasks can be predicted through the trained neural network model.

[0135] For example, Figure 7 A flowchart showing another resource allocation method in an exemplary embodiment of the present disclosure is shown. Figure 7 , the method may include steps S710 to S740. In step S710, the task to be processed is split to obtain subtasks; in step S720, resources are allocated to each subtask according to the resource allocation template database; in step S730, the operation result of each subtask under the current resource allocation is determined; in step S740, a mapping relationship between a specific task, a specific resource, and a specific performance is generated according to the operation result of the subtask under the current resource allocation, and the mapping relationship is stored in the resource allocation template database.

[0136] For example, in the present disclosure, tasks can be split and resources can be allocated to the split tasks to obtain the execution performance of subtasks supported by different resources, such as latency. Through continuous learning, the experience of different performances of different subtasks under different resources can be improved, and the experience of the operation of the three can be recorded as the decision-making basis for a new round of resource allocation algorithms.

[0137] For example, Figure 8 A schematic diagram of a resource allocation system in an exemplary embodiment of the present disclosure is shown. The resource allocation system may include a user task perception subsystem, a user task prediction subsystem, a user QoS recording subsystem, a task division subsystem, a task required resource learning subsystem, and a resource allocation algorithm subsystem. Figure 8As shown, the user task perception subsystem may include a task arrival module, a task analysis module, a task splitting module, and a subtask evaluation and labeling module; the user task prediction subsystem may include a user portrait module, a task prediction module, a resource occupancy prediction module, and a resource reservation module; the learning subsystem of the resources required for the task includes a task result aggregation module and a task execution experience summary module; the resource allocation algorithm subsystem includes a resource sleep and wake-up module, a resource allocation algorithm module, where the resource allocation algorithm module may be an ADMM algorithm, or a variant thereof, or a related resource allocation algorithm, a configuration delivery module, a resource layer, and a resource perception module.

[0138] The user portrait module creates a user portrait based on the task requests and other behaviors sent by the user, determines the user's scenario and the user's corresponding tendencies, and thus predicts the next task to be processed based on the user's scenario or corresponding tendencies.

[0139] The task arrival part receives the user's task requirements and sends the task to the task analysis module and the task prediction module. The task analysis analyzes the arrived tasks based on past task processing experience and transmits the analyzed tasks to the task splitting module. After the task splitting module splits the tasks, it sends them to the resource allocation algorithm module together with the subtask evaluation and labeling module; the resource allocation algorithm module calculates the resource allocation ratio that meets the task QoS requirements based on the optimization algorithm and the task's QoS information and the resource allocation template stored in the subtask evaluation and labeling module, and sends the resource configuration information to the resource layer for execution through the configuration sending module.

[0140] The resource layer sends the execution result to the task result aggregation module, and the task result aggregation module sends the task execution result to the task analysis module. The task analysis module analyzes the completion status of the task and subtask, and determines whether it needs to be re-split according to the completion status. At the same time, the task result aggregation module stores the subtask, the number of resources allocated to the subtask, and the subtask execution result (such as the current execution QoS information of the subtask) as task execution experience in the task execution experience module. The task execution experience module sends this part of the experience to the subtask evaluation and labeling module to improve the accuracy of the labeling of the execution performance of different subtasks under different resources.

[0141] In an exemplary implementation, the QoS information may also be the SLA information, or user preference information.

[0142] The resource occupancy prediction module predicts the future resource utilization through the subsequent pending tasks predicted by the user portrait part, and then sends it to the resource reservation module, which reserves the resources. At the same time, the resource occupancy prediction module will also send the current and future resource utilization to the resource allocation algorithm module. The resource allocation algorithm module formulates resource sleep and wake-up configurations based on the current and future resource utilization, and implements them to the resource layer through the configuration delivery module.

[0143] The resource allocation algorithm module can combine the resource status information pre-configured by the operator, such as whether it is open to the outside world, whether it is applicable to task type A, and the resource reservation information obtained by the resource reservation module, and combine it with the resource allocation template to allocate resources to the subtasks.

[0144] The user QoS recording subsystem is used to record the user's target QoS and use the target QoS as the target execution performance of the task to be processed.

[0145] In the present disclosure, deterministic cloud network services are provided to users through the one-to-one correspondence between the analysis of user needs and the required resources. In addition, by providing a complete process, as well as closed-loop perception, configuration, and experience accumulation and updating, the accuracy and efficiency of resource allocation for various tasks are improved, and the operating costs and efficient operations of the cloud network are reduced.

[0146] At the same time, there is no need to improve the terminal, which is convenient and simple, and has good backward compatibility and deployment feasibility. At the same time, the present disclosure enhances the existing protocol without introducing a new protocol process, and the implementation difficulty is relatively low. Furthermore, in the present disclosure, task splitting, resource allocation, and the correspondence between the running conditions of subtasks under different resource conditions form a system that can promote the resource allocation efficiency of the cloud network system.

[0147] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0148] For further reference, Fig. 9As shown, in the implementation of this example, a resource allocation device 900 is also provided, which may include a task splitting analysis module 910 and a resource allocation module 920. Among them: the task splitting analysis module 910 is configured to perform task splitting analysis on the task to be processed to obtain the subtasks corresponding to the task to be processed; the resource allocation module 920 is configured to perform resource allocation on the subtask according to the resource allocation template in the resource allocation template database; the resource allocation template is used to indicate the mapping relationship between the task information of the historical subtask, the historical resource information allocated to the historical subtask, and the execution performance of the historical subtask.

[0149] In an exemplary embodiment, based on the aforementioned embodiment, the device 900 also includes an update module, which is configured to: after allocating resources to the subtask according to the resource allocation template, execute the subtask based on the resource allocation result of the subtask; and update the resource allocation template database according to the execution performance of the subtask.

[0150] In an exemplary embodiment, based on the aforementioned embodiment, updating the resource allocation template database according to the execution performance of the subtask includes: updating the resource allocation template database according to the execution performance of the subtask when the execution performance of the subtask meets a preset execution performance cost.

[0151] In an exemplary embodiment, based on the aforementioned embodiment, updating the resource allocation template database according to the execution performance of the subtask includes: adding the mapping relationship between the task information of the subtask, the resource information allocated to the subtask, and the execution performance of the subtask to the resource allocation template database to update the resource allocation template database.

[0152] In an exemplary implementation, based on the aforementioned embodiment, the resource allocation module 920 may be specifically configured to: match the task information of the subtask with the task information of the historical subtask corresponding to the resource allocation template in the resource allocation template database; and allocate resources to the subtask based on the matching result.

[0153] In an exemplary implementation, based on the above-mentioned embodiment, allocating resources to the subtask according to the matching result includes: in the case of successful matching, allocating resources to the subtask according to historical resource information corresponding to the successfully matched historical subtask.

[0154] In an exemplary embodiment, based on the aforementioned embodiment, in the case of a successful match, resources are allocated to the subtask according to the historical resource information corresponding to the successfully matched historical subtask, including: in the case of a successful match, the successfully matched historical subtask is determined as the target historical subtask; resources are allocated to the subtask according to the historical resource information corresponding to the target historical subtask whose execution performance summary results meet the target execution performance of the task to be processed.

[0155] In an exemplary implementation, based on the foregoing embodiment, allocating resources to the subtasks according to the matching results includes: in the event of a matching failure, allocating resources to the subtasks randomly or according to a preset resource allocation rule.

[0156] In an exemplary embodiment, based on the aforementioned embodiment, the task splitting analysis module 910 can be specifically configured to: perform task splitting analysis on the task to be processed to obtain the subtasks corresponding to the task to be processed and the execution order of the subtasks; based on this, the resource allocation module 920 can be specifically configured to: allocate resources to the subtasks according to the execution order of the subtasks, the target execution performance of the task to be processed and the resource allocation template in the resource allocation template database.

[0157] In an exemplary embodiment, based on the aforementioned embodiment, allocating resources to the subtasks according to the execution order of the subtasks, the target execution performance of the task to be processed and the resource allocation template in the resource allocation template database includes: while satisfying the execution order of the subtasks, determining a reference resource allocation template for each subtask from the historical subtasks in the resource allocation template database, so that the summary result of the execution performance in the reference resource allocation template of each subtask satisfies the target execution performance of the task to be processed; and allocating resources to the subtasks according to the resource allocation information in the reference resource allocation template of each subtask.

[0158] In an exemplary embodiment, based on the aforementioned embodiment, the device 900 may further include a re-splitting module, which may be configured to: after allocating resources to the subtask according to a resource allocation template, execute the subtask based on the resource allocation result of the subtask; determine the execution performance of the task to be processed according to the execution performance of the subtask; when the difference between the execution performance of the task to be processed and the target execution performance of the task to be processed is greater than a first preset value, re-perform task splitting analysis on the task to be processed to re-obtain the subtask corresponding to the task to be processed; when the difference between the execution performance of the task to be processed and the target execution performance of the task to be processed is less than or equal to the first preset value and greater than a second preset value, re-determine the execution order of the subtasks to re-execute the subtasks based on the re-determined execution order, and the first preset value is greater than the second preset value.

[0159] In an exemplary embodiment, based on the aforementioned embodiment, the task splitting analysis module 910 can be specifically configured as follows: according to the task splitting template in the task splitting template database, a task splitting analysis is performed on the task to be processed to obtain the subtasks corresponding to the task to be processed; wherein the task splitting template is used to indicate the mapping relationship between historical task information, the splitting status of historical tasks, and the execution performance of historical tasks.

[0160] In an exemplary embodiment, based on the aforementioned embodiment, the task to be processed is subjected to task splitting analysis according to the task splitting template in the task splitting template database to obtain the subtask corresponding to the task to be processed, including: matching the task information of the task to be processed with the historical task information in the task splitting template database; when the task information of the task to be processed and the historical task information are successfully matched, the task splitting analysis of the task to be processed is performed according to the historical task splitting corresponding to the successfully matched historical task, to obtain the subtask corresponding to the task to be processed.

[0161] In an exemplary embodiment, based on the aforementioned embodiment, according to the historical task splitting corresponding to the historical tasks that have been successfully matched, a task splitting analysis is performed on the task to be processed to obtain the subtasks corresponding to the task to be processed, including: according to the historical task splitting corresponding to the historical tasks that have been successfully matched and whose execution performance meets the target execution performance of the task to be processed, a task splitting analysis is performed on the processing task to obtain the subtasks corresponding to the task to be processed.

[0162] In an exemplary embodiment, based on the aforementioned embodiment, when the task information of the task to be processed and the historical task information fail to match, a task analysis is performed on the task to be processed to obtain a task analysis result of the task to be processed, and the task analysis result includes one or more of the parallel relationship, serial relationship, and execution duration of different tasks in the task to be processed; according to the task analysis result, the task to be processed is split to obtain subtasks corresponding to the task to be processed.

[0163] In an exemplary embodiment, based on the aforementioned embodiment, the pending tasks include pending tasks in the terminal, and the resource allocation for the subtasks according to the resource allocation template in the resource allocation template database includes: determining the current scenario of the terminal according to the current state of the terminal; predicting the subsequent occupation of resources by the terminal based on the current scenario of the terminal; and allocating resources to the subtasks according to the subsequent occupation of resources by the terminal and the resource allocation template in the resource allocation template database.

[0164] In an exemplary embodiment, based on the aforementioned embodiment, predicting the subsequent occupation of resources by the terminal based on the scenario in which the terminal is currently located includes: predicting subsequent tasks to be processed in the terminal based on the scenario in which the terminal is currently located; and predicting the subsequent occupation of resources by the terminal based on the resources required for the subsequent tasks to be processed.

[0165] In an exemplary embodiment, based on the aforementioned embodiment, allocating resources to the subtask according to the subsequent occupation of resources by the terminal and the resource allocation template in the resource allocation template database includes: determining reserved resources according to the subsequent occupation of resources by the terminal; determining remaining resources based on the reserved resources and currently used resources; and allocating resources to the subtask among the remaining resources according to the resource allocation template in the resource allocation template database.

[0166] In an exemplary embodiment, based on the aforementioned embodiment, allocating resources to the subtask according to the resource allocation template in the resource allocation template database includes: allocating resources to the subtask according to the resource allocation template in the historical allocation experience database so that the allocation result satisfies the preset resource usage configuration information; the preset resource usage configuration information is used to indicate the enabled state of the resource.

[0167] In an exemplary embodiment, based on the aforementioned embodiment, the tasks to be processed include tasks to be processed in the terminal, and the device also includes a resource sleep and wake-up determination module, which can be configured to: determine the current scene of the terminal based on the current state of the terminal; predict the subsequent occupation of resources by the terminal based on the current scene of the terminal; determine the sleep and wake-up configuration information of the resources based on the subsequent occupation of resources by the terminal.

[0168] In an exemplary implementation, based on the above-mentioned embodiment, the historical resource information allocated to the historical subtask includes the number of historical resources allocated to the historical subtask.

[0169] In an exemplary implementation, based on the foregoing embodiments, the execution performance includes one or more of quality of service and service level agreement information.

[0170] The specific details of each module in the above device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.

[0171] The exemplary embodiments of the present disclosure also provide an electronic device for executing the resource allocation method. Generally, the electronic device may include a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the resource allocation method by executing the executable instructions.

[0172] Below Fig.10 Taking the mobile terminal 1000 in FIG. 1 as an example, the structure of the electronic device is exemplarily described. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Fig.10 The construction in can also be applied to fixed type equipment.

[0173] like Fig.10 As shown, the mobile terminal 1000 may specifically include: a processor 1001, a memory 1002, a bus 1003, a mobile communication module 1004, an antenna 1, a wireless communication module 1005, an antenna 2, a display screen 1006, a camera module 1007, an audio module 1008, a power module 1009 and a sensor module 1010.

[0174] Processor 1001 may include one or more processing units, for example: processor 1001 may include AP (Application Processor), modem processor, GPU (Graphics Processing Unit), ISP (Image Signal Processor), controller, encoder, decoder, DSP (Digital Signal Processor), baseband processor and / or NPU (Neural-Network Processing Unit), etc.

[0175] The processor 1001 may be connected to the memory 1002 or other components via a bus 1003 .

[0176] The memory 1002 may be used to store computer executable program codes, which include instructions. The processor 1001 executes various functional applications and data processing of the mobile terminal 1000 by running the instructions stored in the memory 1002. The memory 1002 may also store application data, such as images, videos, audio files, etc. The memory 1002 may also store a resource allocation template database.

[0177] The communication function of the mobile terminal 1000 can be implemented by the mobile communication module 1004, antenna 1, wireless communication module 1005, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 1004 can provide 2G, 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 1000. The wireless communication module 1005 can provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. applied to the mobile terminal 1000.

[0178] The display screen 1006 is used to implement display functions, such as displaying a user interface, images, etc. The camera module 1007 is used to implement shooting functions, such as shooting images, videos, etc. The audio module 1008 is used to implement audio functions, such as playing audio, etc. The power module 1009 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 1010 may include a depth sensor 10101, a speed sensor 10102, a gyroscope sensor 10103, an air pressure sensor 10104, etc., to implement corresponding sensing detection functions.

[0179] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0180] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network, and / or installed based on a removable medium. When the computer program is executed by a central processing unit (CPU), various functions defined in the method and apparatus of the present application are executed.

[0181] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification, for example, it can execute Figure 1 Any one or more steps in .

[0182] The computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0183] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0184] In addition, program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0185] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0186] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A resource allocation method, characterized in that: include: Perform task splitting and analysis on the task to be processed to obtain subtasks corresponding to the task to be processed; Allocating resources to the subtasks according to the resource allocation template in the resource allocation template database; The resource allocation template is used to indicate the mapping relationship between the task information of the historical subtask, the historical resource information allocated to the historical subtask, and the execution performance of the historical subtask.

2. The resource allocation method according to claim 1, characterized in that: After allocating resources to the subtasks according to the resource allocation template in the resource allocation template database, the method further includes: Executing the subtask based on the resource allocation result of the subtask; The resource allocation template database is updated according to the execution performance of the subtask.

3. The resource allocation method according to claim 2, characterized in that: The updating of the resource allocation template database according to the execution performance of the subtask includes: When the execution performance of the subtask meets the preset execution performance cost, the resource allocation template database is updated according to the execution performance of the subtask.

4. The resource allocation method according to claim 2 or 3, characterized in that: The updating of the resource allocation template database according to the execution performance of the subtask includes: The mapping relationship between the task information of the subtask, the resource information allocated to the subtask, and the execution performance of the subtask is added to the resource allocation template database to update the resource allocation template database.

5. The resource allocation method according to claim 1, characterized in that: Allocating resources to the subtasks according to the resource allocation template in the resource allocation template database includes: Matching the task information of the subtask with the task information of the historical subtask corresponding to the resource allocation template in the resource allocation template database; According to the matching result, resources are allocated to the subtasks.

6. The resource allocation method according to claim 5, characterized in that: Allocating resources to the subtasks according to the matching results includes: In the case of successful matching, resources are allocated to the subtasks according to the historical resource information corresponding to the successfully matched historical subtasks.

7. The resource allocation method according to claim 6, characterized in that: In the case of successful matching, resources are allocated to the subtasks according to the historical resource information corresponding to the successfully matched historical subtasks, including: In the case of successful matching, the successfully matched historical subtask is determined as the target historical subtask; According to the historical resource information corresponding to the target historical subtasks whose summary results of the execution performance meet the target execution performance of the task to be processed, resources are allocated to the subtasks.

8. The resource allocation method according to claim 5, characterized in that: Allocating resources to the subtasks according to the matching results includes: In case of a matching failure, resources are allocated to the subtasks randomly or according to a preset resource allocation rule.

9. The resource allocation method according to claim 1, characterized in that: The task splitting and analyzing of the task to be processed to obtain the subtasks corresponding to the task to be processed includes: Performing task splitting analysis on the task to be processed to obtain subtasks corresponding to the task to be processed and the execution order of the subtasks; Allocating resources to the subtasks according to the resource allocation template in the resource allocation template database includes: Resources are allocated to the subtasks according to the execution order of the subtasks, the target execution performance of the task to be processed and the resource allocation template in the resource allocation template database.

10. The resource allocation method according to claim 9, characterized in that: Allocating resources to the subtasks according to the execution order of the subtasks, the target execution performance of the task to be processed, and the resource allocation template in the resource allocation template database includes: Under the condition that the execution order of the subtasks is satisfied, a reference resource allocation template for each subtask is determined from the historical subtasks in the resource allocation template database, so that the summary result of the execution performance in the reference resource allocation template of each subtask satisfies the target execution performance of the task to be processed; Resources are allocated to each subtask according to the resource allocation information in the reference resource allocation template of the subtask.

11. The resource allocation method according to claim 9, characterized in that: After allocating resources to the subtasks according to the resource allocation template, the method further includes: Executing the subtask based on the resource allocation result of the subtask; Determining the execution performance of the task to be processed according to the execution performance of the subtask; When the difference between the execution performance of the task to be processed and the target execution performance of the task to be processed is greater than a first preset value, the task to be processed is re-splitting and analyzed to obtain subtasks corresponding to the task to be processed again.

12. The resource allocation method according to claim 11, characterized in that: The method further comprises: When the difference between the execution performance of the task to be processed and the target execution performance of the task to be processed is less than or equal to the first preset value and greater than the second preset value, the execution order of the subtasks is redetermined to re-execute the subtasks based on the redetermined execution order, and the first preset value is greater than the second preset value.

13. The resource allocation method according to claim 1, characterized in that: The task splitting and analyzing of the task to be processed to obtain the subtasks corresponding to the task to be processed includes: According to the task splitting template in the task splitting template database, the task to be processed is subjected to task splitting analysis to obtain subtasks corresponding to the task to be processed; The task splitting template is used to indicate the mapping relationship between historical task information, the splitting status of historical tasks, and the execution performance of historical tasks.

14. The resource allocation method according to claim 13, characterized in that: The step of performing task splitting analysis on the task to be processed according to the task splitting template in the task splitting template database to obtain subtasks corresponding to the task to be processed includes: Matching the task information of the task to be processed with the historical task information in the task splitting template database; When the task information of the task to be processed successfully matches the historical task information, the task to be processed is subjected to task splitting analysis according to the historical task splitting corresponding to the successfully matched historical task, so as to obtain the subtasks corresponding to the task to be processed.

15. The resource allocation method according to claim 14, characterized in that: According to the historical task splitting situation corresponding to the successfully matched historical task, the task to be processed is split and analyzed to obtain the subtasks corresponding to the task to be processed, including: According to the historical task splitting conditions corresponding to the historical tasks that are successfully matched and whose execution performance meets the target execution performance of the task to be processed, the processing task is subjected to task splitting analysis to obtain the subtasks corresponding to the task to be processed.

16. The resource allocation method according to claim 14, characterized in that: The method further comprises: In the case where the task information of the task to be processed fails to match the historical task information, performing task analysis on the task to be processed to obtain a task analysis result of the task to be processed, wherein the task analysis result includes one or more of a parallel relationship, a serial relationship, and an execution time of different tasks in the task to be processed; According to the task analysis result, the task to be processed is split to obtain subtasks corresponding to the task to be processed.

17. The resource allocation method according to claim 1, characterized in that: The pending tasks include pending tasks in the terminal, and the resource allocation for the subtasks according to the resource allocation template in the resource allocation template database includes: Determining the current scene of the terminal according to the current state of the terminal; Predicting subsequent resource occupation by the terminal based on the current scenario of the terminal; Resources are allocated to the subtasks according to the subsequent occupation of resources by the terminal and the resource allocation template in the resource allocation template database.

18. The resource allocation method according to claim 17, characterized in that: The predicting, based on the current scenario of the terminal, a subsequent occupation of resources by the terminal includes: Based on the current scenario of the terminal, predicting subsequent tasks to be processed in the terminal; According to the resources required by the subsequent tasks to be processed, the subsequent occupation of the resources by the terminal is predicted.

19. The resource allocation method according to claim 17, characterized in that: Allocating resources to the subtasks according to the subsequent occupation of resources by the terminal and the resource allocation template in the resource allocation template database includes: Determining reserved resources according to subsequent occupation of resources by the terminal; Determining remaining resources based on the reserved resources and currently used resources; Allocate resources to the subtasks from the remaining resources according to the resource allocation template in the resource allocation template database.

20. The resource allocation method according to claim 1, characterized in that: Allocating resources to the subtasks according to the resource allocation template in the resource allocation template database includes: Allocate resources to the subtasks according to the resource allocation template in the historical allocation experience database so that the allocation result satisfies the preset resource usage configuration information; The preset resource usage configuration information is used to indicate the activation status of the resource.

21. The resource allocation method according to claim 1, characterized in that: The pending tasks include pending tasks in the terminal, and the method further includes: Determining the current scene of the terminal according to the current state of the terminal; Predicting subsequent resource occupation by the terminal based on the current scenario of the terminal; According to the subsequent occupation of the resource by the terminal, the dormancy and wake-up configuration information of the resource is determined.

22. The resource allocation method according to claim 1, characterized in that: The historical resource information allocated to the historical subtask includes the number of historical resources allocated to the historical subtask.

23. The resource allocation method according to claim 1, characterized in that: The execution performance includes one or more of quality of service and service level agreement information.

24. A resource allocation device, characterized in that: include: A task splitting and analysis module is configured to perform task splitting and analysis on the task to be processed to obtain subtasks corresponding to the task to be processed; A resource allocation module, configured to allocate resources to the subtasks according to a resource allocation template in a resource allocation template database; The resource allocation template is used to indicate the mapping relationship between the task information of the historical subtask, the historical resource information allocated to the historical subtask, and the execution performance of the historical subtask.

25. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 23 is implemented.

26. An electronic device, characterized in that: include: one or more processors; as well as A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method according to any one of claims 1 to 23.

Citation Information

Cited By

  • Data service processing method and device and related equipment

    CN120358235A