Business processing method and device based on AI data lake, medium and electronic equipment
Patent Information
- Application Number
- CN202610883101.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2046-06-17
AI Technical Summary
这种情况下,由于涉及与磁盘的交互,一旦出现内存不够的情况,任务的执行时间会大幅增加
[0009]By dividing the total memory resources in the resource nodes, a first memory pool and a second memory pool are obtained. The sum of the memory resources held by the first memory pool and the second memory pool equals the total memory resources. Based on this, the first task is executed first using the memory resources in the first memory pool. During the execution of the first task, if the memory resources used in the first memory pool meet a first condition (meeting the first condition indicates that memory overflow may occur), then the second task is determined and its execution is paused. The second task is placed into the first task queue, and the third task in the first task queue is processed using the memory resources in the second memory pool. This reduces the parallelism of the tasks and can prevent disk writes due to insufficient memory to the greatest extent.
Smart Images

Figure CN122412167B_ABST
Abstract
Description
Technical Field
[0001] This content relates at least to the fields of computer technology and AI (Artificial Intelligence) data lake technology, specifically to a business processing method, apparatus, medium and electronic equipment based on an AI data lake. Background Technology
[0002] OLAP (Online Analytical Processing) systems are one of the main applications of data warehouse systems. They can be used to support business processing, such as quickly and flexibly performing large-scale data query processing according to analysts' requirements and providing the query results to analysts. OLAP systems can rely on data provided by AI data lakes to achieve business processing.
[0003] After receiving a business request, an OLAP system generates corresponding tasks and executes these tasks to obtain the request results. However, to avoid Out of Memory (OOM) errors during task execution, if insufficient memory is available, a spill-to-disk operation is performed, employing a batch execution mechanism to complete all processing eventually. In this scenario, due to disk interaction, task execution time increases significantly if memory is insufficient. Simultaneously, waiting for disk responses during this process reduces CPU (Central Processing Unit) utilization. Summary of the Invention
[0004] This content section is provided to briefly introduce the concepts, which will be described in detail in the examples section later. This content section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] Firstly, a business processing method based on an AI data lake is provided. This method involves dividing the total memory resources in resource nodes to obtain a first memory pool and a second memory pool. The sum of the memory resources held by the first memory pool and the memory resources held by the second memory pool equals the total memory resources. The business processing method includes: At least one first task is executed using the memory resources held by the first memory pool. The execution of the first task depends on the data stored in the AI data lake, and the execution of the first task is used to obtain the business result of the business request. In response to the fact that, during the execution of the at least one first task using memory resources held in the first memory pool, a first condition is met, at least one second task is determined, and the execution of the second task is suspended, wherein the second task is determined from the unfinished first task; All second tasks are placed into the first task queue, and the third task is executed using the memory resources held by the second memory pool. The third task is the highest priority task in the first task queue.
[0006] Secondly, a business processing device based on an AI data lake is provided. This device divides the total memory resources in resource nodes to obtain a first memory pool and a second memory pool. The sum of the memory resources held by the first memory pool and the memory resources held by the second memory pool equals the total memory resources. The business processing device includes: The first execution module is used to execute at least one first task using the memory resources held by the first memory pool. The execution of the first task depends on the data stored in the AI data lake, and the execution of the first task is used to obtain the business result of the business request. A determining module is configured to, in response to a first condition being met by memory resources used in the first memory pool during the execution of at least one first task held by the first memory pool, determine at least one second task and suspend the execution of the second task, wherein the second task is determined from the unfinished first task; The second execution module is used to put all the second tasks into the first task queue and execute the third task using the memory resources held by the second memory pool. The third task is the highest priority task in the first task queue.
[0007] Thirdly, a computer-readable medium is provided having a computer program stored thereon, wherein the computer program, when executed by a processing device, implements the steps of the method described in the first aspect.
[0008] Fourthly, an electronic device is provided, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method described in the first aspect.
[0009] By dividing the total memory resources in the resource nodes, a first memory pool and a second memory pool are obtained. The sum of the memory resources held by the first memory pool and the second memory pool equals the total memory resources. Based on this, the first task is executed first using the memory resources in the first memory pool. During the execution of the first task, if the memory resources used in the first memory pool meet a first condition (meeting the first condition indicates that memory overflow may occur), then the second task is determined and its execution is paused. The second task is placed into the first task queue, and the third task in the first task queue is processed using the memory resources in the second memory pool. This reduces the parallelism of the tasks and can prevent disk writes due to insufficient memory to the greatest extent.
[0010] Other features and advantages of the technical solution will be described in detail in the following examples section. Attached Figure Description
[0011] The above and other features, advantages, and aspects of the technical solution will become more apparent when considered in conjunction with the accompanying drawings and the following examples. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 This is a schematic diagram illustrating one application scenario based on certain conditions; Figure 2 This is a flowchart illustrating a business processing method based on an AI data lake, illustrating certain scenarios. Figure 3 This is a schematic diagram illustrating task scheduling based on certain scenarios; Figure 4 This is a schematic diagram illustrating two resource nodes under certain circumstances; Figure 5 This is a block diagram illustrating a business processing device based on an AI data lake, illustrating certain scenarios. Figure 6 This is a schematic diagram of the structure of an electronic device shown under certain circumstances. Detailed Implementation
[0012] The technical solution will now be described in more detail with reference to the accompanying drawings. Although certain scenarios are shown in the drawings, it should be understood that the technical solution can be implemented in various forms and should not be construed as limited to the scenarios described herein. Rather, these scenarios are provided to provide a more thorough and complete understanding of the technical solution. It should be understood that the accompanying drawings and the scenarios described are for illustrative purposes only and are not intended to limit the scope of protection of the technical solution.
[0013] It should be understood that the steps described in the method implementation may be performed in different orders and / or in parallel. Furthermore, the method implementation may include additional steps and / or omit the steps shown. The scope of the technical solution is not limited in this respect.
[0014] The term "comprising" and its variations as used herein can be open-ended, meaning "including but not limited to". The term "based on" can mean "at least partially based on". The term "one case" means "at least one case", and "a situation" means "at least one situation"; the term "another case" means "at least one additional case", and "another situation" means "at least one additional situation"; the term "some cases" means "at least some cases", and "some situations" means "at least some situations". Definitions of other terms will be given in the description below.
[0015] It should be noted that the concepts of "first" and "second" mentioned here are only used to distinguish different devices, modules or units, and are not used to limit the order of the functions performed by these devices, modules or units or their interdependencies.
[0016] It should be noted that the terms "one" and "more" used here are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0017] The names of messages or information exchanged between the multiple devices in the implementation are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0018] It is understandable that before using the technical solutions provided here, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in accordance with relevant laws and regulations, and their authorization should be obtained through appropriate means.
[0019] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media performing the operations described herein.
[0020] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0021] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the technical solution. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the technical solution.
[0022] At the same time, it is understood that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of relevant laws, regulations and related provisions.
[0023] As discussed above, to avoid memory overflow errors, a disk write operation is performed when the memory required to execute a task is insufficient. In related technologies, the solution to this problem is to estimate the memory requirements of each task before execution and schedule different tasks based on these requirements to avoid memory overflow errors. However, it is difficult to accurately estimate the memory requirements of each task. Not only may the memory requirements of each task be different, but even the memory required for the same task running on different resource nodes may vary. If the estimated memory requirements of a task are too low, it will still lead to insufficient memory for all tasks, causing all tasks to trigger a disk write operation. Conversely, if the estimated memory requirements are too high, only a few tasks will be executed, while others will be queued, resulting in a large amount of unused free memory and increasing the execution time of queued tasks.
[0024] In view of this, we provide business processing methods, devices, storage media, electronic devices, and program products based on AI data lakes. The following explanation and description of the solution are provided in conjunction with the accompanying drawings.
[0025] Figure 1 This is a schematic diagram illustrating an application scenario based on certain conditions. (Refer to...) Figure 1 The application scenario may include a client 101, an online analytical processing system 102, and an artificial intelligence data lake 103. The online analytical processing system 102 establishes communication connections with the client 101 and the artificial intelligence data lake 103, respectively.
[0026] Client 101 may include, but is not limited to, mobile terminals such as mobile phones, laptops, and tablets, as well as fixed terminals such as desktop computers. Applications, such as artificial intelligence applications, may be installed on client 101. These applications can provide data query and analysis functions, enabling users to perform data queries and analyses.
[0027] The Online Analytical Processing (OLAP) system 102 can be mounted on a server. After receiving a business request from client 101, the OLAP system 102 analyzes the request and generates a corresponding plan. This plan may include at least one task. By executing at least one task, the request result of the business request is obtained based on the execution results of all tasks. When scheduling tasks for execution, the OLAP system 102 can implement task execution in a distributed manner. For example, tasks can be executed using memory resources provided by different resource nodes, such as servers.
[0028] AI data lakes (103) can typically be built on a lakeware architecture, combining the low cost and multi-data type support of traditional data lakes with the single source of fact and strict governance of data warehouses. For example, using cloud object storage as a foundation, overlaid with open table formats and unified directories, the same data can simultaneously support offline data warehousing, real-time analysis, and model training.
[0029] When the online analytical processing system 102 executes a task, it can rely on the data stored in the artificial intelligence data lake 103 to process the task, obtain the business result of the business request by executing the task, and then return it to the client 101.
[0030] Figure 2 This is a flowchart illustrating a business processing method based on an AI data lake, illustrating certain scenarios. (Refer to...) Figure 2 This business processing method based on AI data lake can be provided by Figure 1 The online analytical processing system 102 shown is executed, referencing Figure 2 The business processing method based on the AI data lake may include steps S210, S220 and S230.
[0031] By dividing the total memory resources in the resource nodes, a first memory pool and a second memory pool are obtained. The sum of the memory resources held by the first memory pool and the memory resources held by the second memory pool equals the total memory resources. A resource node can be, for example, a cloud server.
[0032] In step S210, at least one first task is executed using the memory resources held by the first memory pool. The execution of the first task depends on the data stored in the AI data lake, and the execution of all first tasks is used to obtain the business result of the business request.
[0033] Of course, the first step is for the online analytical processing system to analyze the business requests submitted by the client to obtain a plan. This plan can include the tasks required to obtain the business results of the business requests, with the first task being the task in this plan. For example, a second task queue (e.g., a multi-level feedback queue) can be set up to maintain the tasks in the plan. In other words, the first task originates from the multi-level feedback queue, and at least one first task can be determined based on the existing multi-level feedback queue scheduling mechanism. This first task is some or all of the tasks in the aforementioned plan, thus achieving compatibility with the existing multi-level feedback queue scheduling mechanism. Figure 3 This is a schematic diagram illustrating task scheduling based on certain scenarios. (Refer to...) Figure 3 The first task in the second task queue is executed first using the memory resources held by the first memory pool.
[0034] As an example, a business request can be a data query request, which can be represented by a structured query statement. Therefore, an online analytical processing (OLAP) system can analyze the structured query statement to generate a corresponding plan.
[0035] In step S220, in response to the memory resources used in the first memory pool satisfying a first condition during the execution of at least one first task through memory resources held in the first memory pool, at least one second task is determined and the execution of the second task is suspended. The second task is determined from the unfinished first task.
[0036] It should be noted that the first condition, which indicates that the memory resources used in the first memory pool may be insufficient, is used to indicate that there may be insufficient memory in the first memory pool. If the first task is allowed to continue execution, it will cause an OutOfMemoryError (OOM), which will require a disk write operation. Therefore, to avoid disk write, it is necessary to pause the execution of some tasks at this time.
[0037] The second task is a first task selected from the incomplete tasks of at least one first task currently being executed through the memory resources held by the first memory pool. As an example, there may be one or more second tasks. The determination of the second task can be found below.
[0038] In step S230, all second tasks are placed into the first task queue, and the third task is executed using the memory resources held by the second memory pool. The third task is the highest priority task in the first task queue.
[0039] When adding a third task to the first task queue, it can be done according to its priority; therefore, the third task can be the first task in the first task queue. (Continue to refer to...) Figure 3If, during the execution of at least one first task using memory resources held in the first memory pool, the memory resources used in the first memory pool meet the first condition, then a second task is determined, and the execution of the second task is suspended. The suspended second task is placed into the first task queue for queuing.
[0040] The aforementioned plan may be divided into multiple plan segments due to blocking operators (such as sorting, joining, or aggregation operators). Each plan segment, when executed on multiple data partitions, will be instantiated into multiple tasks. These tasks can be executed on multiple resource nodes. Each plan segment can be understood as a pipeline, which may include multiple tasks. Therefore, when scheduling task execution, the relationships between upstream and downstream tasks in the pipeline need to be considered.
[0041] Figure 4 This is a schematic diagram illustrating the execution of tasks on two resource nodes under certain circumstances. (Refer to...) Figure 4 Tasks A1 and A2 belong to the same pipeline, and are scheduled to different resource nodes (e.g., ...). Figure 4 As shown, resource nodes 1 and 2 execute, while tasks B1 and B2 belong to another pipeline and are scheduled to execute on different resource nodes. The result of task A1 needs to be transmitted to task A2 in real time, and similarly, the result of task B1 needs to be transmitted to task B2 in real time. If the memory resources of resource node 1 are prioritized for task A1, and the execution of task B1 is suspended, while the memory resources of resource node 2 are prioritized for task B2, and the execution of task A2 is suspended, then the result of task A1 cannot be retrieved by task A2 in time, thus blocking the execution of task A1. Similarly, after task B1 is suspended, task B2 cannot obtain the input data (generated by task B1), and thus task B2 is also blocked, resulting in a deadlock between the two pipelines. Therefore, when there are multiple resource nodes, the third task mentioned above can be the task with the highest global priority in the first task queue. This can avoid deadlock. It can be understood that the task with the highest global priority here can be determined collaboratively by multiple resource nodes. Therefore, it can be seen that during task execution, tasks in the same pipeline are active simultaneously. That is, if a task in a pipeline is being executed, and there are other tasks in the pipeline in the queue of the first task, then the memory resources held by the second memory pool will be used first to execute the other tasks in the pipeline.
[0042] By dividing the total memory resources in the resource nodes into a first memory pool and a second memory pool, the sum of the memory resources held by the first memory pool and the second memory pool equals the total memory resources. Based on this, the first task is executed first using the memory resources in the first memory pool. During the execution of the first task, if the memory resources used in the first memory pool meet the first condition, the second task is determined and its execution is paused. The second task is then placed into the first task queue. The third task in the first task queue is processed using the memory resources in the second memory pool, thereby reducing the parallelism of the tasks. In this way, disk writes caused by insufficient memory can be prevented to the greatest extent.
[0043] In some cases, the above business processing method may also include the following steps: in response to the existence of a fourth task in the first task queue that meets the second condition, suspend the execution of the third task and execute the fourth task through the memory resources held by the second memory pool, wherein the fourth task is the highest priority task in the first task queue.
[0044] Of course, the fourth task is added to the first task queue after the third task is executed. The second condition can be understood as having a higher priority than the third task, which is being executed using memory resources held by the second memory pool.
[0045] Since the fourth task was added to the first task queue after the third task was executed, the fourth task may be a task with a higher priority than the third task.
[0046] Therefore, after the third task is executed, if a task added to the first task queue meets the second condition, it is allowed to preempt the memory resources of the currently executing third task, thus prioritizing the execution of higher-priority tasks.
[0047] In some cases, the fourth task is associated with the fifth task that is being performed.
[0048] As an example, the resource nodes on which the fifth task depends can be different from those on which the fourth task depends. The fifth task can be executed using memory resources in the first memory pool or the second memory pool on the resource nodes on which it depends.
[0049] It should be noted that the above-mentioned correlation can mean that the fourth task and the fifth task belong to the same pipeline, thus avoiding the deadlock situation mentioned above.
[0050] In some cases, the above-mentioned business processing method may also include the following steps: in response to the dynamic changes in memory resources required to perform the third task during the execution of the third task, dynamically adjust the memory resources held by the second memory pool and the memory resources held by the first memory pool.
[0051] To improve memory utilization, task execution does not pre-occupy all the memory resources required to execute the entire task. Therefore, the memory resources required during the execution of the third task can change dynamically. This dynamic change can be an increase. Thus, as an example, dynamically adjusting the memory resources held by the second memory pool and the first memory pool in response to the dynamic change in the memory resources required to execute the third task can include: in response to an increase in the memory resources required to execute the third task, and the memory resources available to the second memory pool being less than the memory resources required for the third task, decreasing the memory resources held by the first memory pool and increasing the memory resources held by the second memory pool, where the decrease in the memory resources held by the first memory pool is equal to the increase in the memory resources held by the second memory pool.
[0052] Of course, the aforementioned dynamic change can also be a reduction. As another example, the dynamic adjustment of the memory resources held by the second memory pool and the first memory pool in response to the dynamic changes in memory resources required to execute the third task during execution can include: in response to a reduction in the memory resources required to execute the third task during execution, and if the memory resources available to the second memory pool are greater than the memory resources required by the third task, increasing the memory resources held by the first memory pool and decreasing the memory resources held by the second memory pool, wherein the increase in the memory resources held by the first memory pool is equal to the decrease in the memory resources held by the second memory pool. It is understood that even after the reduction, the memory resources available to the second memory pool are still sufficient to support the current memory resources required by the third task.
[0053] Before the business processing method begins execution, the memory resources held by the first memory pool can be set to a preset minimum value, for example, 10% of the total memory resources. Correspondingly, the memory resources held by the second memory pool can be 1-10% of the total memory resources in the resource node. During task execution, the memory resources held by the first memory pool can be dynamically adjusted. When dynamically adjusting the memory resources held by the first memory pool, the memory resources held by the first memory pool cannot be less than the preset minimum value. The preset minimum value can be configured according to actual conditions. For example, refer to... Figure 3 X (i.e., the memory resources held by the first memory pool) can be dynamically adjusted, and correspondingly, the memory resources held by the second memory pool can also be dynamically adjusted.
[0054] Since the tasks added to the first task queue (i.e., the second task) can be incomplete first tasks that require significant memory, if the third task requires more memory and the available memory resources in the second memory pool are insufficient to support its execution, more memory resources can be dynamically added to the second memory pool. This prioritizes the tasks in the first task queue, ensuring their normal execution. Conversely, if the third task does not require more memory and the second memory pool has available memory resources besides those used by the third task, memory resources can be dynamically added to the first memory pool. This allows the first memory pool to handle more tasks and improves memory utilization.
[0055] In some cases, the steps of reducing the memory resources held by the first memory pool and increasing the memory resources held by the second memory pool in response to an increase in the memory resources required to execute the third task during execution, and the memory resources available to the second memory pool being less than the memory resources required by the third task, can be implemented as follows: In response to an increase in the memory resources required to execute the third task during execution, and the memory resources available to the second memory pool being less than the memory resources required by the third task, determine the task progress of the first task currently being executed using the memory resources held by the first memory pool; if there is a ninth task among the first tasks currently being executed using the memory resources held by the first memory pool, then pause the execution of the third task, where the task progress of the ninth task is greater than a preset task progress; after the ninth task is completed, reclaim the memory resources used to execute the ninth task and allocate the reclaimed memory resources to the second memory pool; then resume the execution of the third task. It is understood that the memory resources allocated to the second memory pool are also the memory resources reduced from the first memory pool. In this scenario, the third task, which requires significant memory resources, can be paused and waited until the ninth task, which has lower memory requirements and is nearing completion among the incomplete first tasks, finishes before resuming execution. For example, the preset task progress could be 90%.
[0056] In some cases, if the ninth task does not exist, the tenth task in the first task currently executing using the memory resources held by the first memory pool can be paused, and a portion of the memory resources in the first memory pool can be allocated to the second memory pool. The size of this portion of memory resources can be determined based on the memory resource requirements of the third task. Therefore, the paused tenth task can be determined based on the memory resource requirements of the third task.
[0057] It should be noted that if additional memory resources are needed for the second memory pool, the first memory pool may temporarily cease accepting new tasks that require its memory resources. New tasks will only be accepted once the first memory pool has sufficient resources.
[0058] In some cases, the step of determining at least one second task in response to the first condition being met during the execution of at least one first task using memory resources held by the first memory pool can be implemented as follows: in response to the first condition being met during the execution of at least one first task using memory resources held by the first memory pool, the first condition is determined to be met; at least one second task is determined.
[0059] The memory resource threshold is dynamically determined based on a preset ratio and the memory resources currently held by the first memory pool. As explained above, the memory resources held by the first memory pool can change dynamically during task execution. Therefore, the memory resource threshold can change accordingly, thereby improving the overall flexibility of the solution. The preset ratio can be set based on actual circumstances.
[0060] By using the above method, a memory resource threshold is used to determine whether the first condition is met, thereby triggering operations such as determining the second task and pausing the second task.
[0061] In some cases, even if the first condition is not met, at least one first task can still be executed using the memory resources held by the first memory pool.
[0062] In some cases, the determination of at least one second task can be carried out by: obtaining task information of at least one unfinished first task; and determining at least one second task based on the task information of all unfinished first tasks.
[0063] Of course, the unfinished first task here refers to the first unfinished task among the first tasks currently being executed using the memory resources held by the first memory pool.
[0064] The aforementioned task information may include estimated memory resources, which represent the memory resources required to complete the incomplete first task. The priority of the sixth task as the second task is higher than that of the seventh task as the second task. The estimated memory resources of the sixth task are greater than those of the seventh task. Both the sixth and seventh tasks are incomplete first tasks among at least one first task currently being executed using the memory resources held by the first memory pool. In other words, the first task with the larger memory requirement among the incomplete first tasks is considered as the second task to ensure that tasks with smaller memory requirements can be executed first.
[0065] The memory resources required to complete the first task include the memory resources currently used by the first task and the memory resources still needed to complete the first task.
[0066] The aforementioned task information can include task progress and estimated memory resources. As an example, if the first condition is met, only one second task can be prioritized. This reduces the number of paused tasks and avoids impacting task execution efficiency. In this case, multiple dimensions of information can be combined to determine the second task, such as task progress and estimated memory resources. For instance, if estimated memory resources are the same, the task with the shortest progress can be selected as the second task. This way, tasks with larger progress can avoid being paused and can be completed quickly, releasing their memory resources for other tasks to execute more efficiently.
[0067] By using the above method, the task information of the unfinished first task is used to rationally determine the second task that is most suitable to be paused and placed in the first task queue for processing.
[0068] In some cases, a resource node may have multiple first memory pools, which are cascaded. The sum of the memory resources held by the multiple first memory pools and the memory resources held by the second memory pool equals the total memory resources. In this case, the step of performing at least one first task using the memory resources held by the first memory pool can be implemented by performing at least one first task using the memory resources held by the first first memory pool among the multiple first memory pools.
[0069] Next, the above-mentioned business processing method may further include the following steps: in response to the fact that the memory resources used in the previous first memory pool satisfy the third condition during the execution of a task through the memory resources held by the previous first memory pool, at least one eighth task is determined, and at least one eighth task is executed through the memory resources held by the next first memory pool. The eighth task is determined from the unfinished tasks. The previous first memory pool and the next first memory pool are two adjacent first memory pools among a plurality of first memory pools. It should be noted that the unfinished tasks specifically refer to the unfinished tasks in the tasks currently being executed through the memory resources held by the previous first memory pool.
[0070] Furthermore, the above response to determining at least one second task and suspending the execution of the second task in response to executing at least one first task through memory resources held by the first memory pool satisfying a first condition includes: determining at least one second task and suspending the execution of the second task in response to executing a task through memory resources held by the last first memory pool satisfying a fourth condition.
[0071] Taking a resource node that includes two first memory pools and one second memory pool as an example, 10% (minimum) of the total memory resources of the resource node is allocated to the first first memory pool, and 20% (minimum) of the total memory resources is allocated to the second first memory pool. The memory resources held by the second memory pool account for 70% of the total memory resources.
[0072] The methods for determining whether the third and fourth conditions are met can be similar to those for determining whether the first condition is met. Specifically, they can be determined using the corresponding preset proportions of each first memory pool, the currently held memory resources, and a memory resource threshold. For example, to determine whether the third condition is met: if, during the execution of a task using memory resources held by the previous first memory pool, the memory resources used in that previous first memory pool exceed the memory resource threshold corresponding to that previous first memory pool, then the third condition is determined to be met. It is understood that the memory resource threshold corresponding to the previous first memory pool can be determined using the preset proportions of the previous first memory pool and the memory resources currently held by that previous first memory pool.
[0073] Continuing with the example of a resource node comprising two first memory pools and one second memory pool, the above business processing method can proceed as follows: At least one first task is executed using the memory resources held by the first first memory pool; in response to the memory resources used in the first first memory pool satisfying a third condition during task execution using the memory resources held by the first first memory pool, at least one eighth task is determined, and at least one eighth task is executed using the memory resources held by the second first memory pool; in response to the memory resources used in the second first memory pool satisfying a fourth condition during eighth task execution using the memory resources held by the second first memory pool, at least one second task is determined, and the execution of the second task is paused. It is understood that the second task is determined from the unfinished eighth tasks. The method for determining the eighth task can refer to the method for determining the second task described above; for example, based on the estimated memory resources, tasks requiring large amounts of memory are determined as the eighth task.
[0074] By using the above method, it is equivalent to adding an intermediate memory pool that allows tasks to run directly, delaying the time when tasks are added to the first task queue, thereby ensuring that tasks with smaller memory requirements can be executed first.
[0075] In some scenarios, the architecture of a resource node can be an architecture comprising multiple memory nodes, where the sum of the memory resources provided by these multiple memory nodes constitutes the total memory resources of the resource node. In this case, the memory resources held by the memory pool are deployed on the same memory node, and the memory pool can include at least one of a first memory pool and a second memory pool.
[0076] As an example, a memory node can be a NUMA (Non-Uniform Memory Access) memory node.
[0077] This ensures that memory usage within each memory pool is more localized, avoiding the increased time consumption caused by cross-memory node communication during task execution.
[0078] In some cases, the first memory pool can include multiple pools. Since the memory resources allocated to the second memory pool are relatively large, taking two memory nodes as an example, we can first ensure that the memory resources held by the second memory pool are in the same memory node, while the memory resources held by multiple first memory pools are in another memory node, so as to maximize the locality of memory usage within each memory pool.
[0079] Figure 5 This is a block diagram illustrating a business processing device based on an AI data lake, illustrating a scenario where the total memory resources in resource nodes are divided into a first memory pool and a second memory pool. The sum of the memory resources held by the first memory pool and the second memory pool equals the total memory resources. (Refer to...) Figure 5 The service processing device 500 may include: The first execution module 501 is used to execute at least one first task through the memory resources held by the first memory pool. The execution of the first task depends on the data stored in the AI data lake, and the execution of the first task is used to obtain the business result of the business request. The determining module 502 is configured to, in response to the fact that, during the execution of the at least one first task through memory resources held in the first memory pool, the memory resources used in the first memory pool satisfy a first condition, determine at least one second task and suspend the execution of the second task, wherein the second task is determined from the unfinished first task; The second execution module 503 is used to put all the second tasks into the first task queue and execute the third task through the memory resources held by the second memory pool. The third task is the highest priority task in the first task queue.
[0080] In some cases, the service processing apparatus 500 further includes: The first response module is used to respond to the existence of a fourth task in the first task queue that meets the second condition, to suspend the execution of the third task, and to execute the fourth task using the memory resources held by the second memory pool, wherein the fourth task is the highest priority task in the first task queue.
[0081] In some cases, the fourth task is associated with the fifth task that is being performed.
[0082] In some cases, the service processing apparatus 500 further includes: The second response module is used to dynamically adjust the memory resources held by the second memory pool and the memory resources held by the first memory pool in response to the dynamic changes in memory resources required to execute the third task during the execution of the third task.
[0083] In some cases, the determining module 502 includes: The first determining submodule is configured to determine that a first condition is met in response to the fact that, during the execution of the at least one first task through the memory resources held by the first memory pool, the memory resources used in the first memory pool exceed a memory resource threshold. The second determination submodule is used to determine at least one second task.
[0084] In some cases, the determining module 502 is further configured to: Obtain task information for at least one incomplete first task; Based on the task information of all the unfinished first tasks, at least one second task is determined.
[0085] In some cases, the task information includes estimated memory resources, which represent the memory resources required to complete the incomplete first task. The sixth task is determined to have a higher priority than the seventh task. The estimated memory resources of the sixth task are greater than the estimated memory resources of the seventh task. Both the sixth task and the seventh task belong to the incomplete first task.
[0086] In some cases, the first memory pool includes multiple first memory pools, which are cascaded. The sum of the memory resources held by the multiple first memory pools and the memory resources held by the second memory pool is equal to the total memory resources. The first execution module 501 is further configured to: execute at least one first task using the memory resources held by the first first memory pool among the multiple first memory pools. The service processing device 500 further includes: The third response module is configured to respond to the situation where, during the execution of a task using memory resources held by the previous first memory pool, the memory resources used in the first memory pool satisfy a third condition, determine at least one eighth task, and execute the at least one eighth task using memory resources held by the next first memory pool, wherein the at least one eighth task is determined from the unfinished first task. The determining module 502 is further configured to: in response to the fact that, during the execution of a task using memory resources held by the last memory resource in the first memory pool, the memory resources used in the first memory pool satisfy the fourth condition, determine at least one second task, and suspend the execution of the second task.
[0087] In some cases, the total memory resources are deployed across multiple memory nodes, and the memory resources held by the memory pool are deployed on the same memory node, wherein the memory pool includes the first memory pool and / or the second memory pool.
[0088] In some cases, the at least one first task originates from a multi-level feedback queue, and the at least one first task is determined based on the scheduling mechanism of the multi-level feedback queue.
[0089] Among them, regarding Figure 5 The implementation principles of each module in the business processing device 500 shown can be referred to the above content, and the business processing device 500 has the same technical effect as the above business processing method.
[0090] Based on the same concept, a computer-readable medium is provided that stores a computer program thereon, wherein when the computer program is executed by a processing device, it implements the steps of the above-described method, and the computer-readable medium has the technical effects that can be achieved by implementing the above-described related methods, and the technical effects can be referred to the above content.
[0091] Based on the same concept, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, it implements the steps of the above-described method, and the computer program product has the technical effects that can be achieved by implementing the above-described related methods, and the technical effects can be referred to the above content.
[0092] Based on the same concept, an electronic device is provided, comprising: A storage device on which computer programs are stored; A processing device is used to execute the computer program in the storage device to implement the steps of the above method, and the electronic device has the technical effects that can be achieved by implementing the above-mentioned related methods, and the technical effects can be referred to the above content.
[0093] The following is for reference. Figure 6 The diagram illustrates a structural schematic of an electronic device 600 suitable for implementing the above-described technical solution. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Personal Computers), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs (Televisions), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not be construed as limiting its functionality or scope of use.
[0094] like Figure 6 As shown, electronic device 600 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. The random access memory 603 also stores various programs and data required for the operation of electronic device 600. The processing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0095] Typically, the following devices can be connected to the input / output interface 605: input devices 606 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 608 including, for example, magnetic tape, hard disk, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0096] In particular, depending on certain circumstances, the processes described in the flowchart above can be implemented as computer software programs. For example, a computer program product is provided, comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. This computer program can be downloaded and installed from a network via communication device 609, or installed from storage device 608, or installed from read-only memory 602. When the computer program is executed by processing device 601, it performs the functions defined in the above-described methods.
[0097] It should be noted that the aforementioned computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM, or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In one case, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In another case, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof.
[0098] In some implementations, electronic devices can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communications (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), the internet (e.g., the Internet), and peer-to-peer networks (e.g., ad-hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0099] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0100] The aforementioned computer-readable medium carries one or more programs. When the aforementioned one or more programs are executed by the electronic device, the electronic device: divides the total memory resources in the resource nodes to obtain a first memory pool and a second memory pool, the sum of the memory resources held by the first memory pool and the memory resources held by the second memory pool equals the total memory resources. The business processing method includes: executing at least one first task using the memory resources held by the first memory pool, the execution of the first task depending on data stored in the AI data lake, and the execution of the first task being used to obtain the business result of a business request; in response to the memory resources used in the first memory pool satisfying a first condition during the execution of the at least one first task using the memory resources held by the first memory pool, determining at least one second task and pausing the execution of the second task, the second task being determined from the unfinished first task; placing all the second tasks into a first task queue, and executing a third task using the memory resources held by the second memory pool, the third task being the highest priority task in the first task queue.
[0101] Computer program code for performing the above operations can be written in one or more programming languages or a combination thereof. These programming languages include, but are not limited to, object-oriented programming languages, as well as conventional procedural programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0102] The flowcharts and block diagrams in the accompanying figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products under various scenarios. In this respect, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the figures. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0103] The modules mentioned above can be implemented in software or hardware. In some cases, the name of a module does not constitute a limitation on the module itself; for example, the first execution module can also be described as "a module that executes at least one first task using the memory resources held by the first memory pool".
[0104] The functions described above can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field-Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application-Specific Standard Parts (ASSPs), Systems on Chips (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0105] In this context, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0106] The above description is merely illustrative and explains the technical principles employed. Those skilled in the art should understand that the scope of the technical solution is not limited to specific combinations of the above-described technical features, but also includes other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features provided herein that have similar functions.
[0107] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limitations on the scope of the technical solution. Certain features described in the context of a single example can also be implemented in combination in a single example. Conversely, various features described in the context of a single example can also be implemented individually or in any suitable sub-combination in multiple examples.
[0108] Although the technical solution has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims. Regarding the aforementioned apparatus, the specific manner in which each module performs its operation has already been described in detail in the section concerning the method, and will not be elaborated upon here.
Claims
1. A business processing method based on an AI data lake, comprising dividing the total memory resources in resource nodes to obtain a first memory pool and a second memory pool, wherein the sum of the memory resources held by the first memory pool and the memory resources held by the second memory pool equals the total memory resources, wherein the resource nodes include multiple nodes, and the business processing method includes: At least one first task is executed using the memory resources held by the first memory pool. The execution of the first task depends on the data stored in the AI data lake, and the execution of the first task is used to obtain the business result of the business request. In response to the fact that, during the execution of the at least one first task using memory resources held in the first memory pool, a first condition is met, at least one second task is determined, and the execution of the second task is suspended, wherein the second task is determined from the unfinished first task; All the second tasks are placed into the first task queue, and the third task is executed using the memory resources held by the second memory pool. The third task is the highest priority task in the first task queue, and the third task is determined through the collaboration of multiple resource nodes. In response to the existence of a fourth task in the first task queue that meets the second condition, the execution of the third task is paused, and the fourth task is executed using the memory resources held by the second memory pool. The fourth task is the highest priority task in the first task queue, and the fourth task is associated with the fifth task that is being executed. The fourth task and the fifth task belong to the same pipeline.
2. The business processing method according to claim 1, further comprising: In response to the dynamic changes in memory resources required to perform the third task during its execution, the memory resources held by the second memory pool and the memory resources held by the first memory pool are dynamically adjusted.
3. The business processing method according to claim 1, wherein determining at least one second task in response to the memory resources used in the first memory pool satisfying a first condition during the execution of the at least one first task through memory resources held in the first memory pool, comprises: In response to the fact that, during the execution of the at least one first task using memory resources held by the first memory pool, the memory resources used in the first memory pool exceed a memory resource threshold, it is determined that the first condition is met. Identify at least one secondary task.
4. The business processing method according to claim 1 or 3, wherein determining at least one second task includes: Obtain task information for at least one incomplete first task; Based on the task information of all the unfinished first tasks, at least one second task is determined.
5. The business processing method according to claim 4, wherein the task information includes estimated memory resources, the estimated memory resources are used to characterize the memory resources required to complete the unfinished first task, the priority of the sixth task being determined as the second task is higher than the priority of the seventh task being determined as the second task, the estimated memory resources of the sixth task are greater than the estimated memory resources of the seventh task, and both the sixth task and the seventh task belong to the unfinished first task.
6. The business processing method according to claim 1, wherein the first memory pool comprises multiple pools, the multiple first memory pools are cascaded, the sum of the memory resources held by the multiple first memory pools and the memory resources held by the second memory pool equals the total memory resources, and the step of executing at least one first task through the memory resources held by the first memory pool includes: At least one first task is executed using the memory resources held by the first memory pool among multiple first memory pools; The business processing method also includes: In response to the fact that, during the execution of a task using memory resources held by the first memory pool, the memory resources used in the first memory pool satisfy a third condition, at least one eighth task is determined, and the at least one eighth task is executed using memory resources held by the next first memory pool, wherein the at least one eighth task is determined from the unfinished first task; The step of responding to at least one second task being determined and pausing the execution of the second task in response to a first condition being met during the execution of at least one first task using memory resources held by the first memory pool, includes: In response to the fact that, during the execution of a task using memory resources held by the last memory resource in the first memory pool, the memory resources used in the first memory pool satisfy the fourth condition, at least one second task is identified, and the execution of the second task is suspended.
7. The business processing method according to claim 1, wherein the total memory resources are deployed on multiple memory nodes, the memory resources held by the memory pool are deployed on the same memory node, and the memory pool includes the first memory pool and / or the second memory pool.
8. The business processing method according to claim 1, wherein the at least one first task originates from a multi-level feedback queue, and the at least one first task is determined based on the scheduling mechanism of the multi-level feedback queue.
9. A service processing device based on an AI data lake, comprising dividing the total memory resources in resource nodes to obtain a first memory pool and a second memory pool, wherein the sum of the memory resources held by the first memory pool and the memory resources held by the second memory pool equals the total memory resources, wherein the resource nodes include multiple nodes, and the service processing device includes: The first execution module is used to execute at least one first task using the memory resources held by the first memory pool. The execution of the first task depends on the data stored in the AI data lake, and the execution of the first task is used to obtain the business result of the business request. A determining module is configured to, in response to a first condition being met by memory resources used in the first memory pool during the execution of at least one first task held by the first memory pool, determine at least one second task and suspend the execution of the second task, wherein the second task is determined from the unfinished first task; The second execution module is used to put all the second tasks into the first task queue and execute the third task through the memory resources held by the second memory pool. The third task is the highest priority task in the first task queue and is determined by the collaboration of multiple resource nodes. The first response module is used to respond to the existence of a fourth task in the first task queue that meets the second condition, to pause the execution of the third task, and to execute the fourth task using the memory resources held by the second memory pool. The fourth task is the highest priority task in the first task queue, and the fourth task is associated with the fifth task that is being executed. The fourth task and the fifth task belong to the same pipeline.
10. A computer-readable medium having a computer program stored thereon, wherein, When executed by a processing device, the computer program implements the steps of the business processing method according to any one of claims 1-8.
11. An electronic device, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the business processing method according to any one of claims 1-8.
12. A computer program product comprising a computer program, wherein, When executed by a processor, the computer program implements the steps of the business processing method according to any one of claims 1-8.
Citation Information
Patent Citations
Task scheduling method and device in batch processing system, equipment, medium and product
CN120973495A
Computing resource allocation method and related device thereof
CN122111630A