Complex event processing method and apparatus, medium and device

By utilizing a unified event stream processing tool and a complex event timing decision engine on the client side, combined with cross-platform JavaScript development, the problems of low efficiency and high cost in complex event processing are solved, achieving efficient complex event processing applicable across multiple platforms.

WO2025213688A1PCT designated stage Publication Date: 2025-10-16RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/115076
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-09
Filing Date
2024-08-28
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

Existing technologies are inefficient and costly to maintain when handling complex events, making them difficult to apply to various types of clients.

Method used

On the client side, complex event handling is implemented by capturing event tracking data through a unified event stream processing tool, using a complex event timing decision engine for real-time matching and processing, and combining JavaScript cross-platform development to provide a complex event handling solution applicable to multiple platforms.

Benefits of technology

It improves the efficiency of complex event handling, reduces latency and maintenance costs, and achieves cross-platform versatility and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024115076_16102025_PF_FP_ABST
    Figure CN2024115076_16102025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a complex event processing method and apparatus, a medium and a device. The method comprises: starting a client, sending to a server a complex event configuration request, acquiring complex event configuration information, and initializing same; on the basis of a unified event stream processing tool in front-end codes, capturing tracking data, and, on the basis of the tracking data, determining whether a target complex event has been triggered; in response to the triggering of the target complex event, running a complex event occasion decision engine to perform occasion matching on the tracking data on the basis of occasion configuration information, so as to determine whether the occasion of the target complex event is satisfied; and upon successful occasion matching, triggering a callback function to execute a handling scheme corresponding to the target complex event. The present application can improve the efficiency in processing complex events.
Need to check novelty before this filing date? Find Prior Art

Description

Complex event processing method, device, medium and equipment Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a complex event processing method, apparatus, medium and equipment. Background Art

[0002] A complex event is a combination of specific events, such as "three consecutive login failures" or "order payment timeout (e.g., 15 minutes)." Detecting and handling complex events is a crucial step in big data processing. Therefore, improving the efficiency of complex event processing is a technical challenge facing those skilled in the art.

[0003] Summary of the Invention

[0004] In view of this, the present application provides a complex event processing method, device, medium and electronic device, the main purpose of which is to improve the timeliness and versatility of complex event processing and save maintenance costs.

[0005] According to one aspect of the present application, a complex event processing method is provided for detecting and handling complex events on a front-end code applicable to multiple types of clients. The method is applied to one client of any type among the multiple types of clients, and includes:

[0006] Start the client, send a complex event configuration request to the server, obtain complex event configuration information and initialize it, the complex event configuration information including event configuration information and timing configuration information of at least one target complex event;

[0007] Based on the unified event stream processing tool in the front-end code, capture the embedded data, and determine whether the target complex event corresponding to the event configuration information is triggered according to the embedded data;

[0008] In response to the triggering of the target complex event, running a complex event timing decision engine to perform timing matching on the tracking data according to the timing configuration information to determine whether the timing of the target complex event is met;

[0009] After the timing is matched successfully, the callback function is triggered to execute the processing plan corresponding to the target complex event.

[0010] According to another aspect of the present application, a complex event processing method is provided for configuring and contacting front-end code, wherein the front-end code is applicable to multiple types of clients and performs complex event detection and processing. The method is applied to a server and includes:

[0011] The receiving client sends a complex event configuration request, matches the complex event configuration information corresponding to the complex event configuration request and sends it to the client, and the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event, so that the client executes the following steps a to c: step a, based on the unified event stream processing tool in the front-end code, capturing the buried point data, and determining whether the target complex event corresponding to the event configuration information is triggered according to the buried point data; step b, in response to the triggering of the target complex event, running a complex event timing decision engine to perform timing matching on the buried point data according to the timing configuration information, and determining whether the timing of the target complex event is met; step c, after successful timing matching, triggering a callback function;

[0012] In response to the triggering of the callback function, the disposal scheme corresponding to the target complex event is determined and executed.

[0013] According to another aspect of the present application, a complex event processing device is provided for configuring and triggering a front-end code, wherein the JavaScript front-end code is applicable to multiple types of clients and performs complex event detection and disposal, and the device is applied to a server, comprising:

[0014] The configuration request unit is configured to send a complex event configuration request to the server after starting the client, obtain complex event configuration information and initialize it, and the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event;

[0015] The complex event triggering unit is configured to capture buried point data based on the unified event stream processing tool in the front-end code, and determine whether the target complex event corresponding to the event configuration information is triggered according to the buried point data;

[0016] The timing decision unit is configured to run a complex event timing decision engine in response to the triggering of the target complex event, to perform timing matching on the buried point data according to the timing configuration information, and to determine whether the timing of the target complex event is met;

[0017] The callback unit is configured to trigger a callback function after successful timing matching to execute the disposal scheme corresponding to the target complex event.

[0018] According to another aspect of the present application, a complex event processing device is provided for configuring and triggering a front-end code, wherein the JavaScript front-end code is applicable to multiple types of clients and performs complex event detection and disposal, and the device is applied to a server, comprising:

[0019] A configuration request processing unit is used to receive a complex event configuration request sent by a client, match the complex event configuration information corresponding to the complex event configuration request and send it to the client, wherein the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event, so that the client executes the following steps a to c: Step a, capturing buried data based on the unified event stream processing tool in the front-end code, and determining whether the target complex event corresponding to the event configuration information is triggered according to the buried data; Step b, in response to the triggering of the target complex event, running a complex event timing decision engine to perform timing matching on the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; Step c, triggering a callback function after the timing matching is successful;

[0020] The contact unit is used to determine and execute the handling plan corresponding to the target complex event in response to the triggering of the callback function.

[0021] According to one aspect of the present application, a storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned complex event processing method when running.

[0022] According to one aspect of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the above-mentioned complex event processing method.

[0023] By means of the above technical solution, the present application provides a complex event processing method, device, medium and equipment, which detects and handles complex events at the front end for front-end codes applicable to multiple types of clients, wherein after the client is started, a complex event configuration request is sent to the server to obtain complex event configuration information and initialize it, and then based on the unified event stream processing tool in the front-end code, the buried data is captured, and it is determined whether the target complex event corresponding to the event configuration information is triggered according to the buried data; then, in response to the triggering of the target complex event, the complex event timing decision engine is run to match the timing for the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; finally, after the timing is successfully matched, the callback function is triggered to execute the handling solution corresponding to the target complex event. In the present application solution, compared with the method of mainly relying on the server to detect and handle complex events, complex event processing is performed on the client, thereby performing real-time rule matching for the real-time acquired data, thereby reducing the processing time, improving the efficiency of complex event processing, and having the advantages of low latency and low maintenance cost.

[0024] And, unlike the prior art complex event processing scheme which is only applicable to one type of client, the scheme of the present application also improves in this regard, in order to achieve a cross-end applicable complex event processing scheme. In order to achieve a complex event processing scheme applicable to multiple types of clients, the embodiments of the present application rely on a programming language (such as JavaScript, JS) suitable for multiple terminals to develop front-end code. Since JS development is compatible with APP, small program, H5, and various types of clients, the cross-terminal purpose can be achieved, and a set of event processing mechanisms can be used for various types of clients, greatly reducing the development pressure.

[0025] In addition, in order to conveniently configure individual complex events for different types of clients, a terminal intelligent configuration contact platform can be used for visual configuration, thereby conveniently configuring the matching rules of complex events, making the strategy more flexible and easy to use.

[0026] The above description is only a summary of the technical scheme of the present application. In order to more clearly understand the technical means of the present application, the content of the specification can be implemented, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS

[0027] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0028] FIG. 1 shows a flowchart of a complex event processing method applied to a client according to an embodiment of the present application;

[0029] FIG. 2 shows a flowchart of a time decision engine processing process according to an embodiment of the present application;

[0030] FIG. 3 shows a flowchart of a complex event processing method applied to a server according to an embodiment of the present application;

[0031] FIG. 4 shows a structural schematic diagram of a complex event processing device applied to a client according to an embodiment of the present application;

[0032] FIG. 5 shows a structural schematic diagram of a complex event processing device applied to a server according to an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0034] In the practical application in the field of big data analysis, it can be necessary to detect the occurrence of a "continuous login failure event", which is actually a combination event of "login failure" and "login failure". For example, it can be necessary to detect the user's order payment behavior, which is also a combination event. The "payment event" occurs within a period of time after the "order event", which also includes a time limit. The combination event of the above-mentioned multiple events is called a complex event. In the existing scheme, the front-end collects data, the server calculates data and feeds back to the front-end to process complex events. Although this method has the characteristics of strong data processing ability, it has the limitations of high delay and high maintenance cost.

[0035] Therefore, in the embodiments of the present application, compared with the method mainly relying on the server processing, the complex event processing is performed on the side, thereby reducing the processing time and having the advantages of low delay and low maintenance cost. The technical difficulty involved is how to quickly detect and dispose of complex events on the side. Therefore, in the complex event processing method provided by the embodiments of the present application, a complex event timing decision engine is set in the front-end code. When a target complex event is detected (the occurrence of the target complex event is determined by monitoring the buried point information through a unified event stream processing tool (such as a unified event stream SDK)), the complex event timing decision engine is automatically triggered to perform timing matching, and after the matching is completed, a callback disposal is performed. The complex event timing decision engine is a complex event processing component based on a self-developed complex event matching rule library and declared as a static function. The complex event matching rule library is a rule library that can be configured according to the scene / operation and maintenance requirements. The rule library can be pre-acquired and cached on the side. When the complex event timing decision engine is triggered, the complex event matching rule library is called for rule matching.

[0036] In existing network applications, the same network product often corresponds to different types of clients (different channel releases), for example, a takeout product has multiple types of client forms such as APP, small program, website, and web page. For the front-end code of the same product, if different complex event processing mechanisms are adopted for various different types (including but not limited to APP, small program, website, web page, etc.) of clients, it will greatly affect the code development and release efficiency. Therefore, unlike the existing technical complex event processing scheme which can only be applied to one type of client, the embodiments of the present application also improve in this regard to achieve a set of complex event processing scheme applicable across terminals. In order to achieve a complex event processing scheme applicable to multiple types of clients, the embodiments of the present application rely on a cross-terminal programming language (such as JavaScript, JS) for front-end code development. Since JS development is compatible with APP, small program, and H5 types of clients, the cross-terminal purpose can be achieved. In the specific implementation process, cross-terminal data unified event flow processing tools and other issues also need to be considered.

[0037] In addition, in order to conveniently configure individualized complex events for different types of clients, a terminal intelligent configuration contact platform can be used for visual configuration, thereby conveniently configuring matching rules and making the strategy more flexible and easy to use.

[0038] Next, based on the analysis and ideas of the above several aspects, the embodiments of the present application are described in detail.

[0039] Referring to FIG. 1, a complex event processing method flowchart provided by the embodiments of the present application is shown. The method is for front-end code applicable to multiple types of clients, detects complex events in the front-end and handles them. The method is applied to one client in any type of client in the multiple types of clients, and includes the following steps S101-S104.

[0040] In the embodiments of the present application, the JavaScript front-end code applicable to multiple types of clients (also referred to as "cross-end") is obtained by removing the differences between various clients through static compilation of the source code. Static compilation refers to that, when a compiler compiles an executable file, it extracts part of the corresponding static library that needs to be called by the executable file and links it to the executable file, so that the executable file does not depend on a dynamic link library when running. In the embodiments of the present application, static compilation of the source code mainly processes the parts in the JS source code that are strongly constrained and cannot be dynamically modified, which can include three aspects: 1. Module reference, for example, replacing the module reference in the JS source code and modifying the suffix name; 2. Template attribute mapping or syntax compatibility processing, for example, in JS, template attribute mapping usually refers to mapping the properties of an object to a template string to generate a complete string, and this mapping can be used to create dynamic HTML strings or other types of text; in JS, the purpose of syntax compatibility processing is to ensure that the source code can run in different environments, and it needs to pay attention to the syntax differences that may exist in different environments, and the syntax compatibility processing of the scene can be performed in multiple ways, for example, using strict mode, using JSON objects for serialization and deserialization, using optional chaining operators, using specific syntax, using template imports or exports, etc.; 3. Configuration mapping, such as through page configuration. Thus, through the above several aspects of operation, the differences between various types of clients are smoothed out, providing a basis for implementing cross-end processing of complex events.

[0041] S101: Start the client, send a complex event configuration request to the server, obtain complex event configuration information and perform initialization, the complex event configuration information including event configuration information and timing configuration information of at least one target complex event.

[0042] In the embodiments of the present application, the complex event configuration information can be pre-configured or configured in real time through an end intelligent configuration touch point platform, which can be a visual platform and can be set on the server. Through the end intelligent configuration touch point platform, a user (for example, a developer) can configure complex event information, for example, the end intelligent configuration touch point platform provides configuration of timing decision, including event configuration and timing configuration, the event configuration refers to the matching rule of the user event on the end, such as using "spm == a.b.c && click" to correspond to a fixed position click event, and the timing configuration is the sequence of events, used for complex matching of the occurrence sequence of the user event stream on the end, such as "clicking into the store" and then "adding to the cart" and then "returning to the home page". In particular, in order to configure individually for different types of clients, the corresponding complex event set for different types of clients can be configured through the end intelligent configuration touch point platform, wherein the complex event set includes multiple complex events, and each complex event includes event configuration information and timing configuration information.

[0043] When the client is started, it automatically loads the complex event configuration information. For example, in step S101, the client sends a complex event configuration request to the server to obtain and initialize the complex event configuration information. The complex event configuration information includes event configuration information and timing configuration information for at least one target complex event. The complex event configuration request may include latitude and longitude information, client information, and a user ID. The client information may refer to the client type. After receiving the complex event configuration request, the server can determine the client type based on the client information, match the complex event configuration information corresponding to the client type, and issue the corresponding complex event configuration information.

[0044] S102: Based on the unified event stream processing tool in the front-end code, capture the embedded data, and determine whether the target complex event corresponding to the event configuration information is triggered according to the embedded data.

[0045] In the embodiments of the present application, the unified event stream processing tool refers to a standardized event stream processing tool based on super location tracking. It can classify user behaviors into standardized events based on tracking information from various types of clients (APPs, mini-programs, H5 pages, etc.), including tracking information, event ID (eventId), parameter information (properties), and other information fields. Functions in other pages or plug-ins can obtain the current user's operations on the client by monitoring the unified events.

[0046] Among them, super location tracking includes the following settings.

[0047] Event Marker

[0048] For example, abcd is used to mark an event on a page, where a represents the user-side level, b represents a page on the side, c represents a block on a page, and d represents a specific click position on a block.

[0049] Event Type

[0050] The above-mentioned abcd positions can only mark a specific location, but cannot distinguish different event types. Only by recording different general parameter information based on specific event types can all statistical needs be covered, which also helps to reduce the difficulty and resource consumption of data processing. For example, the following three types can be used: Page type: In order to count user behavior at the page granularity, when entering and exiting the page, it is necessary to record parameters such as user ID, device ID, timestamp, entry or exit, etc., so that the UV, PV, user stay time and other data of each page can be counted; Click type: Long press, sliding, etc. are all counted as click types; Exposure type: refers to the exposure at a specific module level, such as product exposure and video exposure. By analyzing click-type events together, the click rate of a product, post, or video can be calculated.

[0051] Jump relationship

[0052] For redirect relationships, simply record the relationship between the previous hop and the previous two hops in the URL. For example, if someone clicks the first item on the shopping cart page, a single click event can be reported. However, the previous hop might be from a specific item in the product details, in which case the previous hop can be recorded. Alternatively, the previous two hops might be from an item in the "Guess You Like" feed on the homepage, in which case both hops can be recorded. This allows the user's movements to be linked.

[0053] Traffic Channel

[0054] For example, if a channel on the homepage contains multiple pages, traffic channels can be introduced. For example, the multiple pages in a flash sale channel can be marked as a traffic channel. Then, by simply removing duplicate visitors from these three pages, the total number of unique visitors for the channel can be obtained. Other metrics such as clicks and total page views can be processed similarly using statistical logic.

[0055] Among them, after the unified event stream processing tool captures the buried point data in the above step S102, it can also include: performing client type analysis and format analysis on the buried point data, and standardizing the buried point data so that the data of different types of clients have a unified format and structure. Among them, the standardized processing of the buried point data can specifically include: parsing the buried point information, event ID, and parameter information of the buried point data; encapsulating the buried point information, event ID and parameter information in a unified format, and converting them into event information in a standard format.

[0056] It can be seen that the unified event stream processing tool in the embodiment of the present application can be understood as a client-side standardized event stream processing tool, which uses the super-position buried points in the cross-end (APP, applet or H5) source code to capture buried point data, and encapsulates the buried point data and then converts it into standardized events. By introducing a unified event stream processing tool, the target complex event triggered by the monitoring processing tool is monitored. When the target complex event occurs, the filtering and matching of the complex event timing decision engine is triggered. This unified event stream processing method is an important part of realizing cross-end processing of complex events. By capturing buried point data based on super-position buried points, event information of various types and locations can be captured on the client side, and by standardizing the buried point data, it is possible to subsequently use a unified complex event timing decision engine to perform complex event detection and disposal based on the same set of complex event matching rule bases and the same matching logic.

[0057] S103: In response to the triggering of the target complex event, a complex event timing decision engine is run to perform timing matching on the buried data according to the timing configuration information to determine whether the timing of the target complex event is met.

[0058] As mentioned above, the complex event timing decision engine (which may be referred to as "timing decision engine" for short) in the embodiment of the present application can be based on a self-developed complex event matching rule library and declared as a complex event processing component of a static function, wherein the self-developed complex event matching rule library is developed in JavaScript to be compatible with multiple types of clients. The advantage of the self-developed complex event matching rule library is that it can be personalized configured or changed according to the needs of the scenario, and specific personalized rule matching is performed based on the complex event matching rule library. Among them, in order to realize a cross-end adaptive timing decision engine, the complex event processing component can be declared as a static function through the aforementioned JS static compilation processing method to remove the differences between multiple ends and obtain a cross-end timing decision engine.

[0059] In an implementation, the specific processing procedure of the complex event timing decision engine is: according to a pre-configured complex event matching rule, performing event processing and timing matching on a target complex event, wherein the complex event matching rule includes an event rule, a pattern rule and a timing rule. For example, for a triggered target complex event, performing event filtering according to the event rule, and performing event conversion on the filtered event to obtain an event ID in a standard format; performing pattern filtering on the converted event according to the pattern rule, retaining events corresponding to the timing rule, and performing pattern matching on the retained events, wherein according to a plurality of rule rules and item rules corresponding to the pattern rule, it is determined whether a round of pattern matching is successful, and according to the progress of a plurality of rounds of pattern matching, it is determined whether the pattern matching is successful; after the pattern matching is successful, performing fatigue detection according to the timing rule, wherein the latest fatigue detection is performed according to fatigue cache information, and if the fatigue detection passes, it is determined that the timing matching is successful.

[0060] In the pattern matching in the complex event processing, it can be understood as two aspects: the characteristics of each simple event and the combination relationship between the simple events. In addition, the function of the pattern can be extended, for example, the time limit of the matching detection, whether each simple event can appear repeatedly, whether to skip the following matching after encountering a match for the event repeatable pattern, etc. The pattern matching detects the continuous events or the events occurring in sequence but discontinuously according to the neighborhood relationship and the conditions in each event, and the pattern can also have a time limit. If the matching condition is not met within the set time range, the pattern matching will time out.

[0061] Referring to FIG. 2, an example of the processing procedure of the timing decision engine is shown.

[0062] S201, event triggering: listening to a target complex event triggered by a unified event stream processing tool.

[0063] S202, event filtering: filtering according to an event rule, for example, only a click event is configured at present, so all exposure events and scroll events will be filtered to reduce the subsequent matching pressure.

[0064] S203, event conversion: converting the filtered event into a unified event that can be matched, wherein the event of the front end is mapped to the ID of the event configured in the background.

[0065] S204, pattern filtering: in a timing, there are a plurality of complex rules, and the events configured by each rule are different. In order to reduce the matching pressure, further filtering is performed to only retain the events used by the rule.

[0066] S205, pattern matching: for example, by depth-first traversal rule, sequentially matching events, containing multiple rule rules. Among them, the pattern matching further includes rule matching and item matching, wherein the rule rule refers to a rule in the complex rule, containing multiple items; item matching: one-to-one correspondence between item and background configured event, here the underlying event matching is performed, and the matching result is returned according to the level after completion.

[0067] S206, view matching progress: increase by one for each completed pattern matching progress, and enter the next link after completion.

[0068] S207, determine whether the matching result is successful: determine whether the matching is successful or failed.

[0069] S208, fatigue detection: after successful matching, detect fatigue, for example, the rule is set as: trigger three orders within three days; if the order within three days is less than or equal to three times, the fatigue is true (true), and the subsequent callback behavior is allowed; if the order within three days is greater than three times, the fatigue is false (false), and the subsequent callback behavior is not allowed. Among them, the historical fatigue can be cached locally, and the next time the client is loaded.

[0070] Step 209, decision making is completed.

[0071] S104: after the time matching is successful, the callback function is triggered to execute the disposal scheme corresponding to the target complex event.

[0072] In one implementation, after the time matching is successful, the callback function (for example, callback function) pre-registered by the complex event time decision engine can be automatically called, and the contact engine is started through the callback function to execute the disposal scheme corresponding to the target complex event. Among them, as described before, the end intelligent configuration contact platform can realize complex event configuration, and corresponding to this, the end intelligent configuration contact platform can receive the time matching success information of the target complex event, and determine the corresponding disposal scheme according to the scene attribute of the target complex event and / or the end attribute of the target complex event corresponding type client. Among them, the scene attribute can include application scene type information, and the client end attribute is used to distinguish the client type, therefore, through the above-mentioned way, the individualized disposal scheme for the target complex event can be realized, wherein the disposal scheme may, for example, be a prompt window or a floating layer.

[0073] Taking "user continuous three times login failure" as an example, the embodiment of the application is exemplarily described.

[0074] Step 1: configure the user login failure event (if it has been configured, it can be reused) in the end intelligent configuration contact platform, which is assumed to be event F here;

[0075] Step 2: Configure the user login failure event occurrence number as three times and the event D matching number as 3 on the end intelligent configuration contact platform.

[0076] Step 3: After starting the client, request configuration information and perform initialization.

[0077] Step 4: After the user fails to log in once (determined by the embedded point of the unified event stream processing tool), trigger the timing decision engine to perform timing matching, and the number is recorded as 1.

[0078] Step 5: After the user fails to log in twice, trigger the timing decision engine to perform timing matching, and the number is recorded as 2.

[0079] Step 6: After the user fails to log in three times, trigger the timing decision engine to perform timing matching, and the number is recorded as 3.

[0080] Step 7: After the matching degree detection passes, call the registered callback function (such as the callback function).

[0081] Step 8: Run the contact engine and perform disposal according to the scene requirements.

[0082] In the above example of "user fails to log in three times in a row", the timing decision engine is an engine that matches according to the matching rules, only performs data analysis and rule matching, and can be understood as a core component declared as a static function but caches a part of the execution process. The matching rules and the association between complex events can be pre-configured on the server, while the intermediate links in the execution process (triggering complex events and timing matching) are not associated and can be understood as a black box implementation.

[0083] In addition, in an implementation mode, the above method further includes the following steps: judging whether the target complex event is a real-time behavior event or a cumulative behavior event, if the target complex event is a real-time behavior event, real-time user behavior data is acquired, and complex event triggering judgment and timing matching are performed based on the embedded point data corresponding to the user behavior data in real time, if the target complex event is a cumulative behavior event, user behavior data is acquired in multiple times, and the user behavior data is accumulated, and complex event triggering judgment and timing matching are performed based on the embedded point data corresponding to the current accumulated user behavior data. It can be seen that by using the above method, the user behavior data is used as the basis for matching, which can realize more intelligent decision-making. Unlike processing real-time user behavior events of users, processing cumulative behavior events (such as ordering 5 times in a week) can realize field linkage: cumulative user data can be used in the timing decision process, and a perfect access scheme is provided.

[0084] It can be seen that through the above technical solution, the embodiment of the present application is aimed at JavaScript front-end code applicable to multiple types of clients, and detects and handles complex events at the front end, wherein after the client is started, a complex event configuration request is sent to the server, complex event configuration information is obtained and initialized, and then based on the unified event stream processing tool in the front-end code, the buried data is captured, and it is determined whether the target complex event corresponding to the event configuration information is triggered according to the buried data; then, in response to the triggering of the target complex event, the complex event timing decision engine is run to match the timing for the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; finally, after the timing is successfully matched, the callback function is triggered to execute the handling plan corresponding to the target complex event. In the embodiment of the present application, compared with the method of mainly relying on the server to detect and handle complex events, complex event processing is performed on the client, thereby performing real-time rule matching for the data obtained in real time, thereby reducing the processing time, and having the advantages of low latency and low maintenance cost.

[0085] Furthermore, unlike the existing complex event processing solutions that are only applicable to one type of client, the embodiments of the present application also make improvements in this regard, in order to achieve a set of complex event processing solutions that are applicable across multiple clients. In order to achieve a complex event processing solution that is applicable to multiple types of clients, the embodiments of the present application rely on JavaScript (JS) for front-end code development. Since JS development is compatible with various types of clients such as APP, mini-programs, and H5, it can achieve the purpose of cross-end. Through a set of event processing mechanisms, it can be universally applicable to various types of clients, greatly reducing the development pressure.

[0086] Furthermore, to facilitate customized complex event configuration for different client types, a terminal intelligent configuration contact platform allows for visual configuration, making it easy to configure complex event matching rules, making policies more flexible and easy to use. This platform enables a simple "input configuration" and "output timing matching results" implementation.

[0087] Referring to FIG3 , an embodiment of the present application provides a complex event processing method for configuring and contacting JavaScript front-end code, wherein the JavaScript front-end code is applicable to multiple types of clients and performs complex event detection and processing. The method is applied to the server and includes:

[0088] S301: Receive a complex event configuration request sent by a client, match complex event configuration information corresponding to the complex event configuration request, and send it to the client. The complex event configuration information includes event configuration information and timing configuration information of at least one target complex event, so that the client performs complex event detection and timing decision-making (steps a to c below).

[0089] Step a, capturing embedded data based on a unified event stream processing tool in the front-end code, and determining whether a target complex event corresponding to the event configuration information is triggered based on the embedded data;

[0090] Step b: in response to the triggering of the target complex event, running a complex event timing decision engine to perform timing matching on the buried data according to the timing configuration information to determine whether the timing of the target complex event is met;

[0091] Step c: After the timing is successfully matched, the callback function is triggered;

[0092] S302: In response to the triggering of the callback function, a handling plan corresponding to the target complex event is determined and executed.

[0093] In one implementation, matching the complex event configuration information corresponding to the complex event configuration request includes: parsing the complex event configuration request to obtain latitude and longitude information, terminal information, and user ID; and matching the complex event configuration information corresponding to the corresponding type of client according to the terminal information.

[0094] In one implementation, the complex event configuration information is determined by configuring different target complex events for different types of clients.

[0095] In one implementation, the method further includes: configuring a complex event matching rule library that the complex event timing decision engine relies on, and sending the complex event matching rule library to the client, wherein the complex event matching rule library is developed using JavaScript to be compatible with multiple types of clients.

[0096] In one implementation, it also includes: configuring corresponding complex event sets for different types of clients through the end intelligent configuration contact platform, wherein the complex event set includes multiple complex events, and each complex event includes event configuration information and timing configuration information; and receiving the timing matching success information of the target complex event through the intelligent configuration contact platform, and determining the corresponding handling plan based on the scene attributes of the target complex event and / or the end attributes of the corresponding type of client of the target complex event.

[0097] Corresponding to the method of FIG. 1 , an embodiment of the present application further provides a complex event processing apparatus for detecting and handling complex events on a front-end of JavaScript front-end code applicable to multiple types of clients. The apparatus is applied to any one of the multiple types of clients, as shown in FIG. 4 , and includes:

[0098] The configuration request unit 401 is configured to send a complex event configuration request to the server after starting the client, obtain complex event configuration information and initialize it. The complex event configuration information includes event configuration information and timing configuration information of at least one target complex event.

[0099] The complex event triggering unit 402 is configured to capture embedded data based on a unified event stream processing tool in the front-end code, and determine whether a target complex event corresponding to the event configuration information is triggered based on the embedded data;

[0100] The timing decision unit 403 is configured to run a complex event timing decision engine in response to the triggering of the target complex event, so as to perform timing matching on the buried data according to the timing configuration information and determine whether the timing of the target complex event is met;

[0101] The callback unit 404 is used to trigger the callback function after the timing is successfully matched to execute the processing plan corresponding to the target complex event.

[0102] In one implementation, the JavaScript front-end code applicable to multiple types of clients is obtained by statically compiling the source code to remove the differences between different types of clients, wherein statically compiling the source code includes: module replacement and / or suffix name modification of the source code, template attribute mapping or syntax compatibility processing of the source code, and configuration mapping of the source code.

[0103] In one implementation, the complex event configuration request carries latitude and longitude information, terminal information, and user ID, so that the server matches the complex event configuration information corresponding to the corresponding type of client according to the terminal information.

[0104] In one implementation, the complex event configuration information is determined by configuring different target complex events for different types of clients.

[0105] In one implementation, the complex event triggering unit is further used to perform client type analysis and format analysis on the buried data, and to standardize the buried data so that data from different types of clients have a unified format and structure.

[0106] In an implementation manner, the complex event trigger unit 402 is specifically configured to: parse the embedded information, event ID, and parameter information of the embedded point data; and encapsulate the embedded information, event ID, and parameter information in a unified format and convert them into event information in a standard format.

[0107] In an implementation manner, the complex event timing decision engine is a complex event processing component based on a self-developed complex event matching rule library and declared as a static function, wherein the self-developed complex event matching rule library is developed in JavaScript to be compatible with multiple types of clients.

[0108] In an implementation manner, the timing decision unit 403 is specifically configured to: run the complex event timing decision engine to perform event processing and timing matching on the target complex event according to a preconfigured complex event matching rule, wherein the complex event matching rule includes an event rule, a pattern rule, and a timing rule.

[0109] In an implementation manner, the timing decision unit 403 further includes:

[0110] The event processing subunit 4031 is configured to: perform event filtering on the triggered target complex event according to the event rule, and perform event conversion on the filtered event to obtain an event ID in a standard format.

[0111] The pattern matching subunit 4032 is configured to: perform pattern filtering on the converted event according to the pattern rule, retain events corresponding to the timing rule, and perform pattern matching on the retained events, wherein a rule matching is performed according to multiple rule rules and item rules corresponding to the pattern rule to determine whether a round of pattern matching is successful, and whether the pattern matching is successful is determined according to the progress of multiple rounds of pattern matching.

[0112] The fatigue detection subunit 4033 is configured to: perform fatigue detection according to the timing rule after the pattern matching is successful, wherein the latest fatigue detection is performed according to fatigue cache information, and the timing matching is determined to be successful if the fatigue detection is passed.

[0113] In an implementation manner, the callback unit 404 is specifically configured to: automatically call a callback function pre-registered by the complex event timing decision engine after the timing matching is successful, and start a contact engine through the callback function to execute a treatment scheme corresponding to the target complex event.

[0114] In an implementation manner, the system further includes:

[0115] The behavior event judgment processing unit 405 is configured to judge whether the target complex event is a real-time behavior event or a cumulative behavior event. If the target complex event is a real-time behavior event, the user behavior data is acquired in real time, and the complex event trigger judgment and time matching are controlled to be performed on the corresponding buried point data of the user behavior data in real time. If the target complex event is a cumulative behavior event, the user behavior data is acquired in multiple times, and the user behavior data is accumulated, and the complex event trigger judgment and time matching are controlled to be performed on the corresponding buried point data of the current accumulated user behavior data.

[0116] Corresponding to the method in FIG. 3, the embodiment of the application further provides a complex event processing device for configuring and touch point for JavaScript front-end code. The JavaScript front-end code is applicable to multiple types of clients and performs complex event detection and disposal. The device is applied to a server. Referring to FIG. 5, the device comprises:

[0117] The configuration request processing unit 501 is configured to receive a complex event configuration request sent by a client, match complex event configuration information corresponding to the complex event configuration request, and deliver the complex event configuration information to the client. The complex event configuration information comprises event configuration information and time configuration information of at least one target complex event, so that the client performs the following steps a to c: step a, capturing buried point data based on a unified event stream processing tool in the front-end code, and determining whether a target complex event corresponding to the event configuration information is triggered according to the buried point data; step b, in response to the trigger of the target complex event, running a complex event time decision engine to perform time matching on the buried point data according to the time configuration information, and determining whether the time of the target complex event is met; and step c, triggering a callback function after the time matching is successful; and

[0118] The touch point unit 502 is configured to determine a disposal scheme corresponding to the target complex event and perform the disposal scheme in response to the trigger of the callback function.

[0119] In an implementation manner, the configuration request processing unit 501 is specifically configured to: parse the complex event configuration request to obtain latitude and longitude information, terminal information, and a user ID; and match complex event configuration information corresponding to a client of a corresponding type according to the terminal information.

[0120] In an implementation manner, the complex event configuration information is determined for different target complex events corresponding to different types of clients.

[0121] In an implementation manner, the device further comprises:

[0122] The rule base configuration unit 503 is configured to configure a complex event matching rule base relied on by the complex event opportunity decision engine, and to distribute the complex event matching rule base to a client, wherein the complex event matching rule base is developed in JavaScript to be compatible with multiple types of clients.

[0123] In an implementation manner, the method further includes:

[0124] The front-end intelligent configuration contact platform 504 is configured to configure a corresponding complex event set for different types of clients, the complex event set including multiple complex events, each complex event including event configuration information and opportunity configuration information, and to receive opportunity matching success information of a target complex event, and determine a corresponding handling scheme according to a scene attribute of the target complex event and / or a front-end attribute of a type of client corresponding to the target complex event.

[0125] Embodiments of the present application also provide a storage medium having a computer program stored therein, wherein the computer program is configured to execute the steps in any of the method embodiments when running.

[0126] Optionally, in the present embodiment, the storage medium can be configured to store a computer program for executing the following steps:

[0127] The client is started, a complex event configuration request is sent to a server, complex event configuration information is acquired and initialized, the complex event configuration information including event configuration information and opportunity configuration information of at least one target complex event, based on a uniform event stream processing tool in the front-end code, buried point data is captured, and it is determined whether the target complex event corresponding to the event configuration information is triggered according to the buried point data, in response to triggering of the target complex event, a complex event opportunity decision engine is run to perform opportunity matching on the buried point data according to the opportunity configuration information, and it is determined whether the opportunity of the target complex event is met, after successful opportunity matching, a callback function is triggered to execute a handling scheme corresponding to the target complex event.

[0128] Or,

[0129] Receive a complex event configuration request sent by a client, match the complex event configuration information corresponding to the complex event configuration request and send it to the client, the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event, so that the client executes the following steps a to c: Step a, capture the buried data based on the unified event stream processing tool in the front-end code, and determine whether the target complex event corresponding to the event configuration information is triggered according to the buried data; Step b, in response to the triggering of the target complex event, run the complex event timing decision engine to perform timing matching on the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; Step c, after the timing matching is successful, trigger the callback function; and, in response to the triggering of the callback function, determine and execute the disposal plan corresponding to the target complex event.

[0130] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0131] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0132] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0133] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0134] Start the client, send a complex event configuration request to the server, obtain complex event configuration information and initialize it, the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event; based on the unified event stream processing tool in the front-end code, capture the buried data, and determine whether the target complex event corresponding to the event configuration information is triggered according to the buried data; in response to the triggering of the target complex event, run the complex event timing decision engine to match the timing of the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; after the timing is successfully matched, trigger the callback function to execute the disposal plan corresponding to the target complex event;

[0135] or,

[0136] Receive a complex event configuration request sent by a client, match the complex event configuration information corresponding to the complex event configuration request and send it to the client, the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event, so that the client executes the following steps a to c: Step a, capture the buried data based on the unified event stream processing tool in the front-end code, and determine whether the target complex event corresponding to the event configuration information is triggered according to the buried data; Step b, in response to the triggering of the target complex event, run the complex event timing decision engine to perform timing matching on the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; Step c, after the timing matching is successful, trigger the callback function; and, in response to the triggering of the callback function, determine and execute the disposal plan corresponding to the target complex event.

[0137] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0138] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0139] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0141] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0142] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0143] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such an understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various other media that can store program codes.

[0144] The above is only the preferred embodiment of the present application, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A complex event processing method, characterized in that: A method for detecting and handling complex events on the front-end code applicable to multiple types of clients, wherein the method is applied to one client of any type of client in the multiple types of clients, including: Start the client, send a complex event configuration request to the server, obtain complex event configuration information and initialize it, the complex event configuration information including event configuration information and timing configuration information of at least one target complex event; Based on the unified event stream processing tool in the front-end code, capture the embedded data, and determine whether the target complex event corresponding to the event configuration information is triggered according to the embedded data; In response to the triggering of the target complex event, running a complex event timing decision engine to perform timing matching on the tracking data according to the timing configuration information to determine whether the timing of the target complex event is met; After the timing is matched successfully, the callback function is triggered to execute the processing plan corresponding to the target complex event.

2. The method according to claim 1, characterized in that The front-end code suitable for multiple types of clients is obtained by statically compiling the source code to remove the differences between different types of clients, wherein statically compiling the source code includes: replacing modules and / or modifying suffix names on the source code, performing template attribute mapping or syntax compatibility processing on the source code, and configuring the source code.

3. The method according to claim 1, characterized in that The complex event configuration request carries latitude and longitude information, terminal information, and user ID, so that the server matches the complex event configuration information corresponding to the corresponding type of client according to the terminal information; wherein, The complex event configuration information is determined by configuring different target complex events for different types of clients.

4. The method according to claim 1, wherein After the unified event stream processing tool captures the tracking data, it also includes: Perform client type and format analysis on the embedded data, and standardize the embedded data so that the data of different types of clients have a unified format and structure.

5. The method according to claim 4, characterized in that The standardization processing of the buried point data includes: Analyze the tracking point information, event ID, and parameter information of the tracking point data; The tracking point information, event ID and parameter information are packaged in a unified format and converted into event information in a standard format.

6. The method according to claim 1, characterized in that The complex event timing decision engine is a complex event processing component based on a self-developed complex event matching rule library and declared as a static function.

7. The method according to claim 1 or 6, characterized in that The running of the complex event timing decision engine includes: Run the complex event timing decision engine to process the target complex event and perform timing matching based on pre-configured complex event matching rules, wherein the complex event matching rules include event rules, pattern rules, and timing rules.

8. The method according to claim 7, characterized in that According to the pre-configured complex event matching rules, the target complex event is processed and time matched, including: For the triggered target complex events, events are filtered according to event rules, and event conversion is performed on the filtered events to obtain event IDs in a standard format; Performing pattern filtering on the converted events according to the pattern rules, retaining events corresponding to the timing rules, and performing pattern matching on the retained events, wherein rule matching is performed according to multiple rule rules and item rules corresponding to the pattern rules to determine whether a round of pattern matching is successful, and determining whether the pattern matching is successful based on the progress of multiple rounds of pattern matching; After the pattern matching is successful, fatigue detection is performed according to the timing rule, wherein the latest fatigue detection is performed according to the fatigue cache information. If the fatigue detection passes, it is determined that the timing matching is successful.

9. The method according to claim 1, characterized in that The trigger callback function is used to execute the processing plan corresponding to the target complex event, including: After the timing is successfully matched, the callback function pre-registered by the complex event timing decision engine is automatically called, and the contact engine is started through the callback function to execute the handling plan corresponding to the target complex event.

10. The method according to claim 1, characterized in that Also includes: Determining whether the target complex event is a real-time behavior event or a cumulative behavior event; If the target complex event is the real-time behavior event, user behavior data is acquired in real time, and complex event triggering judgment and timing matching are performed in real time based on the embedded data corresponding to the user behavior data; If the target complex event is the cumulative behavior event, user behavior data is obtained multiple times and accumulated, and complex event triggering judgment and timing matching are performed based on the buried data corresponding to the current accumulated user behavior data.

11. A complex event processing method, characterized in that: Used to configure and contact front-end code, wherein the front-end code is applicable to multiple types of clients and performs complex event detection and processing. The method is applied to the server and includes: Receive a complex event configuration request sent by a client, match the complex event configuration information corresponding to the complex event configuration request and send it to the client, the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event, so that the client executes the following steps a to c: Step a, capture the buried data based on the unified event stream processing tool in the front-end code, and determine whether the target complex event corresponding to the event configuration information is triggered according to the buried data; Step b, in response to the triggering of the target complex event, run the complex event timing decision engine to perform timing matching on the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; Step c, trigger the callback function after the timing matching is successful; In response to the triggering of the callback function, a handling plan corresponding to the target complex event is determined and executed.

12. A complex event processing device, characterized in that: The device is used for detecting and handling complex events at the front end for front-end codes applicable to multiple types of clients. The device is applied to one client of any type of client among the multiple types of clients, including: Configuration request unit, used to send complex event configuration request to the server after starting the client, and obtain complex event configuration request. The complex event configuration information includes event configuration information and timing configuration information of at least one target complex event; A complex event triggering unit is used to capture embedded data based on the unified event stream processing tool in the front-end code, and determine whether the target complex event corresponding to the event configuration information is triggered according to the embedded data; A timing decision unit is configured to, in response to the triggering of the target complex event, run a complex event timing decision engine to perform timing matching on the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; The callback unit is used to trigger the callback function after the timing is successfully matched to execute the processing plan corresponding to the target complex event.

13. A complex event processing device, characterized in that: Used to configure and contact front-end code, wherein the front-end code is applicable to multiple types of clients and performs complex event detection and processing. The device is applied to the server and includes: A configuration request processing unit is used to receive a complex event configuration request sent by a client, match the complex event configuration information corresponding to the complex event configuration request and send it to the client, wherein the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event, so that the client executes the following steps a to c: Step a, capturing buried data based on the unified event stream processing tool in the front-end code, and determining whether the target complex event corresponding to the event configuration information is triggered according to the buried data; Step b, in response to the triggering of the target complex event, running a complex event timing decision engine to perform timing matching on the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; Step c, triggering a callback function after the timing matching is successful; The contact unit is used to determine and execute a handling plan corresponding to the target complex event in response to the triggering of the callback function.

14. A storage medium, characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 11 when executed.

15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Complex event processing method and system for time series data

    CN111984861A

  • Complex event processing method and system for time series data

    CN114416060A

  • Processing method and system for simultaneously executing front-end and back-end service event streams

    CN115309565A

  • Javascript-based user behavior collection method and device, equipment and medium

    CN116302895A

  • Promotion data real-time processing method and device, server and storage medium

    CN117522473A