Tracking method, device, electronic device, medium and program product

By adding trace fields to the business table and building a trace table, the problem of difficult to trace multiple tables in business operations is solved, effective tracking and correlation of business operations is achieved, and management efficiency is improved.

CN114253946BActive Publication Date: 2024-12-20CCB FINTECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111576136.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-12-20
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

In the prior art, business operations involve difficult to trace when multiple tables are involved, and a method is needed to effectively track and associate operation records of multiple business tables.

Method used

By adding a trace field to each business table and recording the unique identification and trace value of the business table involved in the log table, a trace table is constructed to track business operations and associate the business table with the information in the trace table.

Benefits of technology

It realizes effective tracking of multiple business tables involved in business operations, solves problems that are difficult to trace in the prior art, and improves the traceability and management efficiency of business operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114253946B_ABST
    Figure CN114253946B_ABST
Patent Text Reader

Abstract

The present disclosure provides a tracking method, device, electronic device, medium and computer program product for a business operation table. The above method and device can be used in the field of big data technology. The method includes: obtaining m business tables under the same business scenario; adding a first tracking field to each business table; assigning the same first tracking value to the first tracking field of each business table; obtaining a log table based on business operations under the business scenario, wherein the log table includes n pieces of related information, each piece of related information includes a business unique identification field of the business table involved and a business unique identification value corresponding to the business unique identification field, and each piece of related information also includes the first tracking field and the first tracking value of the business table involved; constructing a tracking table according to the related information, wherein the tracking table includes n pieces of tracking information, and the tracking information corresponds to the related information one by one; and tracking the business operation table according to the tracking table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of big data technology, and more specifically, to a method, device, electronic device, medium and computer program product for tracking a business operation table. Background Art

[0002] There are already many tools or software in the prior art for data lineage tracking, for example, Data Lineage, which associates the fields in the previous and next tables by parsing SQL statements to complete the association between the fields in a table and the next table. In the actual production / development process, it is generally necessary to decompile the code or find the source code, confirm the business logic through breakpoints or analyze the code, and deduce which tables have been added, deleted, modified, and checked. In the actual production / development process, experienced predecessors generally provide guidance. Summary of the invention

[0003] In view of this, the present disclosure provides a method, device, electronic device, computer-readable storage medium and computer program product for tracing a business operation table that is convenient for tracing a business operation involving multiple business tables.

[0004] One aspect of the present disclosure provides a method for tracking a business operation table, comprising: obtaining m business tables under the same business scenario, wherein each of the business tables includes a business unique identification field and a business unique identification value corresponding to the business unique identification field, and m is an integer greater than or equal to 1; adding a first tracking field to each of the business tables; assigning the same first tracking value to the first tracking field of each business table; obtaining a log table based on business operations under the business scenario, wherein the log table includes n pieces of related information, each piece of the related information includes the business unique identification field of the business table involved and the business unique identification value corresponding to the business unique identification field, each piece of the related information also includes the first tracking field and the first tracking value of the business table involved, and n is an integer greater than or equal to 1 and less than or equal to m; constructing a tracking table according to the related information, wherein the tracking table includes n pieces of tracking information, and the tracking information corresponds to the related information one by one; and tracking the business operation table according to the tracking table.

[0005] According to the tracking method of the business operation table of the embodiment of the present disclosure, by adding a first tracking field to each business table, assigning the same first tracking value to the first tracking field, and linking the tracking table with the business table through the information involved in the log table, the business table involved in the business operation can be tracked through the tracking table, which can solve the problem of difficult tracing of multiple tables involved in business operations in the prior art.

[0006] In some embodiments, constructing a tracking table according to the involved information includes: filling in n pieces of tracking information according to n pieces of involved information, respectively, wherein the involved information corresponds one-to-one to the tracking information.

[0007] In some embodiments, each of the tracking information includes a tracking identification field and a second tracking field, and filling the n tracking information according to the n pieces of the involved information includes: filling the value of the tracking identification field of one tracking information according to the business unique identification value of each piece of the involved information; and filling the value of the second tracking field of one tracking information according to the first tracking value of each piece of the involved information.

[0008] In some embodiments, the first tracking field is the same as the second tracking field.

[0009] In some embodiments, each tracking information also includes a tracking number field, and filling the n tracking information according to the n pieces of related information respectively also includes: when filling each tracking information with the n pieces of related information in turn, filling the value of the tracking number field of each tracking information according to the numbering rules.

[0010] In some embodiments, the numbering rule includes: increasing by 1 compared with the previous value.

[0011] In some embodiments, each of the business tables also includes a username field and a username value corresponding to the username field, each of the involved information includes the username field of the business table involved and the username value corresponding to the username field, each of the tracking information also includes a tracking username field, and constructing a tracking table based on the involved information includes: filling in the value of the tracking username field of the tracking information according to the username value of each of the involved information.

[0012] In some embodiments, the business operation includes at least one of data addition, data modification, and data deletion.

[0013] Another aspect of the present disclosure provides a device for tracking a business operation table, comprising: a first acquisition module, the first acquisition module is used to execute acquisition of m business tables under the same business scenario, wherein each of the business tables includes a business unique identification field and a business unique identification value corresponding to the business unique identification field, and m is an integer greater than or equal to 1; an adding module, the adding module is used to execute adding a first tracking field to each of the business tables; an assignment module, the assignment module is used to execute assigning the same first tracking value to the first tracking field of each business table; a second acquisition module, the second acquisition module is used to execute acquisition of a daily value based on business operations under the business scenario A log table, wherein the log table includes n pieces of related information, each piece of the related information includes the business unique identification field of the business table involved and the business unique identification value corresponding to the business unique identification field, each piece of the related information also includes the first tracking field and the first tracking value of the business table involved, and n is an integer greater than or equal to 1 and less than or equal to m; a construction module, the construction module is used to execute construction of a tracking table according to the related information, wherein the tracking table includes n tracking information, and the tracking information corresponds to the related information; and a tracking module, the tracking module is used to execute tracking of a business operation table according to the tracking table.

[0014] Another aspect of the present disclosure provides an electronic device, including one or more processors and one or more memories, wherein the memories are used to store executable instructions, and when the executable instructions are executed by the processors, the above-mentioned method is implemented.

[0015] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0016] Another aspect of the present disclosure provides a computer program product, comprising a computer program, wherein the computer program comprises computer executable instructions, and the instructions are used to implement the method as described above when executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0018] Figure 1 An exemplary system architecture to which the method and apparatus according to an embodiment of the present disclosure can be applied is schematically shown;

[0019] Figure 2 A flowchart schematically shows a method for tracking a business operation table according to an embodiment of the present disclosure;

[0020] Figure 3 Schematically shows a flow chart of constructing a tracking table according to related information according to an embodiment of the present disclosure;

[0021] Figure 4 A flowchart of filling n tracking information respectively according to n pieces of related information according to an embodiment of the present disclosure is schematically shown;

[0022] Figure 5 Schematically shows a flow chart of constructing a tracking table according to related information according to an embodiment of the present disclosure;

[0023] Figure 6 A block diagram schematically shows a device for tracking a business operation table according to an embodiment of the present disclosure;

[0024] Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0026] In the technical solution of this disclosure, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and they do not violate public order and good morals. In the technical solution of this disclosure, the acquisition, collection, storage, use, processing, transmission, provision, disclosure and application of data are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and they do not violate public order and good morals.

[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0028] When using expressions such as "at least one of A, B or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, features defined as "first" and "second" may explicitly or implicitly include one or more of the said features.

[0029] There are already many tools or software in the prior art for data lineage tracking, for example, Data Lineage. Datalineage associates the fields in the previous and next tables by parsing SQL statements to complete the association between the fields in the table and the next table. In the actual production / development process, it is generally necessary to decompile the code or find the source code, confirm the business logic through breakpoints or analyze the code, and deduce which tables have been added, deleted, modified, and checked. In the actual production / development process, guidance is generally provided by experienced predecessors. The above solution has the problem of difficulty in tracing when multiple forms are involved in business operations.

[0030] Embodiments of the present disclosure provide a tracking method, device, electronic device, computer-readable storage medium, and computer program product for a business operation table. The tracking method for a business operation table includes: obtaining m business tables in the same business scenario, wherein each business table includes a business unique identification field and a business unique identification value corresponding to the business unique identification field, and m is an integer greater than or equal to 1; adding a first tracking field to each business table; assigning the same first tracking value to the first tracking field of each business table; obtaining a log table based on business operations in a business scenario, wherein the log table includes n pieces of related information, each piece of related information includes a business unique identification field of the business table involved and a business unique identification value corresponding to the business unique identification field, and each piece of related information also includes a first tracking field and a first tracking value of the business table involved, and n is an integer greater than or equal to 1 and less than or equal to m; constructing a tracking table according to the related information, wherein the tracking table includes n pieces of tracking information, and the tracking information corresponds to the related information one by one; and tracking the business operation table according to the tracking table.

[0031] It should be noted that the business operation table tracking method, device, electronic device, computer-readable storage medium and computer program product disclosed in the present invention can be used in the field of big data technology, and can also be used in any field other than the field of big data technology, such as the financial field. The field of the present invention is not limited here.

[0032] Figure 1 The exemplary system architecture 100 of the tracking method, apparatus, electronic device, computer-readable storage medium and computer program product to which the business operation table can be applied according to the embodiment of the present disclosure is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0033] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0034] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0035] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0036] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0037] It should be noted that the tracking method of the business operation table provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the tracking device of the business operation table provided in the embodiment of the present disclosure can generally be set in the server 105. The tracking method of the business operation table provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the tracking device of the business operation table provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0038] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0039] The following will be based on Figure 1 The scene described by Figure 2 to Figure 5 The method for tracking the business operation table according to the embodiment of the present disclosure is described in detail.

[0040] Figure 2 The flowchart of the method for tracking the business operation table according to the embodiment of the present disclosure is schematically shown.

[0041] like Figure 2 As shown, the method for tracking the business operation table of this embodiment includes operations S210 to S260.

[0042] In operation S210, m business tables of the same user in the same business scenario are obtained, wherein each business table includes a business unique identification field and a business unique identification value corresponding to the business unique identification field, and m is an integer greater than or equal to 1. It should be noted that, for example, there are multiple business scenarios in the daily life of a bank, wherein a deposit business may be a business scenario, a withdrawal business may be a business scenario, a transfer business may be a business scenario, and so on, and the business scenarios of the bank are not given examples one by one here.

[0043] When a bank handles the same business, that is, the same user in the same business scenario, it may involve one business table or multiple business tables. Each business table includes a business unique identification field, under which the business unique identification value of the business table can be recorded. The business unique identification value of each business table is different and is used to distinguish business tables, that is, each business unique identification represents a unique business table.

[0044] In operation S220 , a first tracking field is added to each business table.

[0045] In operation S230, the first tracking field of each business table is assigned the same first tracking value. It is understandable that the first tracking value can be recorded under the first tracking field, and each business table has the same first tracking value to link m business tables under the same business scenario, and the first tracking value represents a unique business scenario.

[0046] In operation S240, a log table based on business operations in a business scenario is obtained, wherein the log table includes n pieces of related information, each piece of related information includes a business unique identification field of the business table involved and a business unique identification value corresponding to the business unique identification field, each piece of related information also includes a first tracking field and a first tracking value of the business table involved, and n is an integer greater than or equal to 1 and less than or equal to m.

[0047] It can be understood that in the same business scenario, a log table will be generated based on different business operations, and the log table can record information related to the operation, that is, the log table may include n pieces of information based on the operation, and each piece of information may include n business tables involved in the business operation. When the business operation involves 1 business table in the business scenario, the log table may include 1 piece of information; when the business operation involves 2 business tables in the business scenario, the log table may include 2 pieces of information; when the business operation involves 3 business tables in the business scenario, the log table may include 3 pieces of information; when the business operation involves n business tables in the business scenario, the log table may include n pieces of information, where n is an integer greater than or equal to 1 and less than or equal to m.

[0048] As a possible implementation method, the business operation may include at least one of data addition, data change and data deletion. Taking the deposit business as an example, data addition can be understood as when a user handles deposit business multiple times, the data of the latter handling is the addition of the data of the previous handling; data change can be understood as the data change made when the data of the current handling is incorrect or other circumstances require data change; data deletion can be understood as data deletion due to bank reasons or user personal reasons. Of course, the business operation is not limited to this, and the above is only an example and cannot be understood as a limitation of the present disclosure.

[0049] In operation S250, a tracking table is constructed according to the related information, wherein the tracking table includes n tracking information, and the tracking information corresponds to the related information one by one.

[0050] As a possible implementation method, Figure 3 As shown, operation S250 of constructing a tracking table according to the related information includes operation S251.

[0051] In operation S251, n tracking information are filled in according to n pieces of related information, wherein the related information corresponds to the tracking information one by one. In other words, the business unique identification field of the business table corresponding to each piece of related information and the business unique identification value corresponding to the business unique identification field can be filled into one tracking information, and the first tracking field and the first tracking value of the business table corresponding to each piece of related information can also be filled into the tracking information. Therefore, operation S251 can facilitate the construction of a tracking table according to the related information.

[0052] As a specific example, each tracking information includes a tracking identification field and a second tracking field, such as Figure 4 As shown, operation S251 fills n tracking information according to n pieces of related information, including operations S2511 to S2512.

[0053] In operation S2511, a value of a tracking identification field of tracking information is filled according to the business unique identification value of each piece of related information.

[0054] In operation S2512, a value of a second tracking field of a tracking information is filled according to the first tracking value of each piece of related information.

[0055] Since the business unique identification value represents a unique business table and the first tracking value represents a unique business scenario, in the tracking table, the value of the tracking identification field of the tracking information can be associated with the corresponding business table, and the first tracking value can be associated with the corresponding business scenario. When n tracking information are filled in, it can be obtained which business tables are involved in the business operation based on the same business scenario.

[0056] Furthermore, the first tracking field is the same as the second tracking field, so that the staff can clearly know that the first tracking field and the second tracking field are one tracking value, namely the first tracking value, which facilitates the smooth progress of work and problem finding.

[0057] Furthermore, each tracking information also includes a tracking number field, such as Figure 4 As shown, operation S251 fills in n tracking information according to n pieces of related information and also includes operation S2513.

[0058] In operation S2513, when n pieces of related information are sequentially filled into each tracking information, the value of the tracking number field of each tracking information is filled in according to the numbering rule. For example, assuming that n is 3, that is, when a certain business operation involves 3 business tables in the business scenario, 3 pieces of related information will be generated in the log table. When the first piece of related information is filled into a tracking information, the value of the tracking number field of the tracking information is filled in according to the numbering rule; when the second piece of related information is filled into a tracking information, the value of the tracking number field of the tracking information is filled in according to the numbering rule; when the third piece of related information is filled into a tracking information, the value of the tracking number field of the tracking information is filled in according to the numbering rule.

[0059] As a possible implementation method, the numbering rule may include: compared with the previous value, the numbering rule is incremented by 1. For example, when the first piece of information is filled into a tracking information, the value of the tracking number field of the tracking information is filled with 1 according to the rule of incrementing by 1 compared with the previous value; when the second piece of information is filled into a tracking information, the value of the tracking number field of the tracking information is filled with 2 according to the rule of incrementing by 1 compared with the previous value; when the third piece of information is filled into a tracking information, the value of the tracking number field of the tracking information is filled with 3 according to the rule of incrementing by 1 compared with the previous value.

[0060] Of course, the values ​​1, 2 and 3 of the tracking number field are only for illustration, and 1 can also be replaced by any natural number and is not limited to starting from 1. The values ​​1, 2 and 3 of the tracking number field are not to be understood as limitations on the present disclosure.

[0061] In operation S260, the business operation table is tracked according to the tracking table. In operation S250, the value of the tracking identification field of the tracking information can be associated with the corresponding business table, and the first tracking value can be associated with the corresponding business scenario. When n tracking information are filled, it can be obtained which business tables are involved in the business operation based on the same business scenario. Therefore, it is convenient to track the specific business tables involved in the business operation according to the tracking table.

[0062] According to the tracking method of the business operation table of the embodiment of the present disclosure, by adding a first tracking field to each business table, assigning the same first tracking value to the first tracking field, and linking the tracking table with the business table through the information involved in the log table, the business table involved in the business operation can be tracked through the tracking table, which can solve the problem of difficult tracing of multiple tables involved in business operations in the prior art.

[0063] In some embodiments of the present disclosure, each business table may further include a user name field and a user name value corresponding to the user name field, each piece of information includes a user name field of the business table involved and a user name value corresponding to the user name field, and each piece of tracking information also includes a tracking user name field. Figure 5 As shown, operation S250 of constructing a tracking table according to the related information includes operation S252.

[0064] In operation S252, a value of a tracking user name field of the tracking information is filled according to the user name value of each piece of information involved. Thus, by adding the tracking user name field of the tracking information, the corresponding information with the business table can be added, so that the staff can obtain more corresponding information between the tracking table and the business table, which is beneficial to the closer connection between the tracking table and the business table, thereby facilitating the tracking of the business table involved in the business operation through the tracking table.

[0065] The following describes in detail a method for tracking a business operation table according to an embodiment of the present disclosure. It is worth noting that the following description is merely an exemplary description and is not a specific limitation of the present disclosure.

[0066] This disclosure first implants code during the development process, combines all edge case operations during the operation process, extracts the places where the database retains the mark, and intelligently summarizes and displays the actual business line structure and call relationship. For the development intrusion line, some annotations can be written to modify the object, and annotations can be added to the code to complete the mapping layer between the database and the code, and some attributes can be added during compilation.

[0067] In the development environment, the developer's responsibility is to connect business logic tables and business tracking when writing business. Fields are added to tables and businesses as needed for tracking business. In the production environment, developers write and package the business, and there is a visual page for tracking to show to developers, testers, and operators to monitor the tracking link. Since sensitive fields are usually the values ​​of a field in a table, this disclosure tracks the relationship between tables based on specific fields. Since tracking connects one table to the next, no mapping is done on a single field, and no sensitive data is involved.

[0068] Among them, using trace_value to reflect the entire business logic relationship is reliable, and the field trace_value in the table is used for tracking and the trace_tb table is used as an auxiliary. If different business processes happen to have the same table name and value, then if these different businesses are traced through the same link, then they can be deduced to be the same business. Otherwise, at least one link node is different, and different businesses can be distinguished. Two unrelated processes will not be associated together.

[0069] The following describes in detail the tracking method of the business operation table.

[0070] Step 1: Prepare the database table.

[0071] Add a field to each table in the database, for example, traceId. The traceId field is of string type, such as varchar.

[0072] As shown in Table 1, taking MySQL as an example, create a user user_tb table. Table 1 is the user_tb table.

[0073] Table 1

[0074] Fields type length user_id varchar 64 user_name varchar 32 password varchar 32 nick_name varchar 32 trace_value varchar 100

[0075] Among them, user_id is the auto-increment id, user_name is the user name, password is the password, nick_name is the nickname, and trace_value is the tracing field, among which trace_value is the added field used for tracing links, and the others are fields used by the business.

[0076] As shown in Table 2, a trace_tb table is created for link analysis. Table 1 is the trace_tb table.

[0077] Table 2

[0078] Fields type length trace_id varchar 64 tb_name varchar 32 sort varchar 32 trace_value varchar 32

[0079] Where, trace_id is auto-incremented, tb_name is the table name in the link, sort is the order field, and trace_value is the unique business number. The value of trace_value in the trace_tb table is the value of trace_value in the user_tb table.

[0080] Step 2: Design the tracing field. Add a trace_value field to each table, and use the unique value of trace_value to identify this business. For example, value = 1234xyz, which is incremented by 1. The result is inserted into the value [1234xyz], and so on. After the first table generates a unique trace_value value, the business chain uses this trace_value value. For example, there are two tables, employee_tbl and user_tb. Employee_tbl and user_tb are used to complete one business, and two tables need to be entered. First insert data into user_tb, and then insert into employee_tbl, both inserting into the trace_value field.

[0081] If the value is a meaningful business mapping method, the tracking results provided are more effective. For example, the same business may involve different branches in different situations. For example, the business includes the permission setting function. A's permission is for general users, which will involve 2 tables. B's permission is for administrators, which will involve 5 tables. In this way, the same business will have different table mapping relationships. Identifying the business type on the id can greatly increase the recognition and understanding of the tracking.

[0082] When the code encounters a critical SQL step, it is stored in the table you want to track. When the business performs addition, deletion, and modification operations, a unique trace_value value is written in the corresponding table. The trace_value value is used as a serial identifier. Generally, a new entry will be added when a business system is added, deleted, or modified, so addition, deletion, or modification can be considered as an addition operation. If a general business system adds, deletes, or modifies a database directly, an operation record will also be inserted into an additional table. The operation record can also add a tracking field, which is applicable to link tracking.

[0083] Step 3: Reverse link deduction, based on the tracking field value, reverse the link table query / tracking stage, query the value in all tables in the database based on the first half of the unique value, and then use the second half of the unique value in these tables to sort the order. Display it in the form of a chart or list.

[0084] For example, reverse deduction is done through MySQL log binlog. Generally, binlog log content, monitoring log, parse and match operations with trace_value field. Then the table field is entered into the tb_name field of the trace_tb table as the table name, and trace_value is the trace_value value of the trace_tb table. Sort is the order, and the trace_value of the business table appears as auto-increment accumulation. As shown in Table 3, trace_value in Table 1 is aaa, the first sort is 1, trace_value in Table 2 is aaa, the first sort is 2, trace_value in Table 3 is aaa, the first sort is 3, and so on.

[0085] Table 3

[0086] tb_name sort trace_value Table 1 1 aaa Table 2 2 aaa Table 3 3 aaa

[0087] In this case, the trace_tb table has three records, tb_name is table 1, table 2, table 3, trace_value is aaa, and sort is 1, 2, 3.

[0088] Step 4: Process database log operations. When data is added: parse the insert keyword field, match and filter the trace_value field, and insert it into trace_tb. When data is updated: parse the update keyword field, match and filter the trace_value field, and insert it into trace_tb. When data is deleted: parse the delete keyword field, and query whether tb_name in the trace table trace_tb has this indication. If it does, insert it into trace_tb.

[0089] Based on the above-mentioned tracking method of the business operation table, the present disclosure also provides a tracking device 10 for the business operation table. Figure 6 The device 10 for tracking the business operation table is described in detail.

[0090] Figure 6 The structural block diagram of the service operation table tracking device 10 according to the embodiment of the present disclosure is schematically shown.

[0091] The device 10 for tracking a business operation table includes a first acquisition module 1 , an adding module 2 , an assignment module 3 , a second acquisition module 4 , a construction module 5 and a tracking module 6 .

[0092] The first acquisition module 1 is used to perform operation S210: obtain m business tables under the same business scenario, wherein each business table includes a business unique identification field and a business unique identification value corresponding to the business unique identification field, and m is an integer greater than or equal to 1.

[0093] Adding module 2, the adding module 2 is used to perform operation S220: adding a first tracking field to each business table.

[0094] The assignment module 3 is used to perform operation S230: assigning the same first tracking value to the first tracking field of each business table.

[0095] The second acquisition module 4 is used to perform operation S240: obtain a log table based on business operations in a business scenario, wherein the log table includes n pieces of related information, each piece of related information includes a business unique identification field of the business table involved and a business unique identification value corresponding to the business unique identification field, each piece of related information also includes a first tracking field and a first tracking value of the business table involved, and n is an integer greater than or equal to 1 and less than or equal to m.

[0096] Construction module 5, construction module 5 is used to perform operation S250: construct a tracking table according to the related information, wherein the tracking table includes n tracking information, and the tracking information corresponds to the related information one by one.

[0097] The tracking module 6 is used to execute tracking of the business operation table according to the tracking table.

[0098] Since the above-mentioned device 10 for tracking the business operation table is set based on the method for tracking the business operation table, the beneficial effects of the above-mentioned device 10 for tracking the business operation table are the same as those of the method for tracking the business operation table, which will not be repeated here.

[0099] In addition, according to an embodiment of the present disclosure, any multiple modules among the first acquisition module 1, the adding module 2, the assigning module 3, the second acquisition module 4, the building module 5 and the tracking module 6 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.

[0100] According to an embodiment of the present disclosure, at least one of the first acquisition module 1, the adding module 2, the assigning module 3, the second acquisition module 4, the building module 5 and the tracking module 6 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or can be implemented in any one of the three implementation methods of software, hardware and firmware, or in an appropriate combination of any of them.

[0101] Alternatively, at least one of the first acquisition module 1, the adding module 2, the assignment module 3, the second acquisition module 4, the construction module 5 and the tracking module 6 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is executed.

[0102] Figure 7 A block diagram of an electronic device suitable for implementing a method for tracking a business operation table according to an embodiment of the present disclosure is schematically shown.

[0103] like Figure 7As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0104] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0105] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the I / O interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.

[0106] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0107] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.

[0108] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method of the embodiment of the present disclosure.

[0109] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 901. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0110] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0111] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0112] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0113] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two 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 box in the block diagram or flow chart, and the combination of the boxes in the block diagram 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.

[0114] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0115] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for tracking a business operation table, characterized in that: include: Obtain m business tables under the same business scenario, wherein each of the business tables includes a business unique identification field and a business unique identification value corresponding to the business unique identification field, and m is an integer greater than or equal to 1; Adding a first tracking field to each of the business tables; Assign the same first tracking value to the first tracking field of each business table; Obtain a log table based on business operations in the business scenario, wherein the log table includes n pieces of related information, each piece of the related information includes the business unique identification field of the business table involved and the business unique identification value corresponding to the business unique identification field, each piece of the related information also includes the first tracking field and the first tracking value of the business table involved, and n is an integer greater than or equal to 1 and less than or equal to m; Constructing a tracking table according to the related information, wherein the tracking table includes n tracking information, and the tracking information corresponds to the related information one by one; and The business operation table is tracked according to the tracking table.

2. The method according to claim 1, characterized in that The constructing of the tracking table according to the involved information includes: filling in n pieces of the tracking information according to n pieces of the involved information, respectively, wherein the involved information corresponds to the tracking information one by one.

3. The method according to claim 2, characterized in that Each of the tracking information includes a tracking identification field and a second tracking field. Filling n pieces of tracking information respectively according to the n pieces of related information includes: Fill in the value of the tracking identification field of the tracking information according to the business unique identification value of each piece of the related information; and Fill the value of the second tracking field of the tracking information according to the first tracking value of each piece of the related information.

4. The method according to claim 3, characterized in that The first tracking field is the same as the second tracking field.

5. The method according to claim 3, characterized in that: Each of the tracking information also includes a tracking number field, Filling n pieces of tracking information according to the n pieces of related information respectively further includes: When the n pieces of the related information are sequentially filled into each of the tracking information, the value of the tracking number field of each of the tracking information is filled in according to the numbering rule.

6. The method according to claim 5, characterized in that The numbering rule includes: increasing by 1 compared with the previous value.

7. The method according to claim 1, characterized in that Each of the business tables further includes a user name field and a user name value corresponding to the user name field, each of the related information includes the user name field of the business table involved and the user name value corresponding to the user name field, and each of the tracking information further includes a tracking user name field, The constructing of the tracking table according to the related information includes: The value of the tracking username field of the tracking information is filled in according to the username value of each piece of the related information.

8. The method according to any one of claims 1 to 7, characterized in that The business operation includes at least one of data addition, data modification and data deletion.

9. A device for tracking a business operation table, characterized in that: include: A first acquisition module, wherein the first acquisition module is used to execute acquisition of m business tables in the same business scenario, wherein each of the business tables includes a business unique identification field and a business unique identification value corresponding to the business unique identification field, and m is an integer greater than or equal to 1; An adding module, the adding module is used to add a first tracking field to each of the business tables; An assignment module, the assignment module is used to assign the same first tracking value to the first tracking field of each business table; a second acquisition module, the second acquisition module is used to execute acquisition of a log table based on a business operation in the business scenario, wherein the log table includes n pieces of related information, each piece of the related information includes the business unique identification field of the business table involved and the business unique identification value corresponding to the business unique identification field, each piece of the related information also includes the first tracking field and the first tracking value of the business table involved, and n is an integer greater than or equal to 1 and less than or equal to m; A construction module, the construction module is used to execute the construction of a tracking table according to the related information, wherein the tracking table includes n tracking information, and the tracking information corresponds to the related information one by one; and A tracking module is used to track the business operation table according to the tracking table.

10. An electronic device, characterized in that: include: one or more processors; One or more memories, used to store executable instructions, wherein when the executable instructions are executed by the processor, the method according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, characterized in that: The storage medium stores executable instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The method comprises a computer program, wherein the computer program comprises one or more executable instructions, and when the executable instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Log monitoring method, device and equipment and computer readable storage medium

    CN111427736A

  • Log tracking method, log generation method, log tracking device, log generation device and log generation system

    CN111858525A

  • Business process monitoring method, apparatus and device, and computer readable medium

    CN111858621A

  • Log aggregation method and device and computer program product

    CN113407511A

  • Membership Tracking and Data Eviction in Mobile Middleware Scenarios

    US20120023067A1