A method, device and equipment for processing stream data

By combining the method of rolling time windows and sliding time windows, the problem of insufficient accuracy and timeliness of streaming data detection in the existing technology is solved, and higher detection accuracy and real-time performance are achieved.

CN114968638BActive Publication Date: 2024-08-27CCB FINTECH CO LTD
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202210551366.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2024-08-27
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

In the existing technology, only one time window is used to detect the response to a specific event in the streaming data, resulting in low accuracy and poor timeliness of the detection results. It is impossible to accurately determine whether the event has timed out or caused repeated detection.

Method used

A combination method of rolling time window and sliding time window is adopted. The rolling time window is used to extract the target flow data, and the sliding time window is used to determine whether there is an abnormality in the event sequence. Through adjacent continuous and non-overlapping rolling time windows and the existence of overlap, The sliding time window is used to improve detection accuracy and timeliness.

Benefits of technology

It improves the detection accuracy and timeliness of specific event responses in streaming data, and avoids inaccuracies in detection results and repeated detection problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968638B
    Figure CN114968638B
Patent Text Reader

Abstract

The embodiment of the present invention relates to the field of data processing technology, and discloses a method, device and equipment for processing stream data. The method includes capturing real-time stream data; extracting target stream data from the real-time stream data using a rolling time window; and judging whether there is an abnormality in the event occurrence sequence of sequential events in the target stream data based on a sliding time window. The present application judges whether there is an abnormality in the event occurrence sequence in the target stream data in the real-time stream data by using a rolling time window and a sliding time window at the same time, and solves the technical problem of low detection result accuracy and poor timeliness caused by using only one time window to detect the response of a specific event in the stream data, thereby achieving the technical effect of improving the detection accuracy of the response of a specific event in the stream data and improving the detection timeliness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a method, device and equipment for processing stream data. Background Art

[0002] In the era of big data, streaming data contains huge commercial and social value. How to mine valuable information from large-scale streaming data is the main problem faced by enterprises and organizations in their digital transformation. In order to fully tap the value of big data, data processing technology has mainly gone through three stages: offline batch processing, quasi-real-time incremental processing, and real-time streaming processing. Among them, real-time streaming data processing is a new data-intensive application that has emerged in the era of mobile Internet and the Internet of Things. That is, data continues to arrive in the form of large, fast, and time-varying streams; and real-time stream processing technology is designed to process this type of streaming data with low latency, so as to achieve the purpose of real-time monitoring of data changes and rapid response to specific events.

[0003] In the current process of processing streaming data, usually only one time window is used to detect the response of specific events in streaming data. However, if only the rolling time window is used, when event A and event B are in two consecutive windows, it is impossible to accurately determine whether event B has timed out; if only the sliding time window is used, repeated detection will occur, which may easily lead to inaccurate detection results or the inability to perform real-time detection. Summary of the invention

[0004] The embodiments of the present invention provide a method, apparatus and device for processing stream data, which solve the technical problem in the prior art of using only one time window to detect the response of a specific event in the stream data, resulting in low detection result accuracy and poor timeliness.

[0005] In a first aspect, an embodiment of the present invention provides a method for processing stream data, the method comprising:

[0006] Capture real-time streaming data;

[0007] Extracting target stream data from the real-time stream data using a rolling time window, wherein the rolling time window is a time window in which two adjacent time windows are continuous and non-overlapping, and the target stream data is at least two sequential events with the shortest interval time captured in the real-time stream data according to the event occurrence sequence;

[0008] Based on a sliding time window, it is determined whether there is an abnormality in the event occurrence sequence of sequential events in the target stream data, wherein the sliding time window is a time window in which there is an overlap between two adjacent time windows, and the window length of the sliding time window is greater than the sliding length of the sliding time window.

[0009] In a second aspect, an embodiment of the present invention further provides a stream data processing system, wherein the stream data processing system performs corresponding actions based on a structured query language database, and the stream data processing system includes:

[0010] A stream data capture unit, used for capturing real-time stream data;

[0011] A stream data extraction unit, used for extracting target stream data from the real-time stream data by using a rolling time window, wherein the rolling time window is a time window in which two adjacent time windows are continuous and non-overlapping, and the target stream data is at least two sequential events with the shortest interval time captured in the real-time stream data according to the event occurrence sequence;

[0012] A stream data anomaly judgment unit is used to judge whether there is an anomaly in the event occurrence sequence of sequential events in the target stream data based on a sliding time window, wherein the sliding time window is a time window in which there is an overlap between two adjacent time windows, and the window length of the sliding time window is greater than the sliding length of the sliding time window.

[0013] In a third aspect, an embodiment of the present invention further provides a stream data processing device, the stream data processing device comprising:

[0014] one or more processors;

[0015] A storage device for storing one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement any stream data processing method as described in the first aspect of the embodiment of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any stream data processing method as described in the first aspect of the embodiment of the present invention.

[0018] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements any stream data processing method as described in the first aspect of the embodiment of the present invention.

[0019] The embodiment of the present invention discloses a method, device and equipment for processing stream data, the method comprising capturing real-time stream data; extracting target stream data from the real-time stream data using a rolling time window; judging whether there is an abnormality in the event occurrence sequence of sequential events in the target stream data based on a sliding time window. The present application simultaneously uses a rolling time window and a sliding time window to judge whether there is an abnormality in the event occurrence sequence in the target stream data in the real-time stream data, and solves the technical problem of low detection result accuracy and poor timeliness caused by using only one time window to detect the response of a specific event in the stream data, thereby achieving the technical effect of improving the detection accuracy of the response of a specific event in the stream data and improving the detection timeliness. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of a stream data processing method provided by an embodiment of the present invention;

[0021] Figure 2 is a schematic diagram of a rolling time window provided by an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of a sliding time window provided by an embodiment of the present invention;

[0023] Figure 4 is a flow chart of another stream data processing method provided by an embodiment of the present invention;

[0024] Figure 5 is a flow chart of another stream data processing method provided by an embodiment of the present invention;

[0025] Figure 6 is a structural diagram of a stream data processing system provided by an embodiment of the present invention;

[0026] Figure 7 It is a structural schematic diagram of a stream data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0028] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present invention are used to distinguish different objects, rather than to limit a specific order. The following embodiments of the present invention can be implemented separately, or in combination with each other, and the embodiments of the present invention do not impose specific limitations on this.

[0029] Figure 1 It is a flow chart of a stream data processing method provided by an embodiment of the present invention. The stream data processing method can be applied to all business scenarios that require stream data processing, such as e-commerce shopping scenarios, industrial Internet of Things scenarios, Internet of Vehicles scenarios, financial management scenarios, etc. The stream data processing method can be executed by a stream data processing system, and the device can be implemented in hardware and / or software, and can generally be integrated into a server. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.

[0030] like Figure 1 As shown, the stream data processing method specifically includes the following steps:

[0031] S101, capture real-time streaming data.

[0032] S102, extracting target stream data from real-time stream data using a rolling time window, wherein the rolling time window is two adjacent time windows that are continuous and non-overlapping, and the target stream data is at least two sequential events with the shortest time interval captured in the real-time stream data according to the event occurrence sequence.

[0033] For example, taking the window length of the rolling time window as 30s, Figure 2 is a schematic diagram of a rolling time window provided by an embodiment of the present invention, see Figure 2 The characteristics of the rolling time window are that it starts at a starting time, the length of the window is fixed, and the two windows before and after are continuous in time but do not overlap, such as Figure 2 The first rolling time window shown in the figure is 0-30s, the second rolling time window is 30-60s and the third rolling time window is 69-90s. The window lengths of the three are all fixed at 30s, which are continuous in time and have no overlap.

[0034] Figure 2 The captured real-time stream data is given as an example, including events A1, A2, A3 and events B1, B2, where A1, A2, A3 means that event A has occurred three times, B1, B2 means that event B has occurred twice, and event A occurs before event B. Among the many events A and B in the same rolling time window, the interval between event A3 and event B1 is the shortest, so they are the captured target stream data.

[0035] By using a rolling time window to filter events that occur repeatedly within a window, the detection timeliness of event responses is improved. At the same time, it also prepares for subsequent detection of whether abnormalities occur in event responses, which helps to improve detection accuracy.

[0036] S103, judging whether there is an abnormality in the event occurrence sequence of sequential events in the target stream data based on a sliding time window, wherein the sliding time window is a time window in which there is an overlap between two adjacent time windows, and the window length of the sliding time window is greater than the sliding length of the sliding time window.

[0037] Specifically, Figure 3 is a schematic diagram of a sliding time window provided by an embodiment of the present invention, see Figure 3 Taking the window length of the sliding time window as 60s and the sliding length as 30s as an example, the first sliding time window is 1-60s, the second sliding time window is 30-90s, and the third sliding time window is 60-120s. Obviously, there is an overlap of 30-60s between the first sliding time window and the second sliding time window, and there is an overlap of 60-90s between the second sliding time window and the third sliding time window.

[0038] After obtaining the target stream data, you need to determine the occurrence position of the sequential events in the target stream data relative to the sliding time window, see Figure 3 , the positions of the sequential events in the target stream data relative to the sliding time window include the following situations: (1) Event A3 falls within the first sliding time window, and event B1 occurs at the overlap of the first sliding time window and the second sliding time window; (2) Event A3 falls within the overlap of the first sliding time window and the second sliding time window, and event B2 occurs within the second sliding time window; (3) Event A3 falls within the overlap of the second sliding time window and the third sliding time window, and event B2 does not occur within the third sliding time window. Through the occurrence positions of the sequential events in the above-mentioned target stream data, it is further determined whether there are abnormalities in the event occurrence sequence of the sequential events in the target stream data. By making a detailed division of the possible occurrence positions of the sequential events in the target stream data within the sliding time window, the accuracy of the judgment is higher.

[0039] The present application uses a rolling time window and a sliding time window at the same time to judge whether there is an abnormal event sequence in the target stream data in the real-time stream data. It solves the technical problem of low detection accuracy and poor timeliness caused by using only one time window to detect the response of a specific event in the stream data. It achieves the technical effect of improving the detection accuracy of the response of a specific event in the stream data and improving the timeliness of detection.

[0040] On the basis of the above technical solutions, Figure 4 is a flow chart of another method for processing stream data provided by an embodiment of the present invention. Figure 4 As shown, S102 specifically includes:

[0041] S401, extracting the first event with the largest occurrence time in each rolling time window.

[0042] S402, extracting the second event in each rolling time window that has the shortest time interval from the first event, wherein the first event occurs before the second event, and the first event and the second event are target stream data.

[0043] Specifically, the maximum occurrence time represents the time length from the start time of a rolling time window to the nearest position of the end time of the rolling time window, for example, see Figure 2 , the first event is recorded as event A, and the second event is recorded as event B. Since event A3 is closest to the end time of the first rolling window, event A3 is the first event with the largest occurrence time. Obviously, event A3 with the largest occurrence time is also the first event that appears last in a rolling time window. Event B1 is the next event with the shortest occurrence time from the first event A3, that is, event A3 and event B1 are the first and second events with the shortest occurrence time interval. Therefore, for Figure 2 For the real-time stream data shown in , event A3 and event B1 are recorded as target stream data.

[0044] On the basis of the above technical solutions, after S402, the stream data processing method further includes: if there is no second event within a rolling time window, determining that the occurrence of the second event is abnormal, and executing an early warning prompt action.

[0045] Specifically, when using a rolling time window to extract target flow data, it is assumed that the first event and the second event need to occur within a preset time interval, and the preset time interval is equal to the window length of a rolling time window. If the second event is not captured within the same rolling time window, it indicates that the second event did not occur within the preset time interval. It can be determined that the occurrence of the second event is abnormal, and an early warning prompt action needs to be executed to issue an early warning prompt to the user.

[0046] On the basis of the above technical solutions, Figure 5 is a flow chart of another method for processing stream data provided by an embodiment of the present invention. Figure 5 As shown, S103 specifically includes:

[0047] S501, based on the sliding time window, determine the position where the occurrence time of the target stream data falls into the sliding time window, and obtain position information;

[0048] S502: Determine whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on the position information.

[0049] Specifically, see Figure 3, the position information of the sequential events in the target stream data determined relative to the sliding time window includes the following situations: (1) the first event (i.e., event A3) falls within the first sliding time window, and the second event (i.e., event B1) occurs at the overlap of the first sliding time window and the second sliding time window; (2) the first event (i.e., event A3) falls within the overlap of the first sliding time window and the second sliding time window, and the second event (i.e., event B1) occurs within the second sliding time window; (3) the first event (i.e., event A3) falls within the overlap of the second sliding time window and the third sliding time window, and the second event (i.e., event B1) does not occur within the third sliding time window.

[0050] Optionally, if the first event falls within the first sliding time window and the second event falls within the overlapping position of the first sliding time window and the second sliding time window, then a first interval duration between the first event and the second event is calculated, wherein the first sliding time window precedes the second sliding time window;

[0051] The first interval duration is compared with the preset interval duration to determine whether there is an abnormality in the event occurrence sequence of the first event and the second event.

[0052] Specifically, when situation (1) occurs, the time interval between the first event and the second event is directly calculated, and the calculated time interval is compared with the preset time interval. If it exceeds the preset time interval, it indicates that there is an abnormality in the event sequence of the first event and the second event.

[0053] Optionally, if the first event falls into the overlapping position of the first sliding time window and the second sliding time window, and the second event falls into the second sliding time window, then a first interval duration between the first event and the second event is calculated, wherein the first sliding time window precedes the second sliding time window;

[0054] The first interval duration is compared with the preset interval duration to determine whether there is an abnormality in the event occurrence sequence of the first event and the second event.

[0055] Specifically, when situation (2) occurs, as in situation (1), the time interval between the occurrence of the first event and the second event is directly calculated, and the calculated time interval is compared with the preset time interval. If it exceeds the preset time interval, it indicates that there is an abnormality in the event occurrence sequence of the first event and the second event.

[0056] Optionally, if the first event falls into the overlapping position of the first sliding time window and the second sliding time window, and the second event does not fall into the second sliding time window, it is determined that there is an anomaly in the event occurrence sequence of the first event and the second event, wherein the first sliding time window precedes the second sliding time window.

[0057] Specifically, when situation (3) occurs, since the second event does not fall within the second sliding time window, it indicates that the second event timeout has not occurred, so it can be directly determined that there is an abnormality in the event sequence of the first event and the second event. It should be noted that the first sliding window time and the second sliding window time here are equivalent to Figure 3 The second sliding window time and the third sliding window time shown in .

[0058] On the basis of the above technical solutions, after S103, the stream data processing method further includes:

[0059] If it is determined whether there is an abnormality in the event occurrence sequence of the sequential time in the target stream data, an early warning action is executed.

[0060] For example, assuming that in an e-commerce shopping scenario, when it is found that a user enters a store to browse products (first event), but does not purchase products after a certain period of time (second event), a coupon can be sent to the user (early warning prompt action) to promote user consumption; assuming that in an industrial Internet of Things scenario, it is detected that a button of a machine is pressed (first event), but the next operation is not performed after a certain period of time (second event), and an alarm needs to be triggered in real time (early warning prompt action) to notify the staff to avoid production accidents; assuming that in a car networking scenario, it is detected that a car is parked at a temporary parking spot (first event), and it has not left after the time allowed for temporary parking (second event), and a message can be sent to the owner (early warning prompt action) to remind the owner to leave as soon as possible to avoid affecting traffic; assuming that in a financial management scenario, it is detected that a user enters the financial product purchase page (first event), and does not click the purchase button after a certain period of time (second event), and recommended information about related financial products can be pushed to the user (early warning prompt action) to help the user choose a suitable financial product.

[0061] Figure 6 is a structural diagram of a stream data processing system provided by an embodiment of the present invention. The stream data processing system performs corresponding actions based on a structured query language database (Structured Query Language, SQL), such as Figure 6 As shown, the stream data processing system includes:

[0062] A stream data capture unit 61, used to capture real-time stream data;

[0063] The stream data extraction unit 62 is used to extract target stream data from the real-time stream data using a rolling time window, wherein the rolling time window is a time window in which two adjacent time windows are continuous and non-overlapping, and the target stream data is a sequence of events with the shortest interval captured according to an event occurrence sequence in at least two real-time stream data;

[0064] The stream data anomaly judgment unit 63 is used to judge whether there is an anomaly in the event occurrence sequence of sequential events in the target stream data based on a sliding time window, wherein the sliding time window is a time window in which there is an overlap between two adjacent time windows, and the window length of the sliding time window is greater than the sliding length of the sliding time window.

[0065] It should be noted that since the stream data processing system executes corresponding actions based on SQL, it does not need to use traditional programming languages ​​(such as Java / Python). SQL is an advanced non-procedural programming language that allows users to define and process data on high-level data structures (shielding the underlying technical details and system differences). It can run in different stream data processing systems. By using simple and standard SQL, it solves the widely used problems such as timeout event sequence monitoring in real-time data streams.

[0066] Optionally, the stream data extraction unit 62 includes:

[0067] A first extraction subunit is used to extract the first event with the largest occurrence time in each rolling time window;

[0068] The second extraction subunit is used to extract the second event with the shortest time from the first event in each rolling time window, wherein the first event occurs before the second event, and the first event and the second event are target stream data.

[0069] Optionally, the stream data processing system further includes:

[0070] The first early warning unit is used to determine that the occurrence of the second event is abnormal and perform an early warning prompt action if the second extraction subunit fails to extract the second event within a rolling time window.

[0071] Optionally, the flow data anomaly judgment unit 63 includes:

[0072] A position determination subunit, used to determine the position where the occurrence time of the target stream data falls into the sliding time window based on the sliding time window, and obtain position information;

[0073] The abnormality determination subunit is used to determine whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on the position information.

[0074] Optionally, if the location information determined by the location determination subunit is that the first event falls within the first sliding time window, and the second event falls within the overlapping position of the first sliding time window and the second sliding time window, the abnormality determination subunit calculates a first interval duration between the first event and the second event, wherein the first sliding time window precedes the second sliding time window;

[0075] The abnormality determination subunit is further used to compare the first interval duration with the preset interval duration to determine whether there is an abnormality in the event occurrence sequence of the first event and the second event.

[0076] Optionally, if the location information determined by the location determination subunit is that the first event falls into the overlapping position of the first sliding time window and the second sliding time window, and the second event falls into the second sliding time window, the abnormality determination subunit calculates a first interval duration between the first event and the second event, wherein the first sliding time window precedes the second sliding time window;

[0077] The abnormality determination subunit is further used to compare the first interval duration with the preset interval duration to determine whether there is an abnormality in the event occurrence sequence of the first event and the second event.

[0078] Optionally, if the location information determined by the location determination subunit is that the first event falls into the overlapping position of the first sliding time window and the second sliding time window, and the second event does not fall into the second sliding time window, the anomaly determination subunit determines that there is an anomaly in the event occurrence sequence of the first event and the second event, wherein the first sliding time window precedes the second sliding time window.

[0079] Optionally, the stream data processing system further includes:

[0080] The second warning unit is used to execute a warning prompt action if the stream data abnormality judgment unit 63 judges whether there is an abnormality in the event occurrence sequence of the sequential time in the target stream data.

[0081] The implementation principle and technical effects of the system provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0082] The stream data processing system provided by the embodiment of the present invention has the same technical features as the stream data processing method provided by the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0083] Figure 7 A structural diagram of a stream data processing device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the stream data processing device includes a processor 71, a memory 72, an input device 73 and an output device 74; the number of processors 71 in the stream data processing device can be one or more. Figure 7 A processor 71 is taken as an example; the processor 71, the memory 72, the input device 73 and the output device 74 in the stream data processing device can be connected by a bus or other means. Figure 7The example of connecting through bus is taken in the following.

[0084] The memory 72 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the stream data processing method in the embodiment of the present invention (for example, the stream data capture unit 61, the stream data extraction unit 62 and the stream data abnormality judgment unit 63 in the stream data processing system). The processor 71 executes various functional applications and data processing of the stream data processing device by running the software programs, instructions and modules stored in the memory 72, that is, implements the above-mentioned stream data processing method.

[0085] The memory 72 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 72 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 72 may further include a memory remotely arranged relative to the processor 71, and these remote memories may be connected to the stream data processing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0086] The input device 73 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the stream data processing device. The output device 74 may include a display device such as a display screen.

[0087] An embodiment of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a stream data processing method when executed by a computer processor.

[0088] Specifically, the stream data processing method includes:

[0089] Capture real-time streaming data;

[0090] Extracting target stream data from real-time stream data using a rolling time window, wherein the rolling time window is a time window where two adjacent time windows are continuous and non-overlapping, and the target stream data is at least two sequential events with the shortest interval captured in the real-time stream data according to the event occurrence sequence;

[0091] Based on the sliding time window, it is judged whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data, wherein the sliding time window is a time window in which there is an overlap between two adjacent time windows, and the window length of the sliding time window is greater than the sliding length of the sliding time window.

[0092] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the operations of the method described above, but can also execute related operations in the stream data processing method provided by any embodiment of the present invention.

[0093] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0094] It is worth noting that in the embodiment of the above-mentioned stream data processing system, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0095] An embodiment of the present invention further provides a computer program product, which includes computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute the stream data processing method provided by any embodiment of the present invention.

[0096] Of course, the computer program product provided in the embodiments of the present application, whose computer executable instructions are not limited to the method operations described above, can also execute related operations in the method provided in any embodiment of the present invention.

[0097] In the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0098] Finally, it should be noted that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for processing stream data, characterized in that: The stream data processing method comprises: Capture real-time streaming data; Extracting target stream data from the real-time stream data using a rolling time window, wherein the rolling time window is a time window in which two adjacent time windows are continuous and non-overlapping, and the target stream data is at least two sequential events with the shortest interval time captured in the real-time stream data according to the event occurrence sequence; Determine whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on a sliding time window, wherein the sliding time window is a time window where two adjacent time windows overlap, and the window length of the sliding time window is greater than the sliding length of the sliding time window; The extracting target stream data from the real-time stream data using a rolling time window comprises: Extracting the first event with the largest occurrence time in each of the rolling time windows; Extracting the second event in each of the rolling time windows that has the shortest time interval from the first event, wherein the first event occurs before the second event, and the first event and the second event are the target stream data; The determining whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on the sliding time window includes: Determine, based on the sliding time window, the position where the occurrence time of the target stream data falls within the sliding time window, and obtain position information; It is determined whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on the position information.

2. The stream data processing method according to claim 1, characterized in that: The stream data processing method further includes: If the second event does not exist within one of the rolling time windows, it is determined that the occurrence of the second event is abnormal, and an early warning action is performed.

3. The stream data processing method according to claim 1, characterized in that: The determining whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on the position information comprises: If the first event falls within the first sliding time window and the second event falls within the overlapping position of the first sliding time window and the second sliding time window, then a first interval duration between the first event and the second event is calculated, wherein the first sliding time window precedes the second sliding time window; The first interval duration is compared with a preset interval duration to determine whether there is an abnormality in the event occurrence sequence of the first event and the second event.

4. The stream data processing method according to claim 1, characterized in that: The determining whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on the position information comprises: If the first event falls into the overlapping position of the first sliding time window and the second sliding time window, and the second event falls into the second sliding time window, then a first interval duration between the first event and the second event is calculated, wherein the first sliding time window precedes the second sliding time window; The first interval duration is compared with a preset interval duration to determine whether there is an abnormality in the event occurrence sequence of the first event and the second event.

5. The stream data processing method according to claim 1, characterized in that: The determining whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on the position information comprises: If the first event falls into the overlapping position of the first sliding time window and the second sliding time window, and the second event does not fall into the second sliding time window, it is determined that there is an abnormality in the event occurrence sequence of the first event and the second event, wherein the first sliding time window precedes the second sliding time window.

6. The stream data processing method according to claim 1, characterized in that: The stream data processing method further includes: If it is determined whether there is an abnormality in the event occurrence sequence of the sequential time in the target stream data, an early warning prompt action is performed.

7. A stream data processing system, characterized in that: The stream data processing system performs corresponding actions based on a structured query language database, and the stream data processing system includes: A stream data capture unit, used for capturing real-time stream data; A stream data extraction unit, used for extracting target stream data from the real-time stream data by using a rolling time window, wherein the rolling time window is a time window in which two adjacent time windows are continuous and non-overlapping, and the target stream data is at least two sequential events with the shortest interval time captured in the real-time stream data according to the event occurrence sequence; A stream data anomaly judgment unit, configured to judge whether there is an anomaly in the event occurrence sequence of the sequential events in the target stream data based on a sliding time window, wherein the sliding time window is a time window in which two adjacent time windows overlap, and the window length of the sliding time window is greater than the sliding length of the sliding time window; The stream data extraction unit comprises: A first extraction subunit, configured to extract a first event with the largest occurrence time in each of the rolling time windows; A second extraction subunit is used to extract a second event in each of the rolling time windows that has the shortest time interval from the first event, wherein the first event occurs before the second event, and the first event and the second event are the target stream data; The flow data abnormality judgment unit includes: A position determination subunit, configured to determine, based on the sliding time window, the position where the occurrence time of the target stream data falls within the sliding time window, and obtain position information; The abnormality determination subunit is used to determine whether there is an abnormality in the event occurrence sequence of the sequential events in the target stream data based on the position information.

8. A stream data processing device, characterized in that: The stream data processing device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the stream data processing method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the stream data processing method as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the stream data processing method according to any one of claims 1 to 6.