Method for extracting object-oriented event log from relational database

Extracting objects and event sets from relational databases through object-oriented event log format solves the problems of data flattening and single-perspective correlation in traditional logs, improves the accuracy of event logs and process mining efficiency, is suitable for current information systems, and supports Business process restoration from multi-angle views.

CN118550952AInactive Publication Date: 2024-08-27NORTH CHINA ELECTRIC POWER UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410486378.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN118550952A
    Figure CN118550952A
Patent Text Reader

Abstract

The invention discloses a method for extracting an object-oriented event log from a relational database. The method comprises the following steps: step S10, setting a format of an object-oriented event log; step S20, determining categories of objects in the event log and identifiers and attributes of each object based on the input database table and the incidence relation between the database table and the database table, and extracting an object set from the database table; and step S30, based on the input time column and business process information in the database table, determining the type of the event in the event log and the identifier and attribute of each event, and extracting an event set from the database table. By means of the method, the accuracy of the event logs and the efficiency of the process mining technology can be improved, and the method has good application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer process mining, in particular to a method for extracting event logs, in particular to a method for extracting object-oriented event logs from a relational database. Background Art

[0002] Process mining is a young cross-disciplinary field across data science and business process management. It is to discover, monitor and improve actual processes by extracting knowledge from event logs that are commonly visible in information systems. Event logs are the starting point of process mining technology. They record the actual situation of business process execution in enterprise information systems. Traditional logs assume a global case concept, which is not coupled with the data generated by currently widely used information systems. At present, most organizations use object-centric systems (such as ERP, CRM and other systems) to support business processes. These systems generally use relational databases to store the generated data. In these business process data, multiple objects and events interact with each other, and there are complex interactive relationships such as one-to-many and many-to-many. For example, one order may correspond to multiple packages, and one package may also correspond to multiple orders. When processing this data, traditional logs require that a case concept must be selected to associate data. This operation will flatten the data, view process instances in isolation, and ignore the interactions between objects, which will induce problems such as convergence and divergence, resulting in distortion of event logs. In addition, a case concept can only provide a specific view of a business process from a certain perspective (such as a sales order). If the user wants to view the process from another perspective (such as a package), he must return to the original data to extract new event logs. This process will take a lot of time and reduce the efficiency of process mining technology. Summary of the invention

[0003] In view of the shortcomings of the above-mentioned prior art, the present invention proposes, in the first aspect, an object-oriented event log format and a method for extracting such a log from a relational database. The object-oriented event log is more in line with the characteristics of the relational database commonly used in current information systems, and aims to solve the defects such as convergence and divergence in the existing log format, and provide support for improving log quality and process mining efficiency. It includes the following steps: Set the format of object-oriented event logging; Based on the input database tables and the associations between them, determine the categories of objects in the event log and the identifiers and attributes of each object, and extract the object set from the database tables; Based on the time column and business process information in the input database table, the categories of events in the event log and the identifier and attributes of each event are determined, and an event set is extracted from the database table.

[0004] Based on the above solution, the format of the object-oriented event log is specifically as follows: Set up an object-oriented event log consisting of two aspects: object set and event set: Among them, objects represent the physical entities and information entities that make up the business process, and events represent the operational behaviors performed in the business process.

[0005] Based on the above scheme, when an event references one or more objects, it means that an event affects one or more objects; when an object is referenced by one or more events, it means that there is an association relationship between the objects.

[0006] Based on the above scheme, the specific method of extracting the object set from the database table is: mapping the database table to obtain the category of the object and the identifier and attribute of each object: wherein one database table corresponds to one object category, the name of the database table or the name of the user according to the scenario is used as the name of the object category, the primary key of the database table is used as the identifier of the object, and all the columns in the database table or a part of the columns selected by the user are used as the attributes of the object; Extracting objects from database table records to obtain an object set of the event log: wherein, an object is extracted from a record in the database table, the category of the object is the object category corresponding to the database table, the identifier of the object is the primary key value of the record, and the attribute value of the object is the value of the corresponding column of the attribute determined in the record; According to the primary key-foreign key relationship between database tables, the association relationship between records in different tables is obtained, and the above relationship is mapped to the association relationship between corresponding objects.

[0007] On the basis of the above scheme, the specific method of extracting the event set from the database table is: mapping the database table to obtain the event category and the identifier, timestamp and attribute of each event: wherein a time column in each database table corresponds to an event category, the event category name is set by the business process information and the name of the time column, by changing the primary key value of the database table or using an increasing value as the event identifier according to the time sequence of the events after all events are extracted, the time column is used as the timestamp of the event, and all the columns in the database table or some columns related to the event selected by the user are used as the attributes of the event; Extracting events from the database table record to obtain an event set of the event log: wherein an event is generated based on the value of a time column in the database table record, and the timestamp value of the event is the time value; An event generated based on the value of a time column in a record of a database table references an object extracted from the record and references objects to which the object is related.

[0008] Based on the above solution, the identifier of the event does not overlap with the identifier of the object.

[0009] In a second aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.

[0010] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0011] Beneficial effects of the present invention: First, because the present invention adopts an object-oriented approach to design the event log format, it better fits the characteristics of the relational database commonly used in current information systems, retains the complex interactive relationships such as one-to-many and many-to-many between objects and events in the data, maintains the three-dimensional characteristics of the data, eliminates defects such as convergence and divergence, and improves the accuracy of the event log.

[0012] Second, the event log format proposed in the present invention abandons the concept of a single case, eliminates the constraint of only being able to associate events from a single perspective, supports full-scale restoration of business processes from multiple perspectives, and does not need to return to the original data to re-extract event logs when changing perspectives, thus saving a lot of time and improving the efficiency of process mining technology.

[0013] Third, the input of the log extraction method proposed in the present invention is a relational database table. Since current information systems generally use relational databases, the method has strong universality; the log extraction method has low requirements on professional background and strong operability; the output of the log extraction method is an object-oriented event log. Since object-oriented is a key research direction of process mining, this type of log is the basis for enabling object-oriented process mining technology, and therefore has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The present invention has the following accompanying drawings: Figure 1 A flowchart of an object-oriented event log extraction method from a relational database; Figure 2 is a relational database table used as input for the log extraction method; Figure 3 is the set of objects in the object-oriented event log; Figure 4 A collection of events in an object-oriented event log. DETAILED DESCRIPTION

[0015] In order to make the objects, advantages and features of the present invention more obvious, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0016] like Figure 1 As shown, in a specific embodiment of the present invention, a method for extracting object-oriented event logs from a relational database has the following process: Step S10, setting the format of the object-oriented event log.

[0017] Step S20, based on the input database tables and the associations between them, determine the categories of objects in the event log and the identifiers (ID) and attributes of each object, and extract the object set from the database tables.

[0018] Step S30, based on the time column and business process information in the input database table, determine the category of the event in the event log and the identifier and attribute of each event, and extract the event set from the database table.

[0019] Furthermore, step S10 includes the following sub-steps: S11, assumes that the object-oriented event log consists of two aspects: object set and event set. The log does not contain the concept of a single case; S12, objects represent the physical entities and information entities that make up the business process, such as materials, documents, products, invoices, etc. Objects have id, categories and attributes; S13, events represent operational behaviors performed in a business process. Events have id, category, timestamp, and attributes. Timestamps represent the time when an event occurs, which can be used to determine the sequence of events. S14, an event can reference one or more objects, indicating that the event affects these objects (i.e., the event changes the attribute values ​​of the objects). An object can also be referenced by one or more events (i.e., the attribute values ​​of the object are changed by multiple events). There is an association relationship between objects (for example, a bill object can be associated with an order object, indicating that the bill is used to pay the order).

[0020] Furthermore, step S20 includes the following sub-steps: S21, one database table corresponds to one object category, the name of the database table (or named by the user according to the scenario) is used as the name of the object category, the primary key of the database table is used as the id of the object, all columns in the database table (or some columns selected by the user) are used as the attributes of the object (the attributes can be 0, 1 or more), all database tables are mapped based on the above method, and all object categories and the id and attributes of each object are obtained; S22, extract an object from a record (i.e., a row of data) in the database table, the category of the object is the object category corresponding to the database table, the id of the object is the primary key value of the record, and the attribute value of the object is the value of the attribute corresponding column determined in step S21 in the record. Based on the above method, objects are extracted from all database table records to obtain an object set of the event log; S23, obtaining association relationships between records in different tables based on primary key-foreign key relationships between database tables, and mapping the above relationships into association relationships between corresponding objects.

[0021] Furthermore, step S30 includes the following sub-steps: S31, a time column in each database table (i.e., the value in the column is time) corresponds to an event category. The user sets the event category name based on the business process information (i.e., when an event of a certain category occurs in the process, the system will write the time information in the time column) and the name of the time column. The primary key value of the database table can be appropriately changed (or an increasing value is used according to the time sequence of the events after all events are extracted) as the event id (ensuring that it does not overlap with the object id), the time column is used as the timestamp of the event, and all columns in the database table (or some columns related to the event selected by the user) are used as the attributes of the event (the attributes can be 0, 1 or more). Based on the above method, all database tables are mapped to obtain all categories of events and the id, timestamp and attributes of each event; S32, based on the value of a time column in the database table record, an event is generated, the timestamp value of the event is the time value, the category of the event is the event category corresponding to the time column determined in step S31, the id value of the event is obtained according to the method determined in step S31, and the attribute value of the event is the value of the attribute corresponding column in the record determined in step S31. Based on the above method, events are extracted from all database table records to obtain an event set of the event log; S33, the event generated based on the time column value in a record of the database table references the object extracted from the record, and references the object associated with the object determined in step S23.

[0022] The following describes the data included and the business process scenarios that generate the data.

[0023] like Figure 2The input data is shown, which consists of 8 database tables. The id column in each table is the primary key. The lines between the tables represent the association relationship, and the arrows point from the foreign key to the primary key. For example, the "order" column in the "order item" table is a foreign key, pointing to the primary key "id" column of the "order" table, indicating the correspondence between the order and the order item. The above database table describes the scenario on the online shopping platform (from the customer creating an order to receiving the package). In the scenario, when a customer creates an order, the system will generate an order record (for example, o1) in the "order" table and multiple order item records (for example, ol1 and ol2) contained in the order in the "order item" table, where one order item corresponds to a product (for example, ol1 is a computer). For example, customer Mike created an order at 10:33:37 on August 11, 2017, and purchased 2 computers and 3 mobile phones, which correspond to the "order" table record o1 and the "order item" table records ol1 and ol2. After the order is created, the goods will be packaged into packages and delivered to the customer. For example, a computer in order item ol1 is packed into package s1 and delivered to the customer at 11:36:35 on August 14, 2017. At the same time, a bill is created and then paid by the customer. For example, bill i1 corresponding to order o1 is created at 9:13:27 on August 15, 2017, and the customer pays at 16:26:13 on August 21, 2017.

[0024] 1. Set the format of object-oriented event log According to step S10, the object-oriented event log consists of two aspects: an object set and an event set. Figure 3 The object set and Figure 4 As shown in the event set in . Objects have id, category and attributes, and each object is associated with other objects, such as Figure 3 As shown in the "Associated Objects" section of the event. An event has an id, category, timestamp, and attributes (in this example, we set the event attributes to be empty. Figure 4 ), and each event references an object, such as Figure 4 As shown in the "Referenced Objects" section in

[0025] 2. Extract the object set of the event log According to step S21, we map each database table to an object category, and the name of the database table is used as the name of the object category. For example, the "order" table is mapped to the "order" category, and the "order item" table is mapped to the "order item" category, and a total of 8 object categories are obtained, namely, "order", "order item", "payment", "payment item", "waybill", "waybill item", "element relationship", and "bill".

[0026] According to step S21, we map the primary key of the database table to the object id, and select some columns as the attributes of the object. For example, we select "customer" as the attribute of the "order" object category, and select "goods" and "quantity" as the attributes of the "order item" object category. Thus, we get the attributes of 8 object categories, such as Figure 3 As shown in the "Attributes" section of the object class. If an object class has a certain attribute, the corresponding attribute has a non-empty value. For example, the "Payment" object class contains the "Amount" attribute, while the "Element Relationship" object class does not contain any attributes.

[0027] According to step S22, an object is extracted from a record in the database table. The category of the object is the object category corresponding to the database table, the id of the object is the primary key value of the record, and the attribute value of the object is the value in the corresponding column of the record. For example, the first column of the "order" table extracts the object o1, whose object category is "order", "id" value is "o1", and the value of the attribute "customer" is "Mike". Based on the above method, objects are extracted from all database table records to obtain the object set of the event log. A total of 26 objects are extracted from 8 tables, such as Figure 3 shown.

[0028] According to step S23, the association relationship between different table records is obtained based on the primary key-foreign key relationship between the database tables, and the above relationship is mapped to the association relationship between corresponding objects. For example, the "order" table record o1 is associated with the "order item" table records ol1 and ol2, so the object o1 is associated with the objects ol1 and ol2. Based on the above method, object relationships are extracted from all database table records to obtain other categories of objects associated with each object, such as Figure 3 As shown in the "Associated Objects" section.

[0029] 3. Extract event sets from event logs According to step S31, a time column in each database table corresponds to an event category. Based on the business process information and the name of the time column, we determine that the log contains four event categories: "Create order" (corresponding to the "Create date" column in the "Order" table), "Delivery" (corresponding to the "Create date" column in the "Waybill" table), "Create bill" (corresponding to the "Create date" column in the "Bill" table), and "Payment" (corresponding to the "Create date" column in the "Payment" table). The time column is used as the timestamp of the event. The "id" of the event is generated by adding the first letter "c" of the English word "create" before the primary key value of the record. For example, the event corresponding to the first record in the "Order" table is "co1". The user selects some columns related to the event as the attributes of the event. This method is the same as creating object attributes, so we omit the process of creating event attributes in the example.

[0030] According to step S32, an event is generated based on the value of a time column in the database table record. For example, the first column time value in the "Order" table can extract an event, "id" is "co1", category is "create order", and timestamp is "2017-08-11 10:33:37". Based on the above method, events are extracted from 8 database table records to obtain an event set of event logs, a total of 10 events.

[0031] According to step S33, the event generated based on the value of the time column in a record of the database table references the object extracted from the record, and references the object associated with the object determined by step S23. For example, the event "co1" and the object "o1" are both generated by the first record in the "Orders" table, so "co1" references the object "o1". Since the object "o1" is associated with the objects "ol1", "ol2", "er1" and "er2", "co1" also references the objects "ol1", "ol2", "er1" and "er2". Based on the above method, reference relationships are extracted from all database table records to obtain the objects referenced by each event, such as Figure 4 As shown in the "Referenced Objects" section.

[0032] The above implementation modes are only used to illustrate the present invention, but not to limit the present invention. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the essence and scope of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the present invention, and the patent protection scope of the present invention should be defined by the claims. The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.

Claims

1. A method for extracting object-oriented event logs from a relational database, characterized in that: The steps include: Set the format of object-oriented event logging; Based on the input database tables and the associations between them, determine the categories of objects in the event log and the identifiers and attributes of each object, and extract the object set from the database tables; Based on the time column and business process information in the input database table, the categories of events in the event log and the identifier and attributes of each event are determined, and an event set is extracted from the database table.

2. A method for extracting object-oriented event logs from a relational database as claimed in claim 1, characterized in that: The format of the object-oriented event log is specifically: Set up an object-oriented event log consisting of two aspects: object set and event set: Among them, objects represent the physical entities and information entities that make up the business process, and events represent the operational behaviors performed in the business process.

3. A method for extracting object-oriented event logs from a relational database as claimed in claim 2, characterized in that: When an event references one or more objects, it means that an event affects one or more objects; when an object is referenced by one or more events, it means that there is an association relationship between the objects.

4. A method for extracting object-oriented event logs from a relational database as claimed in claim 1, characterized in that: The specific method for extracting an object set from a database table is: Map the database table to obtain the object category and the identifier and attributes of each object: one database table corresponds to one object category, the name of the database table or the name of the user according to the scenario is used as the name of the object category, the primary key of the database table is used as the identifier of the object, and all columns in the database table or a part of the columns selected by the user are used as the attributes of the object; Extracting objects from database table records to obtain an object set of the event log: wherein, an object is extracted from a record in the database table, the category of the object is the object category corresponding to the database table, the identifier of the object is the primary key value of the record, and the attribute value of the object is the value of the corresponding column of the attribute determined in the record; According to the primary key-foreign key relationship between database tables, the association relationship between records in different tables is obtained, and the above relationship is mapped to the association relationship between corresponding objects.

5. A method for extracting object-oriented event logs from a relational database as claimed in claim 1, characterized in that: The specific method for extracting the event set from the database table is: Map the database table to obtain the event category and the identifier, timestamp and attribute of each event: wherein a time column in each database table corresponds to an event category, the event category name is set by the business process information and the name of the time column, by changing the primary key value of the database table or using an increasing value as the event identifier according to the time sequence of the events after all events are extracted, the time column is used as the timestamp of the event, and all the columns in the database table or some columns related to the event selected by the user are used as the attributes of the event; Extracting events from the database table record to obtain an event set of the event log: wherein an event is generated based on the value of a time column in the database table record, and the timestamp value of the event is the time value; An event generated based on the value of a time column in a record of a database table references an object extracted from the record and references objects to which the object is related.

6. A method for extracting object-oriented event logs from a relational database as claimed in claim 5, characterized in that: The identifier of the event does not overlap with the identifier of the object.

7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Internal audit log generating method and related devices

    CN107644107A

  • Log record processing method and device

    CN110019506A

  • Log content protection method and device, computer equipment and storage medium

    CN111651781A