Delay propagation for sliding window aggregation across unordered streams

The method of delayed propagation and partial aggregation in a hierarchical graph-based structure addresses the inefficiencies of out-of-order data streams, enhancing performance and supporting diverse data types in stream processing.

JP7953791B2Active Publication Date: 2026-11-19NEC CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022125618
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-10-05
Filing Date
2022-08-05
Publication Date
2026-11-19
Estimated Expiration
2042-08-05

AI Technical Summary

Technical Problem

Existing stream processing frameworks face challenges in efficiently aggregating data across sliding windows when stream elements are out of order, leading to computational bottlenecks and memory overhead due to buffering and reordering, which affects latency and performance.

Method used

A method for delayed propagation of value aggregation across sliding windows using a hierarchical graph-based data structure that includes nodes with pending and delayed propagation, allowing for partial aggregates to be reused across multiple time windows, supporting arbitrary data types beyond Booleans.

Benefits of technology

This approach reduces computational overhead and improves performance by minimizing the number of time windows that need updating, enabling faster aggregation of non-boolean values across unordered data streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007953791000020
    Figure 0007953791000020
  • Figure 0007953791000021
    Figure 0007953791000021
  • Figure 0007953791000022
    Figure 0007953791000022
Patent Text Reader

Abstract

To provide systems, computer-readable media and methods for aggregating data items from an out-of-order data stream over a sliding window efficiently.SOLUTION: In a delayed propagation process, propagation is delayed at any of nodes between S and T, and delayed at nodes in dedicated segments, and a following strategy is fixed or set for delaying propagation, where the propagation is delayed at a node S'. Here, S' is determined by going to N's predecessor node N' and then following its explicit outgoing vertical link. That is, S' is the first visited node that is waiting for a value from another node that is before N. If N has no predecessor, the propagation is not delayed. The propagation is also not delayed if the node S' is not between S and T. Furthermore, S and S' may be the same aggregation node. In this case, the propagation from N gets directly delayed at S.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the priority benefit of U.S. Provisional Patent Application No. 63 / 230,074, filed on August 6, 2021, entitled "DELAYED PROPAGATIONS FOR SLIDING-WINDOW AGGREGATIONS OVER OUT-OF-ORDER STREAMS", which is hereby incorporated by reference in its entirety into this specification.

[0002] The present disclosure relates to methods, systems, and computer-readable media for delayed propagation for sliding-window aggregations over out-of-order data streams. BACKGROUND ART

[0003] Data that is today often machine-generated, for example by devices and components of IT systems, is processed and analyzed in real time (or often must be processed and analyzed in real time). As an example, in the Internet of Things (IoT), various devices constantly generate data that is immediately analyzed by services running in the cloud or directly at edge nodes. The processed data may then be transferred to a data consumer, which can combine the data with data from other sources or make decisions based on the data.

[0004] Such data processing is often carried out by stream processing frameworks, engines, or services like Apache Flink, which process the data online in the form of data streams or event streams (https website:<flink.apache.org> >, <<de.wikipedia.org / wiki / Apache_Flink> >, <<azure.microsoft.com / en-us / services / stream-analytics / > >, and <<en.wikipedia.org / wiki / Azure_Stream_Analytics> (See here for the full content of each of these, which is incorporated herein by reference). Their application areas are numerous, and these include system monitoring, system verification and debugging, intrusion detection, surveillance, fraud detection, data mining such as in advertising and e-commerce, and many others.

[0005] Analysis in these application areas often involves aggregating data in real time across sliding windows in some form. See M. Stonebraker, U. Cetintemel, and S. Zdonik: "The 8 requirements of real-time stream processing," SIGMOD Record 34(4), 2005 (the entire content is incorporated here by reference). A simple example of data aggregation across sliding windows is continuously counting bids over the last hour in an online auction. Data aggregation across sliding windows is a stateful computation. A state essentially consists of currently active / incomplete time windows with their provisional aggregate values. Newly received stream elements create new time windows, triggering updates to multiple provisional aggregate values ​​and allowing for the final aggregation of several time windows. However, maintaining states can be computationally expensive, and updating states can quickly become a bottleneck, especially in real-time applications with large data rates.

[0006] Efficient processing of data streams becomes even more complex when stream elements are not necessarily received in the order in which they were generated. The parsing result may depend on the order in which the data of the stream elements is processed. Network latency and retransmission of network packets are one reason why stream elements may not be in order within the data stream. Buffering and reordering stream elements delays the parsing result, thus harming the latency of the output of the processed data stream. Furthermore, buffering and reordering can result in significant memory and computational overhead, which can quickly become another bottleneck.

[0007] D. Basin, F. Klaedtke, and E. Zalinescu: “Runtime verification over out-of-order streams,” ACM Transactions on Computational Logic, 21(1):5, 2020 (the entire content of which is incorporated herein by reference) describes a graph-based data structure for monitoring system behavior over out-of-order event streams. An optimized version of this graph-based data structure is described in F. Klaedtke: “Method for operating a monitoring entity,” U.S. Patent No. 10725887B2 (the entire content of which is incorporated herein by reference). However, the monitoring method described is limited to Boolean values ​​as analysis results. Roughly speaking, it is limited to checking whether a given specification is true or false at a given time point. Consequently, the aggregation is also limited to Boolean values. [Prior art documents] [Patent Documents]

[0008] [Patent Document 1] U.S. Patent No. 10725887B2 [Patent Document 2] U.S. Patent Application Publication No. 20210124746A1 [Non-patent literature]

[0009] [Non-Patent Document 1] https website:<flink.apache.org> > [Non-Patent Document 2] https website:<de.wikipedia.org / wiki / Apache_Flink> > [Non-Patent Document 3] https website:<azure.microsoft.com / en-us / services / stream-analytics / > > [Non-Patent Document 4] https website:<en.wikipedia.org / wiki / Azure_Stream_Analytics> > [Non-Patent Document 5] M. Stonebraker, U. Cetintemel, and S. Zdonik: "The 8 requirements of real-time stream processing," SIGMOD Record 34(4), 2005. [Non-Patent Document 6] D. Basin, F. Klaedtke, and E. Zalinescu: "Runtime verification over out-of-order streams," ACM Transactions on Computational Logic, 21(1):5, 2020. [Non-Patent Document 7] K. Tangwongsan, M. Hirzel, S. Schneider, and K.-L. Wu: "General incremental sliding-window aggregation," Proceedings of the VLDB Endowment, 8(7), 2015. [Non-Patent Document 8] D. Basin, F. Klaedtke, and E. Zalinescu: "Greedily computing associative aggregations on sliding windows," Information Processing Letters, 115(2), 2015. [Non-Patent Document 9] K. Tangwongsan, M. Hirzel, and S. Schneider: "Optimal and general out-of-order sliding-window aggregation," Proceedings of the VLDB Endowment, 12(10), 2020. [Non-Patent Document 10] J. Traub, PM Grulich, A. Rodriguez Cuellar, S. Breβ, A. Katsifodimos, T. Rabl, and V. Markl: "Scotty: General and efficient open-source window aggregation for stream processing systems", ACM Transactions on Database Systems. 46(1):1, 2021. [Overview of the Initiative] [Means for solving the problem]

[0010] One aspect of the present disclosure provides a computer implementation method for computing data aggregation within a sliding window over unordered data streams received from a distributed system of data producer components by delaying value propagation, the method being performed in a processor connected to memory storing a data structure, wherein the data structure includes a hierarchical structure of nodes where nodes on the same horizontal layer relate to the same operators, initial values, and metric constraints. The method involves a first aggregate node among a plurality of aggregate nodes in a first time window on a first horizontal layer of the data structure receiving a final value from a first node among lower nodes below the plurality of aggregate nodes, wherein the final value includes a data value and a timestamp, and the first node receives the final value within the scope of each aggregate node among the plurality of aggregate nodes in the first time window, and if no existing partial aggregate of the first aggregate node exists, creating a partial aggregate of the first aggregate node using the final value, or if an existing partial aggregate of the first aggregate node exists If present, the process involves combining the final value with the existing partial aggregate of the first aggregate node to create a partial aggregate of the first aggregate node, and repeatedly propagating the partial aggregate of the first aggregate node in order to the remaining aggregate nodes among the multiple aggregate nodes in the first time window, wherein for each subsequent node among the remaining aggregate nodes, the provisional value of that aggregate node is updated with the value of the partial aggregate, determining whether to delay the propagation for each subsequent node, and delaying the propagation of the partial aggregate to the next aggregate node in response to the determination to delay the propagation.

[0011] The subject matter of this disclosure will be described in more detail below with reference to illustrative drawings. All features described and / or illustrated herein can be used individually or in various combinations. The features and advantages of various embodiments will become apparent when the following detailed description is read with reference to the accompanying drawings illustrating the following. [Brief explanation of the drawing]

[0012] [Figure 1] FIG. 2 is a diagram illustrating a system model according to one embodiment. [Figure 2] FIG. 4A is a diagram illustrating an unordered data stream in which stream element e appears before stream element e' in the stream, even though the timestamp of stream element e is greater than the timestamp of e', according to one embodiment. [Figure 3] FIG. 4B is a diagram illustrating a sliding window in a data stream where stream elements are arranged in order (and no data elements are missing) according to one embodiment. [Figure 4A] FIG. 5 is a diagram illustrating a graph-based data structure. [Figure 4B] FIG. 6 is a diagram illustrating an optimized graph-based data structure. [Figure 5] FIG. 7 is a diagram illustrating examples of updates to the graph from FIG. 4B shown at the top of FIG. 5, according to various embodiments. [Figure 6] FIG. 8 is a diagram illustrating an aggregation node according to one embodiment. [Figure 7] FIG. 9 is a diagram illustrating value propagation (without delay) according to one embodiment. [Figure 8] FIG. 10 is a diagram illustrating value propagation (with delay) according to one embodiment. [Figure 9] FIG. 11 is a diagram illustrating prioritization of propagation according to one embodiment. [Figure 10] FIG. 12 is a diagram illustrating partial aggregation using inverse elements according to one embodiment. [Figure 11] FIG. 13 is a diagram illustrating partial aggregation according to one embodiment. [Figure 12] FIG. 14 is a diagram illustrating Listing 1: Partial Aggregation according to one embodiment. [Figure 13] FIG. 15 is a diagram illustrating Listing 2: Partial Aggregation (Continued) according to one embodiment. [Figure 14] FIG. 16 is a diagram illustrating a processing system according to one embodiment. [Description of Embodiments]

[0013] This disclosure provides a method for efficiently aggregating data items from an out-of-order data stream across sliding windows. The method delays the aggregation of values ​​for a given time window and computes partial aggregates that can be reused for multiple time windows.

[0014] Advantages of embodiments of this disclosure include the ability to enable arbitrary data types, such as maps, in aggregation (rather than being limited to Booleans, as has been the case in the current art), and not being limited to other basic types such as integers.

[0015] Embodiments of this disclosure also enable aggregation to be calculated faster (compared to what was possible prior to the present invention). In the current art, all associated time windows may be updated for newly received stream elements. Embodiments of this disclosure delay propagation so that fewer time windows are updated when new stream elements are received. Furthermore, embodiments of this disclosure reduce the recalculation of partially aggregated values, thereby resulting in improved performance.

[0016] Embodiments of this disclosure extend graph-based data structures to non-boolean values, enabling the computation of aggregates having non-boolean values ​​across sliding windows for unordered data streams. Furthermore, embodiments of this disclosure include delaying the propagation of data values ​​for aggregation if each aggregation is not yet complete because earlier or later data values ​​are also missing. The delayed propagation is collected and partially aggregated later to efficiently propagate them. By delaying and collecting propagation across multiple time windows, the computation of aggregating data values ​​is accelerated.

[0017] According to one embodiment, a computer implementation method for calculating data aggregation within a sliding window over unordered data streams received from a distributed system of data producer components by delaying value propagation, the method being performed in a processor connected to memory storing a data structure, wherein the data structure includes a hierarchical structure of nodes where nodes on the same horizontal layer relate to the same operators, initial values, and metric constraints. The method involves a first aggregate node among a plurality of aggregate nodes in a first time window on a first horizontal layer of the data structure receiving a final value from a first node among lower nodes below the plurality of aggregate nodes, wherein the final value includes a data value and a timestamp, and the first node is within the scope of each aggregate node among the plurality of aggregate nodes in the first time window, and if no existing partial aggregate of the first aggregate node exists, creating a partial aggregate of the first aggregate node using the final value, or if an existing partial aggregate of the first aggregate node exists If present, the process involves combining the final value with the existing partial aggregate of the first aggregate node to create a partial aggregate of the first aggregate node, and repeatedly propagating the partial aggregate of the first aggregate node in order to the remaining aggregate nodes among the multiple aggregate nodes in the first time window, wherein for each subsequent node among the remaining aggregate nodes, the provisional value of that aggregate node is updated with the value of the partial aggregate; determining whether to delay the propagation for each subsequent node; and delaying the propagation of the partial aggregate to the next aggregate node in response to the determination to delay the propagation.

[0018] According to one embodiment, the method further includes sending the final value of one of the aggregation nodes to nodes on layers above the first horizontal layer when the status of that aggregation node is final.

[0019] According to one embodiment, the final value of the first node has a value type selected from the group consisting of Boolean, integer, string, floating-point, vector, and map.

[0020] According to one embodiment, determining whether to delay propagation for the next node includes determining whether the next node is waiting for a value from a preceding node on the same horizontal layer as the first node.

[0021] According to one embodiment, the method further includes restarting the propagation of the delayed partial aggregate in response to the delayed node receiving a value from another node in the lower layer.

[0022] According to one embodiment, the partial aggregate is stored as a balanced search tree or an ordered array.

[0023] According to one embodiment, the method further includes dropping the delayed propagation of a partial aggregation at a certain aggregation node when it is determined that the aggregation node is not within the time window of a first aggregation node.

[0024] According to one embodiment, a network device in a distributed system is provided, comprising one or more processors, instructions, and memory for storing data structures, wherein the data structures include a hierarchical configuration of nodes where nodes on the same horizontal layer relate to the same operators, initial values, and metric constraints, and the instructions, when executed by one or more processors, cause the network device to perform a method of calculating aggregations within a sliding window across unordered data streams received from data producer components of the distributed system by delaying value propagation. The method involves a first aggregate node among a plurality of aggregate nodes in a first time window on a first horizontal layer of the data structure receiving a final value from a first node among lower layer nodes below the plurality of aggregate nodes, wherein the final value includes a data value and a timestamp, and the first node receives the final value within the scope of each aggregate node among the plurality of aggregate nodes in the first time window, and if no existing partial aggregates exist for the first aggregate node, creating a partial aggregate for the first aggregate node using the final value, or if an existing partial aggregate for the first aggregate node is If present, the process involves combining the final value with the existing partial aggregate of the first aggregate node to create a partial aggregate of the first aggregate node, and repeatedly propagating the partial aggregate of the first aggregate node in order to the remaining aggregate nodes among the multiple aggregate nodes in the first time window, wherein for each subsequent node among the remaining aggregate nodes, the provisional value of that aggregate node is updated with the value of the partial aggregate; determining whether to delay the propagation for each subsequent node; and delaying the propagation of the partial aggregate to the next aggregate node in response to the determination to delay the propagation.

[0025] According to one embodiment, the memory further stores instructions that, when executed by one or more processors, cause a network device to send the final value of one of the aggregate nodes to a node on a layer above the first horizontal layer when the status of that aggregate node is final.

[0026] According to one embodiment, the instruction for determining whether to delay propagation for the next node includes an instruction for determining whether the next node is waiting for a value from a preceding node on the same horizontal layer as the first node.

[0027] According to one embodiment, the final value of the first node has a value type selected from the group consisting of Boolean, integer, string, floating-point, vector, and map.

[0028] According to one embodiment, the memory further stores instructions that, when executed by one or more processors, cause the network device to resume the propagation of the delayed partial aggregate in response to the delayed node receiving a value from another node on a lower layer.

[0029] According to one embodiment, the partial aggregate is stored in memory as a balanced search tree or an ordered array.

[0030] According to one embodiment, the memory further stores instructions that, when executed by one or more processors, cause the network device to drop the delayed propagation of a partial aggregation at a certain aggregation node when it is determined that the aggregation node is not within the time window of a first aggregation node.

[0031] According to one embodiment, a tangible, non-temporary, computer-readable medium having instructions thereon, which, when executed alone or in combination by one or more processors, enables the execution of a method for calculating aggregations within a sliding window across unordered data streams received from a distributed system of data producer components by delaying value propagation, wherein the method defines a data structure in a memory unit coupled to one or more processors, the data structure including a hierarchical configuration of nodes where nodes on the same horizontal layer relate to the same operators, initial values, and metric constraints, and the first aggregation node among a plurality of aggregation nodes in a first time window on a first horizontal layer of the data structure receives a final value from a first node among lower-layer nodes below the plurality of aggregation nodes, the final value including a data value and a timestamp, and the first node A tangible, non-temporary, computer-readable medium is provided, which includes receiving a code within the scope of each of the multiple aggregation nodes in a first time window; creating a partial aggregation of the first aggregation node using the final value if no existing partial aggregation of the first aggregation node exists, or creating a partial aggregation of the first aggregation node by combining the final value with the existing partial aggregation of the first aggregation node if an existing partial aggregation of the first aggregation node exists; repeatedly propagating the partial aggregation of the first aggregation node in order to the remaining aggregation nodes in the multiple aggregation nodes in the first time window, wherein for each subsequent node of the remaining aggregation nodes, the provisional value of that aggregation node is updated by the value of the partial aggregation; determining whether to delay the propagation for each subsequent node; and delaying the propagation of the partial aggregation to the next aggregation node in response to the determination to delay the propagation.

[0032] System Model Aspects of this disclosure will be described in relation to the underlying system model 10 shown in Figure 1. System 10 can consist of multiple components. These components may be, for example, software components of a cloud-based IT system, or IoT devices, or a mixture of both. Some of the system components generate data. Such components are called data producers. For example, an IoT sensor may measure temperature every second. The device's measurements are continuously transmitted to a platform 15, for example, a network device in a distributed system or a network of components. The platform hosts services for processing and analyzing data from data producers. That is, the services receive and process data streams from data producers. Data processing typically involves aggregating some data values. For example, aggregation may include calculating the average temperature over a period of time, and the minimum and maximum temperatures during this period. The processed data, which may also be aggregated, is also a data stream that is continuously transmitted to data consumers, which may simply collect the data and process it further, or make decisions and / or take actions based on the processed data. For example, if the average temperature is too high, the data consumer may activate a cooling unit, reduce the workload on the components, or shut down the components.

[0033] The stream elements of a data stream are not necessarily received in the order in which they were created. That is, stream elements may be received out of order on the platform. One reason for out-of-order stream elements is network latency. Furthermore, dropped network packets, if not retransmitted, can result in infinite delay. To infer the order of stream elements, we assume that each stream element has a timestamp. The timestamp is the time the stream element was created. Timestamps are linearly ordered. Often, timestamps originate from a physical clock. Figure 2 shows an example where each stream element contains a timestamp and a data item. In this example, the timestamp (2) of stream element e' is less than the timestamp (7) of the preceding stream element e, so stream element e' appears out of order in the data stream.

[0034] Sliding window across aggregation Data aggregation combines data items from multiple stream elements. Typically, this combination involves data items from stream elements received over a certain time period. Such a time period is often given by a sliding window. A sliding window is a time window that moves with the data stream, provided that the stream elements of the data stream are correctly ordered. Figure 3 shows an example where the τ timestamp is the timestamp of the first stream element in the time window, and the κ timestamp is the timestamp of the last stream element in the time window. A time window can be specified, for example, by its duration and direction (forward or backward), or by dedicated start and end tags. Note that time windows can partially overlap, as shown in Figure 3; that is, data elements occurring within multiple time windows can contribute to multiple aggregations. Furthermore, the number of stream elements within a time window can vary. A time window can also be empty, meaning that a time window may not contain any stream elements.

[0035] As a simple example of data aggregation, consider counting login failures for a device in an IT system within the last hour. In this case, the data stream consists of logged, timestamped system events. The count can be triggered through a dedicated check event or periodically, for example, every 10 minutes. Even in this simple example, correctly and efficiently counting login failures within a given time window becomes difficult when stream elements are not necessarily received in the order they were generated. Specifically, stream elements that arrive late should not be excluded when calculating aggregations across sliding windows.

[0036] Aggregation is typically defined on top of an underlying monoid; that is, data items are joined by associative operators.

[0037]

number

[0038] And it is from a set D that has a neutral element e ∈ D.

[0039]

number

[0040] Because it is binding,

[0041]

number

[0042] Please note that the way parentheses are placed around terms like this is irrelevant. However,

[0043]

number

[0044] The order of elements is important when they are not interchangeable. Examples of monoids are integers with addition + and 0 as a neutral element, as well as n × n matrices for n ≥ 1 with matrix multiplication and the identity matrix. For further examples, see K. Tangwongsan, M. Hirzel, S. Schneider, and K.-L. Wu: "General incremental sliding-window aggregation," Proceedings of the VLDB Endowment, 8(7), 2015 (the entire disclosure is incorporated herein by reference).

[0045] Graph-based data structures are described in D. Basin, F. Klaedtke, and E. Zalinescu: “Runtime verification over out-of-order streams,” ACM Transactions on Computational Logic, 21(1):5, 2020 (the entire disclosure is incorporated herein by reference), and some of its optimized versions are described in F. Klaedtke: “Method for operating a monitoring entity,” U.S. Patent No. 10725887B2 (the entire disclosure is incorporated herein by reference).

[0046] Figures 4A and 4B show examples of a graph-based data structure and an optimized graph-based data structure, respectively. Nodes in the graph-based data structure are grouped into segments. Each segment corresponds to either a time point or a gap. Time points relate to the timestamp of a received stream element, while gaps relate to a non-overlapping, non-empty, non-singular time interval, which acts as a placeholder for time points that may be added to the graph-based data structure in the future. Segments are sorted in ascending order according to their timestamps and time intervals and stored in a doubly linked list. Nodes are stored horizontally within layers. Each layer corresponds to a node type, for example, a node of a specific temporal subformula from a given specification. Nodes in each layer are also stored in a doubly linked list; that is, each node has horizontal links to its predecessors and successors of the same kind. Since segments and nodes are sorted in order of their timestamps and time intervals, nodes can be compared to each other by their temporal position. Specifically, a node that is "closest" to another node that meets certain conditions is clearly defined.

[0047] Furthermore, each node can also have vertical links. In D. Basin, F. Klaedtke, and E. Zalinescu: "Runtime verification over out-of-order streams," ACM Transactions on Computational Logic, 21(1):5, 2020, each node has a link to the node to which it propagates its (boolean) value when it is final. Furthermore, for each such link, there is a corresponding back link. To simplify the problem, assume below that nodes in layer L can receive values ​​from at most a few nodes from a single lower layer L', and that nodes in layer L propagate those values ​​to a few nodes in a single upper layer L'' (if layer L is not the top layer). Note that nodes in some layers obtain those values ​​directly from the data items of the received stream elements.

[0048] In one embodiment, explicit concatenations are stored in memory. In contrast, implicit concatenations are not stored in memory; they are derived from explicit concatenations (along with node timestamps / gaps and metric constraints). For example, the graph-based data structure described in F. Klaedtke: "Method for operating a monitoring entity," U.S. Patent No. 10725887B2, explicitly stores only some of the vertical concatenations. The remaining vertical concatenations are implicit and are derived from both explicit vertical and horizontal concatenations whenever needed. This has the advantage that fewer concatenations need to be updated when updating the graph-based data structure (e.g., by erasing nodes when values ​​are propagated upwards, or by splitting segments when new stream elements are received). Furthermore, less memory is used to store the graph-based data structure. Specifically, it is sufficient to explicitly store the following vertical concatenations: Nodes have explicit outward-pointing vertical concatenations to the nearest node to which values ​​are propagated. Nodes N1, ..., N n For every outward connection from node N to node N, N has a single return connection. N1, ..., N n Assuming they are arranged in interval order, the furthest node that has an explicit outward vertical connection to node N is node N n It is sufficient to store the vertical connections from N to N. Note that there are no back connections if there are no nodes with explicit outward connections to N. A node has back connections for each layer if it receives values ​​from multiple different lower-level nodes.

[0049] In the graph-based data structure shown in Figure 4B, all nodes have a constant number of outward connections, whereas in the graph-based data structure shown in Figure 4A, nodes have a linearly large number of outward connections in the worst case. A constant number of outward connections means that the number of outward connections is constant. In one embodiment, for example, a node has (1) two outward horizontal connections (predecessor and successor), provided that the node is neither the first nor the last node in the list, and (2) a single outward vertical connection, provided that the node is not the topmost node. Note that in special cases, a node may have even fewer connections. For example, if a node is the first node in the list, its connection to its predecessor is nil. Note that these connections are the explicit *connections described above. Note that storing a single connection in memory is considerably less expensive than storing a list of connections in memory. It should also be noted that this graph-based data structure accommodates slightly fewer connections than that described in F. Klaedtke: "Method for operating a monitoring entity," U.S. Patent No. 10725887B2. Finally, the values ​​stored in the nodes are not limited to Boolean values, as described in D. Basin, F. Klaedtke, and E. Zalinescu: "Runtime verification over out-of-order streams," ACM Transactions on Computational Logic, 21(1):5, 2020. In fact, the values ​​in the nodes can be of any data type, including integers, floating-point numbers, vectors, and maps.

[0050] Basic updates to graph-based data structures can include (1) adding time points, (2) removing gaps, and (3) propagating values. To add a time point, the gap containing the timestamp of that time point is split, and the segments of that gap are replaced with the resulting segments that have their own nodes. The nodes in the new segments inherit their own values ​​from the nodes in the split segments. Furthermore, note that when propagating values, removing gaps, or splitting segments, irrelevant nodes are removed from the graph-based data structure. Reducing gaps is another example of updating a graph-based data structure.

[0051] Figure 5 shows an example of updating the graph from Figure 4B, shown at the top of Figure 5. First, the gap (4.2, 4.3) is removed from the graph. Second, a new time point with timestamp 4.0 is added to the graph. To add this new time point, the interval (3.14, 4.2) containing timestamp 4.0 is split, resulting in a new segment. Third, the lower-level nodes within segment {4.0} propagate their values ​​upward, this node is removed, and the value of the node to which this value is propagated is updated. It should be understood that this example does not represent all cases. For example, multiple gaps may be removed, multiple values ​​may be propagated, splitting a gap does not always result in three new segments, nodes without outward connections may be removed from the graph, and nodes without inward nodes (explicit or implicit) may be complete and propagate their values, etc.

[0052] Aggregation node A new type of node, namely the aggregation node, is introduced herein. Each such node is a combinatorial operator

[0053]

number

[0054] This can be associated with an aggregation over a certain time window, given by an initial value z ∈ D and a metric constraint given by an interval I. The interval I, along with the interval of the node's segments, determines the time window of the node's aggregation. For example, if a segment corresponds to a time point with a timestamp τ, the time window can be τ+I, and if a segment corresponds to a gap with a time interval J, the time window can be J+I. Intuitively, τ and J are shifted by I to cover all segments that partially overlap with this time window. A segment with a time interval K may (i) be included in J+I (i.e., K ⊆ J+I), or (ii) be partially included in J+I (i.e., K ∩ (J+I) ≠

[0055]

number

[0056] However, K⊆J+I is not the case, and (iii) K is prime to J+I (i.e., K∩(J+I)=

[0057]

number

[0058] This may be the case. In case (i), the input node of the segment with time interval K is included in the time window, and in case (iii), the input node of the segment with time interval K is not included in the time window. In case (ii), at least one of the segments must be a gap, and whether or not the input node of the segment with time interval K is included in the time window is "pending".

[0059] In one embodiment, aggregation nodes on the same horizontal layer relate to the same initial characteristics, such as operators, initial values, and metric constraints. Note that above, the time windows were limited to include only stream elements with equal or greater timestamps. Extensions for time windows that also include stream elements with smaller timestamps, or only include stream elements with smaller timestamps, are straightforward. Specifically, an aggregation using time windows in both directions can be split into two aggregations using unidirectional time windows.

[0060] Figure 6 shows an example of an aggregation node 20 and its fields according to one embodiment. In one embodiment, the aggregation node 20 may include fields named prev, next, out, and in. The fields prev, next, out, and in of the aggregation node 20 represent explicit horizontal and vertical connections of the graph-based data structure. The field named value of the aggregation node 20 can store the values ​​propagated to that node up to that point. The propagated values ​​can be combined, for example, by associative operators.

[0061]

number

[0062] These can be combined into a single value, which is initially z. Note that the value is not necessarily a Boolean value. The type of the value is determined by the aggregation. For example, the value can be an integer, a map, a floating-point value, etc. Furthermore, the value may be provisional. For example, the value may be provisional if not all values ​​within the node's time window have been propagated to the aggregation node so far. In addition, the aggregation node 20 includes fields called pending and delayed for pending and delayed propagation as follows in one embodiment. Pending propagation is propagation from a time point that satisfies the aggregate's metric constraints but where the metric constraints are not effective; that is, this time point may or may not be part of the aggregate's time window. Each pending propagation has a timestamp and a value. An aggregate node may have pending propagation only if the node's segment corresponds to a gap. Delayed propagation is propagation that has not yet been fully completed. Specifically, the propagation is temporarily suspended at this node. Like pending propagation, each delayed propagation has a timestamp and a value.

[0063] Both pending and delayed propagation are sorted by their timestamps. For example, they can be stored in an array or a balanced search tree.

[0064] In the Go programming language, for example, an aggregate node can be implemented as a struct type having the following fields: type AggregationNode ade { owner *Segment / / The segment containing the nodes. val Value / / The value and status of the node. pending PendingPropagations / / Pending propagation at a node. Delayed Propagations / / Delayed propagation of nodes. next *AggregationNode / / Horizontal link to the next node. prev *AggregationNode / / Horizontal link to the preceding node. out *OutNode / / Explicit outward vertical connection. in *InNode / / Explicit inward vertical concatenation (backward concatenation). } Here, explicit node concatenation is implemented as a pointer in one embodiment. Note that a concatenation pointer can be nil if explicit concatenation does not exist; for example, if a node is the head of a doubly linked list of aggregate nodes, its prev field will be nil. Furthermore, note that the types of (vertically) inward and outward nodes are determined according to the types of nodes in each layer. Alternatively, an interface type can be used for nodes that has an API for operations on the node. In addition, the aggregate node type maintains a pointer to the segment (owner field) in which the node is located. For example, by following this pointer, the timestamp or interval of a node can be obtained, depending on whether the node is in a segment that is a time point or a segment that is a gap, respectively.

[0065] Value propagation Figures 7 and 8 illustrate the propagation of a value from node N to an upper-level aggregation node according to one embodiment. For the value of N to propagate, N should preferably be in a segment that is a time point with a timestamp. Otherwise, the segment containing N is a gap segment. Since gaps acting as placeholders may later be removed or split into multiple segments, it is not sound to propagate the value of N. Furthermore, the value of N should preferably not be provisional when propagating the value of N.

[0066] Figure 7 shows a propagation process that does not delay propagation, and this is explained first because it will help in understanding propagation when it is delayed and explained later. The dotted boxes in Figure 7 contain all aggregate nodes that are within the scope of N, that is, that have node N within their time window. In other words, N has outward-facing vertical connections to the nodes in the dotted boxes. Here, the connection to the nearest node S is explicit. Other connections are implicit and are not shown in Figure 7. In general, the scope of a node determines the furthest node to which the node propagates its value. For example, this scope can be given through the minimum or maximum timestamp. For node N in Figure 7, this value is min({τ}-I) or min(JI), where I is the metric constraint of the aggregate and τ / J is the timestamp / gap of node N. Furthermore, note that min(X) represents the minimum value of the set X. Recall that an aggregation node aggregates values ​​from nodes in a given time window on a lower layer. The time window of an aggregation node is given by the node's timestamp τ or node gap J and the aggregation's metric constraint, i.e., interval I. The scope of a node is defined from the perspective of the nodes in the lower layer; i.e., the node's scope specifies the node to which the value propagates. In contrast, the time window of a node is defined from the perspective of the nodes in the upper layer; i.e., the node's time window specifies the node from which the value *receives*.

[0067] The value of N is propagated upward along its outward-facing explicit vertical linkage to node S, and then propagated horizontally along the upper layer along the horizontal linkage until it visits a node too far from N, i.e., until N is no longer within the time window of the aggregation node, or until the horizontal preceding linkage becomes a nile (i.e., at the top of that layer). In Figure 7, this node is the preceding (or nile) of node T. For all nodes between S and T, their provisional aggregate values ​​are updated according to the propagated value. Nodes S or T may be in a segment that is a gap, and the segment of N may not be fully contained within the time window of those nodes. In one embodiment, if so, the timestamp of the segment of N and the value of N are added to the pending propagation of those nodes, which is later performed for derived nodes resulting from splitting the segment. Pending propagation may also be dropped if its timestamp is not partially contained within the time window of the aggregation node.

[0068] Furthermore, N is removed from the graph-based data structure. Aggregation nodes between S and T that do not have explicit or implicit vertical connections and do not have pending propagation (i.e., N was the last remaining input to those nodes) are complete, meaning that those nodes finalize their values ​​and propagate them further up.

[0069] In one embodiment of this delayed propagation process, shown in Figure 8, propagation can be delayed when it repeatedly visits aggregation nodes that start at S and proceed toward T. Propagation can be delayed at any node between S and T. For example, propagation can be delayed at a node in a dedicated segment. Below, the following strategy for delaying the propagation shown in Figure 8 is defined or set, in which case propagation is delayed at node S'. S' is determined by moving toward the preceding node N' of N, and then following its explicit outward vertical connection; that is, S' is the first visited node waiting for a value from another node prior to N. If N has no preceding node, propagation is not delayed. Propagation is also not delayed if node S' is not between S and T. Furthermore, S and S' may be the same aggregation node. In this case, propagation from N is directly delayed at S.

[0070] The values ​​of nodes from S to D are updated according to the propagated values. S can be a node in a segment, as described above, and the segment of N may not be entirely contained within the time window of S. In this case, the propagation is added to the pending propagation of S, rather than updating the value of S. Similarly, if D is T, and the segment of N may not be entirely contained within the time window of T, the propagation is added to the pending propagation of D.

[0071] Some of the delayed propagations in S may also be propagated further. That is, any delayed propagation δ in S that satisfies the following conditions: (i) has a timestamp between the timestamp of N and (ii) has a timestamp or interval between the inputs (if any) to the aggregation node S adjacent to N, is propagated along with the value of N. Note that this timestamp or interval in (ii) exists if N.next is not nil and N.next.out points to S. Otherwise, δ has a timestamp later than the timestamp of N and can also be propagated further.

[0072] When iterating through nodes (from S and D), any delayed propagation from S that is not within the time window of the currently visited aggregate node is dropped. The value propagation and pending propagation of the currently visited aggregate node are updated accordingly. At node S', the remaining propagation is added to the delayed propagation of this node. Furthermore, according to the defined strategy for delaying propagation, there is no delayed propagation between the aggregate node S (excluded) and D because there is no explicit inward vertical connection.

[0073] Assuming that all time windows accommodate O(n) nodes, propagation without delay always visits a linear number of nodes and performs a linear number of value updates. When propagation is delayed, in the worst case, only O(n) nodes are visited and updated for the values ​​being propagated. However, if delayed propagation is performed separately later, not much is gained, because the inventors may later visit and update nodes (or their derivatives resulting from splitting the gap). Next, we describe a method according to one embodiment for efficiently combining delayed propagations at an aggregation node so that the inventors can perform them together.

[0074] When combining delayed propagations, it is beneficial to prioritize the propagations. An example is shown in Figure 9, where both nodes N1 and N2 propagate their values ​​upward along an explicit outward connection to the same aggregation node S. A prioritized queue can be used to ensure that N2 propagates its value before N1. Priority should be given to the node with the larger timestamp, given that the time window extends to the right-hand stream elements. This results in N2's propagation being immediately delayed, combined with N1's propagation, and executed. In other words, when combining both propagations, they are executed essentially at once, rather than sequentially.

[0075] Partial aggregation According to one embodiment, instead of updating the value of an aggregation node separately for each value propagated to that node, including delayed propagation, the propagations can be combined to form a partial aggregation, and this partial aggregation can be used when propagating values. The partial aggregation is stored in the aggregation node as delayed propagation using, for example, a balanced search tree or an ordered array. In one embodiment, the following operations can be performed with respect to the partial aggregation. P.Add(t,ν): Adds a propagation with timestamp t and value ν to partial aggregate P. P.Drop(t): Drops propagation with timestamp t and subsequent data from the partial aggregate P. P.Append(Q): Appends partial aggregate Q to partial aggregate P.

[0076] Furthermore, the following two functions can be used for partial aggregation. P.Key(): Returns the key of the partial aggregate P. P.Value(): Returns the value of the partial aggregate P.

[0077] One important aspect of a partial aggregate (in one embodiment) is the timestamp of the first propagation in the partial aggregate. When a value is propagated from a node along its explicit outward link to an aggregate node, i.e., from node N to node S as shown in Figure 8, a decision is made as to whether the delayed propagation at S is "blocked" by N. These delayed propagations are stored and combined as a partial aggregate. New propagations are added to this partial aggregate by using the Add operation (if such a partial aggregate does not exist, a new partial aggregate containing the propagation is created). Subsequently, the partial aggregate is propagated to the remaining aggregate nodes until it is "blocked" or until all remaining aggregate nodes have been visited. Note that when iterating through aggregate nodes, the Drop operation can be used to drop irrelevant propagations from a partial aggregate. The Value function can be used when updating the value of an aggregate node. When a partial aggregate is "blocked", it is added to the current aggregate node, using the Key function and the Append operation.

[0078] The following describes an efficient implementation of partial aggregation. The following discusses domain D and operations.

[0079]

number

[0080] A monoid having an inverse function -1 Special cases are considered, including those where :D→D also occurs. For example,

[0081]

number

[0082] If the addition operation is performed over integers, the inverse of d∈D is -d. In this special case, partial aggregation stores the propagation in a queue (first-in, first-out). Furthermore, partial aggregation maintains a value that is a combination of the propagation values, as shown in Figure 10. The value of the partial aggregation is updated accordingly when propagation is added or removed.

[0083] As an example, consider an implementation that stores the propagation within a doubly linked list containing pointers to the previous and next paths. Whenever a propagation is added (P.Add), the propagation is added to the beginning of the list (see Figure 10). Furthermore, the value of the partial aggregate P is updated with the value ν of the added propagation, i.e., the value of the partial aggregate P is

[0084]

number

[0085] It will be set to .Value(). Whenever a propagation is dropped (P.Drop), the propagation is removed from the end of the list (see Figure 10). Furthermore, when the value of the partial aggregate P is updated using the inverse value ν of the propagation, the value of the partial aggregate P is:

[0086]

number

[0087] It is set to . When removing all propagations for a given timestamp t from P, the method iterates through the propagations from the end of the list until a propagation with a smaller timestamp is visited. The values ​​of the visited propagations are joined, the value of the partial aggregate is updated accordingly using the inverse value, and the propagation is removed from the list.

[0088] Furthermore, P.Value() returns the value of the partial aggregate P, P.Key() returns the timestamp of the first element in the propagation slice of P, and P.Append(Q) updates the value of P with the value of Q and appends the list of propagations of Q to the list of propagations of P.

[0089] Assuming that the list of propagations is ordered by their timestamps, we assume that the added propagation will have a smaller timestamp. Similarly, we make the same assumption when appending propagations. Furthermore, to efficiently implement P.Append, we assume that P.Append(Q) "steals" the list of Q and that Q will not be used later. These assumptions are met when propagating values ​​to the aggregation node as described above.

[0090] In this embodiment of partial aggregation, the worst-case average computation time for operations is O(1). Key findings include (i) values ​​are not recalculated by P.Value(), and (ii) P.Drop(t) is at most linearly large for propagation that is added by P.Add(t,ν) or P.Append(Q) and not dropped.

[0091]

number

[0092] This includes performing calculations.

[0093] Now, let's move on to an example of a common case where we consider that a monoid does not necessarily have an inverse function. Instead of a single queue, two arrays or lists are used to store the propagation. Furthermore, partial aggregate values ​​are stored to quickly remove the propagation. An example of the corresponding struct type in the Go programming language is below: type PartialAggregation struct { val Value / / The aggregated value of the forward propagation values. front []propagation back []aggregated } and type propagation struct { ts Timestamp / / Propagation timestamp. val Value / / The value of propagation. } , and type aggregated struct { wave comb Value / / Index of each entry starting from index 0 in the backward slice / / The aggregated value of the propagation up to that point. } It can be done as follows: Here, forward and backward refer to slices, i.e., dynamically sized arrays. Propagations in the forward slice are sorted in descending order with respect to their timestamps, and propagations in the backward slice are sorted in ascending order. This makes it possible to quickly add new propagations to the forward slice and remove propagations from the backward slice. Implementations of functions and operations for partial aggregates can be as follows, where k is the length of P.front and l is the length of P.back, and without loss of generality, we assume that the partial aggregate P contains at least one propagation, i.e., both k and l cannot be zero. P.Key() returns P.front[k-1].ts if k > 0, and P.back[0].ts otherwise. • P.Value() returns P.val if l=0, otherwise

[0094]

number

[0095] It returns. P.Add(t,ν) adds propagation to the end of P.front and updates P.val accordingly, i.e., P.front is set to append(P.front,propagation{t,ν}) and P.val is

[0096]

number

[0097] It will be set to this. P.Append(Q) combines two front slices, P and Q, meaning P.front is set to the slice Q.front which has slice P.front appended to it, meaning P.front is set to append(Q.front, P.front...). P.val is

[0098]

number

[0099] It is set to P.back, and P.back is set to Q.back. Note that the inventors here assume that slice P.back is empty. Furthermore, since P "steals" slice Q, the inventors assume that Q will not be used later. P.Drop(t) updates the forward and backward slices of P as follows: If k > 0 and P.front[0].ts is not before t: P.back is set to an empty slice. The propagation after t stored in P.front is moved to P.back in reverse order. The corresponding comb values ​​in the entries of slice P.back are set accordingly. Finally, P.front is set to an empty slice and P.val is set to the neutral source of the monoid. Otherwise: A binary search is performed in P.back to find the smallest index i whose entry timestamp is not earlier than t. Afterwards, the corresponding propagation is dropped in P.back, i.e., P.back is set to P.back[:i].

[0100] Figure 11 shows a partial aggregation data structure with a forward slice and a backward slice according to one embodiment. Note that delayed propagation can also be dropped directly from the forward slice. In this case, the backward slice is emptied first, and the remaining entries in the forward slice are moved to the backward slice. See listing 1 in Figure 12 and listing 2 in Figure 13 above as examples of these operations in the Go programming language. Here, the monoid is added to the PartialAggregation type, and here the value and timestamp are of machine integer type for simplicity.

[0101] Similar to special cases, we can make the same assumption that, for example, the added propagation has a smaller timestamp than the already stored propagation. Again, similar to special cases, the worst-case time complexity of the operation is O(1). Other implementations for partial aggregations with similar complexity bounds are possible. For example, doubly linked lists can be used instead of slices. However, slices often have slightly less overhead because slices store their elements in contiguous memory cells. Another implementation is based on a tree-like data structure and a greedy method for joining values, as described in D. Basin, F. Klaedtke, and E. Zalinescu: "Greedily computing associative aggregations on sliding windows," Information Processing Letters, 115(2), 2015 (the entire content of which is incorporated herein by reference). Based on the data structure and method described, the following is performed.

[0102]

number

[0103] The number of calculations can be further reduced. This means that

[0104]

number

[0105] This is a costly operation, and the cost of maintaining a tree-like data structure is

[0106]

number

[0107] It is interesting when it becomes smaller compared to [the original value]. Finally, neither the greedy methods and their tree-like data structures described in D. Basin, F. Klaedtke, and E. Zalinescu: "Greedily computing associative aggregations on sliding windows," Information Processing Letters, 115(2), 2015, nor the "TwoStack" solution mentioned in K. Tangwongsan, M. Hirzel, and S. Schneider: "Optimal and general out-of-order sliding-window aggregation," Proceedings of the VLDB Endowment, 12(10), 2020 (the entire content of which is incorporated herein by reference), apply to situations where stream elements in the data stream may appear out of order.

[0108] Gap division According to one embodiment, when a new stream element is received, the gap in the graph-based data structure containing the timestamp of that stream element can be split. Gap splitting can be performed as described in D. Basin, F. Klaedtke, and E. Zalinescu: “Runtime verification over out-of-order streams,” ACM Transactions on Computational Logic, 21(1):5, 2020, and F. Klaedtke: “Method for operating a monitoring entity,” U.S. Patent No. 10725887B2. Explicit vertical connectivity of nodes should preferably be adjusted, while implicit vertical connectivity does not require adjustment. Pending and delayed propagation of aggregate nodes should also preferably be adjusted. Furthermore, gap splitting can trigger the propagation of values, possibly including some delayed propagation, and the elimination of irrelevant nodes.

[0109] Gap removal According to one embodiment, when it is found that a gap does not contain any time points, the gap can be removed from the graph-based data structure. Such information can be received through a so-called watermark message that informs the stream processor that all stream elements up to a certain time have been received. Alternatively, sequential numbers can be used to derive whether all stream elements within a certain time period have been received. See D. Basin, F. Klaedtke, and E. Zalinescu: "Runtime verification over out-of-order streams," ACM Transactions on Computational Logic, 21(1):5, 2020.

[0110] Regarding gap splitting, gap elimination can be performed as described in D. Basin, F. Klaedtke, and E. Zalinescu: "Runtime verification over out-of-order streams," ACM Transactions on Computational Logic, 21(1):5, 2020, and F. Klaedtke: "Method for operating a monitoring entity," U.S. Patent No. 10725887B2. In this case as well, pending and delayed propagation should preferably be coordinated.

[0111] As already explained above, this disclosure improves upon and extends the graph-based data structure described in D. Basin, F. Klaedtke, and E. Zalinescu: “Runtime verification over out-of-order streams,” ACM Transactions on Computational Logic, 21(1):5, 2020, and its optimized version described in F. Klaedtke: “Method for operating a monitoring entity,” U.S. Patent No. 10725887B2. For example, this disclosure describes a way to efficiently aggregate values ​​across a sliding window by (1) delaying propagation at aggregation nodes, (2) collecting the delayed propagation at those nodes as partial aggregates, and (3) propagating the partial aggregates to multiple nodes, thereby correctly maintaining the partial aggregates during propagation. The values ​​of stream elements are joined together through associative operators, and these values ​​can be received in no particular order.

[0112] A situation similar to that described herein is also considered in F. Klaedtke: “Efficient stream processing with data aggregations in a sliding window over out-of-order data streams,” U.S. Patent Application Publication No. 20210124746A1 (the entirety of which is incorporated herein by reference). In that document, stream elements with no gaps between them are grouped together, and their values ​​are aggregated together when each stream element completely covers a time window. Such grouping also maintains aggregations for the leftmost and rightmost time windows completely covered by the grouping. These aggregations can be used to calculate the aggregated value of the complete time window within a grouping resulting from merging two adjacent groupings.

[0113] The situation of aggregating values ​​from unordered streams is also considered in J. Traub, PM Grulich, A. Rodriguez Cuellar, S. Breβ, A. Katsifodimos, T. Rabl, and V. Markl: "Scotty: General and efficient open-source window aggregation for stream processing systems," ACM Transactions on Database Systems. 46(1):1, 2021 (the entire content of which is incorporated herein by reference). The underlying idea in Traub et al.'s work is to group stream elements into "slices" and aggregate values ​​individually for each slice. These slice aggregates are then used to calculate the aggregation of stream elements within a time window. That is, whenever all stream elements within a time window have been received, a slice within that time window is selected and the slice aggregates are aggregated together. This is sound because Traub et al. require that the slices either be entirely contained within a time window or not contained within a time window at all. Slices may reside within multiple time windows, and therefore slice aggregation is used multiple times in such cases. The architecture proposed by Traub et al. consists of components for initializing slices, components for updating slices when new stream elements are received, and components for calculating aggregated values ​​from slices. Note that there is overhead in managing slices. For example, if there are many small slices (which often occurs when time windows partially overlap), this overhead can be a significant factor.

[0114] In contrast to the two studies mentioned above, the partial aggregation in this disclosure has minimal overhead and integrates seamlessly with graph-based data structures, as described in D. Basin, F. Klaedtke, and E. Zalinescu: “Runtime verification over out-of-order streams,” ACM Transactions on Computational Logic, 21(1):5, 2020, and F. Klaedtke: “Method for operating a monitoring entity,” U.S. Patent No. 10725887B2. For example, the partial aggregation in this disclosure is updated in real time, independent of the size of the time window. Another difference of the embodiments of this disclosure is that they directly support configurability. Recall that graph-based data structures can be horizontally layered structures and vertically segmented structures. By having several layers for joining and aggregating, aggregates can be easily joined and even nested. Vertical linkages define dependencies and determine where values ​​should propagate. Furthermore, note that gaps are explicitly represented as segments. This has the advantage that, when the values ​​of nodes within a gap are known or can be inferred, those values ​​can be propagated upward in certain cases. This allows for early output of aggregated results regarding the time window.

[0115] Embodiments of this disclosure include, advantageously, the following: 1) Delaying the value update for the provisional aggregate value of the time window, collecting multiple delayed value updates into a single value update for that time window, and / or 2) Adjusting a value update consisting of multiple delayed value updates for a given time window in real time to a separate value update for an adjacent time window. This adjustment involves adding and dropping delayed value updates, as well as combining two such value updates. Here, the delayed value updates are stored in an orderly manner so that (a) those at the ends (i.e., the first and last) can be accessed quickly, and (b) the delayed value updates are expanded by aggregating the parts (prefixes and suffixes) of the delayed value updates.

[0116] These technological improvements are advantageous in that they result in better worst-case computational complexity, and therefore improvements in performance and scalability, particularly in data stream processing for computing aggregates across unordered data streams with large sliding windows or high data rate rates.

[0117] Embodiments of this disclosure support aggregation using underlying associative operators. The need for associative operators is common when aggregating data in stream processing; that is, associative operators are already widely applied. This is advantageous compared to the current technology, which is more restrictive, i.e., only supports commutative operators.

[0118] In some embodiments, delayed propagation may not be included in the aggregated values, so no check is performed to see if the incomplete time window values ​​satisfy a certain "monotonic" condition.

[0119] Embodiments of this disclosure can be used to differentiate IoT (Internet of Things) platform businesses (e.g., FIRWARE). Stream processing can be an essential part of applications that collect and analyze data from IoT devices.

[0120] Embodiments of this disclosure can be implemented to enhance the security and security operations center (SOC) of an IoT platform that analyzes data streams.

[0121] Further relevant information (discussing similar situations) can be found in J. Traub, PM Grulich, A. Rodriguez Cuellar, S. Breβ, A. Katsifodimos, T. Rabl, and V. Markl. "Scotty: General and efficient open-source window aggregation for stream processing systems," ACM Transactions on Database Systems. 46(1):1, 2021 ("Traub et al.") (the entire content of which is incorporated herein by reference). In the case of partially overlapping time windows, the method of this disclosure should scale better than the method of Traub et al. and therefore provide better performance for computing aggregations across unordered data streams.

[0122] One aspect of this disclosure provides a method for calculating aggregations within a sliding window across unordered data streams by delaying value propagation. The method includes one or more of the following: 1) The node's status becomes final, for example, due to a newly received stream element, or because the node has received a value from a node above it. 2) The node begins propagating its final value along its outward vertical connections to the nearest aggregation node in the layer above. Specifically, the propagation (i.e., the propagated value) may be added to the existing partial aggregation of this aggregation node. The partial aggregation may include or consist of delayed propagation at this aggregation node. 3) Aggregation nodes within the scope of a propagation node are repeatedly processed until propagation is completed or temporarily suspended. 4) When propagation is performed at an aggregation node, the provisional value of the aggregation node is updated with the value of the partial aggregation. If the aggregation node is complete, its value becomes final, and the aggregation node outputs that value or propagates it to the node above it. Propagation at this layer proceeds to the next aggregation node, at which point irrelevant propagation within the partial aggregation is dropped, and this partial aggregation is combined with the partial aggregation of the next node, and / or 5) When propagation is delayed at an aggregation node, propagation can be resumed later, for example, with a value received from another node on a lower level.

[0123] As those skilled in the art will understand, all methods, apparatus, elements, units, and means described herein can be implemented as software elements, hardware elements, or any combination thereof. All steps performed by various entities described herein, and functions described as being performed by various entities, are intended to mean that each entity is adapted or configured to perform its respective steps and functions. Even if, in the following description of exemplary embodiments, a particular function or step performed by an external entity is not reflected in the description of a specific detailed element of the entity performing that particular step or function, these methods and functions can be implemented as their respective software elements, hardware elements, or any combination thereof.

[0124] Referring to Figure 14, the processing system 900 may include one or more processors 902, a memory 904, one or more input / output devices 906, one or more sensors 908, one or more user interfaces 910, and one or more actuators 912. The processing system 900 may represent each of the computing systems disclosed herein.

[0125] The processor 902 may include one or more separate processors, each having one or more cores. Each separate processor may have the same or different structure. The processor 902 may include one or more central processing units (CPUs), one or more graphics processing units (GPUs), circuits (e.g., application-specific integrated circuits (ASICs)), digital signal processors (DSPs), etc. The processor 902 may be mounted on a common board or on multiple different boards.

[0126] The processor 902 is configured to perform a particular function, method, or operation when at least one of one or more separate processors is capable of performing an operation that embodies that function, method, or operation (for example, it is configured to enable the performance of such a function, method, or operation). The processor 902 can perform the operation that embodies that function, method, or operation, for example, by executing code stored in memory 904 (for example, by interpreting a script) and / or by passing data through one or more ASICs. The processor 902, and therefore the processing system 900, can be configured to automatically perform any and all of the functions, methods, and operations disclosed herein. Accordingly, the processing system 900 can be configured to perform any (for example, all) of the protocols, devices, mechanisms, systems, and methods described herein.

[0127] For example, when this disclosure states that a method or apparatus performs (or is performed) task "X", such statement should be understood as disclosing that the processing system 900 can be configured to perform task "X". The processing system 900 is configured to perform at least the function, method, or operation when the processor 902 is configured to perform that function, method, or operation.

[0128] Memory 904 may include volatile memory, non-volatile memory, and any other medium capable of storing data. Volatile memory, non-volatile memory, and any other type of memory may each include multiple different memory devices located in multiple separate locations, each having a different structure. Memory 904 may include remotely hosted (e.g., cloud) storage.

[0129] Examples of memory 904 include non-temporary computer-readable media such as RAM, ROM, flash memory, EEPROM, any type of optical storage disk such as DVD or Blu-ray® discs, magnetic storage devices, holographic storage devices, HDDs, SSDs, and any medium that can be used to store program code in the form of instructions or data structures. All methods, functions, and operations described herein can be fully embodied in the form of tangible and / or non-temporary machine-readable code (e.g., interpretable scripts) stored within memory 904.

[0130] The input-output device 906 may include any components for data transmission, such as ports, antennas (i.e., transceivers), and printed conductive paths. The input-output device 906 may enable wired communication via USB®, DisplayPort®, HDMI®, Ethernet, etc. The input-output device 906 may enable electronic, optical, magnetic, and holographic communication with appropriate memory 904. The input-output device 906 may enable wireless communication via WiFi®, Bluetooth®, cellular (e.g., LTE®, CDMA®, GSM®, WiMAX®, NFC®), GPS, etc. The input-output device 906 may include wired and / or wireless communication paths.

[0131] Sensor 908 can capture physical measurements of the environment and report them to processor 902. User interface 910 may include a display, physical buttons, speaker, microphone, keyboard, etc. Actuator 912 can enable processor 902 to control mechanical forces.

[0132] The processing system 900 can be distributed. For example, some components of the processing system 900 may reside in a remotely hosted network service (e.g., a cloud computing environment), while other components of the processing system 900 may reside in a local computing system. The processing system 900 may have a modular design in which certain modules include multiple features / functions as shown in Figure 9. For example, an I / O module may include volatile memory and one or more processors. As another example, individual processor modules may include read-only memory and / or a local cache.

[0133] Although the subject matter of this disclosure has been illustrated and described in detail in the drawings and the preceding description, such illustrations and descriptions should be considered illustrative or exemplary, not limiting. Any statements characterizing the invention made herein should be considered illustrative or exemplary, not limiting. It will be understood that modifications and alterations, which may include any combination of features from the various embodiments described above, can be made within the scope of the above description by those skilled in the art. [Explanation of symbols]

[0134] 10 System Models, System 15 Platforms 20 aggregation nodes 900 Processing Systems 902 Processor 904 memory 906 Input / Output Device, Input-Output Device 908 Sensor 910 User Interface 912 Actuator D set, domain e Preceding stream element, neutral source e' Stream element I. Interval i Minimum Index J Time interval, gap K Time Interval L layer L' The layer below L'' is the layer above. N nodes N'N's Preceding Node N1, ..., N n node P partial aggregation Q Partial aggregation S Aggregation Node S' node T node t timestamp X set z initial value δ Delayed propagation κ Timestamp ν value, inverse value τ Timestamp

Claims

1. A method implemented in a network device for calculating data aggregation in a sliding window over unordered data streams received from a distributed system comprising a plurality of data producer components that generate data, wherein the network device comprises a memory for storing a data structure and a processor connected to the memory, the method is performed in the processor, the data structure comprises a hierarchical structure comprising a plurality of horizontal layers, the plurality of nodes in each horizontal layer being arranged in time series and related to a single metric constraint, the unordered data stream comprises a plurality of stream elements, each of the plurality of stream elements comprising a data item and a timestamp, the plurality of stream elements are received in an order different from the order of the timestamps of each of the plurality of stream elements, the data aggregation is the joining of the data items contained in each of the plurality of stream elements, and the method is A step of receiving a final value from a first node of a lower layer of nodes below the plurality of aggregation nodes in a first time window on a first horizontal layer of the data structure, wherein the final value is a value determined at the first node and includes the data item and the timestamp-based data value held at the first node, and the first node is within the scope of each of the plurality of aggregation nodes in the first time window, and each scope indicates the range of aggregation nodes in the first horizontal layer from which the final value propagates, based on one metric constraint. If no existing partial aggregate exists for the first aggregate node, the final value is used to create a partial aggregate for the first aggregate node, or If an existing partial aggregate exists for the first aggregate node, the step of creating the partial aggregate for the first aggregate node by combining the final value with the existing partial aggregate for the first aggregate node, wherein the first time window is included in a plurality of time windows, and the sliding window corresponds to moving each window of the plurality of time windows in the time domain. With respect to the partial aggregation of the first aggregation node, the step of determining whether to delay the propagation to the remaining aggregation nodes other than the first aggregation node among the plurality of aggregation nodes within the first time window, In response to determining that the propagation should not be delayed, the step is to repeatedly propagate the partial aggregation of the first aggregation node in order, wherein for each of the remaining aggregation nodes, the provisional value of the aggregation node is updated with the value of the partial aggregation. In response to the determination to delay the propagation, the steps include delaying the propagation of the partial aggregation to the aggregation node adjacent to the first aggregation node among the remaining aggregation nodes. Methods that include...

2. The method according to claim 1, wherein the final value of the first node has a value type selected from the group consisting of Boolean, integer, string, floating-point, and vector.

3. The method according to claim 1, wherein the step of determining whether to delay the propagation for the next node includes the step of determining whether the next node is waiting for a value from a preceding node on the same horizontal layer as the first node.

4. The method according to claim 1, further comprising the step of restarting the propagation of the delayed partial aggregate in response that the node where the delay occurred has received a value from another node on the lower layer.

5. The method according to claim 1, wherein the partial aggregates are stored as a balanced search tree or an ordered array.

6. The method according to claim 1, further comprising the step of dropping the propagation of the partial aggregation at a certain aggregation node when it is determined that the certain aggregation node is not within the time window of the first aggregation node, if it is determined that the propagation should be delayed.

7. A network device, One or more processors, A memory connected to one or more processors, which stores instructions and data structures. The data structure comprises a hierarchical configuration of nodes, where nodes on the same horizontal layer are associated with the same operators, initial values, and metric constraints, and the instruction, when executed by one or more processors, causes the network device to perform a method for calculating data aggregation within a sliding window across unordered data streams received from a distributed system comprising a plurality of data producer components that generate data, wherein the data structure comprises a hierarchical configuration comprising a plurality of horizontal layers, where a plurality of nodes in each horizontal layer are arranged in chronological order and associated with one metric constraint, the unordered data stream comprises a plurality of stream elements, each of the plurality of stream elements comprises a data item and a timestamp, the plurality of stream elements are received in an order different from the order of the timestamps of each of the plurality of stream elements, the data aggregation is the joining of the data items contained in each of the plurality of stream elements, and the method is The receiving of a final value from a first node among a plurality of aggregation nodes in a first time window on a first horizontal layer of the data structure, wherein the final value is a value determined at the first node and includes the data item and the timestamp-based data value held at the first node, and the first node is within the scope of each of the plurality of aggregation nodes in the first time window, and each scope indicates the range of aggregation nodes in the first horizontal layer from which the final value propagates based on one metric constraint. If no existing partial aggregate exists for the first aggregate node, create a partial aggregate for the first aggregate node using the final value; or, if an existing partial aggregate exists for the first aggregate node, combine the final value with the existing partial aggregate for the first aggregate node to create the partial aggregate for the first aggregate node, wherein the first time window is contained within multiple time windows, and the sliding window corresponds to moving each window of the multiple time windows in the time domain. With respect to the partial aggregation of the first aggregation node, it is determined whether to delay the propagation to the remaining aggregation nodes other than the first aggregation node among the plurality of aggregation nodes within the first time window, In response to determining that the propagation should not be delayed, the propagation is carried out repeatedly in order, wherein for each of the remaining aggregation nodes, the provisional value of the aggregation node is updated by the value of the partial aggregation. In response to the determination to delay the propagation, the propagation of the partial aggregation to the aggregation node adjacent to the first aggregation node among the remaining aggregation nodes is delayed. Network devices, including those mentioned above.

8. The network device according to claim 7, wherein the instruction for determining whether to delay the propagation for the next node includes an instruction for determining whether the next node is waiting for a value from a preceding node on the same horizontal layer as the first node.

9. The network device according to claim 7, wherein the final value of the first node has a value type selected from the group consisting of Boolean, integer, string, floating-point, and vector.

10. The network device according to claim 7, wherein the memory further stores instructions that, when executed by one or more processors, cause the network device to resume the propagation of the delayed partial aggregate in response that the delayed node has received a value from another node on the lower layer.

11. The network device according to claim 7, wherein the partial aggregate is stored in the memory as a balanced search tree or an ordered array.

12. The network device according to claim 7, wherein, if it is determined that the propagation should be delayed, the memory further stores an instruction, which, when executed by one or more processors, causes the network device to drop the propagation of the partial aggregation at a certain aggregation node when it is determined that the certain aggregation node is not within the time window of the first aggregation node.

13. A tangible, non-temporary, computer-readable medium having instructions thereon, which enable the execution of a method for calculating data aggregation in a sliding window over a plurality of data producer components received from a distributed system comprising multiple data producer components that generate data, when the instructions are executed individually or in combination by one or more processors, the method The definition of a data structure in a memory unit coupled to one or more processors, wherein the data structure is composed of a hierarchical structure including multiple horizontal layers, where multiple nodes in each horizontal layer are arranged in time series and related to one metric constraint, the unordered data stream comprises multiple stream elements, each of the multiple stream elements includes a data item and a timestamp, the multiple stream elements are received in an order different from the order of the timestamps of each of the multiple stream elements, and the data aggregation is the joining of the data items contained in each of the multiple stream elements. The receiving of a final value from a first node among a plurality of aggregation nodes in a first time window on a first horizontal layer of the data structure, wherein the final value is a value determined at the first node and includes the data item and the timestamp-based data value held at the first node, and the first node is within the scope of each of the plurality of aggregation nodes in the first time window, and each scope indicates the range of aggregation nodes in the first horizontal layer from which the final value propagates based on one metric constraint. If no existing partial aggregate exists for the first aggregate node, create a partial aggregate for the first aggregate node using the final value; or, if an existing partial aggregate exists for the first aggregate node, combine the final value with the existing partial aggregate for the first aggregate node to create the partial aggregate for the first aggregate node, wherein the first time window is contained within multiple time windows, and the sliding window corresponds to moving each window of the multiple time windows in the time domain. With respect to the partial aggregation of the first aggregation node, it is determined whether to delay the propagation to the remaining aggregation nodes other than the first aggregation node among the plurality of aggregation nodes within the first time window, In response to determining that the propagation should not be delayed, the partial aggregation of the first aggregation node is repeatedly propagated in order, and for each subsequent node among the remaining aggregation nodes, the provisional value of the aggregation node is updated with the value of the partial aggregation. In response to the determination to delay the propagation, the propagation of the partial aggregation to the aggregation node adjacent to the first aggregation node among the remaining aggregation nodes is delayed. A tangible, non-temporary, computer-readable medium, including [the specified text].

Citation Information

Patent Citations

  • Stream data processing method and computer system

    JP2009266007A

  • Real-time reporting based on measurement of software

    JP2020187798A

  • Method for operating a monitoring entity

    US10725887B2

  • Efficient stream processing with data aggregations in a sliding window over out-of-order data streams

    US20210124746A1