Streaming data processing method and device and storage medium

By determining the data processing method based on the lag status of the data consumption of the computing node in the distributed computing system, the problem of unbalanced data consumption of the computing node is solved, and the data consumption throughput and resource utilization are improved.

CN119046008APending Publication Date: 2024-11-29BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411204390.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

In a distributed computing scenario based on data flow, each computing node consumes unevenly, affecting the data consumption throughput and resource utilization.

Method used

By obtaining the pending data from the data allocated to the computing node in the data stream of the stream processing engine, determining the data consumption lag status of the node, and determining the proportion of local data processing and data shuffling based on the lag status, determining the target processing of the data, determining the data Method, select local processing or data shuffling.

Benefits of technology

It effectively solves the problem of unbalanced data consumption at computing nodes, achieves global uniform consumption, and improves data consumption throughput and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046008A_ABST
    Figure CN119046008A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a streaming data processing method and device, and a storage medium. The method comprises the steps of obtaining first to-be-processed data from data allocated to a first computing node in a data stream of a streaming processing engine; determining a data consumption lag condition of the first computing node, further determining a proportion of executing local data processing and data shuffling processing by the first computing node, and determining a target processing mode of the first to-be-processed data according to the proportion; if it is determined that the target processing mode is local data processing, processing the first to-be-processed data; and if it is determined that the target processing mode is data shuffling processing, distributing the first to-be-processed data to any second computing node in the distributed computing system for processing through data shuffling. According to the embodiment of the invention, local data processing or data shuffling is determined for the first to-be-processed data acquired by the first computing node, resources of the computing nodes are fully utilized, the problem of unbalanced data consumption of the computing nodes is solved, and the data consumption throughput and the resource utilization rate are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and in particular, to a streaming data processing method, device, and storage medium. Background Art

[0002] In a scenario of distributed computing based on data streams, the data stream is usually divided into blocks, and then the blocks are allocated to each computing node in the distributed computing system. Each computing node consumes the data in the blocks for data processing.

[0003] However, in the prior art, there is usually an imbalance in data consumption among computing nodes, which affects data consumption throughput and resource utilization. Summary of the invention

[0004] The embodiments of the present disclosure provide a streaming data processing method, device and storage medium to effectively solve the problem of unbalanced data consumption of various computing nodes and improve data consumption throughput and resource utilization.

[0005] In a first aspect, an embodiment of the present disclosure provides a streaming data processing method, including:

[0006] Obtain first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine;

[0007] Determine a data consumption hysteresis condition of the first computing node, where the data consumption hysteresis condition is used to characterize an accumulation condition of data allocated to the first computing node in the data stream;

[0008] Determine, according to the data consumption lag condition, a ratio of local data processing and data shuffling processing performed by the first computing node, and determine, according to the ratio, a target processing method for the first data to be processed, the target processing method including local data processing or data shuffling processing;

[0009] If it is determined that the target processing mode is local data processing, the first data to be processed is processed; or

[0010] If it is determined that the target processing method is data shuffling processing, the first data to be processed is distributed to any second computing node in the distributed computing system through data shuffling for processing.

[0011] In a second aspect, an embodiment of the present disclosure provides a streaming data processing device, including:

[0012] A data acquisition unit, configured to acquire first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine;

[0013] a decision unit, configured to determine a data consumption hysteresis condition of the first computing node, wherein the data consumption hysteresis condition is used to characterize an accumulation condition of data allocated to the first computing node in the data stream; determine a ratio of local data processing and data shuffling processing performed by the first computing node according to the data consumption hysteresis condition, and determine a target processing method for the first data to be processed according to the ratio, wherein the target processing method includes local data processing or data shuffling processing;

[0014] a local processing unit, configured to process the first data to be processed if it is determined that the target processing mode is local data processing; or

[0015] A data shuffling unit is used to distribute the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling if it is determined that the target processing method is data shuffling processing.

[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;

[0017] The memory stores computer-executable instructions;

[0018] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the streaming data processing method described in the first aspect and various possible designs of the first aspect.

[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the streaming data processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0020] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including computer execution instructions. When a processor executes the computer execution instructions, it implements the streaming data processing method described in the first aspect and various possible designs of the first aspect.

[0021] The streaming data processing method, device and storage medium provided by the embodiment of the present disclosure obtain the first data to be processed from the data assigned to the first computing node in the data stream of the stream processing engine; determine the data consumption hysteresis of the first computing node, the data consumption hysteresis is used to characterize the accumulation of the data assigned to the first computing node in the data stream; according to the data consumption hysteresis, determine the proportion of local data processing and data shuffling processing performed by the first computing node, and determine the target processing method of the first data to be processed according to the proportion, the target processing method includes local data processing or data shuffling processing; if it is determined that the target processing method is local data processing, the first data to be processed is processed; or, if it is determined that the target processing method is data shuffling processing, the first data to be processed is distributed to any second computing node in the distributed computing system through data shuffling for processing. The embodiment of the present disclosure determines whether to perform local data processing or data shuffling on the first data to be processed obtained by the first computing node, thereby making full use of the resources of each computing node for data processing, effectively solving the problem of uneven data consumption of each computing node, achieving global uniform consumption, and improving data consumption throughput and resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 A schematic diagram of an application scenario of a streaming data processing method provided by an embodiment of the present disclosure;

[0024] Figure 2 A schematic diagram of a flow chart of a method for processing streaming data provided by an embodiment of the present disclosure;

[0025] Figure 3 A schematic diagram of a flow chart of a streaming data processing method provided by another embodiment of the present disclosure;

[0026] Figure 4 A schematic diagram of partition allocation of a master control node provided in an embodiment of the present disclosure;

[0027] Figure 5 A schematic diagram of the system architecture of a streaming data processing method provided by an embodiment of the present disclosure;

[0028] Figure 6 A structural block diagram of a streaming data processing device provided in one embodiment of the present disclosure;

[0029] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0031] In a scenario of distributed computing based on data streams, the data stream is usually divided into blocks, and then the blocks are allocated to each computing node in the distributed computing system. Each computing node consumes the data in the blocks for data processing.

[0032] There are at least three data distribution modes in the prior art:

[0033] 1) Keyby mode is an operation that repartitions data according to the hash value of the key, that is, the hash value is calculated for the key of the data, and the data with the same hash value is divided into one partition, and then different partitions are assigned to different computing nodes. However, it is impossible to control whether the partitions are uniform or to which partition the data corresponding to each key will be assigned;

[0034] 2) Shuffle mode, also known as data shuffling, randomly distributes the acquired data to the parallel tasks of the downstream computing nodes. Because the distribution is completely random, for the same input data, the computing nodes allocated each time the data shuffle is executed may be different;

[0035] 3) Local consumption mode, that is, after the computing node reads the data, it consumes it entirely by itself and does not distribute it to other nodes.

[0036] However, the keyby mode is suitable for specific computing business logic; while the local consumption mode is that the data read by the current computing node is consumed by the current computing node, and does not involve data transmission between processes or nodes. Therefore, its consumption throughput performance is optimal, but at the same time it also faces a problem. Due to problems such as the machine performance of different computing nodes or data skew in each partition, it may cause uneven consumption between different computing nodes, and it is easy to have consumption lags (Partition Lag) in some partitions. In this scenario, the shuffle mode can effectively solve the problem of uneven consumption by distributing and breaking up the data, thereby achieving global uniform consumption; however, the shuffle mode occupies more resources than the local consumption mode, affecting the throughput performance of data consumption.

[0037] In summary, in the prior art, there is usually an imbalance in data consumption among computing nodes, which affects data consumption throughput and resource utilization.

[0038] In order to solve the above technical problems, the present disclosure provides a streaming data processing method, wherein the first computing node obtains the first data to be processed from the data assigned to the first computing node in the data stream of the stream processing engine; determines the data consumption hysteresis of the first computing node, and the data consumption hysteresis is used to characterize the accumulation of data assigned to the first computing node in the data stream; according to the data consumption hysteresis, determines the ratio of local data processing and data shuffling processing performed by the first computing node, and determines the target processing method of the first data to be processed according to the ratio, and the target processing method includes local data processing or data shuffling processing; if the target processing method is determined to be local data processing, the first data to be processed is processed; or, if the target processing method is determined to be data shuffling processing, the first data to be processed is distributed to any second computing node in the distributed computing system through data shuffling for processing. In this embodiment, by determining whether to perform local data processing or data shuffling on the first data to be processed obtained by the first computing node, the resources of each computing node are fully utilized for data processing, and the problem of unbalanced data consumption of each computing node is effectively solved, global uniform consumption is achieved, and data consumption throughput and resource utilization are improved.

[0039] The streaming data processing method provided in the embodiment of the present disclosure is applicable to Figure 1 In the scenario shown, the first computing node can obtain the first data to be processed from the data allocated to the first computing node in the data stream of the stream processing engine, determine the ratio of local data processing and data shuffling processing performed by the first computing node through the first speed limiter of the first computing node, and determine the target processing method of the first data to be processed according to the ratio, and the target processing method includes local data processing or data shuffling processing; if the target processing method is determined to be local data processing, the first data to be processed is processed by the local data processor in the first computing node; or, if the target processing method is determined to be data shuffling processing, the first data to be processed is distributed to any second computing node in the distributed computing system through data shuffling through the data shuffling component for processing.

[0040] In addition, any second computing node in the distributed computing system can also send it to the first computing node when determining that a second data to be processed is to be shuffled. The first computing node determines whether the second data to be processed can be processed through the second rate limiter. If it can be processed, the second data to be processed is received and processed. Otherwise, the second data to be processed is not received and a processing refusal message is returned.

[0041] The streaming data processing method provided by the embodiment of the present disclosure will be described in detail below in conjunction with specific embodiments.

[0042] refer to Figure 2 , Figure 2 A flow chart of a method for processing streaming data provided by an embodiment of the present disclosure. The method of this embodiment can be applied to any first computing node in a distributed computing system, wherein the first computing node can be an electronic device such as a terminal device or a server, and the method for processing streaming data of this embodiment includes:

[0043] S201. Obtain first data to be processed from data allocated to a first computing node in a data stream of a stream processing engine.

[0044] In this embodiment, a stream processing engine such as Kafka serves as a data source for a distributed computing system, and can provide one or more data streams (one of which is a topic) for the distributed computing system, so that each computing node in the distributed computing system can read the data for data processing, where the data processing can be any data processing, such as distributed machine learning training, etc., which can be selected according to needs and is not limited in this embodiment.

[0045] For any first computing node in the distributed computing system, the data to be processed can be obtained from the data stream of the stream processing engine. Specifically, some data in the data stream can be pre-allocated to the first computing node for consumption, and then the first computing node can obtain data from the data allocated to the first computing node in the data stream of the stream processing engine, which is recorded here as the first data to be processed.

[0046] Optionally, in a stream processing engine such as Kafka, a Topic data stream can be divided into multiple partitions (Partition), and multiple partitions of a Topic data stream can be pre-allocated to each computing node in a distributed computing system. Each computing node can be allocated one or more partitions. Optionally, an average allocation method can be adopted, and the number of partitions allocated to each computing node can be the same. In specific implementation, a master node pair can be used to evenly allocate multiple partitions of a Topic data stream to each computing node in a distributed computing system.

[0047] Furthermore, each computing node can obtain the data to be processed from the assigned partition. In a specific implementation, there may be one or more Topic data streams in the stream processing engine, and at least one target partition of at least one target data stream can be assigned to the first computing node, so that the first computing node needs to obtain the first data to be processed from the assigned partition.

[0048] Optionally, when the first computing node needs to obtain the first data to be processed from the data stream, for any target data stream, metadata of the target data stream can be obtained, including but not limited to identification information of the metadata, permission information (whether to be processed by the first computing node), etc. The first computing node can create one or more data stream reading tasks according to the metadata of the target data stream, and execute the data stream reading tasks to read the first data to be processed from the target data stream. One data stream reading task can correspond to one thread. Optionally, if a target partition of the target data stream is assigned to the first computing node, one or more data stream reading tasks can be created to obtain the first data to be processed in parallel from the target partition; Optionally, if multiple target partitions of the target data stream are assigned to the first computing node, multiple data stream reading tasks can be created, and each data stream reading task can obtain the first data to be processed in parallel from one or more target partitions, and the specific combination method can be set according to the actual situation.

[0049] S202. Determine the data consumption lag situation of the first computing node, where the data consumption lag situation is used to characterize the accumulation situation of the data assigned to the first computing node in the data stream.

[0050] In this embodiment, since there may be differences in performance between different computing nodes, or there may be data skew in the partitions assigned to different computing nodes, it may lead to unbalanced data consumption of the data stream in the stream processing engine by different computing nodes, resulting in data consumption lag (lag, or data accumulation). Also, considering that the consumption throughput and resource utilization are different when the first computing node executes local data processing and data shuffle processing, and there are different impacts on data consumption lag, so in this embodiment, the data consumption lag situation of the first computing node can be determined first, and then based on whether the data consumption lag situation of the first computing node is serious, the ratio of the first computing node to execute local data processing and data shuffle processing can be determined.

[0051] Among them, the data consumption lag situation of the first computing node, that is, assuming that n pieces of data are assigned to the first computing node from the data stream, and the first computing node has only consumed m pieces (m < n) of data currently, then there is data consumption lag (the data lag amount or data accumulation amount is n - m). And there may be data streams with different Topics in the stream processing engine, and different partitions in different data streams may be assigned to the first computing node, so the data consumption lag situation of the first computing node can be determined by comprehensive consideration.

[0052] S203. Determine the ratio of local data processing and data shuffling processing performed by the first computing node according to the data consumption lag condition, and determine the target processing method of the first data to be processed according to the ratio, wherein the target processing method includes local data processing or data shuffling processing.

[0053] In this embodiment, the ratio of local data processing and data shuffling (Shuffle) performed by the first computing node can be determined according to the data consumption lag status of the first computing node, that is, the ratio of local data processing and data shuffling performed by the first computing node on the first data to be processed. In other words, for the acquired first data to be processed, what percentage of the first data to be processed is subjected to local data processing, and what percentage of the first data to be processed is subjected to data shuffling, and then it can be determined whether local data processing or data shuffling is performed for each piece of first data to be processed.

[0054] For example, if the ratio of local data processing and data shuffling performed by the first computing node is 3:1, then 3 / 4 of the first data to be processed obtained by the first computing node will be processed locally, and 1 / 4 of the first data to be processed will be shuffled. Furthermore, in the process of obtaining the first data to be processed 1, 2, 3, 4, 5..., the first data to be processed 1, 2, 3 will be processed by local data, the first data to be processed 4 will be shuffled, the first data to be processed 5, 6, 7 will be processed by local data, the first data to be processed 8 will be shuffled, and so on. Alternatively, other methods can be used to allocate local data processing and data shuffling according to the ratio, wherein data shuffling is to randomly distribute the data to be processed to other computing nodes for processing. In this way, the resources of each computing node can be fully utilized, the problem of unbalanced data consumption can be effectively solved, global uniform consumption can be achieved, and data consumption throughput can be improved.

[0055] Optionally, any other feasible method may be used to determine the ratio of local data processing and data shuffling processing performed by the first computing node, such as determining it based on current performance indicators of the first computing node, including but not limited to CPU utilization, memory utilization, etc.

[0056] Further, if it is determined that the target processing method is local data processing, S204 is executed; if it is determined that the target processing method is data shuffling processing, S205 is executed.

[0057] S204: If it is determined that the target processing method is local data processing, the first data to be processed is processed.

[0058] In this embodiment, the specific process of processing the first data to be processed can be determined according to needs, and this embodiment does not limit it. For example, in distributed machine learning training, the first computing node performs machine learning training locally based on the first data to be processed.

[0059] S205: If it is determined that the target processing method is data shuffling processing, the first to-be-processed data is distributed to any second computing node in the distributed computing system through data shuffling for processing.

[0060] In this embodiment, the process of sending the first to-be-processed data to any second computing node through the data shuffling process may adopt any data shuffling method.

[0061] Optionally, the first data to be processed that requires data shuffling can be cached in the cache space (Buffer) of the first computing node, and the first data to be processed in the cache space of the first computing node can be sent to any second computing node in the distributed computing system for processing through a data shuffling output channel between the first computing node and any second computing node in the distributed computing system.

[0062] In this embodiment, a cache space for caching shuffled data is configured in the first computing node, wherein the cache space can be a Buffer, and the first data to be processed that needs to be shuffled can be cached in the cache space of the first computing node, and the optional cache space can also be a Buffer pool composed of multiple Buffers. In addition, a data shuffling output channel can be created between the first computing node and any second computing node in the distributed computing system, which is used to send the first data to be processed that is shuffled in the first computing node to any second computing node. In specific implementation, the first data to be processed cached in the cache space of the first computing node can be sent to any second computing node through the data shuffling output channel between any second computing node. Which second computing node is specifically sent to can be randomly determined, that is, distributed based on the distribution mechanism of data shuffling, or determined according to the current performance indicators of the second computing node, or determined according to the data consumption lag of the second computing node, etc., and there is no restriction here.

[0063] Optionally, when distributing the first data to be processed to any second computing node in the distributed computing system through a data shuffling process, a pre-created data shuffling component can also be used to implement it, wherein the data shuffling component may include but is not limited to a cache space and a data shuffling channel connected to any second computing node, and the data shuffling channel includes a data shuffling output channel for distributing the first data to be processed that requires data shuffling to the second computing node connected to the data shuffling channel.

[0064] After distributing the first data to be processed to any second computing node in the distributed computing system, the second computing node processes the first data to be processed. The specific processing process is the same as the local processing process of the first computing node, which will not be repeated here.

[0065] The streaming data processing method provided in this embodiment obtains the first data to be processed from the data assigned to the first computing node in the data stream of the stream processing engine; determines the data consumption hysteresis of the first computing node, and the data consumption hysteresis is used to characterize the accumulation of data assigned to the first computing node in the data stream; according to the data consumption hysteresis, determines the proportion of local data processing and data shuffling processing performed by the first computing node, and determines the target processing method of the first data to be processed according to the proportion, and the target processing method includes local data processing or data shuffling processing; if the target processing method is determined to be local data processing, the first data to be processed is processed; or, if the target processing method is determined to be data shuffling processing, the first data to be processed is distributed to any second computing node in the distributed computing system through data shuffling for processing. This embodiment determines whether to perform local data processing or data shuffling on the first data to be processed obtained by the first computing node, thereby fully utilizing the resources of each computing node for data processing, effectively solving the problem of uneven data consumption of each computing node, achieving global uniform consumption, and improving data consumption throughput and resource utilization.

[0066] Based on any of the above embodiments, if at least one target partition of at least one target data stream is assigned to the first computing node from the stream processing engine, and the first computing node obtains the first data to be processed from the assigned target partition, the data consumption lag status of the first computing node can be determined based on the data lag (Partition Lag) of the at least one target partition.

[0067] Among them, the data lag (Partition Lag) of the target partition specifically refers to the difference between the offset of the latest data in the target partition and the offset of the data currently consumed by the first computing node, that is, the accumulated amount of data in the target partition that needs to be processed by the first computing node but has not yet been processed. For example, assuming that there are currently n data in the target partition, the first computing node has consumed the mth data, that is, the offset of the latest data is n, and the offset of the currently consumed data is m, the data lag of the target partition Partition Lag = nm.

[0068] Optionally, based on the above embodiment, when determining the data consumption hysteresis status of the first computing node according to the data hysteresis amount of the at least one target partition, the following three conditions may be specifically included:

[0069] First severity: If the data lag of all target partitions in the at least one target partition exceeds the first lag threshold and does not exceed the second lag threshold, the data consumption lag status of the first computing node is determined to be the first severity; wherein the first lag threshold is less than the second lag threshold; wherein the data lag of all target partitions exceeds the first lag threshold and does not exceed the second lag threshold, indicating that the data lag of all target partitions is at a relatively high level and there is no obvious abnormal outlier (wherein the data lag exceeding the second lag threshold is an abnormal outlier), at this time the first computing node has a low consumption throughput, and the consumption throughput of the first computing node needs to be further improved.

[0070] Second severity: If there is a target partition in at least one of the target partitions whose data lag exceeds the second lag threshold, the data consumption lag of the first computing node is determined to be the second severity; the second severity is more serious than the first severity; there is a target partition whose data lag exceeds the second lag threshold, that is, there is an abnormal outlier, which may be data skew or performance reaching full load, which needs to be shared by other computing nodes, otherwise the data lag of the target partition exceeding the second lag threshold will always exist.

[0071] Data consumption is normal: if the data lag of all target partitions in at least one target partition does not exceed the first lag threshold, or the data lag of some target partitions exceeds the first lag threshold and does not exceed the second lag threshold, then it is determined that the data consumption of the first computing node is normal, and the data lag of all target partitions is at a normal level. The data lag of all target partitions can be ignored. At this time, there is no need to adjust the ratio of local data processing and data shuffling processing performed by the first computing node, that is, keep the original ratio unchanged.

[0072] Optionally, in the above embodiment, the first hysteresis threshold may be a preset threshold, such as 10000, which may be set according to actual conditions; the second hysteresis threshold may be a target multiple of the median of the data hysteresis of all target partitions of all computing nodes in the distributed computing system, such as 10 times. The second hysteresis threshold may be based on the data hysteresis of all computing nodes, so as to dynamically update the second hysteresis threshold and adapt to changes in the data hysteresis of all computing nodes. For example, assuming that the data hysteresis of a target partition of the first computing node is relatively high, but the data hysteresis of all target partitions of all computing nodes in the distributed computing system are relatively high, the second hysteresis threshold is also relatively high. At this time, even if the data hysteresis of a target partition of the first computing node is relatively high, it will not exceed the second hysteresis threshold and will not be mistakenly identified as an abnormal outlier.

[0073] Optionally, the process of determining the data consumption hysteresis status of the first computing node can be performed by the first computing node. The first computing node can obtain the data hysteresis of the target partition assigned to the first computing node from the stream processing engine or the master control node, and of course can also obtain the first hysteresis threshold and the second hysteresis threshold, and then the first computing node can determine its own data consumption hysteresis status based on the above rules. The master control node is connected to each computing node in the distributed computing system, and of course can also be connected to the stream processing engine, and can obtain the data hysteresis of the target partition assigned to each computing node.

[0074] Optionally, the process of determining the data consumption lag status of the first computing node can also be performed by a master control node, which is connected to each computing node in the distributed computing system and can also be connected to the stream processing engine. The data consumption lag status of each computing node can be obtained through the above process and can be sent to each computing node. Optionally, each computing node in the distributed computing system can periodically perform heartbeat communication with the master control node, and during the heartbeat communication process, the master control node can send the data consumption lag status of each computing node to each computing node.

[0075] On the basis of the above embodiment, after the first computing node obtains the data consumption hysteresis condition, the ratio of the local data processing and the data shuffling processing performed by the first computing node may be determined according to the data consumption hysteresis condition, which may specifically include:

[0076] If the data consumption lag of the first computing node is of a first severity, determining that the ratio of local data processing and data shuffling processing performed by the first computing node is 1:0; or

[0077] If the data consumption lag condition of the first computing node is of the second severity, then increasing the proportion of the data shuffling processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset increment threshold for at least one round, or reducing the proportion of local data processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset decrement threshold for at least one round, until the adjusted proportion of local data processing and data shuffling processing makes the data consumption lag condition of the first computing node normal; or

[0078] If the data consumption lag status of the first computing node is that data consumption is normal, the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round is obtained as the proportion of local data processing and data shuffling processing performed in this round.

[0079] In this embodiment, if it is determined that the data consumption lag condition of the first computing node is the first severity level, it is necessary to increase the consumption throughput of the first computing node. Considering that the data shuffling process consumes more resources and is slower than local data processing, in order to improve the consumption throughput of the first computing node, it is necessary to reduce data shuffling. Therefore, in this embodiment, it is determined that the first computing node performs complete local data processing without data shuffling, that is, all first data to be processed are processed by the first computing node.

[0080] If it is determined that the data consumption lag of the first computing node is the second severity, it means that data skew occurs or the performance reaches full load, and needs to be shared by other computing nodes. Therefore, in this embodiment, the proportion of local data processing performed by the first computing node is reduced, which is equivalent to increasing the proportion of data shuffling processing. The specific reduction in the proportion of local data processing and the increase in the proportion of data shuffling processing can be determined by any method. For example, the proportion of data shuffling processing can be increased according to a preset increment threshold (for example, 20%) based on the proportion of local data processing and data shuffling processing in the previous round, or the proportion of local data processing can be reduced according to a preset decrement threshold (for example, 20%).

[0081] Optionally, in this embodiment, the proportion of executing local data processing and data shuffling processing may not be adjusted all at once, but may be adjusted step by step in multiple rounds, that is, the proportion of data shuffling processing in the proportion of local data processing and data shuffling processing executed by the first computing node in the previous round is increased according to a preset increment threshold for at least one round, or the proportion of local data processing in the proportion of local data processing and data shuffling processing executed by the first computing node in the previous round is reduced according to a preset decrement threshold for at least one round. For example, the preset increment threshold or the preset decrement threshold is 10%, that is, the proportion of data shuffling processing is increased by 10% each time, which is equivalent to reducing the proportion of local data processing by 10% each time, and then the data consumption lag status of the first computing node is re-determined, and then it is determined whether to continue to adjust according to the re-determined data consumption lag status. If the re-determined data consumption lag status is normal data consumption, there is no need to continue to adjust. If the re-determined data consumption lag status is still the second severity, it is adjusted again by 10% until the re-determined data consumption lag status is normal data consumption. Optionally, the proportion of local data processing performed by the first computing node can be directly adjusted to 0, that is, no local data processing is performed at all, and all data shuffling is performed. At this time, the ratio of local data processing and data shuffling is 0:1, which can quickly restore data balanced consumption and restore the data consumption lag to normal data consumption.

[0082] If it is determined that the data consumption of the first computing node is normal, it means that the data consumption throughput of each target partition of the first computing node is normal, and the ratio of local data processing and data shuffling processing performed by the first computing node is maintained unchanged without any adjustment.

[0083] Based on any of the above embodiments, when the first data to be processed is distributed to any second computing node in a distributed computing system through data shuffling for processing, the first data to be processed can be cached in the cache space of the first computing node, and the first data to be processed in the cache space of the first computing node can be sent to any second computing node through a data shuffling output channel between the first computing node and any second computing node in the distributed computing system; accordingly, after receiving the first data to be processed, the second computing node first caches the data in the cache space of the second computing node, and then the second computing node processes the first data to be processed in the cache space.

[0084] On this basis, this embodiment provides a back pressure control mechanism, specifically, Figure 3 As shown, the first computing node can obtain the remaining capacity (Buffer Slot) of the cache space of the second computing node, which can be obtained specifically through the main control node, or the first computing node can directly communicate with the second computing node (for example, communicate through a registration process) to obtain the remaining capacity of the cache space of the second computing node. Further, the sending rate is determined according to the remaining capacity of the cache space of the second computing node, wherein the larger the remaining capacity of the cache space of the second computing node, the larger the sending rate is determined, and the smaller the remaining capacity of the cache space of the second computing node, the smaller the sending rate is determined, and the first to-be-processed data in the cache space of the first computing node is sent to the second computing node at the sending rate through the data shuffling output channel, so as to be cached in the cache space of the second computing node and then processed by the second computing node, thereby achieving the effect of back pressure control.

[0085] On the basis of any of the above embodiments, after the first computing node distributes the first data to be processed to any second computing node in the distributed computing system through data shuffling for processing, the second computing node can choose whether to process the first data to be processed according to its own data consumption lag status. If it is determined that it can be processed, the second computing node receives the first data to be processed; if it is determined that it cannot be processed, the second computing node can return a rejection processing message. Further, the first computing node can retry, that is, resend the first data to be processed to the second computing node through the data shuffling process. If the rejection processing message returned by the second computing node is still received after the preset number of retries, the first computing node can replace the computing node and send the first data to be processed to other computing nodes in the distributed computing system through the data shuffling process for processing; or, the first computing node can also directly replace the computing node after receiving the rejection processing message returned by the second computing node for the first time, and send the first data to be processed to other computing nodes in the distributed computing system through the data shuffling process for processing.

[0086] On the basis of any of the above embodiments, the first computing node may also receive the second data to be processed sent by any second computing node in the distributed computing system through the data shuffling process, and process the second data to be processed in the first computing node. Optionally, the received second data to be processed may be first stored in the cache space, and then the second data to be processed in the cache space may be processed. Optionally, there is a data shuffling input channel between the first computing node and any second computing node in the distributed computing system, and the first computing node may receive the second data to be processed sent by any second computing node in the distributed computing system through the data shuffling process through the data shuffling input channel.

[0087] Optionally, when receiving second data to be processed sent by any second computing node in the distributed computing system through the data shuffling process, it is determined whether the second data to be processed sent through the data shuffling process can be processed based on the data consumption lag of the first computing node; if it is determined that it can be processed, the second data to be processed is received for processing; or, if it is determined that it cannot be processed, the second data to be processed is refused to be received, and a refusal to process message is returned to the second computing node.

[0088] In this embodiment, if the data consumption lag condition of the first computing node is the above-mentioned first severity level, then in order to improve the resource utilization of the first computing node, the second data to be processed can be received for processing; if the data consumption lag condition of the first computing node is the above-mentioned second severity level, then in order to alleviate the performance load of the first computing node, it can be determined that the second data to be processed cannot be processed, that is, the second data to be processed is not received; if the data consumption of the first computing node is normal, the original state can be maintained. If the second data to be processed can be processed originally, the second data to be processed will continue to be received; if the second data to be processed cannot be processed originally, the second data to be processed will continue to not be received.

[0089] Based on any of the above embodiments, this embodiment provides a system framework of a streaming data processing method, such as Figure 5 As shown, it includes a stream processing engine, a master control node, and a distributed computing system, wherein the distributed computing system includes multiple computing nodes, taking the first computing node and the second computing node as examples (wherein the first computing node only shows the output part of the data shuffling component, and the second computing node only shows the input part of the data shuffling component).

[0090] The master node can receive metadata of the target data stream in the stream processing engine configured by the user, including which computing nodes can process the data of the target data stream, etc. Then the master node can evenly distribute the partitions of the target data stream to each computing node according to the metadata of the target stream data, such as Figure 4 As shown, metadata of the target stream data may also be sent to each computing node. Optionally, the metadata may include information about the allocated partitions.

[0091] In addition, the master control node can also obtain the data consumption lag status of each computing node and send it to each computing node.

[0092] Each computing node may include a stream processing engine reader, a first rate limiter, a second rate limiter, a local data processor, and a data shuffling component.

[0093] The first computing node obtains the metadata of the target stream data, and creates one or more data stream reading tasks according to the metadata of the target stream data, and executes the data stream reading task through the stream processing engine reader to obtain the first data to be processed from the target data stream. In addition, the first computing node can also create a data shuffling component for the target data stream (one data shuffling component for each target data stream), the data shuffling component includes a cache space and a data shuffling channel, and the data shuffling channel includes a data shuffling output channel and a data shuffling input channel connected to each other computing node in the distributed computing system except the first computing node. The data shuffling output channel of the first computing node is connected to the data shuffling input channel of the second computing node through an interface, wherein the interface can be an rpc (Remote Procedure Call, remote procedure call) interface, such as implemented by rpc client and rpc server. In addition, the first or second data to be processed can be serialized before the first or second data to be processed is transmitted, and operations such as deserialization can be performed after receiving the first or second data to be processed, which will not be repeated here.

[0094] The first computing node obtains the first data to be processed from the target partition of the target data stream of the stream processing engine through the stream processing engine reader, and the first rate limiter determines the proportion of local data processing and data shuffling processing performed by the first computing node based on the data consumption lag of the first computing node, and then determines whether the first data to be processed is to be processed locally or to be processed by data shuffling; if the target processing method is determined to be local data processing, the local data processor processes the first data to be processed; if the target processing method is determined to be data shuffling processing, the first data to be processed is transmitted to the data shuffling component corresponding to the target data stream to which it belongs, and is first cached in the cache space of the data shuffling component, and then the first data to be processed in the cache space is sent to the second computing node through a data shuffling output channel connected to any second computing node in the distributed computing system.

[0095] After the second computing node receives the first data to be processed, it determines through the second rate limiter whether the second computing node can process the first data to be processed. If it is determined that it can be processed, it transmits the data to the data shuffling component corresponding to the target data stream through the data shuffling input channel, and caches it in the cache space of the data shuffling component, and transmits the first data to be processed in the cache space to the local data processor of the second computing node for processing; if it is determined that it cannot be processed, the first data to be processed is not received, and a rejection processing message is returned to the first computing node.

[0096] After receiving the rejection processing message, the first computing node may resend the first data to be processed to the second computing node through the data shuffling output channel for retry, or send the first data to be processed through the data shuffling output channel to other computing nodes in the distributed computing system for processing.

[0097] This embodiment determines whether to perform local data processing or data shuffling on the first data to be processed obtained by the first computing node, thereby fully utilizing the resources of each computing node for data processing, effectively solving the problem of unbalanced data consumption of each computing node, achieving global uniform consumption, and improving data consumption throughput and resource utilization.

[0098] In addition, in this embodiment, when the first data to be processed in the cache space is sent to any second computing node in the distributed computing system through a data shuffle output channel connected to the second computing node, the sending rate can be determined according to the remaining capacity of the cache space of the second computing node, wherein the larger the remaining capacity of the cache space of the second computing node, the larger the sending rate is determined, and the smaller the remaining capacity of the cache space of the second computing node, the smaller the sending rate is determined, and the first data to be processed in the cache space of the first computing node is sent to the second computing node through the data shuffle output channel at the sending rate, so as to be cached in the cache space of the second computing node and then processed by the second computing node, so as to achieve the effect of back pressure control. Among them, the first computing node can obtain the remaining capacity of the cache space of the second computing node before sending the first data to be processed. Optionally, the first computing node and the second computing node can register with each other, and after registration, the remaining capacity of their own cache space can be regularly pushed to each other. Of course, in this embodiment, other methods can also be used to obtain the remaining capacity of the cache space of the second computing node, such as obtaining it through the master control node and sending it to the first computing node, etc.

[0099] Corresponding to the streaming data processing method of the above embodiment, Figure 6 The structural block diagram of the streaming data processing device provided by the embodiment of the present disclosure. For the convenience of explanation, only the part related to the embodiment of the present disclosure is shown. Figure 6 The streaming data processing device 500 includes: a data acquisition unit 501, a decision unit 502, a local processing unit 503, and a data shuffling unit 504.

[0100] The data acquisition unit 501 is used to acquire first data to be processed from the data allocated to the first computing node in the data stream of the stream processing engine;

[0101] A decision unit 502 is used to determine a data consumption hysteresis condition of the first computing node, where the data consumption hysteresis condition is used to characterize an accumulation condition of data allocated to the first computing node in the data stream; determine a ratio of local data processing and data shuffling processing performed by the first computing node according to the data consumption hysteresis condition, and determine a target processing method for the first data to be processed according to the ratio, where the target processing method includes local data processing or data shuffling processing;

[0102] A local processing unit 503 is configured to process the first data to be processed if it is determined that the target processing mode is local data processing; or

[0103] The data shuffling unit 504 is configured to distribute the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling if it is determined that the target processing method is data shuffling processing.

[0104] In one or more embodiments of the present disclosure, when the data acquisition unit 501 acquires the first data to be processed from the data allocated to the first computing node in the data stream of the stream processing engine, it is used to:

[0105] Obtaining the first data to be processed from at least one target partition of at least one target data stream of the stream processing engine; wherein the target partition is a partition in the target data stream that is pre-allocated to the first computing node for consumption;

[0106] When determining the data consumption lag status of the first computing node, the decision unit 502 is used to:

[0107] The data consumption hysteresis status of the first computing node is determined according to the data hysteresis of the at least one target partition.

[0108] In one or more embodiments of the present disclosure, when determining the data consumption hysteresis status of the first computing node according to the data hysteresis amount of the at least one target partition, the decision unit 502 is used to:

[0109] According to the data lag of the at least one target partition and a preset lag threshold, the data consumption lag status of the first computing node is determined, and the data consumption lag status includes: normal data consumption, a first severity or a second severity; wherein the second severity is greater than the second severity.

[0110] In one or more embodiments of the present disclosure, when determining the data consumption hysteresis status of the first computing node, the decision unit 502 is used to:

[0111] The data consumption lag status of the first computing node is obtained from a master control node, wherein the master control node is connected to each computing node in the distributed computing system, and is used to determine the data consumption lag status of each computing node, wherein the data consumption lag status of each computing node includes a first severity, a second severity, or normal data consumption, wherein the second severity is more severe than the first severity.

[0112] In one or more embodiments of the present disclosure, when determining the ratio of the local data processing and the data shuffling processing performed by the first computing node according to the data consumption lag condition, the decision unit 502 is used to:

[0113] If the data consumption lag of the first computing node is of a first severity, determining that the ratio of local data processing and data shuffling processing performed by the first computing node is 1:0; or

[0114] If the data consumption lag condition of the first computing node is of the second severity, then increasing the proportion of the data shuffling processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset increment threshold for at least one round, or reducing the proportion of local data processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset decrement threshold for at least one round, until the adjusted proportion of local data processing and data shuffling processing makes the data consumption lag condition of the first computing node normal; or

[0115] If the data consumption lag status of the first computing node is that data consumption is normal, the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round is obtained as the proportion of local data processing and data shuffling processing performed in this round.

[0116] In one or more embodiments of the present disclosure, when the data shuffling unit 504 distributes the first to-be-processed data to any second computing node in the distributed computing system for processing through data shuffling, it is configured to:

[0117] Obtain the remaining capacity of the cache space of the second computing node, determine the sending rate according to the remaining capacity of the cache space of the second computing node, and send the first to-be-processed data to the second computing node at the sending rate so as to be cached in the cache space of the second computing node for further processing.

[0118] In one or more embodiments of the present disclosure, after distributing the first to-be-processed data to any second computing node in the distributed computing system for processing through data shuffling, the data shuffling unit 504 is further configured to:

[0119] Receive a rejection processing message returned by the second computing node based on its own data consumption lag status, and resend the first data to be processed to the second computing node through a data shuffling process for processing, or send the first data to be processed to another other computing node in the distributed computing system through a data shuffling process for processing.

[0120] In one or more embodiments of the present disclosure, the data shuffling unit 504 is further configured to:

[0121] If second data to be processed is received from any second computing node in the distributed computing system through a data shuffling process, determining whether the second data to be processed can be processed according to a data consumption lag of the first computing node;

[0122] If it is determined that the data can be processed, receiving the second data to be processed, and processing the second data to be processed; or

[0123] If it is determined that the data cannot be processed, the receiving of the second data to be processed is rejected, and a processing rejection message is returned to the second computing node.

[0124] In one or more embodiments of the present disclosure, the data shuffling unit 504 is further configured to:

[0125] For any target data stream, create a data shuffle component, the data shuffle component includes a cache space and a data shuffle channel, the data shuffle channel includes a data shuffle output channel and a data shuffle input channel respectively connected to each other computing node in the distributed computing system except the first computing node by the first computing node;

[0126] The step of distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling includes:

[0127] The first to-be-processed data is transmitted to a data shuffling component corresponding to the target data stream, so that the data shuffling component sends the data to any second computing node in the distributed computing system for processing.

[0128] The streaming data processing device provided in this embodiment can be used to execute the technical solution in the above-mentioned streaming data processing method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0129] refer to Figure 7, which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure, and the electronic device 600 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0130] like Figure 7 As shown, the electronic device 600 may include a processing device (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 a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0131] Typically, the following devices may be connected to the I / O interface 605: input devices 606 including but not limited to touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including but not limited to liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including tapes, hard disks, etc.; and communication devices 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0132] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0133] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0134] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0135] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0136] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0137] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the 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 square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0138] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0139] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0140] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] In a first aspect, according to one or more embodiments of the present disclosure, a streaming data processing method is provided, which is applied to any first computing node in a distributed computing system, and the method includes:

[0142] Obtain first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine;

[0143] Determine a data consumption hysteresis condition of the first computing node, where the data consumption hysteresis condition is used to characterize an accumulation condition of data allocated to the first computing node in the data stream;

[0144] Determine, according to the data consumption lag condition, a ratio of local data processing and data shuffling processing performed by the first computing node, and determine, according to the ratio, a target processing method for the first data to be processed, the target processing method including local data processing or data shuffling processing;

[0145] If it is determined that the target processing mode is local data processing, the first data to be processed is processed; or

[0146] If it is determined that the target processing method is data shuffling processing, the first data to be processed is distributed to any second computing node in the distributed computing system through data shuffling for processing.

[0147] According to one or more embodiments of the present disclosure, obtaining first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine includes:

[0148] Obtaining the first data to be processed from at least one target partition of at least one target data stream of the stream processing engine; wherein the target partition is a partition in the target data stream that is pre-allocated to the first computing node for consumption;

[0149] Then, determining the data consumption lag status of the first computing node includes:

[0150] The data consumption hysteresis status of the first computing node is determined according to the data hysteresis of the at least one target partition.

[0151] According to one or more embodiments of the present disclosure, determining the data consumption hysteresis status of the first computing node according to the data hysteresis of the at least one target partition includes:

[0152] According to the data lag of the at least one target partition and a preset lag threshold, the data consumption lag status of the first computing node is determined, and the data consumption lag status includes: normal data consumption, a first severity or a second severity; wherein the second severity is greater than the second severity.

[0153] According to one or more embodiments of the present disclosure, determining the data consumption hysteresis status of the first computing node according to the data hysteresis of the at least one target partition and a preset hysteresis threshold includes:

[0154] If the data hysteresis of all target partitions in the at least one target partition exceeds a first hysteresis threshold and does not exceed a second hysteresis threshold, it is determined that the data consumption hysteresis status of the first computing node is of a first severity; wherein the first hysteresis threshold is less than the second hysteresis threshold; or

[0155] If there is a target partition in the at least one target partition whose data lag exceeds the second lag threshold, determining that the data consumption lag status of the first computing node is of a second severity; wherein the second severity is more severe than the first severity; or

[0156] If the data lag of all target partitions in the at least one target partition does not exceed the first lag threshold, or the data lag of some target partitions exceeds the first lag threshold but does not exceed the second lag threshold, then the data consumption lag status of the first computing node is determined to be normal.

[0157] According to one or more embodiments of the present disclosure, the first lag threshold is a preset lag threshold; and / or the second lag threshold is a target multiple of the median of data lags of all target partitions of all computing nodes in the distributed computing system.

[0158] According to one or more embodiments of the present disclosure, determining the data consumption hysteresis status of the first computing node includes:

[0159] The data consumption lag status of the first computing node is obtained from a master control node, wherein the master control node is connected to each computing node in the distributed computing system, and is used to determine the data consumption lag status of each computing node, wherein the data consumption lag status of each computing node includes a first severity, a second severity, or normal data consumption, wherein the second severity is more severe than the first severity.

[0160] According to one or more embodiments of the present disclosure, determining the ratio of local data processing and data shuffling processing performed by the first computing node according to the data consumption lag condition includes:

[0161] If the data consumption lag of the first computing node is of a first severity, determining that the ratio of local data processing and data shuffling processing performed by the first computing node is 1:0; or

[0162] If the data consumption lag condition of the first computing node is of the second severity, then increasing the proportion of the data shuffling processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset increment threshold for at least one round, or reducing the proportion of local data processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset decrement threshold for at least one round, until the adjusted proportion of local data processing and data shuffling processing makes the data consumption lag condition of the first computing node normal; or

[0163] If the data consumption lag status of the first computing node is that data consumption is normal, the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round is obtained as the proportion of local data processing and data shuffling processing performed in this round.

[0164] According to one or more embodiments of the present disclosure, distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling includes:

[0165] The first data to be processed is cached in the cache space of the first computing node, and the first data to be processed in the cache space of the first computing node is distributed to any second computing node in the distributed computing system for processing through a data shuffling output channel between the first computing node and any second computing node in the distributed computing system.

[0166] According to one or more embodiments of the present disclosure, distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling includes:

[0167] Obtain the remaining capacity of the cache space of the second computing node, determine the sending rate according to the remaining capacity of the cache space of the second computing node, and send the first to-be-processed data to the second computing node at the sending rate so as to be cached in the cache space of the second computing node for further processing.

[0168] According to one or more embodiments of the present disclosure, after distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling, the method further includes:

[0169] Receive a rejection processing message returned by the second computing node based on its own data consumption lag status, and resend the first data to be processed to the second computing node through a data shuffling process for processing, or send the first data to be processed to another other computing node in the distributed computing system through a data shuffling process for processing.

[0170] According to one or more embodiments of the present disclosure, the method further includes:

[0171] Receive second data to be processed distributed by any second computing node in the distributed computing system through data shuffling, and process the second data to be processed.

[0172] According to one or more embodiments of the present disclosure, the method further includes:

[0173] If second data to be processed is received from any second computing node in the distributed computing system through a data shuffling process, determining whether the second data to be processed can be processed according to a data consumption lag of the first computing node;

[0174] If it is determined that the data can be processed, receiving the second data to be processed, and processing the second data to be processed; or

[0175] If it is determined that the data cannot be processed, the receiving of the second data to be processed is rejected, and a processing rejection message is returned to the second computing node.

[0176] According to one or more embodiments of the present disclosure, obtaining first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine includes:

[0177] The metadata of any target data stream is obtained, one or more data stream reading tasks are created according to the metadata, and the data stream reading tasks are executed to obtain the first to-be-processed data from the target data stream.

[0178] According to one or more embodiments of the present disclosure, the method further includes:

[0179] For any target data stream, create a data shuffle component, the data shuffle component includes a cache space and a data shuffle channel, the data shuffle channel includes a data shuffle output channel and a data shuffle input channel respectively connected to each other computing node in the distributed computing system except the first computing node by the first computing node;

[0180] The step of distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling includes:

[0181] The first to-be-processed data is transmitted to a data shuffling component corresponding to the target data stream, so that the data shuffling component sends the data to any second computing node in the distributed computing system for processing.

[0182] In a second aspect, according to one or more embodiments of the present disclosure, a streaming data processing device is provided, comprising:

[0183] A data acquisition unit, configured to acquire first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine;

[0184] a decision unit, configured to determine a data consumption hysteresis condition of the first computing node, wherein the data consumption hysteresis condition is used to characterize an accumulation condition of data allocated to the first computing node in the data stream; determine a ratio of local data processing and data shuffling processing performed by the first computing node according to the data consumption hysteresis condition, and determine a target processing method for the first data to be processed according to the ratio, wherein the target processing method includes local data processing or data shuffling processing;

[0185] a local processing unit, configured to process the first data to be processed if it is determined that the target processing mode is local data processing; or

[0186] A data shuffling unit is used to distribute the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling if it is determined that the target processing method is data shuffling processing.

[0187] According to one or more embodiments of the present disclosure, when the data acquisition unit acquires the first data to be processed from the data allocated to the first computing node in the data stream of the stream processing engine, it is used to:

[0188] Obtaining the first data to be processed from at least one target partition of at least one target data stream of the stream processing engine; wherein the target partition is a partition in the target data stream that is pre-allocated to the first computing node for consumption;

[0189] When determining the data consumption lag status of the first computing node, the decision unit is used to:

[0190] The data consumption hysteresis status of the first computing node is determined according to the data hysteresis of the at least one target partition.

[0191] According to one or more embodiments of the present disclosure, when the decision unit determines the data consumption hysteresis status of the first computing node according to the data hysteresis amount of the at least one target partition, it is used to:

[0192] According to the data lag of the at least one target partition and a preset lag threshold, the data consumption lag status of the first computing node is determined, and the data consumption lag status includes: normal data consumption, a first severity or a second severity; wherein the second severity is greater than the second severity.

[0193] According to one or more embodiments of the present disclosure, when the decision unit determines the data consumption hysteresis status of the first computing node according to the data hysteresis of the at least one target partition and a preset hysteresis threshold, it is used to:

[0194] If the data hysteresis of all target partitions in the at least one target partition exceeds a first hysteresis threshold and does not exceed a second hysteresis threshold, it is determined that the data consumption hysteresis status of the first computing node is of a first severity; wherein the first hysteresis threshold is less than the second hysteresis threshold; or

[0195] If there is a target partition in the at least one target partition whose data lag exceeds the second lag threshold, determining that the data consumption lag status of the first computing node is of a second severity; wherein the second severity is more severe than the first severity; or

[0196] If the data lag of all target partitions in the at least one target partition does not exceed the first lag threshold, or the data lag of some target partitions exceeds the first lag threshold but does not exceed the second lag threshold, then the data consumption lag status of the first computing node is determined to be normal.

[0197] According to one or more embodiments of the present disclosure, the first lag threshold is a preset lag threshold; and / or the second lag threshold is a target multiple of the median of data lags of all target partitions of all computing nodes in the distributed computing system.

[0198] According to one or more embodiments of the present disclosure, when determining the data consumption hysteresis status of the first computing node, the decision unit is used to:

[0199] The data consumption lag status of the first computing node is obtained from a master control node, wherein the master control node is connected to each computing node in the distributed computing system, and is used to determine the data consumption lag status of each computing node, wherein the data consumption lag status of each computing node includes a first severity, a second severity, or normal data consumption, wherein the second severity is more severe than the first severity.

[0200] According to one or more embodiments of the present disclosure, when the decision unit determines the ratio of the first computing node to perform local data processing and data shuffling processing according to the data consumption lag condition, it is used to:

[0201] If the data consumption lag of the first computing node is of a first severity, determining that the ratio of local data processing and data shuffling processing performed by the first computing node is 1:0; or

[0202] If the data consumption lag condition of the first computing node is of the second severity, then increasing the proportion of the data shuffling processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset increment threshold for at least one round, or reducing the proportion of local data processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset decrement threshold for at least one round, until the adjusted proportion of local data processing and data shuffling processing makes the data consumption lag condition of the first computing node normal; or

[0203] If the data consumption lag status of the first computing node is that data consumption is normal, the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round is obtained as the proportion of local data processing and data shuffling processing performed in this round.

[0204] According to one or more embodiments of the present disclosure, when the data shuffling unit distributes the first to-be-processed data to any second computing node in the distributed computing system for processing through data shuffling, it is configured to:

[0205] The first data to be processed is cached in the cache space of the first computing node, and the first data to be processed in the cache space of the first computing node is distributed to any second computing node in the distributed computing system for processing through a data shuffling output channel between the first computing node and any second computing node in the distributed computing system.

[0206] According to one or more embodiments of the present disclosure, when the data shuffling unit distributes the first to-be-processed data to any second computing node in the distributed computing system for processing through data shuffling, it is configured to:

[0207] Obtain the remaining capacity of the cache space of the second computing node, determine the sending rate according to the remaining capacity of the cache space of the second computing node, and send the first to-be-processed data to the second computing node at the sending rate so as to be cached in the cache space of the second computing node for further processing.

[0208] According to one or more embodiments of the present disclosure, after distributing the first to-be-processed data to any second computing node in the distributed computing system for processing through data shuffling, the data shuffling unit is further configured to:

[0209] Receive a rejection processing message returned by the second computing node based on its own data consumption lag status, and resend the first data to be processed to the second computing node through a data shuffling process for processing, or send the first data to be processed to another other computing node in the distributed computing system through a data shuffling process for processing.

[0210] According to one or more embodiments of the present disclosure, the data shuffling unit is further configured to:

[0211] Receive second data to be processed distributed by any second computing node in the distributed computing system through data shuffling, and process the second data to be processed.

[0212] According to one or more embodiments of the present disclosure, the data shuffling unit is further configured to:

[0213] If second data to be processed is received from any second computing node in the distributed computing system through a data shuffling process, determining whether the second data to be processed can be processed according to a data consumption lag of the first computing node;

[0214] If it is determined that the data can be processed, receiving the second data to be processed, and processing the second data to be processed; or

[0215] If it is determined that the data cannot be processed, the receiving of the second data to be processed is rejected, and a processing rejection message is returned to the second computing node.

[0216] According to one or more embodiments of the present disclosure, obtaining first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine includes:

[0217] The metadata of any target data stream is obtained, one or more data stream reading tasks are created according to the metadata, and the data stream reading tasks are executed to obtain the first to-be-processed data from the target data stream.

[0218] According to one or more embodiments of the present disclosure, the data shuffling unit is further configured to:

[0219] For any target data stream, create a data shuffle component, the data shuffle component includes a cache space and a data shuffle channel, the data shuffle channel includes a data shuffle output channel and a data shuffle input channel respectively connected to each other computing node in the distributed computing system except the first computing node by the first computing node;

[0220] The step of distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling includes:

[0221] The first to-be-processed data is transmitted to a data shuffling component corresponding to the target data stream, so that the data shuffling component sends the data to any second computing node in the distributed computing system for processing.

[0222] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0223] The memory stores computer-executable instructions;

[0224] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the streaming data processing method described in the first aspect and various possible designs of the first aspect.

[0225] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the streaming data processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0226] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising computer execution instructions. When a processor executes the computer execution instructions, the streaming data processing method as described in the first aspect and various possible designs of the first aspect is implemented.

[0227] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0228] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0229] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, 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. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A streaming data processing method, It is characterized in that include: Obtain first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine; Determine a data consumption hysteresis condition of the first computing node, where the data consumption hysteresis condition is used to characterize an accumulation condition of data allocated to the first computing node in the data stream; Determine, according to the data consumption lag condition, a ratio of local data processing and data shuffling processing performed by the first computing node, and determine, according to the ratio, a target processing method for the first data to be processed, the target processing method including local data processing or data shuffling processing; If it is determined that the target processing mode is local data processing, processing the first data to be processed; or If it is determined that the target processing method is data shuffling processing, the first data to be processed is distributed to any second computing node in the distributed computing system through data shuffling for processing.

2. The method according to claim 1, It is characterized in that The step of obtaining first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine includes: Obtaining the first data to be processed from at least one target partition of at least one target data stream of the stream processing engine; wherein the target partition is a partition in the target data stream that is pre-allocated to the first computing node for consumption; Then, determining the data consumption lag status of the first computing node includes: The data consumption hysteresis status of the first computing node is determined according to the data hysteresis of the at least one target partition.

3. The method according to claim 2, It is characterized in that The determining, according to the data hysteresis of the at least one target partition, the data consumption hysteresis status of the first computing node comprises: According to the data lag of the at least one target partition and a preset lag threshold, the data consumption lag status of the first computing node is determined, and the data consumption lag status includes: normal data consumption, a first severity or a second severity; wherein the second severity is greater than the second severity.

4. The method according to claim 2, It is characterized in that The determining the data consumption hysteresis status of the first computing node includes: The data consumption lag status of the first computing node is obtained from a master control node, wherein the master control node is connected to each computing node in the distributed computing system, and is used to determine the data consumption lag status of each computing node, wherein the data consumption lag status of each computing node includes a first severity, a second severity, or normal data consumption, wherein the second severity is more severe than the first severity.

5. The method according to claim 3 or 4, It is characterized in that The determining, according to the data consumption lag condition, a ratio of the first computing node to perform local data processing and data shuffling processing includes: If the data consumption lag of the first computing node is of a first severity, determining that the ratio of local data processing and data shuffling processing performed by the first computing node is 1:0; or If the data consumption lag condition of the first computing node is of the second severity, then increasing the proportion of the data shuffling processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset increment threshold for at least one round, or reducing the proportion of local data processing in the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round according to a preset decrement threshold for at least one round, until the adjusted proportion of local data processing and data shuffling processing makes the data consumption lag condition of the first computing node normal; or If the data consumption lag status of the first computing node is that data consumption is normal, the proportion of local data processing and data shuffling processing performed by the first computing node in the previous round is obtained as the proportion of local data processing and data shuffling processing performed in this round.

6. The method according to any one of claims 1 to 4, It is characterized in that The step of distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling includes: Obtain the remaining capacity of the cache space of the second computing node, determine the sending rate according to the remaining capacity of the cache space of the second computing node, and send the first to-be-processed data to the second computing node at the sending rate so as to be cached in the cache space of the second computing node for further processing.

7. The method according to any one of claims 1 to 4, It is characterized in that After distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling, the method further includes: Receive a rejection processing message returned by the second computing node based on its own data consumption lag status, and resend the first data to be processed to the second computing node through a data shuffling process for processing, or send the first data to be processed to another other computing node in the distributed computing system through a data shuffling process for processing.

8. The method according to claim 1, It is characterized in that The method further comprises: If second data to be processed is received from any second computing node in the distributed computing system through a data shuffling process, determining whether the second data to be processed can be processed according to a data consumption lag of the first computing node; If it is determined that the data can be processed, receiving the second data to be processed, and processing the second data to be processed; or If it is determined that the data cannot be processed, the receiving of the second data to be processed is rejected, and a processing rejection message is returned to the second computing node.

9. The method according to claim 1, It is characterized in that The method further comprises: For any target data stream, create a data shuffle component, the data shuffle component includes a cache space and a data shuffle channel, the data shuffle channel includes a data shuffle output channel and a data shuffle input channel respectively connected to each other computing node in the distributed computing system except the first computing node by the first computing node; The step of distributing the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling includes: The first to-be-processed data is transmitted to a data shuffling component corresponding to the target data stream, so that the data shuffling component sends the data to any second computing node in the distributed computing system for processing.

10. A streaming data processing device, It is characterized in that include: A data acquisition unit, configured to acquire first data to be processed from data allocated to the first computing node in the data stream of the stream processing engine; a decision unit, configured to determine a data consumption hysteresis condition of the first computing node, wherein the data consumption hysteresis condition is used to characterize an accumulation condition of data allocated to the first computing node in the data stream; determine a ratio of local data processing and data shuffling processing performed by the first computing node according to the data consumption hysteresis condition, and determine a target processing method for the first data to be processed according to the ratio, wherein the target processing method includes local data processing or data shuffling processing; A local processing unit, configured to process the first data to be processed if it is determined that the target processing mode is local data processing; or A data shuffling unit is used to distribute the first to-be-processed data to any second computing node in the distributed computing system for processing by data shuffling if it is determined that the target processing method is data shuffling processing.

11. An electronic device, It is characterized in that include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 9 is implemented.

13. A computer program product, It is characterized in that The method comprises computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 9 is implemented.