Event processing method and device, electronic equipment and computer readable storage medium
By acquiring pending events and their target conversion rules and converting them into standard events, the flexibility and scalability problems of event conversion in the prior art are solved, efficient event acquisition and storage are achieved, and system maintenance costs are reduced.
Patent Information
- Application Number
- CN202411801238.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-28
AI Technical Summary
When converting behavioral events into standard events, the prior art has problems such as poor flexibility, low scalability, high risk of errors, and the inability to ensure data integrity and accuracy.
By obtaining the pending events and their corresponding target conversion rules, the pending events are converted into standard events based on these rules. This method does not require modifying the code logic due to changes in the data source of the pending events, which improves the flexibility and scalability of event conversion.
It realizes flexible collection and storage of behavioral events generated by each platform, solves the difficulty of information extraction caused by information dispersion on each platform, reduces system maintenance costs, and improves data integrity and accuracy.
Smart Images

Figure CN119718321A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an event processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the continuous development of computer technology, people are increasingly obtaining the services they need through various Internet Technology (IT) services. The system changes and iterations of Internet IT business services are very frequent, and each business has its own change system, and each system generates behavior events. How to convert the above behavior events into standard events to improve the value of event analysis is of great significance to Internet IT business services.
[0003] Related technologies mainly convert behavioral events into standard events by: setting a unique identifier for the data source; hard-coding the data obtained from the data source according to the set unique identifier; and storing the hard-coded data in the database. However, the above methods have problems such as poor flexibility, low scalability, high risk of errors, and inability to guarantee data integrity and accuracy. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure propose an event processing method, device, electronic device and computer-readable storage medium to solve the problems existing in the related technology, such as poor flexibility, low scalability, high error risk, and inability to guarantee data integrity and accuracy.
[0005] According to a first aspect of the present disclosure, an event processing method is provided, including: obtaining an event to be processed; obtaining a target conversion rule corresponding to the event to be processed; the target conversion rule is used to convert the event to be processed into a standard event; and converting the event to be processed into a standard event based on the target conversion rule.
[0006] According to a second aspect of the present disclosure, an event processing device is provided, comprising: an event collection module for acquiring events to be processed; a rule determination module for acquiring target conversion rules corresponding to the events to be processed; the target conversion rules are used to convert the events to be processed into standard events; and an event processing module for converting the events to be processed into standard events based on the target conversion rules.
[0007] According to a third aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, cause the processor to perform the above-mentioned event processing method.
[0008] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned event processing method.
[0009] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:
[0010] In the event processing method provided in the example implementation of the present disclosure, an event to be processed is obtained; a target conversion rule corresponding to the event to be processed is obtained, and the target conversion rule is used to convert the event to be processed into a standard event; and the event to be processed is converted into a standard event based on the target conversion rule. The embodiment of the present disclosure obtains the event to be processed and the target conversion rule corresponding to the event to be processed, and converts the event to be processed into a standard event based on the target conversion rule. Therefore, there is no need to modify the code logic due to changes in the data source of the event to be processed, and the flexibility and scalability of event conversion are improved, so that the behavior events generated by each platform can be collected and stored, etc., which solves the problem of difficulty in extracting information caused by information being scattered on each platform, and reduces the system maintenance cost.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0013] Figure 1 A flow chart of an event processing method according to an exemplary embodiment of the present disclosure is shown;
[0014] Figure 2 An interactive flow chart showing another event processing method according to an exemplary embodiment of the present disclosure is shown;
[0015] Figure 3 A flow chart of another event processing method data cleaning service according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 4 A schematic block diagram of an event processing device according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0019] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0020] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] Related technologies mainly use hard coding to achieve the conversion and storage of behavior event related data. This method has the following problems:
[0024] (1) The hard-coded processing logic converts data according to a fixed format, which limits the flexibility and scalability of the data. When the data source or data format changes, the code logic needs to be modified, which increases maintenance costs;
[0025] (2) Hard-coding is prone to errors, especially when processing complex data or performing complex conversions. Once an error occurs in the coding logic, it will lead to data conversion failure or data errors, which will affect subsequent data analysis and application;
[0026] (3) Hard coding cannot fully guarantee the integrity and accuracy of the data. During data conversion and storage, additional verification mechanisms need to be added to ensure the correctness of the data.
[0027] In order to solve the problems existing in the above related technologies, the embodiments of the present disclosure provide an event processing method, device, electronic device and computer-readable storage medium. The following describes the scheme of the present disclosure with reference to the accompanying drawings for illustration.
[0028] The present disclosure first provides an event processing method. Figure 1 As shown, the event processing method specifically includes the following steps:
[0029] S110: Obtaining events to be processed;
[0030] S120: Obtaining a target conversion rule corresponding to the event to be processed; the target conversion rule is used to convert the event to be processed into a standard event;
[0031] S130: Convert the event to be processed into a standard event based on the target conversion rule.
[0032] In the event processing method provided in the embodiment of the present disclosure, the event to be processed and the target conversion rule corresponding to the event to be processed are obtained, and the event to be processed is converted into a standard event based on the target conversion rule. Therefore, there is no need to modify the code logic due to changes in the data source of the event to be processed, thereby improving the flexibility and scalability of event conversion, so that the behavior events generated by each platform can be collected and stored, etc., solving the problem of difficulty in information extraction caused by information scattered on various platforms, and reducing system maintenance costs.
[0033] Next, in another embodiment, the above steps are described in more detail.
[0034] In step S110, an event to be processed is obtained.
[0035] In the embodiment of the present application, the above-mentioned events to be processed are behavioral events with clear purposes and results performed by users in the process of using Internet IT products or services.
[0036] In an embodiment of the present application, in a general user (ToC) type product, the above-mentioned behavioral events (events to be processed) may be behaviors such as clicking, browsing, purchasing, sharing or commenting.
[0037] In the embodiment of the present application, in the scenario of system change, the above-mentioned behavioral events (pending events) can be a series of specific behaviors performed before and after the system change, which directly or indirectly affect the progress, effect and user experience of the change, and have the following characteristics: (1) Closely related to the change: behavioral events are directly related to changes in the system, application or business process, and are important feedback on the effect of change implementation; (2) Observability: behavioral events can usually be observed and recorded through means such as logging and user behavior analysis; (3) Influence: behavioral events may have a significant impact on the progress, effect and user satisfaction of the change.
[0038] In the embodiment of the present application, the nature, state, time, location, participants and results of the above-mentioned event to be processed can be described by event attributes. Specifically, the above-mentioned event attributes are features or parameters associated with the above-mentioned event to be processed. In different fields and application scenarios, event attributes may include different specific contents, but they are all for a more comprehensive understanding and analysis of events.
[0039] In the embodiments of the present application, the above-mentioned Internet IT products or services mainly refer to services for external users (that is, the above-mentioned To C type services), which are deployed in computer hardware media. In a distributed architecture, a complete service is usually composed of multiple modules in the IT system, and each module is composed of multiple instances.
[0040] In the embodiments of the present application, the above-mentioned system change refers to any modification or adjustment to the existing computer system (including hardware, software, network, database, etc.). Exemplarily, the above-mentioned system change may include software upgrade, patch installation, configuration change, function expansion, etc. Among them, the above-mentioned software upgrade refers to the version update or upgrade of the operating system, application software, middleware, etc.; the above-mentioned patch installation refers to the software update installed to fix known security vulnerabilities or errors; the above-mentioned configuration change refers to the adjustment or optimization of the system configuration, network settings, database environment, etc.; the above-mentioned function expansion refers to the addition of new functional modules or features to meet new business needs.
[0041] In the embodiment of the present application, the above-mentioned process of obtaining pending events is the process of collecting the above-mentioned behavioral events. Specifically, the collection of pending events (behavioral events) refers to the process of capturing, recording, and analyzing the behaviors and related events occurring in the system, application, or business process. By collecting pending events, we can better understand system changes and evaluate the effects of changes, which is of vital importance for diagnosing system problems.
[0042] In the embodiment of the present application, the above-mentioned acquisition of pending events can be implemented as follows, illustratively: initiating an event collection request; receiving an event collection task corresponding to the event collection request; and acquiring pending events required to be collected by the event collection task.
[0043] In an embodiment of the present application, the above-mentioned acquisition of pending events can be specifically implemented as follows: the event processing service in the system periodically initiates an event collection request to the message queue; after receiving the event collection request, the message queue returns the event collection task corresponding to the event collection request to the event processing service; after receiving the event collection task returned by the message queue, the event processing service goes to the corresponding data source based on the event collection task to pull the pending events corresponding to the event collection task.
[0044] In the embodiment of the present application, the above-mentioned message queue (Message Queue, MQ) is a communication method in a distributed system. Exemplarily, when there is an application or service in the system that generates the above-mentioned pending event (behavior event), the corresponding application or service sends the relevant message of the pending event to the message queue; the above-mentioned event processing service sends an event collection request to the message queue at a fixed time, and after receiving the event collection request, the message queue generates an event collection task based on the relevant message of the pending event between the current event collection request and the previous event collection request, and returns the event collection task to the event processing service. Exemplarily, assuming that the event processing service last sent an event collection request to the message queue at 10:05, and sent the event collection request again at 10:10 this time, the message queue returns the pending events in the time period from 10:05 to 10:10 as an event collection task to the event processing service after receiving the current event collection request (that is, the event collection request at 10:10); after receiving the event collection task, the event processing service pulls the pending events from the corresponding data source based on the event collection task to obtain a list of pending events.
[0045] In the embodiments of the present application, the above data source refers to the source or provider of data, which may include structured data and semi-structured data, and is used to provide specific events to be processed (behavior events). Exemplarily, the data source may be various types of data storage systems, databases, application program interfaces (APIs), and other entities and services for storing and managing data.
[0046] In an embodiment of the present application, the acquisition of pending events can also be implemented as follows: when a specified pending event occurs in the system, the event processing service sends an event collection request to the message queue; after receiving the event collection request, the message queue returns an event collection task generated based on the relevant message of the specified pending event to the event processing service; after receiving the event collection task, the event processing service pulls the specified pending event from the corresponding data source based on the event collection task to obtain an event list of the specified pending event. The specified pending event can be any pending event specified by the user, and illustratively, the specified pending event can be a behavioral event implemented before and after the system is changed.
[0047] In step S120, a target conversion rule corresponding to the event to be processed is obtained; the target conversion rule is used to convert the event to be processed into a standard event.
[0048] In the embodiment of the present application, the target conversion rule is a rule for converting the pending event into a standard event. The standard event is an event obtained by converting the event data of the pending event into a standard format, and the standard format is a data format defined based on actual needs.
[0049] In the embodiment of the present application, illustratively, the target conversion rule may be described based on a data definition language (DDL), where the DDL is used to describe the objects and / or processes to be processed.
[0050] In an embodiment of the present application, the target conversion rule may include a user-defined function (UDF), which refers to a function developed by the user according to actual needs, used to expand the functionality of the software and meet specific business needs. For example, the user can customize the conversion rules based on actual needs to convert the data format of the above-mentioned event to be processed into the required standard format.
[0051] In the embodiment of the present application, the above target conversion rule can be implemented by the following process: determining the event conversion requirement based on the event attribute; generating the conversion rule to be selected based on the event conversion requirement. Specifically, the user can determine the event type of the event to be processed based on the event attribute of the event to be processed, and determine the standard format of data for different event types based on actual needs; determine the event conversion requirement based on the current format and standard format of the event to be processed, and obtain the conversion rule of the corresponding event type based on the event conversion requirement as the conversion rule to be selected.
[0052] In the embodiment of the present application, the target conversion rule may include a conversion condition and a conversion operation. When the data of the event to be processed meets the conversion condition, a corresponding conversion operation is performed on the event to be processed.
[0053] In the embodiment of the present application, after generating conversion rules corresponding to different event types and obtaining a plurality of conversion rules to be selected, each of the conversion rules to be selected may be stored in a system database.
[0054] In the embodiment of the present application, the above-mentioned acquisition of the target conversion rule corresponding to the event to be processed can be implemented as follows: obtaining the event attribute of the event to be processed; determining the target conversion rule from the conversion rules to be selected based on the event attribute of the event to be processed. Specifically, the event type of the event to be processed can be determined based on the event attribute of the event to be processed, and the corresponding conversion rule can be queried from the conversion rules to be selected in the database based on the determined event type of the event to be processed to obtain the target conversion rule.
[0055] In step S130, the event to be processed is converted into a standard event based on the target conversion rule.
[0056] In an embodiment of the present application, after determining the target conversion rule, the event to be processed can be converted into a standard event based on the target conversion rule. Exemplarily, the above conversion of the event to be processed into a standard event based on the target conversion rule can be implemented as follows: based on the target conversion rule, the data format of the event to be processed is converted into a standard format to convert the event to be processed into a standard event.
[0057] Specifically, the conversion of the to-be-processed event into the standard event based on the target conversion rule can be divided into three stages: a preprocessing (Prepare) stage, a filling (Fill) stage and a conversion (Transfer) stage.
[0058] The preprocessing stage preprocesses the data of the event to be processed, and the preprocessing may include a preliminary format conversion, which is used to convert the data format of the event to be processed into a format that conforms to the subsequent filling and conversion stages. In addition, the preprocessing process may also include operations such as correction of outliers, which are not specifically limited in the embodiments of the present application.
[0059] The above-mentioned filling stage is used to perform corresponding logical operations on the data that meets the requirements when it is determined that there is data in the event to be processed that meets the conditional rules configured in the target conversion rules. Exemplarily, it can be determined whether the corresponding field of the event to be processed meets the requirements based on the judgment condition corresponding to a user-defined function in the target conversion rule. If it does, the user-defined function is called to perform data filling.
[0060] The conversion phase is used to convert the data format of the event to be processed into the attribute structure of the standard event based on the event attributes of the event to be processed and the processing results of the preprocessing phase and the filling phase.
[0061] In an embodiment of the present application, the above process of converting the to-be-processed event into a standard event based on the target conversion rule further includes: generating an identification code for the standard event, and marking the standard event based on the identification code.
[0062] In an embodiment of the present application, after data cleaning is performed on the event to be processed based on the above-mentioned target conversion rule to obtain a standard event that meets the standard format requirements, a unique identification code can also be generated for the standard event (the unique identification code of the same event is the same), which can avoid data cleaning again for the behavioral event that has been data cleaned, thereby improving the efficiency of event conversion and reducing system consumption. Exemplarily, the process can be implemented as follows: when obtaining the target conversion rule corresponding to the event to be processed, first determine whether a corresponding standard event already exists for the event to be processed based on the identification code; if it is determined that there is no corresponding standard event for the event to be processed, then obtain the target conversion rule corresponding to the event to be processed, so that the event to be processed can be subsequently converted into a standard event based on the target conversion rule; if it is determined that there is a corresponding standard event for the event to be processed, it is proved that the event to be processed has been data cleaned and no subsequent operations are performed.
[0063] In the embodiment of the present application, illustratively, after the to-be-processed event is converted into a standard event based on the target conversion rule, the obtained standard event can also be sent to a message queue for external calling.
[0064] In the event processing method provided in the embodiment of the present disclosure, the event to be processed and the target conversion rule corresponding to the event to be processed are obtained, and the event to be processed is converted into a standard event based on the target conversion rule. Therefore, there is no need to modify the code logic due to changes in the data source of the event to be processed, thereby improving the flexibility and scalability of event conversion, so that the behavior events generated by each platform can be collected and stored, etc., solving the problem of difficulty in information extraction caused by information scattered on various platforms, and reducing system maintenance costs.
[0065] Next, in another embodiment, in combination Figure 2 and Figure 3 , the process of the above event handling method is described in detail:
[0066] Figure 2 is a timing flow chart of the above event processing method, such as Figure 2As shown, the system includes a data source (DataSource), a data cleaning service (Collector, corresponding to the above event processing service), a message queue (MessageQueue, MQ) and a database (Database, DB). The system performs data cleaning on the above event to be processed through the above event processing method to obtain the above standard event, which specifically includes the following steps:
[0067] S201: The data cleaning service sends a request to obtain a data collection task to a message queue.
[0068] In an embodiment of the present application, the data cleaning service periodically initiates an event collection request to the message queue, or, when a specified event to be processed occurs in the system, sends an event collection request to the message queue. The event collection request is used to request the above data collection task from the message queue.
[0069] S202: The message queue returns the data collection task to the data cleaning service.
[0070] S203: The data cleaning service pulls the events to be processed from the data source.
[0071] In an embodiment of the present application, after the data cleaning service obtains the data collection task from the message queue, it pulls the to-be-processed events from the data source based on the data collection task.
[0072] S204: The data source returns an event list of events to be processed to the data cleansing service.
[0073] S205: The data cleaning service extracts rule configuration from the database based on event attributes of the event to be processed.
[0074] In an embodiment of the present application, the rule configuration of the data cleaning rule corresponding to the event is queried from the database. If it exists, the conversion rule described by the DDL is returned. If it does not exist, the event to be processed is directly stored without event conversion. Among them, the data cleaning rule corresponds to the above-mentioned target conversion rule. The specific implementation of determining the target conversion rule based on the event attribute has been described in detail above, so it will not be repeated here.
[0075] S206: The database returns the rule configuration to the data cleaning service.
[0076] S207: The data cleaning service converts the pending events into standard events based on the rule configuration.
[0077] In the embodiment of the present application, event attributes are processed, filled, and converted according to predefined configurations. Figure 3 As shown, the process of converting pending events into standard events based on rule configuration specifically includes the following steps:
[0078] S310: Preprocess the event to be processed according to the configuration of the preprocessing stage and save the preprocessing result.
[0079] In an embodiment of the present application, this step can obtain the conversion rules of the preprocessing stage from the database according to the configuration of the preprocessing stage, and the conversion rules of the preprocessing stage define how to convert data in different operation scenarios; preprocess the events to be processed according to the configuration of the preprocessing stage; and save the preprocessing results.
[0080] S320: Call the user-defined function according to the configuration of the filling stage, execute the filling logic and save the filling result.
[0081] S330: Obtain the preprocessing result of the preprocessing stage and the filling result of the filling stage according to the configuration of the conversion stage, and construct the data format of the event to be processed into a standard event format.
[0082] In an embodiment of the present application, a unique identification code can also be generated for the cleaned standard event and marked (the unique identification code of the same event is the same) so that when it is subsequently determined based on the unique identification code that the event to be processed has been cleaned, the data cleaning service can be skipped.
[0083] In the embodiment of the present application, the specific implementation of the above steps S310 to S330 has been described in detail above, so it will not be repeated here.
[0084] S208: The data cleaning service sends a standard event to the message queue.
[0085] S209: The message queue returns a confirmation message to the data cleaning service.
[0086] In the embodiment of the present application, the message queue informs the data cleaning service through the above confirmation message that the standard event after data cleaning has been received.
[0087] S210: Store the standard event in the database.
[0088] The event processing method provided in the embodiment of the present application includes the following advantages: (1) DDL definition configuration: construct the DDL corresponding to the cleaning process, and then through DDL, the user customizes the entire data cleaning process to improve the maintainability and flexibility of the program; (2) Abstract general process: disassemble the entire data cleaning life cycle, abstract the general process, which is mainly divided into three stages, the preprocessing stage, the filling stage and the conversion stage. In addition, by defining UDF, the reuse of operators is realized to the greatest extent. When a new data source is connected, the capabilities of existing operators can be directly reused to achieve data cleaning effects; (3) Data verification, generate a unique identification code for the cleaned event to ensure that repeated events will not be cleaned multiple times. In addition, by storing standard events in the database, data accuracy is guaranteed to avoid affecting the accuracy of subsequent data analysis; (4) Code non-intrusion: Data cleaning is achieved by defining the data cleaning process through DDL, without changing the code, thereby improving efficiency.
[0089] The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0090] The embodiment of the present invention can divide the event processing device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0091] The present disclosure provides an event processing device. Figure 4 As shown, the event processing device 400 may include an event collection module 410, a rule determination module 420 and an event processing module 430, wherein:
[0092] An event collection module 410 is used to obtain events to be processed;
[0093] The rule determination module 420 is used to obtain the target conversion rule corresponding to the event to be processed; the target conversion rule is used to convert the event to be processed into a standard event;
[0094] The event processing module 430 is used to convert the event to be processed into a standard event based on the target conversion rule.
[0095] In the embodiment of the present disclosure, the rule determination module is further used to: determine event conversion requirements based on event attributes; and generate conversion rules to be selected based on the event conversion requirements.
[0096] In the embodiment of the present disclosure, the rule determination module is specifically used to: obtain the event attributes of the event to be processed; and determine the target conversion rule from the candidate conversion rules based on the event attributes of the event to be processed.
[0097] In the disclosed embodiment, the event collection module is specifically used to: initiate an event collection request; receive an event collection task corresponding to the event collection request; and obtain pending events required to be collected by the event collection task.
[0098] In the embodiment of the present disclosure, the above-mentioned event processing module is also used to: generate an identification code for the standard event, and mark the standard event based on the identification code.
[0099] In the disclosed embodiment, the rule determination module is specifically used to: determine whether a corresponding standard event already exists for the event to be processed based on the identification code; if it is determined that there is no corresponding standard event for the event to be processed, obtain the target conversion rule corresponding to the event to be processed.
[0100] In the embodiment of the present disclosure, the event processing module is specifically used to: convert the data format of the event to be processed into a standard format based on the target conversion rule, so as to convert the event to be processed into a standard event.
[0101] In addition, the specific implementation details of the above event processing device have been described in detail in the corresponding position of the event processing method, so they will not be repeated here.
[0102] Figure 5 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 5 , which shows a structural schematic diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0103] like Figure 5As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503 to implement the event processing method of the embodiment described in the present disclosure. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0104] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0105] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the event processing method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0106] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0107] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0108] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0109] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0110] Get pending events;
[0111] Obtain the target conversion rule corresponding to the event to be processed; the target conversion rule is used to convert the event to be processed into a standard event;
[0112] Convert pending events into standard events based on target conversion rules.
[0113] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0114] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0115] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0117] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0118] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0119] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0120] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0121] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. An event processing method, characterized in that: include: Get pending events; Obtaining a target conversion rule corresponding to the event to be processed; the target conversion rule is used to convert the event to be processed into a standard event; The event to be processed is converted into a standard event based on the target conversion rule.
2. The event processing method according to claim 1, characterized in that: The method further comprises: Determine event conversion requirements based on event attributes; Generate a candidate conversion rule based on the event conversion requirement.
3. The event processing method according to claim 2, characterized in that: The obtaining of the target conversion rule corresponding to the event to be processed includes: Obtaining the event attribute of the event to be processed; The target conversion rule is determined from the candidate conversion rules based on the event attribute of the event to be processed.
4. The event processing method according to claim 1, characterized in that: The obtaining of events to be processed includes: Initiate event collection request; Receive an event collection task corresponding to the event collection request; Obtain the to-be-processed events required to be collected by the event collection task.
5. The event processing method according to claim 1, characterized in that: The converting the to-be-processed event into a standard event based on the target conversion rule further includes: An identification code is generated for the standard event, and the standard event is marked based on the identification code.
6. The event processing method according to claim 5, characterized in that: The obtaining of the target conversion rule corresponding to the event to be processed includes: Determining whether the event to be processed already has the corresponding standard event based on the identification code; If it is determined that there is no corresponding standard event for the event to be processed, the target conversion rule corresponding to the event to be processed is obtained.
7. The event processing method according to claim 1, characterized in that: The converting the to-be-processed event into a standard event based on the target conversion rule comprises: The data format of the event to be processed is converted into a standard format based on the target conversion rule, so as to convert the event to be processed into the standard event.
8. An event processing device, characterized in that: include: Event collection module, used to obtain events to be processed; A rule determination module, used for obtaining a target conversion rule corresponding to the event to be processed; the target conversion rule is used for converting the event to be processed into a standard event; The event processing module is used to convert the event to be processed into a standard event based on the target conversion rule.
9. An electronic device, comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.