Complex event processing method and system under intelligent scene of Internet of Things terminal

By adopting a dual filtering strategy of time pruning and predicate pruning in the intelligent scenario of the Internet of Things, and using window-aware Bloom filters and ordered arrays, the high transmission overhead and delay problems caused by limited computing resources of sensor nodes are solved, and efficient complex event processing is achieved.

CN120825459AActive Publication Date: 2025-10-21NANJING UNIV +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511348570.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-21
Publication Date
2025-10-21
Estimated Expiration
2045-09-21

AI Technical Summary

Technical Problem

In smart scenarios on the IoT side, existing complex event processing methods cannot effectively utilize the computing power of sensor nodes due to the limited computing resources of sensor nodes, resulting in high transmission overhead and processing delay.

Method used

A lightweight and efficient event filtering mechanism is adopted, and a dual filtering strategy of time pruning and predicate pruning is used to reduce the transmission of irrelevant events from sensor nodes to the central node. Window-aware Bloom filters and ordered arrays are used to optimize the communication process.

Benefits of technology

The communication overhead and processing delay between sensor nodes and central nodes are reduced, and the efficiency of complex event processing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120825459A_ABST
    Figure CN120825459A_ABST
Patent Text Reader

Abstract

The invention discloses a complex event processing method and system in an intelligent scene of an internet of things terminal. According to the method, through a double filtering strategy of time-based event pruning and predicate-based time pruning, multiple rounds of communication with low overhead are used, a time interval containing possible matching is determined in advance, and finally, only relevant events with timestamps in the time interval are transmitted for mode matching. According to the method, the computing power of the sensor node is effectively utilized, unnecessary original event transmission is avoided, the communication overhead between the sensor node and the central node is reduced, and the overall delay of complex event processing is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of event stream processing, and in particular relates to a method and system for processing complex events in intelligent scenarios on the Internet of Things. Background Art

[0002] Internet of Things technology is profoundly changing people's lives. Ubiquitous smart sensors and connected devices make it possible to continuously monitor the real environment and achieve intelligent management. End-to-end intelligence has been an important development direction of the Internet of Things in recent years. By deploying the perception, computing, and decision-making processes on edge devices close to the data source, data can be processed and responded to locally in real time, significantly improving the real-time performance, reliability, and security of the system. However, when processing the data generated by end-side devices, there is a core technical challenge, namely how to minimize the query latency of complex event processing in end-to-end intelligence scenarios. Achieving efficient complex event processing is the key to achieving functional optimization and system upgrades in end-to-end intelligence scenarios. Specifically, consider the following three application scenarios:

[0003] (1) Suspected burglary identification scenario: Smart door locks can record the behavior and results of password input attempts, infrared sensors can detect whether there is anyone in the room, and optical sensors can detect the opening and closing of windows. At a certain moment, if the behavior of multiple incorrect password inputs is detected, and then the window is opened and someone is detected in the room within a period of time, it may indicate that the house has suffered a suspected burglary. It is necessary to send an alert notification to the user, or execute the user-defined behavior of sounding the alarm in the house.

[0004] (2) Industrial IoT anomaly detection scenario: The energy meter can monitor the current power of the equipment, the temperature sensor can monitor the real-time temperature of the equipment, and the cooling system can record the running and stopping status. At a certain moment, if it is detected that the current operating power of the equipment exceeds the normal usage range and the equipment temperature rises by more than 10 degrees Celsius, and the cooling system is still in the stopped state, it indicates that there may be an abnormality in the cooling system or the equipment is overloaded. It is necessary to issue an equipment overheating warning and reduce the equipment operating power.

[0005] (3) Health monitoring scenario for users living alone: ​​The smart central control screen can listen to voice input and respond to user requests through the microphone array, the infrared sensor can detect whether there is anyone in the room, and the smart bracelet can monitor the user's movement status and various physiological indicators such as heart rate. At a certain moment, if someone is detected in the room, but the body has not moved for a long time and no sound is made, and the physiological indicators detect abnormal data, it indicates that the user may have a special condition such as sudden fainting. It is necessary to turn on the room lights, try to wake up through the smart central control screen, and call emergency contacts for assistance.

[0006] In the three application scenarios described above, data generated by multiple sensor nodes, combined with user-specified event attribute values, event sequence relationships, and time window constraints, form a complex event pattern. However, existing complex event processing methods are typically based on a centralized network design, where all sensor node data is directly transmitted to a single intelligent central control terminal (i.e., a central node) with high computing power for execution. This completely ignores the limited computing and storage capabilities of sensor nodes. Furthermore, user-defined complex event patterns typically occur infrequently. Transmitting all generated data from sensor nodes to the central node would inevitably result in high network communication overhead. (Notably, in edge intelligence scenarios, the bottleneck for complex event processing often stems from the network, not the computing power of the central node.) Furthermore, unlike distributed processing, due to the relatively limited computing resources of sensor nodes, it is impossible to completely offload tasks to them in edge intelligence scenarios. Overall, these issues lead to high transmission overhead and processing delays in complex event processing in edge intelligence scenarios. How to effectively utilize the computing power of sensor nodes and minimize the overall network transmission overhead based on given query features to reduce the overall query latency has become an urgent problem that needs to be solved in complex event processing in end-to-end intelligent scenarios. Summary of the Invention

[0007] Purpose of the invention: In order to effectively utilize the computing power of sensor nodes in end-intelligent scenarios, reduce unnecessary network transmission overhead of sensor nodes, and achieve the goal of efficient complex event processing in end-intelligent scenarios, the present invention provides a complex event processing method and system in end-intelligent scenarios of the Internet of Things. Through a lightweight and efficient event filtering mechanism, it effectively reduces the number of events transmitted from sensor nodes to central nodes, reduces the communication overhead between sensor nodes and central nodes, and thus reduces the overall delay in complex event processing.

[0008] In order to achieve the above object of the invention, the technical solution of the present invention is as follows: In a first aspect, a complex event processing method in an intelligent scenario of an IoT terminal is applied to a sensor node, and the method includes: Receive the variable processing plan from the central node, generate reference bindings for the events corresponding to each variable according to the variable processing plan, and then send the timestamp of the first event bound to the variable to be processed to the central node. The central node constructs the initial feasible time interval set based on the received timestamp and processes the remaining variables in sequence according to the variable processing plan; In a communication round, the current feasible time interval set is received from the central node. If there is an equal value dependency constraint between the variable processed by the current communication round and the variable processed by the previous communication round, the window-aware Bloom filter is constructed using the attribute values ​​and timestamp information corresponding to the events bound to the processed variables and sent to the central node. The central node merges them into a complete window-aware Bloom filter, and then removes the reference binding of the event whose corresponding attribute value is not in its time window or adjacent window from the events bound to the current processing variable according to the complete window-aware Bloom filter; If the current processing variable does not have an equal dependency constraint or the equal dependency constraint of the current processing variable has been processed, remove the event reference bound to the current processing variable whose timestamp does not fall within the current feasible time interval set; A new feasible time interval set is constructed based on the event list bound to the current processing variable, and the intersection with the current feasible time interval set is taken and sent back to the central node. The central node merges the new current feasible time interval set to complete a communication round. After all the variables to be processed are processed, the final feasible time interval set is received from the central node. Events with timestamps falling within the final feasible time interval set are selected from the events bound to each variable and sent back to the central node. The central node then matches the obtained events to obtain the final query results.

[0009] Preferably, when constructing a window-aware Bloom filter, multiple independent hash functions are used for all events bound to the variable, and the time window ID of the event timestamp is used as the hash function seed and the corresponding attribute value is used as the key to calculate the hash value, and 1 is set to the corresponding bit in the bit array, where the time window ID is obtained by rounding the value obtained by dividing the event timestamp by the query window length.

[0010] In a second aspect, an electronic device comprises: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the complex event processing method in the intelligent scenario of the Internet of Things as described in the first aspect are implemented.

[0011] In a third aspect, a complex event processing method in an intelligent scenario of an IoT terminal is applied to a central node, and the method includes: Determine the variable processing plan based on the characteristics of the complex event pattern and send it to each sensor node, which generates a reference binding for the event corresponding to each variable; Receive the timestamp of the event bound to the first variable to be processed in the variable processing plan from the sensor node, construct an initial feasible time interval set, and process the remaining variables in sequence according to the variable processing plan; In a communication round, the current feasible time interval set is sent to each sensor node, and the sensor node updates the feasible time interval set. When the sensor node determines that there is an equal value dependency constraint between the variable processed by the current communication round and the variable processed by the previous communication round, and uses the attribute value and timestamp information corresponding to the event bound to the processed variable to construct a window-aware Bloom filter, the window-aware Bloom filter is received from the sensor node and merged into a complete window-aware Bloom filter, and then sent back to each sensor node. Each sensor node removes the reference binding of the event whose corresponding attribute value is not in its time window or adjacent window from the event bound to the current processing variable according to the complete window-aware Bloom filter. In addition, when there is no equal value dependency constraint on the current processing variable or the equal value dependency constraint of the current processing variable is processed, the sensor node removes the event reference bound to the current processing variable whose timestamp does not fall within the current feasible time interval set, and constructs a new feasible time interval set based on the event list bound to the current processing variable, and takes the intersection with the current feasible time interval set to obtain the updated feasible time interval set. Receive the updated feasible time interval set from each sensor node, merge it to get the new current feasible time interval set, and complete a communication round; After all the variables to be processed are processed, the final feasible time interval set is sent to each sensor node. The sensor node selects the events whose timestamps fall within the final feasible time interval set from the events bound to each variable, and matches them according to the events filtered by the sensor node to obtain the final query result.

[0012] Preferably, in the process of determining the processing order of each variable by the variable processing plan, a greedy strategy is used to first select the variable with the least time window covered by the generated feasible time interval as the first variable to be processed; secondly, the variable with the lowest selection rate is selected from the variables without equal-value dependency constraints for processing; when all unselected variables have equal-value dependency constraints, the variable with the earliest selected corresponding dependent variable is selected from the variables that only have equal-value dependency constraints with the selected variables for processing. If there are multiple such variables, the variable with the lowest selection rate is selected; when all unselected variables have equal-value dependency constraints with other unselected variables, the variables with the lowest selection rate are selected in turn for processing.

[0013] Preferably, the set of feasible time intervals is generated by the timestamps of the original events. Assume that the timestamp of an original event is , the time interval specified by the complex event pattern is , then the feasible time interval generated by this original event is for: , The first variable refers to the current processing variable being the first variable in the complex event pattern, and the tail variable refers to the current processing variable being the last variable in the complex event pattern.

[0014] Preferably, the set of feasible time intervals is represented by an ordered array, which stores multiple time intervals that may contain matching results. Each time interval only records its start time and end time, and all time intervals do not overlap with each other. When performing search, insertion, and deletion operations, a binary search method is used to quickly locate the associated time interval for operation.

[0015] In a fourth aspect, an electronic device comprises: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the complex event processing method in the intelligent scenario of the Internet of Things as described in the third aspect are implemented.

[0016] In a fifth aspect, a method for processing complex events in an intelligent scenario on an IoT terminal is provided, comprising the following steps: (1) The central node receives the complex event pattern given by the user, which includes variable names, attribute constraints, and time window information; (2) The central node determines the variable processing plan based on the characteristics of the complex event pattern and sends the variable processing plan to each sensor node. The variable processing plan includes the processing order and filtering logic of each variable; (3) The sensor node reads the events corresponding to each variable from the memory according to the independent constraints in the complex event pattern and generates a pointer reference for binding. Then, it selects the variable to be processed first and sends the timestamps of all its bound events to the central node. (4) After receiving the timestamps from all sensor nodes, the central node constructs an initial feasible time interval set based on the received timestamps. The initial feasible time interval set is a set of time intervals that may contain matching events. (5) If there is no unprocessed variable in the variable processing plan, jump to step (14); otherwise, start a new communication round and process the next variable to be processed in the variable processing plan according to steps (6) to (13); (6) The central node sends the current feasible time interval set to each sensor node; (7) If there is no equivalent dependency constraint between the variables processed by the current communication round and the variables processed by the previous communication round, directly jump to step (11); otherwise, proceed according to steps (8) to (10); (8) The sensor node builds a window-sensing Bloom filter for the attribute value and timestamp information corresponding to the event based on the event bound to the processed variable in the equal value constraint condition, and sends it to the central node; (9) After receiving the window-aware Bloom filters from all sensor nodes, the central node performs a bitwise OR operation on these filters, merges them into a complete window-aware Bloom filter, and sends it back to each sensor node; (10) The sensor node detects the Bloom filter based on the complete window, checks whether the attribute value corresponding to the event bound to the current processing variable is within the time window or adjacent window where the event is located, and removes the reference binding of the variable to the event if not; (11) After all the equivalent dependency constraints are processed, the sensor node checks whether the timestamp of the event bound to the current processing variable falls within the current feasible time interval set. If not, the reference binding of the variable to the event is removed; (12) The sensor node constructs a new feasible time interval set based on the event bound to the current processing variable, takes the intersection with the current feasible time interval set, and sends the result back to the central node; (13) After the central node receives the feasible time interval sets from all sensor nodes, it takes the union set as the updated current feasible time interval set; (14) After all the variables to be processed in the variable processing plan are processed, the central node sends the final feasible time interval set to each sensor node. The sensor node selects the events whose timestamps fall within the final feasible time interval set from the events bound to each variable and sends them back to the central node; (15) After receiving the filtered events from all sensor nodes, the central node transmits them to the matching engine for matching and obtains the final query results.

[0017] In a sixth aspect, a complex event processing system in an intelligent scenario of an IoT terminal includes: A sensor node device, used for generating, storing and partially processing data in an end-smart scenario, wherein the partial processing is performed according to the complex event processing method in the end-smart scenario of the Internet of Things described in the first aspect; The central node device is used to communicate with each sensor node device and implement complex event processing according to the complex event processing method in the intelligent scenario of the Internet of Things end described in the third aspect.

[0018] Beneficial effects: The present invention uses a lightweight dual filtering strategy of time-based event pruning and predicate-based time pruning to avoid as much as possible the transmission of matching irrelevant events by sensor nodes to the central node, thereby reducing the communication overhead between the sensor nodes and the central node; gradually reduces the set of feasible time intervals through multiple rounds of communication, thereby reducing the bandwidth requirements for communication between the sensor nodes and the central node; through data structures such as ordered arrays and window-aware Bloom filters, it can efficiently execute related operations in the algorithm while reducing the amount of data required to be transmitted. In the process of complex event processing for end-to-end intelligent scenarios, the present invention uses query windows, dependencies and other constraints to avoid the transmission of irrelevant original events, reduce communication overhead and processing delays, and thus improve processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a flow chart of the efficient complex event processing method for end-to-end intelligent scenarios of the present invention.

[0020] Figure 2 Schematic diagram of the specific screening process of the double filtration strategy of the present invention.

[0021] Figure 3 This is a schematic diagram of the specific processing process of the complex event processing method of the present invention.

[0022] Figure 4 Schematic diagram comparing the average communication overhead of the processing method of the present invention and the existing method.

[0023] Figure 5 Schematic diagram comparing the average query delay between the processing method of the present invention and the existing method. DETAILED DESCRIPTION

[0024] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0025] In the embodiment of the present invention, the application of suspicious burglary event identification is taken as an example to illustrate the specific process of the efficient complex event processing method for end-to-end intelligent scenarios. Considering the suspicious burglary event processing scenario, the smart door lock can record the behavior and results of each attempt to enter the password; infrared sensors are deployed in the room to detect and record whether there is anyone in the room; optical sensors can detect the behavior of windows being opened and closed. In this embodiment, the sensor nodes represented by each sensor cannot communicate with each other and have limited computing power; the central node represented by the intelligent central control terminal or cloud server can communicate with each sensor node and has higher computing power.

[0026] like Figure 1 As shown, this embodiment discloses a complex event processing method, which implements efficient complex event processing through strategies such as double filtering. The method includes the following steps: (1) The central node receives the complex event pattern given by the user, which includes information such as variable names, attribute constraints, and time windows; (2) The central node determines the variable processing plan (i.e., the processing order and filtering logic of each variable) based on the characteristics of the complex event pattern and sends the variable processing plan to each sensor node; (3) The sensor node reads the events corresponding to each variable from the memory according to the independent constraints in the pattern and generates a pointer reference for binding. Then, it selects the variable to be processed first and sends the timestamps of all its binding events to the central node. (4) After the central node receives the timestamps from all sensor nodes, it constructs the initial feasible time interval set (i.e., the set of time intervals that may contain matching events) based on the received timestamps; (5) If there is no unprocessed variable in the variable processing plan, jump to step (14); otherwise, start a new communication round and process the next variable to be processed in the variable processing plan according to steps (6) to (13); (6) The central node sends the current feasible time interval set to each sensor node; (7) If there is no equivalent dependency constraint between the variables processed by the current communication round and the variables processed by the previous communication round, directly jump to step (11); otherwise, proceed according to steps (8) to (10); (8) The sensor node builds a window-sensing Bloom filter for the attribute value and timestamp information corresponding to the event based on the event bound to the processed variable in the equal value constraint condition, and sends it to the central node; (9) After receiving the window-aware Bloom filters from all sensor nodes, the central node performs a bitwise OR operation on these filters, merges them into a complete window-aware Bloom filter, and sends it back to each sensor node; (10) The sensor node detects the Bloom filter based on the complete window, checks whether the attribute value corresponding to the event bound to the current processing variable is within the time window or adjacent window where the event is located, and removes the reference binding of the variable to the event if not; (11) After all the equivalent dependency constraints are processed, the sensor node checks whether the timestamp of the event bound to the current processing variable falls within the current feasible time interval set. If not, the reference binding of the variable to the event is removed; (12) The sensor node constructs a new feasible time interval set based on the event bound to the current processing variable, takes the intersection with the current feasible time interval set, and sends the result back to the central node; (13) After receiving the feasible time interval sets from all edge nodes, the central processor takes the union of the feasible time interval sets as the updated current feasible time interval set; (14) After all variables to be processed in the variable processing plan are processed, the central node sends the final feasible time interval set to each sensor node. The sensor node selects the events whose timestamps fall into the set from the events bound to each variable and sends them back to the central node; (15) After receiving the filtered events from all sensor nodes, the central node transmits them to the matching engine for matching and obtains the final query results.

[0027] In the process of determining the processing order of each variable in the variable processing plan, in order to minimize the event processing volume in subsequent filtering, a greedy strategy is used to first select the variable with the least time window covered by the generated feasible time interval as the first variable to be processed; secondly, the variable with the lowest selection rate is preferentially selected from the variables without equal-value dependency constraints for processing; when all unselected variables have equal-value dependency constraints, the variable with the earliest selected corresponding dependent variable is preferentially selected from the variables that have equal-value dependency constraints only with the selected variables for processing. If there are multiple such variables, the variable with the lowest selection rate is selected; when all unselected variables have equal-value dependency constraints with other unselected variables, the variables with the lowest selection rate are selected in turn for processing.

[0028] The feasible time interval set of the present invention is generated by the timestamp of the original event. Assuming that the timestamp of an original event is , the time interval specified by the complex event pattern is , then the feasible time interval generated by this original event is for: , Here, the first variable refers to the current processing variable being the first variable in the variable processing plan, and the tail variable refers to the current processing variable being the last variable in the variable processing plan.

[0029] The present invention represents a set of feasible time intervals through an ordered array. The ordered array stores multiple time intervals that may contain matching results. Each time interval only records its start time and end time, and ensures that all time intervals do not overlap to reduce storage overhead. When performing operations such as searching, inserting, and deleting, a binary search method is used to quickly locate the associated time interval for operation.

[0030] When constructing a window-aware Bloom filter, the present invention uses multiple independent hash functions for all events bound to a variable. The hash value is calculated using the time window ID (derived by rounding the value obtained by dividing the event timestamp by the query window length) of the event timestamp as the hash function seed and the corresponding attribute value as the key. The corresponding bit in the bit array is then set to 1. Compared to traditional Bloom filters (which concatenate the time window ID and attribute value as the key and use a fixed hash seed to hash and store attribute values ​​and time window information), window-aware Bloom filters avoid string concatenation and reduce the length of the insertion key, achieving efficient insertion and search operations. Compared to key-value mapping structures, window-aware Bloom filters can significantly reduce the size of information that needs to be transmitted.

[0031] like Figure 2 As shown, in order to explain the basic principle and screening process of the double filtering strategy, this embodiment provides a specific process diagram of a simple example of screening using a double-layer filtering strategy. In this example, it is assumed that a complex event pattern "PATTERN (A N1*? B N2*? C) WITHIN '30' MINUTE" is given, wherein the variables A, B, and C in the pattern refer to events of event types A, B, and C respectively, variables N1 and N2 can match any event, and there is an attribute value constraint B.attr = C.attr between variables B and C. The symbol "*" is a quantifier symbol, indicating zero or more matches. The symbol "?" is a matching pattern modifier, indicating matching as few events as possible. The queried event set is given in Table 1.

[0032] Table 1 Example of event sets in complex event patterns Event Number Event type (type) Event attribute value (attr) timestamp e1 C 2 1:20 e2 C 5 1:30 e3 C 7 4:30 e4 B 5 1:20 e5 B 8 3:15 e6 B 9 4:20 e7 A 2 1:15 e8 A 3 2:45 e9 A 7 4:15

[0033] Assuming that the variables are processed in the order of CBA, variable C is processed first. Since variable C is the tail variable of the complex event pattern, the feasible time intervals generated by e1, e2, and e3 are [0:50, 1:20], [1:00, 1:30], and [4:00, 4:30], respectively, and the initial feasible time interval set is {[0:50, 1:30], [4:00, 4:30]}; then variable B is processed. Since e5 does not fall into the initial feasible time interval set, and the attr attribute value 9 of e6 is in the corresponding feasible time interval, the event bound to variable C cannot be found to match it, so the binding of variable B to e5 and e6 is removed; at this time, variable B is only bound to e4, whose timestamp is 1:20. According to the time interval generation formula mentioned above, the feasible time interval set generated by variable B is {[0:50, 1:50]}; then, the time interval set generated by variable B intersects with the initial feasible time interval set, resulting in the current feasible time interval set of {[0:50, 1:30]}; finally, variable A is processed and the current feasible time interval set is checked. It is found that e8 and e9 do not fall into the current feasible time interval set, so the binding of variable A to e8 and e9 is removed. Since variable A is the first variable of the complex event pattern, the feasible time interval set generated by variable A for e7 is {[1:15, 1:45]}, which intersects with the current feasible time interval set {[0:50, 1:30]} to obtain the final feasible time interval set of {[1:15, 1:30]}.

[0034] To further illustrate the process of this method, here's an example of a real-world IoT application scenario: In a smart home, suspicious burglary detection involves continuously monitoring for multiple failed door unlock attempts within 30 minutes, followed by detection of an open window before entry. The following describes the specific complex event pattern to be monitored (for simplicity, this example only considers a single failed door unlock attempt): SELECT * FROM Events MATCH_RECOGNIZE ( ORDER BY date MEASURES LF.id AS LFID, O.id AS OID, D.id AS DID ONE ROW PER MATCH AFTER MATCH SKIP TO NEXT ROW PATTERN (LF N1*? O N2*? D) WITHIN '30' MINUTE DEFINE LF AS LF.primary_type = 'LOGIN FAILURE', O AS O.primary_type = 'OPENING', D AS D.primary_type = 'DETECTED' AND D.room = O.room );

[0035] The MATCH_RECOGNIZE clause of this complex event query specifies the matching content and format. The ORDER BY clause specifies the sorting order of rows matching the pattern. The MEASURES clause specifies the content of the output results. ONE ROW PER MATCH specifies the output format of one row for each matching pattern. AFTER MATCH SKIP TO NEXT ROW specifies the starting position of the next match after a successful match. The PATTERN clause specifies the regular expression form of the complex event pattern. WITHIN specifies the time window limit for the occurrence of the complex event pattern. The DEFINE clause specifies the constraints on each variable in the complex event pattern. In this embodiment, the variable LF refers to the original event with the event type of "LOGIN FAILURE", indicating that the attempt to unlock the door lock failed; the variable O refers to the original event with the event type of "OPENING", indicating that the room window was opened; the variable D refers to the original event with the event type of "DETECTED", indicating that someone was detected entering the room; the room attribute values ​​of the variables O and D must be the same, indicating that the corresponding two original events occurred in the same room; the variables LF, O, and D are separated by skippable variables N1 and N2, respectively, indicating that there may be several other unrelated events between the corresponding events; the time window limit is 30 MINUTE, indicating that the time difference between the events matched by the first variable LF and the last variable D does not exceed 30 minutes.

[0036] In this embodiment, the specific steps of the complex event processing execution process are as follows: Figure 3 As shown: First, the central node determines the variable processing plan (i.e., the processing order and filtering logic for each variable) based on the characteristics of the complex event pattern. N1 and N2 are jump variables that can match any event, thereby filtering out irrelevant events occurring between the variables on their left and right sides. For non-jump variables, their selectivity is first determined through a sampling algorithm. Assuming variable O has the lowest selectivity, variable O is selected as the first variable to be processed. Among the remaining variables, variable LF does not have an equal dependency constraint and is selected as the second variable to be processed. Therefore, the final processing order of non-skipped variables is determined to be O-LF-D. In the first round of communication, which is the first communication round, the current processing variable is O. The central node sends the variable processing plan to each sensor node. The sensor node generates pointer references for the events corresponding to the independent constraints of the three variables O, LF, and D according to the received variable processing plan, and sends the timestamps of the events bound to variable O to the central node in the processing order (before the final feasible time interval set is determined, the events bound to the variables are not matched); In the second round of communication, which is the second communication round, the current processing variable is LF. The central node constructs an ordered array based on the received timestamp to store the initial feasible time interval set (that is, the set of time intervals that may contain matching events) and sends it to each sensor node. The sensor node filters out the events that do not fall into the feasible time interval set from the events bound to the variable LF, removes LF's binding to these events, and then constructs a new feasible time interval set based on the events bound to LF, takes the intersection with the current feasible time interval set, and sends the result back to the central node; In the third round of communication, which is the third communication round, the current processing variable is D. The central node takes the union of the feasible time interval sets sent by each sensor node as the new current feasible time interval set and sends it to each sensor node. Since the variable D processed by the current communication round and the variable O processed by the previous communication round have an equal dependency constraint on the room attribute (that is, a dependency constraint involving only two variables and their corresponding attributes, and using an equal sign for comparison, such as D.room = O.room in the given pattern), each sensor node constructs a window-aware Bloom filter based on the room attribute value and timestamp information of the event bound to variable O, and sends it to the central node; In the fourth round of communication, which is still the third round, the current processing variable is D. The central node performs a bitwise OR operation on the window-aware Bloom filter sent by each sensor node, merges it to obtain a complete window-aware Bloom filter and sends it back to each sensor node. The sensor node checks whether the attribute value corresponding to the event bound to the current processing variable D is in the time window or adjacent window where the event is located, and whether the timestamp of the event falls within the current feasible time interval set. If one condition is not met, the binding of D to the event is removed, and then a new feasible time interval set is constructed based on the event bound to D, and the intersection with the current feasible time interval set is taken, and the result is sent back to the central node. In the fifth round of communication, all variables in the variable processing plan have been processed. The central node takes the union of the feasible time interval sets sent by each sensor node as the final feasible time interval set and sends it to each sensor node. Each sensor node filters the events whose timestamps fall within the final feasible time interval set from the events bound to variables O, LF, and D, and sends them back to the central node. Finally, the central node transmits the received events to the matching engine for matching to obtain the final query results.

[0037] Furthermore, the performance of the efficient complex event processing method for end-to-end intelligent scenarios described in the present invention was verified under two real data sets. Here, Thrift was used to build a node communication framework, and the complex event processing method described in the present invention was implemented using JAVA language (DFS is used to refer to this method), and compared with the following three methods: (1) Single-round predicate pushdown, which pushes independent constraints from the central node to the sensor node to filter irrelevant original events before the sensor node transmits the event to the central node (Pushdown is used to refer to this method); (2) Multi-round predicate pushdown, which determines the feasible time interval set through multiple rounds of communication, and then pushes the independent constraints and the feasible time interval set to the sensor node to filter the event before the sensor node transmits the event to the central node (Pushdown+ is used to refer to this method); (3) Multi-round push-pull, which gradually pushes all event window constraints and predicate constraints to the sensor node for filtering through multiple rounds of communication (Pushpull is used to refer to this method). The experimental results are as follows: (1) Figure 4 The data transmission volume comparison between the present invention and other methods when executing various complex event patterns (containing only independent constraints, containing independent constraints and equivalent dependent constraints, containing all types of constraints) 100 times each in various data sets is shown. Compared with the Pushdown method, the present invention reduces the data transmission volume by 85.32% and 87.9% on the citibike and cluster data sets respectively; compared with the Pushdown+ method, the present invention reduces the data transmission volume by 82.9% and 53.4% ​​on the citibike and cluster data sets respectively; compared with the Pushpull method, the present invention reduces the data transmission volume by 0.3% and 50.0% on the citibike and cluster data sets respectively; (2) Figure 5The query latency comparison between the present invention and other methods when executing multiple complex event patterns 100 times each on various data sets is shown. Compared with the Pushdown method, the present invention reduces the query latency by 3.4 times and 21.5 times on the citibike and cluster data sets, respectively; compared with the Pushdown+ method, the present invention reduces the query latency by 3.5 times and 3.6 times on the citibike and cluster data sets, respectively; compared with the Pushpull method, the present invention reduces the query latency by 2.3 times and 3.1 times on the citibike and cluster data sets, respectively.

[0038] In summary, this efficient complex event processing method for end-to-end intelligent scenarios can reduce the communication overhead between sensor nodes and central nodes, avoid the transmission of irrelevant original events, reduce the overall query delay, and improve the speed of complex event processing.

[0039] Based on the specific implementation steps and verification example results of the above-mentioned efficient complex event processing method for end-to-end intelligent scenarios, the present invention also provides a complex event processing method for an IoT end-to-end intelligent scenario executed on a sensor node, comprising the following steps: Receive the variable processing plan from the central node, generate reference bindings for the events corresponding to each variable according to the variable processing plan, and then send the timestamp of the first event bound to the variable to be processed to the central node. The central node constructs the initial feasible time interval set based on the received timestamp and processes the remaining variables in sequence according to the variable processing plan; In a communication round, the current feasible time interval set is received from the central node. If there is an equal value dependency constraint between the variable processed by the current communication round and the variable processed by the previous communication round, the window-aware Bloom filter is constructed using the attribute values ​​and timestamp information corresponding to the events bound to the processed variables and sent to the central node. The central node merges them into a complete window-aware Bloom filter, and then removes the reference binding of the event whose corresponding attribute value is not in its time window or adjacent window from the events bound to the current processing variable according to the complete window-aware Bloom filter; If the current processing variable does not have an equal dependency constraint or the equal dependency constraint of the current processing variable has been processed, remove the event reference bound to the current processing variable whose timestamp does not fall within the current feasible time interval set; A new feasible time interval set is constructed based on the event list bound to the current processing variable, and the intersection with the current feasible time interval set is taken and sent back to the central node. The central node merges the new current feasible time interval set to complete a communication round. After all the variables to be processed are processed, the final feasible time interval set is received from the central node. Events with timestamps falling within the final feasible time interval set are selected from the events bound to each variable and sent back to the central node. The central node then matches the obtained events to obtain the final query results.

[0040] The present invention also provides an electronic device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the complex event processing method based on the intelligent scenario of the Internet of Things end, which are executed on the sensor node as described above, are implemented.

[0041] The present invention also provides a method for processing complex events in an intelligent scenario at an IoT terminal executed on a central node, the method comprising the following steps: Determine the variable processing plan based on the characteristics of the complex event pattern and send it to each sensor node, which generates a reference binding for the event corresponding to each variable; Receive the timestamp of the event bound to the first variable to be processed in the variable processing plan from the sensor node, construct an initial feasible time interval set, and process the remaining variables in sequence according to the variable processing plan; In a communication round, the current feasible time interval set is sent to each sensor node, and the sensor node updates the feasible time interval set. When the sensor node determines that there is an equal value dependency constraint between the variable processed by the current communication round and the variable processed by the previous communication round, and uses the attribute value and timestamp information corresponding to the event bound to the processed variable to construct a window-aware Bloom filter, the window-aware Bloom filter is received from the sensor node and merged into a complete window-aware Bloom filter, and then sent back to each sensor node. Each sensor node removes the reference binding of the event whose corresponding attribute value is not in its time window or adjacent window from the event bound to the current processing variable according to the complete window-aware Bloom filter. In addition, when there is no equal value dependency constraint on the current processing variable or the equal value dependency constraint of the current processing variable is processed, the sensor node removes the event reference bound to the current processing variable whose timestamp does not fall within the current feasible time interval set, and constructs a new feasible time interval set based on the event list bound to the current processing variable, and takes the intersection with the current feasible time interval set to obtain the updated feasible time interval set. Receive the updated feasible time interval set from each sensor node, merge it to get the new current feasible time interval set, and complete a communication round; After all the variables to be processed are processed, the final feasible time interval set is sent to each sensor node. The sensor node selects the events whose timestamps fall within the final feasible time interval set from the events bound to each variable, and matches them according to the events filtered by the sensor node to obtain the final query result.

[0042] The present invention also provides an electronic device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the complex event processing method based on the intelligent scenario of the Internet of Things end, which are executed on the central node as described above, are implemented.

[0043] The present invention also provides a complex event processing system in an intelligent scenario of an Internet of Things terminal, comprising: A sensor node device for generating, storing, and partially processing data in an end-to-end intelligent scenario, wherein the processing is performed according to the above-described complex event processing method in an IoT end-to-end intelligent scenario executed on a sensor node; The central node device is used to communicate with each sensor node device and implement complex event processing according to the complex event processing method in the intelligent scenario of the Internet of Things end executed on the central node as described above.

[0044] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the complex event processing method based on the intelligent scenario of the Internet of Things end executed on the sensor node or the complex event processing method based on the intelligent scenario of the Internet of Things end executed on the central node are implemented as described above.

[0045] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A complex event processing method in an intelligent scenario of an Internet of Things terminal, characterized in that: Applied to a sensor node, the method includes: Receive the variable processing plan from the central node, generate reference bindings for the events corresponding to each variable according to the variable processing plan, and then send the timestamp of the first event bound to the variable to be processed to the central node. The central node constructs the initial feasible time interval set based on the received timestamp and processes the remaining variables in sequence according to the variable processing plan; In a communication round, the current feasible time interval set is received from the central node. If there is an equal value dependency constraint between the variable processed by the current communication round and the variable processed by the previous communication round, the window-aware Bloom filter is constructed using the attribute values ​​and timestamp information corresponding to the events bound to the processed variables and sent to the central node. The central node merges them into a complete window-aware Bloom filter, and then removes the reference binding of the event whose corresponding attribute value is not in its time window or adjacent window from the events bound to the current processing variable according to the complete window-aware Bloom filter; If the current processing variable does not have an equal dependency constraint or the equal dependency constraint of the current processing variable has been processed, remove the event reference bound to the current processing variable whose timestamp does not fall within the current feasible time interval set; A new feasible time interval set is constructed based on the event list bound to the current processing variable, and the intersection with the current feasible time interval set is taken and sent back to the central node. The central node merges the new current feasible time interval set to complete a communication round. After all the variables to be processed are processed, the final feasible time interval set is received from the central node. Events with timestamps falling within the final feasible time interval set are selected from the events bound to each variable and sent back to the central node. The central node then matches the obtained events to obtain the final query results.

2. The method according to claim 1, characterized in that When constructing a window-aware Bloom filter, multiple independent hash functions are used for all events bound to the variable. The time window ID of the event timestamp is used as the hash function seed and the corresponding attribute value is used as the key to calculate the hash value, and the corresponding bit in the bit array is set to 1. The time window ID is obtained by rounding the value obtained by dividing the event timestamp by the query window length.

3. An electronic device, characterized in that: include: one or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the complex event processing method in the intelligent scenario of the Internet of Things end as described in any one of claims 1-2 are implemented.

4. A complex event processing method in an intelligent scenario of an Internet of Things terminal, characterized in that: Applied to a central node, the method includes: Determine the variable processing plan based on the characteristics of the complex event pattern and send it to each sensor node, which generates a reference binding for the event corresponding to each variable; Receive the timestamp of the event bound to the first variable to be processed in the variable processing plan from the sensor node, construct an initial feasible time interval set, and process the remaining variables in sequence according to the variable processing plan; In a communication round, the current feasible time interval set is sent to each sensor node, and the sensor node updates the feasible time interval set. When the sensor node determines that there is an equal value dependency constraint between the variable processed by the current communication round and the variable processed by the previous communication round, and uses the attribute value and timestamp information corresponding to the event bound to the processed variable to construct a window-aware Bloom filter, the window-aware Bloom filter is received from the sensor node and merged into a complete window-aware Bloom filter, and then sent back to each sensor node. Each sensor node removes the reference binding of the event whose corresponding attribute value is not in its time window or adjacent window from the event bound to the current processing variable according to the complete window-aware Bloom filter. In addition, when there is no equal value dependency constraint on the current processing variable or the equal value dependency constraint of the current processing variable is processed, the sensor node removes the event reference bound to the current processing variable whose timestamp does not fall within the current feasible time interval set, and constructs a new feasible time interval set based on the event list bound to the current processing variable, and takes the intersection with the current feasible time interval set to obtain the updated feasible time interval set. Receive the updated feasible time interval set from each sensor node, merge it to get the new current feasible time interval set, and complete a communication round; After all the variables to be processed are processed, the final feasible time interval set is sent to each sensor node. The sensor node selects the events whose timestamps fall within the final feasible time interval set from the events bound to each variable, and matches them according to the events filtered by the sensor node to obtain the final query result.

5. The method according to claim 4, characterized in that In the process of determining the processing order of each variable in the variable processing plan, a greedy strategy is used to first select the variable with the least time window covered by the generated feasible time interval as the first variable to be processed; secondly, the variable with the lowest selection rate is selected from the variables without equal-value dependency constraints for processing; when all unselected variables have equal-value dependency constraints, the variable with the earliest selected corresponding dependent variable is selected from the variables that have equal-value dependency constraints only with the selected variables for processing. If there are multiple such variables, the variable with the lowest selection rate is selected; when all unselected variables have equal-value dependency constraints with other unselected variables, the variables with the lowest selection rate are selected in turn for processing.

6. The method according to claim 4, characterized in that The set of feasible time intervals is generated by the timestamps of the original events. Suppose the timestamp of an original event is , the time interval specified by the complex event pattern is , then the feasible time interval generated by this original event is for: , The first variable refers to the current processing variable being the first variable in the complex event pattern, and the tail variable refers to the current processing variable being the last variable in the complex event pattern.

7. The method according to claim 4, characterized in that The set of feasible time intervals is represented by an ordered array, which stores multiple time intervals that may contain matching results. Each time interval only records its start time and end time, and all time intervals do not overlap with each other. When performing search, insertion, and deletion operations, the binary search method is used to quickly locate the associated time interval for operation.

8. An electronic device, characterized in that: include: one or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the complex event processing method in the intelligent scenario of the Internet of Things end as described in any one of claims 4-7 are implemented.

9. A complex event processing method in an intelligent scenario of an Internet of Things terminal, characterized in that: The following steps are involved: (1) The central node receives the complex event pattern given by the user, which includes variable names, attribute constraints, and time window information; (2) The central node determines the variable processing plan based on the characteristics of the complex event pattern and sends the variable processing plan to each sensor node. The variable processing plan includes the processing order and filtering logic of each variable; (3) The sensor node reads the events corresponding to each variable from the memory according to the independent constraints in the complex event pattern and generates a pointer reference for binding. Then, it selects the variable to be processed first and sends the timestamps of all its bound events to the central node. (4) After receiving the timestamps from all sensor nodes, the central node constructs an initial feasible time interval set based on the received timestamps. The initial feasible time interval set is a set of time intervals that may contain matching events. (5) If there is no unprocessed variable in the variable processing plan, jump to step (14); otherwise, start a new communication round and process the next variable to be processed in the variable processing plan according to steps (6) to (13); (6) The central node sends the current feasible time interval set to each sensor node; (7) If there is no equivalent dependency constraint between the variables processed by the current communication round and the variables processed by the previous communication round, directly jump to step (11); otherwise, proceed according to steps (8) to (10); (8) The sensor node builds a window-sensing Bloom filter for the attribute value and timestamp information corresponding to the event based on the event bound to the processed variable in the equal value constraint condition, and sends it to the central node; (9) After receiving the window-aware Bloom filters from all sensor nodes, the central node performs a bitwise OR operation on these filters, merges them into a complete window-aware Bloom filter, and sends it back to each sensor node; (10) The sensor node detects the Bloom filter based on the complete window, checks whether the attribute value corresponding to the event bound to the current processing variable is within the time window or adjacent window where the event is located, and removes the reference binding of the variable to the event if not; (11) After all the equivalent dependency constraints are processed, the sensor node checks whether the timestamp of the event bound to the current processing variable falls within the current feasible time interval set. If not, the reference binding of the variable to the event is removed; (12) The sensor node constructs a new feasible time interval set based on the event bound to the current processing variable, takes the intersection with the current feasible time interval set, and sends the result back to the central node; (13) After the central node receives the feasible time interval sets from all sensor nodes, it takes the union set as the updated current feasible time interval set; (14) After all the variables to be processed in the variable processing plan are processed, the central node sends the final feasible time interval set to each sensor node. The sensor node selects the events whose timestamps fall within the final feasible time interval set from the events bound to each variable and sends them back to the central node; (15) After receiving the filtered events from all sensor nodes, the central node transmits them to the matching engine for matching and obtains the final query results.

10. A complex event processing system in an intelligent scenario of the Internet of Things, characterized by: include: A sensor node device for generating, storing, and partially processing data in an end-smart scenario, wherein the partial processing is performed by the complex event processing method in an end-smart scenario of the Internet of Things according to any one of claims 1-2; The central node device is used to communicate with each sensor node device and implement complex event processing according to the complex event processing method in the intelligent scenario of the Internet of Things terminal according to any one of claims 4-7.

Citation Information

Patent Citations

  • Complex event processing system and method based on edge computing for Internet of Things

    CN112653749A

  • Complex event matching method and device based on ordered event list and storage medium

    CN114610978A

  • Multi-mode complex event detection and optimization method for semi-structured data

    CN119988681A

  • Distributed complex event processing

    US9992269B1