A complex event processing method for real-time event streams

By introducing the concept of temporary matching chain partition storage structure and complex event instance coverage in complex event processing, the problem of redundant calculations in the finite state automaton matching process is solved, and more efficient complex event matching is achieved, especially in large time periods. Performance improvements under window conditions.

CN114860718BActive Publication Date: 2024-09-06SHENYANG AEROSPACE UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210382427.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-12
Publication Date
2024-09-06
Estimated Expiration
2042-04-12

AI Technical Summary

Technical Problem

Complex event processing technology based on finite state automata generates a large amount of redundant calculations during the matching process, especially when the time window span of complex time queries is large, causing huge additional overhead on processor and memory resources.

Method used

A complex event processing method for real-time event streams is designed. By introducing the concept of temporary matching chain partition storage structure and complex event instance coverage, redundant matching and copying are reduced, and the CoverMatch and CombineMatch algorithms are used to process the matching results.

Benefits of technology

It significantly improves the efficiency of complex event matching, reduces redundant calculations, optimizes the use of hardware resources, and shows significant performance improvements especially under large time window conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860718B
    Figure CN114860718B
Patent Text Reader

Abstract

The present invention discloses a complex event processing method for real-time event streams, comprising the following steps: 1) establishing an association relationship between a query and a temporary match of an event stream based on the definitions of "event instance coverage" and "complex event instance coverage"; 2) constructing a chain partition storage structure of temporary matching, using the structure as a carrier of complex event instance coverage, and obtaining a complex event instance coverage set of matching results, wherein a complex event matching algorithm CoverMatch is used during matching; 3) using a CombineMatch algorithm to perform a reverse matching result connection on the obtained matching results, and finally obtaining all matching results. The present invention adopts a temporary matching chain partition storage structure, which is designed with the help of the concepts of event instance coverage and complex event instance coverage, and avoids the disadvantages of centralized temporary matching storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a complex event processing method oriented to real-time event streams. Background Art

[0002] Complex event processing is a technology for analyzing event streams in a dynamic environment. With the further development of the information society, more and more industries are using complex event processing (CEP) technology to analyze massive event streams in real time. Complex event processing analyzes the relationships in events, and formulates query rules based on the temporal relationship and aggregation relationship between events through association, aggregation, filtering and other technologies, and continuously obtains event sequences that meet the requirements from the event stream. This technology has been widely used in financial transaction analysis, sensor networks, the Internet of Things and other fields.

[0003] At present, the processing model based on finite state automata (NFA) is the most popular implementation method of complex event processing technology. Complex event processing technology implemented by NFA will generate temporary matches during the matching process on the event stream to ensure that the temporary matching results can be used by subsequent events to form new temporary matches and final matching results. Therefore, a large number of overlapping partial matches will be generated on the event stream during the matching process, and the finite state automaton needs to maintain a large number of repeated matching states, resulting in the problem of redundant calculations in methods based on this technology. Especially when the time window span of complex time queries is large, redundant calculations will bring huge additional overhead to hardware resources such as processors and memories. Summary of the invention

[0004] In view of this, the present invention discloses a complex event processing method for real-time event streams to solve the redundant calculation problem caused by the finite state automaton matching process, thereby improving the efficiency of complex event matching.

[0005] The technical solution provided by the present invention is specifically a complex event processing method for real-time event streams, comprising the following steps:

[0006] 1) Parse the query into a finite state automaton, read the event stream, and establish the association between the query and the temporary match of the event stream based on the definitions of "event instance coverage" and "complex event instance coverage";

[0007] 2) constructing a temporary matching chain partition storage structure, using the structure as a carrier of complex event instance coverage, querying the complex event instance coverage matching on the event stream on the structure, and obtaining a matching result complex event instance coverage set, wherein the complex event matching algorithm CoverMatch is used during matching;

[0008] 3) Use the CombineMatch algorithm to perform a reverse matching result connection on the obtained matching results, and finally obtain all the matching results.

[0009] Preferably, the event stream S (s1, s2, ..., sn) is composed of a series of basic event instances, where si is an event instance, which includes the type of event, the attributes of the event and the time when the event occurs;

[0010] The query is a complex event query Q, which is composed of a set of constraints defined on basic events, and is used to define and represent the attribute characteristics of higher-level complex events;

[0011] The “event instance coverage” is defined as: when the event instance s i The previous event instance s that is adjacent to the previous event instance in the event stream i-1 If they belong to the same event type, can be successfully verified by the current NFA and act on the same state node of the NFA, then we call them s i Yes i-1 An event instance of ;

[0012] The "complex event instance coverage" is defined as: for two matching results M1 and M2, if each event instance in M1 is equal to the corresponding event instance in M2 or is an event instance coverage of the corresponding event instance in M2, then M1 is called a complex event instance coverage of M2, where both event instance coverage and complex event instance coverage are transitive.

[0013] Preferably, the above method specifically comprises the following steps:

[0014] S1: Assume there is a query Q and an event stream S, compile the query Q into NFA, where after Q is compiled into NFA, there are main states and multiple partitions;

[0015] S2: Search for event e in the event stream; if event e is not empty, proceed to step S3, otherwise proceed to step S6;

[0016] S3: Check the attributes of event e; if they meet the requirements, proceed to step S4, otherwise proceed to step S2;

[0017] S4: Use event e to traverse the exposed matching nodes in the previous partition, copy the nodes that can be updated, and update them to generate new nodes;

[0018] S5: Check whether the time window of this node is greater than the time range of the event stream S. If so, proceed to step S2, otherwise proceed to step S6;

[0019] S6: Find the partition region where event e is located, enter the current partition to check the complex event instance coverage, and find the tail node of each temporary matching chain in the partition region where the current event e is located. If event e is not covered by the complex event instances of all the tail nodes of this partition, it will be chained separately, otherwise it will become the tail node of a chain;

[0020] S7: Search for the last partition of the event stream, find each temporary matching chain of the partition, and use prev to directly locate the tail node of the chain, store these tail nodes in the complex event instance coverage set R, and thus obtain the final complex event instance coverage set R;

[0021] S8: Since a bidirectional ring chain structure is used in the matching process, we start from the bottom complex event instance cover set R and traverse the linked list in reverse; collect the last event instance of the linked list node of each partition, and finally recursively connect the event instances of each partition to finally obtain all matching results.

[0022] The present invention proposes a complex event processing method for real-time event streams, enhances NFA, and designs a temporary matching chain partition storage structure for it to replace the centralized temporary matching storage method in the prior art. The temporary matching chain partition storage structure adopted by the present invention is designed with the help of the concepts of event instance coverage and complex event instance coverage, avoiding the disadvantages of centralized temporary matching storage.

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

[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0025] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Figure 1 It is a schematic diagram of a temporary matching chain partition storage structure in a complex event processing method for real-time event streams of the present invention;

[0027] Figure 2 It is a schematic diagram of performance comparison of processing 5 groups of queries on the ABC data set in the disclosed embodiment of the present invention;

[0028] Figure 3 is a schematic diagram of performance comparison of processing five groups of queries on a traffic data set in an embodiment disclosed by the present invention;

[0029] Figure 4 This is an experimental comparison of the effect of the size of the time window constraint on the performance on the ABC dataset in the disclosed embodiment of the present invention;

[0030] Figure 5 It is a schematic diagram of experimental comparison of the impact of the size of the time window constraint on the performance of the present invention on the traffic data set. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present invention. Instead, they are merely examples of systems consistent with some aspects of the present invention as detailed in the appended claims.

[0032] In order to solve the problems of redundant calculation caused by a large number of temporary matches and copies generated in complex event processing based on NFA, this implementation scheme provides a complex event processing method for real-time event streams and proposes the concept of complex event instance coverage. Through complex event instance coverage, an association relationship between temporary matches can be established, and based on this relationship, the redundant generation and redundant replication of temporary matches can be reduced. A temporary matching chain partition storage structure is designed, which avoids the centralized storage and use of temporary matches. At the same time, the structure also serves as a carrier for complex event instance coverage and constructs the association between temporary matches. Complex event matching algorithms CoverMatch and CombineMatch based on the temporary matching chain partition storage structure are proposed. Through these two algorithms, the correctness and integrity of complex event processing matching results can be guaranteed while reducing the number of temporary matches and replications.

[0033] A complex event processing method for real-time event streams, comprising: 1) parsing a query into a finite state automaton, reading the event stream, and establishing an association relationship between the query and a temporary match of the event stream based on the definitions of "event instance coverage" and "complex event instance coverage";

[0034] 2) constructing a temporary matching chain partition storage structure, using the structure as a carrier of complex event instance coverage, querying the event stream for complex event instance coverage matching, and obtaining matching results, wherein the complex event matching algorithm CoverMatch is used during matching;

[0035] 3) Use the CombineMatch algorithm to perform a reverse matching result connection on the obtained matching results, and finally obtain all the matching results.

[0036] The above event stream S (s1, s2, ..., sn) consists of a series of basic event instances, where si is an event instance, which includes the type of event, the attributes of the event and the time when the event occurs;

[0037] The above query is a complex event query Q, which is composed of a set of constraints defined on basic events to define and represent the attribute characteristics of higher-level complex events;

[0038] The above “event instance coverage” is defined as: when the event instance s i The previous event instance s that is adjacent to the previous event instance in the event stream i-1 If they belong to the same event type, can be successfully verified by the current NFA and act on the same state node of the NFA, then we call them s i Yes i-1 An event instance of ;

[0039] The above-mentioned "complex event instance coverage" is defined as: for two matching results M1 and M2, if each event instance in M1 is equal to the corresponding event instance in M2 or an event instance coverage of the corresponding event instance in M2, then M1 is called a complex event instance coverage of M2, where both event instance coverage and complex event instance coverage are transitive.

[0040] The above method enhances the existing NFA and designs a temporary matching chain partition storage structure for it to replace the original centralized temporary matching storage method. The centralized temporary matching storage method needs to traverse and verify all temporary matches every time a new event arrives, which seriously consumes computing resources. The temporary matching chain partition storage structure in this implementation scheme is designed with the help of the concepts of event instance coverage and complex event instance coverage, avoiding the shortcomings of centralized temporary matching storage.

[0041] In a complex event processing method for real-time event streams, assume that there is a query Q4: SEQ(A a, Bb, C c) and an event stream S t(a1, a2, b1, b2, a3, b3, c1, c2). For simplicity and understanding, the event constraint of Q4 is set to empty, and the time window is larger than the time range of the event stream St. When query Q4 performs complex event instance coverage matching on the event stream St, the temporary matching chain partition storage structure diagram is as follows Figure 1 shown.

[0042] After Q4 is compiled into NFA, there are three main states (state F is the terminal state), and three partitions are generated, referred to as partition A, partition B, and partition C. Event flow S t When event instances a1 and a2 arrive, temporary matches are generated and stored in partition A, and are packaged into linked list nodes. <a1>and <a2>Since a2 is an event instance override of a1, <a2>Will be <a1>The successor node of is exposed to the next B partition. Only the tail node in the linked list is exposed to the next partition. When event instance b1 arrives, it first searches for the exposed node in the previous A partition and copies it down, that is, <a2>Node, and then update it to become<a2,b1> Node, and is stored as the linked list head in partition B and exposed to partition C. Then event instance b2 arrives, and b2 will also find the exposed node in partition A <a2>, a node will be generated<a2,b2> ,because<a2,b2> yes<a2,b1> The complex event instance covers, so<a2,b2> will become<a2,b1> 's successor node, and replace<a2,b1> is exposed to partition C. Similarly, when the event stream S t After all the events in arrive and are processed, we will end up with 3 complex event instances covering<a2,b2,c2> ,<a2,b3,c2> ,<a3,b3,c2> .

[0043] The matching algorithm CoverMatch based on the chain partition storage structure is as follows:

[0044] Input: event stream S e , query Q.

[0045] Output: complex event instance coverage set R s .

[0046]

[0047] In the above algorithm, the buildTempMatch method in line g indicates that the event e is used to traverse the exposed matching nodes in the previous partition, copy the nodes that can be updated, update them, and then enter the current partition to check the complex event instance coverage. If it is not the complex event instance coverage of a certain node, it will be chained separately (line o), otherwise it will become the tail node of a chain (line m). The final complex event instance coverage returned at the end uses a bidirectional ring chain structure, so the use of prev in line q can directly locate the tail node of the chain to obtain the final complex event instance coverage.

[0048] By temporarily matching the chain partition storage structure and the above matching algorithm, query Q4 in the event stream S t In the matching process, only 13 temporary matches and 10 copies of temporary matches need to be generated, while the traditional matching method based on finite state automaton needs to generate 24 temporary matches and 21 copies of temporary matches. The optimization effect is significant.

[0049] Furthermore, if the user wants a complex event instance closest to the current time, he only needs to specify that the system save<a3,b3,c2> Assuming that the user needs to match all results like the skip-till-any-match strategy, then it is necessary to use all the final complex event instance coverage and use the other node information on the linked list to connect the results, so as to obtain all the matching results.

[0050] The present invention further improves the generation of matching results. When the user specifies that all matching results need to be obtained, the CoverMatch algorithm needs to be used to perform a reverse matching result connection on the obtained results, and the query Q4: SEQ (A a, B b, C c) and the event stream S t (a1,a2,b1,b2,a3,b3,c1,c2) ​​for example, Figure 1 In the matching process and results shown, the query result of Q4 is<a2,b2,c2> ,<a2,b3,c2> ,<a3,b3,c2> , all matching results will be obtained through this result and the chain partition structure.

[0051] Since a bidirectional ring chain structure is used, we can start from the bottom of the complex event instance coverage and traverse the linked list in reverse. We only need to collect the last event instance of the linked list node of each partition, and finally connect the event instances of each partition through recursion. The process is shown in CombineMatch below. For Q4, we only need to<a2,b2,c2> ,<a2,b3,c2> ,<a3,b3,c2> By passing the three nodes into Algorithm 2 respectively, all the matching results of Q4 can be obtained.

[0052] Matching result connection algorithm CombineMatch

[0053] Input: Complex event instance coverage R.

[0054] Output: All matching results M.

[0055]

[0056] In the getPrevBlockNode method in line g of the above algorithm, the parent node of R in the previous partition can be obtained by passing in the linked list vertex R. The i-th line uses a recursive form to obtain the final connection result, in which the doCombine method is used for the connection operation.

[0057] use Figure 1 Taking the leftmost linked list as an example, first get the node of partition C<a2,b2,c1> In partition C, we obtain the last event instance of each node to get [c1,c2], then get [b1,b2] in the linked list corresponding to partition B, and then get [a1,a2] in partition A. We connect the three through the recursive doCombine method to get eight matching results (a1,b1,c1), (a1,b1,c2), (a1,b2,c1), (a1,b2,c2), (a2,b1,c1), (a2,b1,c2), (a2,b2,c1), (a2,b2,c2). Similarly, using the other two complex event instances of partition C to cover all their corresponding matches, we can finally get all the matching results in this way to achieve the matching effect of the skip-till-any-match strategy and avoid the generation and copying of a large number of temporary matches.

[0058] In summary, a complex event processing method for real-time event streams includes the following steps:

[0059] S1: Assume there is a query Q and an event stream S. Compile the query Q into NFA. After Q is compiled into NFA, there are several main states and several partitions will be generated.

[0060] S2: Search for event e in the event stream; if event e is not empty, proceed to step S3, otherwise proceed to step S6;

[0061] S3: Check the attributes of event e; if they meet the requirements, proceed to step S4, otherwise proceed to step S2;

[0062] S4: Use event e to traverse the exposed matching nodes in the previous partition, copy the nodes that can be updated, and update them to generate new nodes;

[0063] Among them, in complex event processing, the copy processing of temporary matches needs to be implemented using deep copies. To complete a deep copy of a temporary match, a new temporary match instance needs to be generated in the memory, and all attribute values ​​in the original temporary match instance and the references existing in the instance are copied to the new temporary match instance. In the traditional method, the copy of temporary matches is performed in the process of traversing all temporary matches, which will not be conducive to providing good system throughput for complex event processing, and the computational overhead of the system will also increase. At the same time, all temporary matches are found and explicitly exist in the form of instances in the memory, which will increase the memory overhead.

[0064] S5: Check whether the time window of this node is greater than the time range of the event stream S. If so, proceed to step S2, otherwise proceed to step S6;

[0065] S6: Find the partition region where event e is located, enter the current partition to check the complex event instance coverage, and find the tail node of each temporary matching chain in the partition region where the current event e is located. If event e is not covered by the complex event instances of all the tail nodes of this partition, it will be chained separately, otherwise it will become the tail node of a chain;

[0066] S7: Search for the last partition of this event stream, find each temporary matching chain of this partition, and use prev to directly locate the tail node of the chain, store these tail nodes in the complex event instance coverage set R, and thus obtain the final complex event instance coverage set R.

[0067] The time complexity and space complexity of the first seven steps are analyzed. If the system is processing event e, assuming that the number of temporary matching nodes exposed in the previous adjacent partition of the partition to which event e belongs is x, and the number of chain structure instances in the partition to which event e belongs is y, and the average length of the event sequence in the temporary matching is k, then the time complexity of complex event instance coverage check is O(k), and the time complexity of obtaining a new temporary matching node through event e is O(x+ky). Since only the tail node in the temporary matching chain structure of the partition where event e belongs will participate in the construction of a new temporary matching node, the space complexity of obtaining a new temporary matching node through event e is O(k(x+y)).

[0068] S8: Since a bidirectional ring chain structure is used, we can start from the bottom complex event instance cover set R and traverse the linked list in reverse. We only need to collect the last event instance of the linked list node of each partition, and finally recursively connect the event instances of each partition to finally obtain all matching results.

[0069] The time complexity and space complexity of step S8 are analyzed. If the current number of partitions is n, the maximum number of recursive function calls is n. If the average length of the temporary matching chain associated with the complex event instance coverage R in each partition is m, the space complexity is O(nm). Since the execution operation complexity in each recursive function body is O(m), the time complexity is O(nm).

[0070] In the process of complex event matching, if only complex event instance coverage is matched, the matching task can be completed with faster efficiency when continuous instances of the same event type appear. At the same time, compared with the skip-till-any-match strategy based on NFA in SASE that uses a large number of temporary matches to calculate all results, the method proposed in the present invention can use the result connection algorithm while matching the complex event instance coverage to obtain all matching results. The process is efficient and does not generate additional temporary matches, thereby achieving the purpose of reducing redundant calculations.

[0071] The present invention is further described below in conjunction with specific comparative experiments. By conducting comparative experiments and analysis on the performance of the optimization method on simulated data sets and real data sets, the effectiveness and efficiency of the proposed method and algorithm are verified.

[0072] Example 1

[0073] The effectiveness of the matching optimization method based on the temporary matching chain partition storage structure proposed in the present invention is analyzed and verified through experimental comparison. The experiment uses Java to implement the writing of the optimization method. The experimental results are analyzed and explained from multiple dimensions, and their effectiveness is proved through performance comparison.

[0074] This embodiment conducts experiments on two data sets, where the first data set is a simulated data stream generated by an event stream generator, and the second data set is a real data set.

[0075] The first data set is an ABC type event stream. The event type is defined by abbreviating the event type with uppercase English letters. Each event has a timestamp and its own attribute value. Before generating an event stream, you can customize the number of event types, the number of attributes, and the range of attribute values ​​in the event stream generator. Each event in the stream is randomly generated. In the experiment, the data set contains 100,000 original events.

[0076] The second dataset contains vehicle traffic data collected by sensors from the city of Aarhus, Denmark. The dataset is obtained by collecting data from 449 observation points for 4 months, and contains a total of 13,577,132 raw events. Each event represents the traffic situation at an observation point, and the attributes of an event include the ID, the average speed of the point, and the total number of vehicles observed in the past 5 minutes.

[0077] The optimization method of this embodiment will be compared with the currently popular SASE method based on finite state automata and Siddhi method. The matching optimization method based on temporary matching chain partition storage structure proposed in this embodiment is denoted as LinkedCEP, and the experiment is carried out on a Linux system with Intel Core 2.60GHz CPU i7 and 16G memory.

[0078] First, the experiment compares the matching performance and number of temporary matches generated by LinkedCEP, SASE, and Siddhi in this embodiment on different data sets. Since the CoverMatch algorithm proposed in this embodiment only matches the complex event instance coverage in the event stream and does not generate all matching results, in order to compare the matching performance fairly, the matching result connection algorithm CombineMatch will be included in LinkedCEP to support the generation of all matching results.

[0079] Since the original events and event attributes of the two datasets are different, in order to better perform matching on the two datasets, different queries are synthesized for the two datasets, and LinkedCEP, SASE, and Siddhi are used to execute the corresponding queries on the two datasets. The following two sets of experiments are designed for comparative analysis.

[0080] Experiment 1: Five groups of queries were synthesized for each of the two datasets. Each group of queries contained 10 basic complex event queries. The sequence length of these complex event queries was 3. Since the time window has a great impact on the matching time, the time window was unified to 50s, and the corresponding value was the average matching time of the group of queries.

[0081] Figure 2 and Figure 3 The following table shows the comparison results of matching performance on ABC event stream and traffic time stream. When the query sequence length and event window are consistent, LinkedCEP's matching efficiency is better than the other two methods in any set of queries. Figure 2 For the matching results of the Q3 query group, LinkedCEP takes 220ms, while SASE and Siddhi take 385ms and 290ms respectively. Figure 3 In the query matching of traffic event streams, LinkedCEP's matching efficiency is also better than SASE and Siddhi. For example, for the matching results of the Q2 query group, LinkedCEP takes 130ms, while SASE and Siddhi take 240ms and 160ms respectively.

[0082] Experiment 2: Test the matching performance under different time windows. Use the query group in Query 1 and change the query time window to 50s, 100s, 150s, 200s, and 300s. The corresponding value is the average matching time of the query group.

[0083] like Figure 4 and Figure 5 As shown in Figure 2, LinkedCEP performs better than the other two methods in different time windows. Figure 4 In the experimental comparison results, when the time window is 200s, LinkedCEP's processing performance is 34% higher than SASE and 19% higher than Siddhi. Figure 4 and Figure 5 It can be found that as the time window increases, LinkedCEP has a greater performance improvement than the other two methods. This is because the size of the time window affects the number of temporary matches. When the time window is large, there are more accumulated temporary matches, and the impact on performance is greater.

[0084] The above experiments show that the method proposed in the present invention can effectively improve the matching efficiency of complex event processing technology based on finite state automata, and can improve performance by reducing redundant calculations regardless of whether the query sequence length is long or the query time window is large.

[0085] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These changes and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A complex event processing method for real-time event streams, characterized in that: The steps include: 1) Parse the query into a finite state automaton, read the event stream, and establish the association relationship between the query and the temporary match of the event stream based on the definitions of "event instance coverage" and "complex event instance coverage"; 2) constructing a temporary matching chain partition storage structure, using the structure as a carrier of complex event instance coverage, and performing complex event instance coverage matching on the event stream on the structure to obtain a matching result complex event instance coverage set, wherein the complex event matching algorithm CoverMatch is used for matching; 3) Use the CombineMatch algorithm to perform a reverse matching result connection on the obtained matching results, and finally obtain all matching results; The event stream S (s1, s2, ..., sn) is composed of a series of basic event instances, where si is an event instance, which includes the type of event, the attributes of the event and the time when the event occurs; The query is a complex event query Q, which is composed of a set of constraints defined on basic events, and is used to define and represent the attribute characteristics of higher-level complex events; The "event instance coverage" is defined as: when the event instance s i The previous event instance s that is adjacent to the previous event instance in the event stream i-1 If they belong to the same event type, can be successfully verified by the current NFA and act on the same state node of the NFA, then we call them s i Yes i-1 An event instance of ; The "complex event instance coverage" is defined as: for two matching results M1 and M2, if each event instance in M1 is equal to the corresponding event instance in M2 or an event instance coverage of the corresponding event instance in M2, then M1 is called a complex event instance coverage of M2, where both event instance coverage and complex event instance coverage are transitive; The temporarily matched chain partition storage structure is a bidirectional ring chain structure; The complex event processing method for real-time event streams specifically includes the following steps: S1: Assume there is a query Q and an event stream S, compile the query Q into NFA, where after Q is compiled into NFA, there are main states and multiple partitions; S2: Search for event e in the event stream; if event e is not empty, proceed to step S3, otherwise proceed to step S6; S3: Check the attributes of event e; if they meet the requirements, proceed to step S4, otherwise proceed to step S2; S4: Use event e to traverse the exposed matching nodes in the previous partition, copy the nodes that can be updated, and update them to generate new nodes; S5: Check whether the time window of this node is greater than the time range of the event stream S. If so, proceed to step S2, otherwise proceed to step S6; S6: Find the partition region where event e is located, enter the current partition to check the complex event instance coverage, and find the tail node of each temporary matching chain in the partition region where the current event e is located. If event e is not covered by the complex event instances of all the tail nodes of this partition, it will be chained separately, otherwise it will become the tail node of a chain; S7: Search for the last partition of the event stream, find each temporary matching chain of the partition, and use prev to directly locate the tail node of the chain, store these tail nodes in the complex event instance coverage set R, and thus obtain the final complex event instance coverage set R; S8: Since a bidirectional ring chain structure is used in the matching process, we start from the bottom complex event instance cover set R and traverse the linked list in reverse; collect the last event instance of the linked list node of each partition, and finally recursively connect the event instances of each partition to finally obtain all matching results.

Citation Information

Patent Citations

  • Parsing observable collections

    CN102402420A

  • Association retrieval method combining ElasticSearch and FSM

    CN111046130A

  • People flow estimation device, system, and program

    JP2019040475A