A method, device and storage medium for allocating resources to tasks

By setting value scores for data warehouse node tasks and using Gaussian attenuation function to calculate value scores for node tasks at each level, the problem of inability to measure task value in the existing technology is solved, and efficient allocation and saving of resources are achieved.

CN114356572BActive Publication Date: 2025-04-15北京理房通支付科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111683631.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2025-04-15
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

The existing technology cannot measure the value of tasks, resulting in the inability to prioritize the allocation of limited resources to high-value tasks, resulting in waste of resources.

Method used

By setting value scores for the application layer node tasks of the data warehouse, and using the Gaussian decay function to calculate the value scores of each layer's node tasks step by step, dispersing them to the associated downstream node tasks, and finally allocating resources to each node task according to the value scores of each node task.

Benefits of technology

The task of prioritizing the allocation of limited resources to high-value tasks has been achieved, resource costs have been saved, and the role of limited resources has been fully played.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356572B_ABST
    Figure CN114356572B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for allocating resources for tasks, including: setting a value score for a data warehouse application layer node task according to statistical results; calculating the step-by-step attenuation result of the value score starting from the data warehouse application layer node task according to a Gaussian decay function, distributing the step-by-step attenuation result calculated step by step to the associated downstream node tasks until the value scores of all node tasks in the data warehouse are calculated; allocating resources to each node task in the data warehouse according to the value score obtained. Applying the embodiment of the present application, since the value scores of the node tasks at each layer of the data warehouse conform to the Gaussian decay law, the value scores of the node tasks at each layer can be calculated step by step using the Gaussian decay function, so that the corresponding resources are allocated to each node task using the value score, and limited resources are preferentially allocated to high-value and important tasks, giving full play to the role of limited resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method for allocating resources to tasks, an apparatus for allocating resources to tasks, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the advent of the big data era, more and more industries are using big data as the basis for decision-making. In order to make accurate decisions, thousands of tasks are usually run on the big data platform, and data warehouse technology is used to organize these huge data. Existing technologies usually allocate a series of resources such as computing power and storage to these tasks, and consume the allocated resources to achieve the purpose of completing the tasks. However, existing technologies cannot measure the value of tasks, and cannot prioritize the allocation of limited resources to high-value tasks, resulting in a waste of resources. Summary of the invention

[0003] With respect to the above-mentioned prior art, the method for allocating resources to tasks disclosed in the embodiments of the present invention can overcome the defect of being unable to measure the value of tasks, and achieve the purpose of allocating limited resources to high-value tasks in priority.

[0004] In view of this, an embodiment of the present application proposes a method for allocating resources to a task, the method comprising:

[0005] According to the statistical results, a value score is set for the data warehouse application layer node task, wherein the value score indicates the importance of the node task, and the data warehouse application layer node task is a node task of the first level of the data warehouse;

[0006] Calculate the attenuation results of the value scores step by step starting from the data warehouse application layer node tasks according to the Gaussian attenuation function, and distribute the attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks, until the value scores of all node tasks in the data warehouse are calculated;

[0007] Resources are allocated to each node task in the data warehouse according to the value score obtained therefor.

[0008] Further,

[0009] The step of calculating the stepwise attenuation results of the value scores starting from the data warehouse application layer node tasks step by step according to the Gaussian attenuation function, distributing the stepwise attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks, until the value scores of all node tasks in the data warehouse are calculated, comprises:

[0010] Determine a downstream node task associated with the data warehouse application layer node task, wherein the downstream node task associated with the data warehouse application layer node is a data warehouse subject model layer node task, and the data warehouse subject model layer node task is a node task of the second level of the data warehouse; treat the data warehouse application layer node task as a node task to be processed, and treat the downstream node task associated with the data warehouse application layer node as a downstream node task to be processed;

[0011] Calculating a first attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distributing the first attenuation result to the downstream node task to be processed as the value score of the downstream node task to be processed;

[0012] Determine a downstream node task associated with the data warehouse subject model layer node task, wherein the downstream node task associated with the data warehouse subject model layer node task is a data warehouse dimension fact layer node task, and the data warehouse dimension fact layer node task is a node task at the third level of the data warehouse; take the data warehouse subject model layer node task as a node task to be processed, and take the downstream node task associated with the data warehouse subject model layer node task as a downstream node task to be processed;

[0013] Calculating a second attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distributing the second attenuation result to the downstream node task to be processed as the value score of the downstream node task to be processed;

[0014] Determine a downstream node task associated with the data warehouse dimension fact node task, wherein the downstream node task associated with the data warehouse dimension fact node task is a data warehouse original data layer node task, and the data warehouse original data layer node task is a node task at the fourth level of the data warehouse; take the data warehouse dimension fact node task as a node to be processed, and take the downstream node task associated with the data warehouse dimension fact node task as a downstream node task to be processed;

[0015] A third attenuation result of the value score of the node task to be processed is calculated according to the Gaussian attenuation function, and the third attenuation result is distributed to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

[0016] Further,

[0017] The Gaussian function is Among them, x represents the number of levels of the node task to be processed in the data warehouse, a represents the value score of the node task to be processed, c represents the layer attenuation penalty factor, and is set to c=2, and f(x) represents the attenuation result of the value score of the node task to be processed.

[0018] Further,

[0019] The step of allocating resources to each node task in the data warehouse according to the value score obtained therefor comprises:

[0020] Allocate computing resources to each node task in the data warehouse according to the value score obtained;

[0021] Storage resources are allocated to each node task in the data warehouse according to the value score obtained therefor.

[0022] With respect to the above-mentioned prior art, the device for allocating resources to tasks disclosed in the embodiments of the present invention can overcome the defect of being unable to measure the value of tasks and achieve the purpose of preferentially allocating limited resources to high-value tasks.

[0023] A device for allocating resources to tasks, the device comprising: a setting unit, a calculation unit, and an allocation unit;

[0024] The setting unit is used to set a value score for the data warehouse application layer node task according to the statistical result, and the value score indicates the importance of the node task;

[0025] The calculation unit is used to calculate the step-by-step attenuation results of the value scores starting from the data warehouse application layer node tasks according to the Gaussian attenuation function, and distribute the step-by-step attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks, until the value scores of all the node tasks in the data warehouse are calculated;

[0026] The allocation unit is used to allocate resources to each node task in the data warehouse according to the value score obtained by the node task.

[0027] Further,

[0028] The calculation unit includes: a first determining subunit, a first calculating subunit, a second determining subunit, a second calculating subunit, a third determining subunit, and a third calculating subunit;

[0029] The first determining subunit is used to determine the downstream node task associated with the data warehouse application layer node task, the downstream node task associated with the data warehouse application layer node is the data warehouse subject model layer node task, and the data warehouse subject model layer node task is the node task of the second level of the data warehouse; the data warehouse application layer node task is used as the node task to be processed, and the downstream node task associated with the data warehouse application layer node is used as the downstream node task to be processed;

[0030] The first calculation subunit is used to calculate a first attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the first attenuation result to the downstream node task to be processed as the value score of the downstream node task to be processed;

[0031] The second determination subunit is used to determine the downstream node task associated with the data warehouse subject model layer node task, the downstream node task associated with the data warehouse subject model layer node task is the data warehouse dimension fact layer node task, and the data warehouse dimension fact layer node task is the node task of the third level of the data warehouse; the data warehouse subject model layer node task is used as the node task to be processed, and the downstream node task associated with the data warehouse subject model layer node task is used as the downstream node task to be processed;

[0032] The second calculation subunit is used to calculate a second attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the second attenuation result to the downstream node task to be processed as the value score of the downstream node task to be processed;

[0033] The third determination subunit is used to determine the downstream node task associated with the data warehouse dimension fact node task, the downstream node task associated with the data warehouse dimension fact node task is the data warehouse original data layer node task, and the data warehouse original data layer node task is the node task of the fourth level of the data warehouse; the data warehouse dimension fact node task is used as a node to be processed, and the downstream node task associated with the data warehouse dimension fact node task is used as a downstream node task to be processed;

[0034] The third calculation subunit is used to calculate the third attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the third attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

[0035] Further,

[0036] The Gaussian decay function is Among them, x represents the number of levels of the node task to be processed in the data warehouse, a represents the value score of the node task to be processed, c represents the layer attenuation penalty factor, and is set to c=2, and f(x) represents the attenuation result of the value score of the node task to be processed.

[0037] Further,

[0038] When the allocation unit allocates resources to each node task in the data warehouse according to the value score obtained, it includes: allocating computing power resources to each node task in the data warehouse according to the value score obtained; allocating storage resources to each node task in the data warehouse according to the value score obtained.

[0039] An embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the above-mentioned method of allocating resources to tasks can be implemented.

[0040] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the method for allocating resources to tasks as described in any one of the above items.

[0041] In summary, the embodiment of the present application sets value scores for data warehouse application layer node tasks, and uses the Gaussian decay function to calculate the value scores of node tasks at each layer step by step. The value score of each node task is used to allocate corresponding resources to it, and limited resources are allocated to high-value and important tasks in priority, saving resource costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0043] Figure 1 This is a flowchart of Embodiment 1 of the method for allocating resources to tasks implemented in the present application.

[0044] Figure 2 This is a flowchart of Embodiment 2 of the method for allocating resources to tasks implemented in the present application.

[0045] Figure 3 This is an example diagram of the data warehouse in the third embodiment of the method of the present application.

[0046] Figure 4 It is a structural diagram of embodiment 1 of the device for allocating resources to tasks in the present application.

[0047] Figure 5 It is a structural diagram of embodiment 2 of the device for allocating resources to tasks in the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0050] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0051] Data warehouse is a strategic collection that provides all types of data support for decision-making processes at all levels of the enterprise. It is created for analytical reporting and decision support purposes. Data warehouses are usually divided into different levels according to the organization and management of data. Among them, the first level is the data warehouse application layer (rpt layer), which is usually used to provide users with applications with different goals, such as report analysis; the second level is the data warehouse subject model layer (olap layer), which is usually used to create data cubes with different themes and different granularities; the third level is the data warehouse dimension fact layer (dw), which is usually used to extract, convert, clean and other processing operations on data to generate dimension wide tables and fact wide tables respectively; the fourth level is the data warehouse raw data layer (stg), which is usually used to store raw data from various channels.

[0052] After the data warehouse is established, it can be viewed as a pyramid, with the first-level application layer at the bottom and the fourth-level raw data layer at the top. However, when establishing a data warehouse, it starts from the raw data layer. In other words, a series of processing operations such as extraction, conversion, and cleaning are performed on the data in the raw data layer of the data warehouse to generate dimension wide tables and fact wide tables, namely the data warehouse dimension fact layer; data cubes with different themes and granularities are created based on the dimension wide tables and fact wide tables, namely the data warehouse subject model layer; finally, data is intercepted from the data cubes according to user needs to generate report analysis, etc., namely the data warehouse application layer.

[0053] In actual applications, no matter which level of the data warehouse, there are different tasks, and there are correlations between tasks at adjacent levels. Assume that the implementation of a node task A at the first-level data warehouse application layer depends on the second-level data warehouse topic model layer B and the second-level data warehouse topic model layer C, that is, A——>(B,C), indicating that node task A is correlated with node task B and node task C. The correlations between other levels are similar.

[0054] The embodiment of the present application uses the data warehouse application layer node task as the first-level node task, first calculates the value score of the first-level node task, uses the Gaussian decay function to calculate the decay result step by step, and allocates value scores to the corresponding downstream node tasks step by step, and then uses the value score obtained by each node task to allocate resources. The specific method is described in detail by the following embodiment.

[0055] Figure 1 1 is a flow chart of the first embodiment of the method for allocating resources to tasks implemented by the present application. Figure 1 As shown, the method includes:

[0056] Step 101: Set a value score for the data warehouse application layer node task according to the statistical results. The value score indicates the importance of the node task. The data warehouse application layer node task is the first-level node task of the data warehouse.

[0057] In this step, the value score of the data warehouse application layer node task can be set according to the statistical results. For example, the frequency of use, breadth of use, and importance of use of the data warehouse application layer node tasks are counted, and the corresponding value score is given according to the statistical results. As mentioned above, each layer of the data warehouse has corresponding tasks, and the implementation of upstream tasks has an association relationship with downstream tasks. The association relationship between tasks at each layer constitutes a directed acyclic graph (DAG, Directed Acyclic Graph).

[0058] Step 102: Calculate the attenuation results of the value scores step by step starting from the data warehouse application layer node tasks according to the Gaussian attenuation function, and distribute the attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks until the value scores of all node tasks in the data warehouse are calculated.

[0059] As described above, each layer of the data warehouse has corresponding node tasks, and a directed acyclic graph can be constructed between each node task. The inventor of the present application found that in the directed acyclic graph constructed by the data warehouse node task, there is a Gaussian decay law between the value score of a certain data warehouse node task and the associated downstream node task. Therefore, according to the Gaussian decay function, the decay result of the value score can be calculated step by step, thereby determining the value score of the downstream node task. According to this method, the value scores of all node tasks in the data warehouse can be calculated.

[0060] Step 103: Allocate resources to each node task in the data warehouse according to the value score obtained.

[0061] After determining all the node tasks in the data warehouse, when the node tasks are implemented, the corresponding resources can be allocated to them according to the value score of the node tasks. In practical applications, the higher the value score of the node task, the more important it is, and more computing power and storage resources can be allocated to it. On the contrary, the lower the value score of the node task, the lower its importance, and less computing power and storage resources can be allocated to it.

[0062] Therefore, by applying the embodiment of the present application, since the value scores of node tasks at each layer of the data warehouse conform to the Gaussian decay law, the value scores of node tasks at each layer can be calculated step by step using the Gaussian decay function, so that the value score of each node task can be used to allocate corresponding resources to it, and limited resources can be allocated preferentially to high-value and important tasks, so as to give full play to the role of limited resources.

[0063] In order to better describe the present application scheme, other embodiments are described in detail below. In method embodiment 2, it is assumed that the data warehouse has four layers, wherein the first layer is the data warehouse application layer, the second layer is the data warehouse subject model layer, the third layer is the data warehouse dimension fact layer, and the fourth layer is the data warehouse original data layer.

[0064] Figure 2 This is a flow chart of Embodiment 2 of the method for allocating resources to tasks implemented in this application. Figure 2 As shown, the method includes:

[0065] Step 201: Set a value score for the data warehouse application layer node task according to the statistical results. The value score indicates the importance of the node task. The data warehouse application layer node task is the first-level node task of the data warehouse.

[0066] This step is the same as step 101 in the second embodiment of the method. In practical applications, assuming that the usage frequency x, usage breadth y and usage importance z of the data warehouse application layer node task are collected, the value score can be set to M = a*x+b*y+c*z, where a, b and c are weights.

[0067] Step 202: Determine the downstream node tasks associated with the data warehouse application layer node tasks. The downstream node tasks associated with the data warehouse application layer nodes are the data warehouse subject model layer node tasks. The data warehouse subject model layer node tasks are the node tasks of the second level of the data warehouse. The data warehouse application layer node tasks are the node tasks to be processed. The downstream node tasks associated with the data warehouse application layer nodes are the downstream node tasks to be processed.

[0068] In order to calculate the decay of the value score of the data warehouse application layer node task, it is necessary to first determine the downstream node tasks associated with the data warehouse application layer node. The value scores of these downstream node tasks are the value scores dispersed after the value scores of the data warehouse application layer node tasks decay.

[0069] Step 203: Calculate a first attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the first attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

[0070] In order to distinguish it from other subsequent attenuation results, the attenuation result here is called the first attenuation result. It should be noted that here the first attenuation result is distributed to the downstream node tasks to be processed. If there are multiple downstream node tasks that are associated with the current node task to be processed, the multiple downstream node tasks are all downstream node tasks to be processed. Then, here the calculated first attenuation result is distributed to multiple downstream node tasks to be processed. For example: the value score of a node task to be processed is m, and the first attenuation result calculated according to the Gaussian attenuation function is n. The first attenuation result n is distributed to three associated downstream node tasks to be processed, namely n1, n2 and n3.

[0071] Step 204: Determine the downstream node tasks associated with the data warehouse subject model layer node tasks, the downstream node tasks associated with the data warehouse subject model layer node tasks are data warehouse dimension fact layer node tasks, and the data warehouse dimension fact layer node tasks are node tasks at the third level of the data warehouse; treat the data warehouse subject model layer node tasks as node tasks to be processed, and treat the downstream node tasks associated with the data warehouse subject model layer node tasks as downstream node tasks to be processed.

[0072] This step 204 is similar to step 202, except that here the data warehouse subject model layer node task is taken as the node task to be processed, and the downstream node task associated with the data warehouse subject model layer node task is taken as the downstream node task to be processed.

[0073] Step 205: Calculate the second attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the second attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

[0074] This step 205 is similar to step 203, except that the level of calculation is different.

[0075] Step 206: Determine the downstream node tasks associated with the data warehouse dimension fact node tasks. The downstream node tasks associated with the data warehouse dimension fact node tasks are the data warehouse original data layer node tasks. The data warehouse original data layer node tasks are the node tasks of the fourth level of the data warehouse. The data warehouse dimension fact node tasks are taken as the nodes to be processed, and the downstream node tasks associated with the data warehouse dimension fact node tasks are taken as the downstream node tasks to be processed.

[0076] This step 206 is similar to step 202, except that here the data warehouse dimension fact node task is used as the node to be processed, and the downstream node task associated with the data warehouse dimension fact node task is used as the downstream node task to be processed.

[0077] Step 207: Calculate the third attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the third attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

[0078] This step 207 is similar to step 203, except that the level of calculation is different.

[0079] The above steps 202 to 207 specifically describe how to calculate the step-by-step attenuation results of the value scores starting from the data warehouse application layer node tasks according to the Gaussian attenuation function, and distribute the step-by-step attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks, until the value scores of all node tasks in the data warehouse are calculated, that is, the specific implementation method of step 102 of method embodiment 1.

[0080] In practical applications, the Gaussian attenuation function used in the above steps 203, 205 and 207 may be:

[0081]

[0082] Among them, x represents the number of levels of the node task to be processed in the data warehouse, a represents the value score of the node task to be processed, c represents the layer attenuation penalty factor, and is set to c=2, and f(x) represents the attenuation result of the value score of the node task to be processed.

[0083] Assume that a data warehouse application layer node task is a pending node task A, and there are three associated pending downstream node tasks B1, B2 and B3; the value score of the pending node task is a; since the data warehouse application layer node task is the first-level node task of the data warehouse, x = 1; the layer attenuation penalty factor is set to c = 2 according to the actual situation. Assuming that the attenuation result calculated according to the above formula (1) is y, then y can be distributed to the three pending downstream node tasks. For example: y / 3 is distributed to the pending downstream node task B1, y / 3 is distributed to the pending downstream node task B2, and y / 3 is distributed to the pending downstream node task B3.

[0084] In actual applications, the value scores of all node tasks of the data warehouse can be calculated according to the above steps 202 to 207.

[0085] Step 208: Allocate computing resources to each node task in the data warehouse according to the value score obtained, and allocate storage resources to each node task in the data warehouse according to the value score obtained.

[0086] This step is a specific implementation of step 103 of method embodiment 1. Computing resources and storage resources are involved here. In actual applications, other resources can also be allocated to node tasks, which will not be listed here one by one.

[0087] By applying the embodiment of the present application, the value scores of all node tasks in the data warehouse can be calculated step by step using the Gaussian decay function, so as to allocate reasonable resources to each node task, give priority to allocating limited resources to high-value and important tasks, and give full play to the role of limited resources.

[0088] The application of the present application scheme is illustrated below using a specific data warehouse example. Figure 3 This is an example diagram of the data warehouse in the third embodiment of the present application method. Figure 3 As shown in the figure, it includes: the first layer is the data warehouse application layer, the second layer is the data warehouse subject model layer, the third layer is the data warehouse dimension fact layer, and the fourth layer is the data warehouse original data layer. The node tasks of the data warehouse form a directed acyclic graph, and the arrows are used to show their association relationship.

[0089] The value score of data warehouse application layer node task A1 is 20, the value score of data warehouse application layer node task A2 is 40, the value score of data warehouse application layer node task A3 is 60, and the value score of data warehouse application layer node task A4 is 80. Assuming that the decay result calculated for data warehouse application layer node task A1 is 20, and the decay result calculated for data warehouse application layer node task A2 is 40, then the value score of data warehouse subject model layer node task B1 is 20+40=60. Assuming that the decay result calculated for data warehouse application layer node task A3 is 60, then the value score distributed to data warehouse subject model layer node task B2 is 30, and the value score distributed to data warehouse subject model layer node task B3 is 30.

[0090] The above value scores are only examples, and should actually be calculated using a Gaussian decay function. In short, according to the schemes of the above method embodiments 1 and 2, the value scores of all node tasks in the data warehouse can be calculated, and then resources can be allocated to them using the value scores.

[0091] An embodiment of the present application also provides a device for allocating resources to tasks. Figure 4 1 is a schematic diagram of the structure of the first embodiment of the device for allocating resources to tasks in the present application. Figure 3 As shown, the device includes: a setting unit 401, a calculation unit 402, and an allocation unit 403. Among them:

[0092] The setting unit 401 is used to set a value score for the data warehouse application layer node task according to the statistical result, and the value score indicates the importance of the node task.

[0093] The calculation unit 402 is used to calculate the step-by-step attenuation results of the value scores starting from the data warehouse application layer node tasks according to the Gaussian attenuation function, and distribute the step-by-step attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks until the value scores of all node tasks in the data warehouse are calculated.

[0094] The allocation unit 403 is used to allocate resources to each node task in the data warehouse according to the value score obtained therefrom.

[0095] That is, the setting unit 401 sets a value score for the data warehouse application layer node task; the calculation unit 402 calculates the step-by-step attenuation result of the value score starting from the data warehouse application layer node task according to the Gaussian attenuation function, and distributes the step-by-step attenuation result calculated step by step to the associated downstream node tasks as the value score of the downstream node tasks, until the value scores of all node tasks in the data warehouse are calculated; thereafter, the allocation unit 403 allocates resources to each node task in the data warehouse according to the value score obtained.

[0096] By applying the scheme of the embodiment of the device of the present application, since the value scores of node tasks at each layer of the data warehouse conform to the Gaussian decay law, the value scores of node tasks at each layer can be calculated step by step using the Gaussian decay function, so that the value score of each node task can be used to allocate corresponding resources to it, and limited resources can be allocated preferentially to high-value and important tasks, so as to give full play to the role of limited resources.

[0097] Figure 5 1 is a schematic diagram of the structure of the second embodiment of the device for allocating resources to tasks in the present application. Figure 5 As shown, the device includes: a setting unit 401, a calculation unit 402, and an allocation unit 403. Among them:

[0098] The setting unit 401 is used to set a value score for the data warehouse application layer node task according to the statistical result, and the value score indicates the importance of the node task.

[0099] The calculation unit 402 is used to calculate the step-by-step attenuation results of the value scores starting from the data warehouse application layer node tasks according to the Gaussian attenuation function, and distribute the step-by-step attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks until the value scores of all node tasks in the data warehouse are calculated.

[0100] Specifically, the calculation unit 402 includes a first determination subunit 404, a first calculation subunit 405, a second determination subunit 406, a second calculation subunit 407, a third determination subunit 408, and a third calculation subunit 409. Among them:

[0101] The first determination subunit 404 is used to determine the downstream node tasks associated with the data warehouse application layer node tasks, the downstream node tasks associated with the data warehouse application layer nodes are the data warehouse subject model layer node tasks, and the data warehouse subject model layer node tasks are the node tasks of the second level of the data warehouse; the data warehouse application layer node tasks are used as the node tasks to be processed, and the downstream node tasks associated with the data warehouse application layer nodes are used as the downstream node tasks to be processed.

[0102] The first calculation subunit 405 is used to calculate a first attenuation result of the value score of the node task to be processed according to a Gaussian attenuation function, and distribute the first attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

[0103] The second determination subunit 406 is used to determine the downstream node tasks associated with the data warehouse subject model layer node tasks, the downstream node tasks associated with the data warehouse subject model layer node tasks are the data warehouse dimension fact layer node tasks, and the data warehouse dimension fact layer node tasks are the node tasks of the third level of the data warehouse; the data warehouse subject model layer node tasks are used as the node tasks to be processed, and the downstream node tasks associated with the data warehouse subject model layer node tasks are used as the downstream node tasks to be processed.

[0104] The second calculation subunit 407 is used to calculate the second attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the second attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

[0105] The third determination subunit 408 is used to determine the downstream node tasks associated with the data warehouse dimension fact node tasks, the downstream node tasks associated with the data warehouse dimension fact node tasks are the data warehouse original data layer node tasks, and the data warehouse original data layer node tasks are the node tasks of the fourth level of the data warehouse; the data warehouse dimension fact node tasks are used as the nodes to be processed, and the downstream node tasks associated with the data warehouse dimension fact node tasks are used as the downstream node tasks to be processed.

[0106] The third calculation subunit 409 is used to calculate the third attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the third attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

[0107] In practical applications, the first computing subunit 405, the second computing subunit 407 and the third computing subunit

[0108] The Gaussian decay function used by unit 409 may be: Among them, x represents the number of levels of the node task to be processed in the data warehouse, a represents the value score of the node task to be processed, c represents the layer attenuation penalty factor, and is set to c=2, and f(x) represents the attenuation result of the value score of the node task to be processed.

[0109] The allocation unit 403 is used to allocate resources to each node task in the data warehouse according to the value score obtained. In actual applications, when the allocation unit 403 allocates resources to each node task in the data warehouse according to the value score obtained, it includes: allocating computing power resources to each node task in the data warehouse according to the value score obtained; allocating storage resources to each node task in the data warehouse according to the value score obtained.

[0110] By applying the embodiment of the present application, the value scores of all node tasks in the data warehouse can be calculated step by step using the Gaussian decay function, so as to allocate reasonable resources to each node task, give priority to allocating limited resources to high-value and important tasks, and give full play to the role of limited resources.

[0111] The embodiment of the present application also provides a computer-readable medium, the computer-readable storage medium stores instructions, and the instructions can execute the method of allocating resources to tasks as described above when executed by a processor. In practical applications, the computer-readable medium may be included in the device / device / system described in the above embodiment, or it may exist alone without being assembled into the device / device / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method of allocating resources to tasks described in the above embodiments can be implemented. According to the embodiment disclosed in the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, but it is not used to limit the scope of protection of the present application. In the embodiment disclosed in the present application, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, a device or a device or used in combination with it.

[0112] An embodiment of the present application further provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the method described in any of the above embodiments is implemented.

[0113] The flow chart and block diagram in the accompanying drawings of the present application show the possible architecture, function and operation of the system, method and computer program product according to the various embodiments disclosed in the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in the order of the standards in different figures. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0114] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teachings of the present application, the features described in the various embodiments and / or claims of the present application may be combined and / or combined in a variety of ways, and all of these combinations and / or combinations fall within the scope disclosed in the present application.

[0115] Specific embodiments are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas, and is not used to limit the present application. For those skilled in the art, changes can be made in the specific implementation methods and application scopes according to the ideas, spirits and principles of the present invention, and any modifications, equivalent substitutions, improvements, etc. made therein should be included in the scope of protection of this application.

Claims

1. A method for allocating resources to tasks, characterized in that: The method includes: According to the statistical results, a value score is set for the data warehouse application layer node task, wherein the value score indicates the importance of the node task, and the data warehouse application layer node task is a node task of the first level of the data warehouse; The step-by-step attenuation result of the value score is calculated from the data warehouse application layer node task according to the Gaussian attenuation function, and the step-by-step attenuation result calculated step by step is distributed to the associated downstream node tasks as the value score of the downstream node tasks until the value scores of all node tasks in the data warehouse are calculated, wherein the data warehouse application layer node task is taken as the node task to be processed, and the Gaussian attenuation function is x represents the number of levels of the node task to be processed in the data warehouse, a represents the value score of the node task to be processed, c represents the layer attenuation penalty factor, and f(x) represents the attenuation result of the value score of the node task to be processed; Resources are allocated to each node task in the data warehouse according to the value score obtained therefor.

2. The method according to claim 1, characterized in that The step of calculating the stepwise attenuation results of the value scores starting from the data warehouse application layer node tasks step by step according to the Gaussian attenuation function, distributing the stepwise attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks, until the value scores of all node tasks in the data warehouse are calculated, comprises: Determine the downstream node task associated with the data warehouse application layer node task, the downstream node task associated with the data warehouse application layer node is the data warehouse subject model layer node task, and the data warehouse subject model layer node task is the node task of the second level of the data warehouse; treat the downstream node task associated with the data warehouse application layer node as the downstream node task to be processed; Calculating a first attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distributing the first attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed; Determine a downstream node task associated with the data warehouse subject model layer node task, wherein the downstream node task associated with the data warehouse subject model layer node task is a data warehouse dimension fact layer node task, and the data warehouse dimension fact layer node task is a node task at the third level of the data warehouse; treat the data warehouse subject model layer node task as a node task to be processed, and treat the downstream node task associated with the data warehouse subject model layer node task as a downstream node task to be processed; Calculating a second attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distributing the second attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed; Determine a downstream node task associated with the data warehouse dimension fact node task, wherein the downstream node task associated with the data warehouse dimension fact node task is a data warehouse original data layer node task, and the data warehouse original data layer node task is a node task at the fourth level of the data warehouse; take the data warehouse dimension fact node task as a node to be processed, and take the downstream node task associated with the data warehouse dimension fact node task as a downstream node task to be processed; A third attenuation result of the value score of the node task to be processed is calculated according to the Gaussian attenuation function, and the third attenuation result is distributed to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

3. The method according to claim 1 or 2, characterized in that: The step of allocating resources to each node task in the data warehouse according to the value score obtained therefor comprises: Allocate computing resources to each node task in the data warehouse according to the value score obtained; Storage resources are allocated to each node task in the data warehouse according to the value score obtained therefor.

4. A device for allocating resources to tasks, characterized in that: The device comprises: a setting unit, a calculation unit, and an allocation unit; The setting unit is used to set a value score for the data warehouse application layer node task according to the statistical result, and the value score indicates the importance of the node task; The calculation unit is used to calculate the step-by-step attenuation results of the value score starting from the data warehouse application layer node task according to the Gaussian attenuation function, and distribute the step-by-step attenuation results calculated step by step to the associated downstream node tasks as the value scores of the downstream node tasks until the value scores of all node tasks in the data warehouse are calculated, wherein the data warehouse application layer node task is taken as the node task to be processed, and the Gaussian attenuation function is x represents the number of levels of the node task to be processed in the data warehouse, a represents the value score of the node task to be processed, c represents the layer attenuation penalty factor, and f(x) represents the attenuation result of the value score of the node task to be processed; The allocation unit is used to allocate resources to each node task in the data warehouse according to the value score obtained by the node task.

5. The device according to claim 4, characterized in that The calculation unit includes: a first determining subunit, a first calculating subunit, a second determining subunit, a second calculating subunit, a third determining subunit, and a third calculating subunit; The first determination subunit is used to determine the downstream node task associated with the data warehouse application layer node task, the downstream node task associated with the data warehouse application layer node is the data warehouse subject model layer node task, and the data warehouse subject model layer node task is the node task of the second level of the data warehouse; the downstream node task associated with the data warehouse application layer node is used as the downstream node task to be processed; The first calculation subunit is used to calculate a first attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the first attenuation result to the downstream node task to be processed as the value score of the downstream node task to be processed; The second determining subunit is used to determine the downstream node task associated with the data warehouse subject model layer node task, the downstream node task associated with the data warehouse subject model layer node task is the data warehouse dimension fact layer node task, and the data warehouse dimension fact layer node task is the node task of the third level of the data warehouse; the data warehouse subject model layer node task is used as the node task to be processed, and the downstream node task associated with the data warehouse subject model layer node task is used as the downstream node task to be processed; The second calculation subunit is used to calculate a second attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the second attenuation result to the downstream node task to be processed as the value score of the downstream node task to be processed; The third determination subunit is used to determine the downstream node task associated with the data warehouse dimension fact node task, the downstream node task associated with the data warehouse dimension fact node task is the data warehouse original data layer node task, and the data warehouse original data layer node task is the node task of the fourth level of the data warehouse; the data warehouse dimension fact node task is used as a node to be processed, and the downstream node task associated with the data warehouse dimension fact node task is used as a downstream node task to be processed; The third calculation subunit is used to calculate the third attenuation result of the value score of the node task to be processed according to the Gaussian attenuation function, and distribute the third attenuation result to the downstream node tasks to be processed as the value score of the downstream node tasks to be processed.

6. The device according to claim 4 or 5, characterized in that When the allocation unit allocates resources to each node task in the data warehouse according to the value score obtained, it includes: allocating computing power resources to each node task in the data warehouse according to the value score obtained; allocating storage resources to each node task in the data warehouse according to the value score obtained.

7. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the method for allocating resources to tasks as described in any one of claims 1 to 3 is implemented.

8. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method for allocating resources to tasks as described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Collaborative cloud computing migration method based on Internet of Vehicles application security grading

    CN111240821A

  • Method and device for evaluating enterprise risks by using confidence coefficient and electronic equipment

    CN112613755A