Operation log recording method and computing device

By recording the difference information of the operation log and generating the difference log, the problems of large storage space occupancy and high database pressure in the existing technology are solved, and efficient data traceability and analysis are achieved.

CN120469896APending Publication Date: 2025-08-12HENAN QINWEI DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510405421.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing operation logging method is not accurate enough, resulting in difficulty in tracking and analyzing historical data, large storage space occupies and excessive database pressure.

Method used

By recording the difference information of data changes, a difference record log is generated, including the first value before the change of the target data and the second value after the change, the difference record rule is determined based on the object attribute type, and the difference record log is generated and saved to the database.

Benefits of technology

It reduces the storage amount of log data, improves the readability and storage efficiency of logs, reduces database pressure, and improves the efficiency of data traceability and analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469896A_ABST
    Figure CN120469896A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an operation log recording method and computing device.The method comprises the steps that when a user operates target data, a first value before the target data changes and a second value after the target data changes are obtained; determining a target difference record rule based on the object attribute type of the target data, the target difference record rule being used for representing a logic for generating a difference record log; on the basis of the target difference recording rule, a difference recording log is generated, and change description information of the first value and the second value is recorded in the difference recording log; and storing the difference record log in a database. According to the embodiment of the invention, by recording the data change information, the log size is reduced, the storage space is saved, and the database pressure is relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of log data recording, and in particular to an operation log recording method and computing device. Background Art

[0002] With the advancement of information technology, log data has become a crucial tool for enterprises to record the storage and changes of business data within software systems. Operation logs, in particular, primarily record the addition or modification of a system object by a user. Similar to a diary, they record the time and content of a user's actions on an object. Almost every system maintains various operation logs, such as a billing address changing from A to B, a user's mobile number changing from C to D, order logistics information, and customer service records of work orders. Unlike system logs, which provide developers with a basis for troubleshooting, operation logs focus more on changes in business content and require high readability.

[0003] As business operations progress, historical operation log data accumulates. This data is crucial for tracing, analysis, and data rollback. Therefore, effective management of historical operation log data has become a key requirement for software systems. However, current operation log recording methods are often inaccurate and difficult to understand, making subsequent tracking and analysis of historical data difficult. Summary of the Invention

[0004] The embodiments of the present application provide an operation log recording method and computing device, which reduce the size of the log, save storage space, and alleviate database pressure by recording information about data changes.

[0005] To this end, the following technical solutions are provided in the embodiments of the present application:

[0006] In a first aspect, an embodiment of the present application provides an operation log recording method, comprising: when a user operates on target data, obtaining a first value of the target data before the change and a second value of the target data after the change; determining a target difference recording rule based on the object attribute type of the target data, the target difference recording rule being used to represent the logic for generating a difference recording log; generating a difference recording log based on the target difference recording rule, the difference recording log recording change description information of the first value and the second value; and saving the difference recording log to a database.

[0007] This implementation optimizes operation log storage by recording data change information, reducing log size, saving storage space, and alleviating database pressure. The core idea is to record only the differences in data changes, rather than the complete original and modified values, thereby improving data storage efficiency and readability.

[0008] Specifically, when a user operates on target data in the system (such as order information or user information), the system first obtains the first value (original attribute value) before the operation and the second value (modified attribute value) after the operation. The key to this operation is to capture data differences, rather than recording the entire data. Based on the object attribute type of the target data, the system determines a set of target difference recording rules, which define how to generate difference logs. Object attribute types refer to the attribute values within the data's attribute structure, such as attributes like a user's phone number or address. The logical rules for generating difference logs (i.e., difference recording rules) are determined based on the object attribute type of the target data. For example, if the content of a string field changes, the system may only record the changed content. However, for numeric fields, the changed value and its unit must be recorded. Different recording rules apply to each attribute change; that is, different data types (add, modify, delete) can have different recording rules to optimize storage. Based on the determined target difference recording rules, the system describes the differences between the first and second values and generates a difference log. This difference log does not record the complete data value, but only the changed portion, reducing redundant information in log storage. Finally, the generated difference log is saved to the database for subsequent query, tracing, and analysis. Since the log only records the changed information, it avoids storing large amounts of redundant data, thereby reducing storage costs. Furthermore, using difference logging, the log only records the changed data, making the information more concise and intuitive, improving readability and enabling analysts to quickly understand the core content of the data changes.

[0009] The operation logging method of the present invention records data change information in a differentiated manner, reducing the amount of log data stored while also improving log readability and the efficiency of subsequent operations. It effectively reduces database pressure, optimizes storage space, and provides efficient data tracing and rollback capabilities. It is particularly suitable for applications requiring precise tracking and analysis of large amounts of business data changes, such as those in finance, e-commerce, and customer management.

[0010] As an achievable implementation method, the object attribute type of the target data includes the object index corresponding to the target data object, and the associated object type, associated object index and attribute value record table of each attribute in at least one attribute associated with the target data object; obtaining the first value before the target data changes and the second value after the target data changes includes: when the user operates on the target data, according to the object index of the target data, determining at least one object of the target data and the unmodified attribute value of each object in the data table corresponding to the target data as the first value; when the user operates on the target data, obtaining the type of operation performed by the user on the object corresponding to the target data; according to the modification operation indicated by the operation type for the associated object type, associated object index and attribute value of each attribute in at least one attribute associated with the object attribute type of the target data, obtaining the attribute value of the target data modified according to the operation type as the second value.

[0011] In this embodiment, the object index is a unique identifier that identifies the target data and can be used to quickly locate data in the database. Associated attributes: There is a certain association relationship between the target data and other objects. These association relationships include multiple attributes (such as the address, order, etc. associated with a certain user). The associated object type, associated object index, and attribute value record table of each attribute are also recorded. The design of these attribute types ensures that the relationship between the target data and the associated data is clearly recorded, so that each attribute change can be accurately tracked. When the user operates on the target data, the system will query the data table corresponding to the target data based on the object index to find the attribute value before the modification of at least one attribute of the object, that is, record the value before the operation (first value). The system will also obtain the type of operation performed by the user on the target data. Optionally, the operation type includes "add", "delete", "modify", etc. This operation type determines how to handle subsequent attribute value modifications. According to the operation type, the system obtains the attribute value after the operation (second value) by performing operations on each associated attribute (such as modification, deletion, addition, etc.) based on the attributes associated with the target data object attribute type indicated by the operation type. By introducing information such as object indexes, associated object types, associated object indexes, and attribute value records, the system can accurately locate changes in target data and its related attributes. This allows tracking not only changes to the target data itself, but also changes to its associated data. This precise change capture ensures that all data modifications are recorded in detail, greatly improving the accuracy of data tracing and analysis.

[0012] After collecting the first value (before the change) and the second value (after the change) of the target data, the system generates a differential record log based on pre-determined target differential recording rules. This log only records the changes between the two values, such as which attributes changed and the details of the changes, rather than recording all detailed data. This improves the streamlining of log storage. When a large number of operation logs accumulate, traditional log data often becomes voluminous due to the need to record all data, making query and analysis complex and inefficient. Using differential recording, the system focuses only on the changes in the log, allowing analysts to more quickly locate key points of data changes, improving query and analysis efficiency. This differential recording significantly speeds up the process, especially when data rollbacks or retrospective operations are required. However, traditional logging methods accumulate large amounts of log data with frequent operations, placing significant pressure on the database and impacting system performance. Differential recording can significantly reduce the amount of log data stored in the database, thereby alleviating the database burden and improving the overall system response speed and processing efficiency.

[0013] As an achievable implementation method, the target difference recording rule is used to generate a difference recording log, including: recording the user name, the operation time when the user operates the target data, the effective start time of the first value before the target data changes, and the effective end time of the second value after the target data changes.

[0014] In this embodiment, upon target data change, the system generates a difference log based on the target difference recording rules. These rules define the information to be recorded and specify the content of the record. The log content may include: User name, which records the user ID that initiated the operation. This is a unique identifier in the system that allows the user to trace the data operation. Operation time, which records the timestamp of the user's operation. This time helps locate the data change, facilitating subsequent audits or analysis. The first value effective start time before the target data change: This records the effective start time of the data before the data change, i.e., the effective time range before the data change. This identifies the valid period before the operation. The second value effective end time after the target data change: This records the effective end time after the data change, i.e., the effective time range after the data change. This helps determine the effective period after the data change, typically indicating the end time of the data change. By recording the user name, operation time, effective start time, and effective end time of the data change, the system provides a complete and transparent audit chain for the operation. Each data change is clearly labeled with the initiator of the operation and the specific time window, enabling clear tracking of each data change. This audit function is particularly important in scenarios with high data compliance requirements, such as finance, healthcare and other industries.

[0015] As an achievable implementation method, the operation types performed by the user on the target data include at least one of data structure deletion drop, truncation truncate, insertion insert, data content deletion delete, update update, change alter and selection select; the target difference record rule is used to indicate that the logic for generating the difference record log is generated by the associated object type in the object attribute type, and the associated object type includes at least one of multiple selection of personnel, multiple selection button group, JSON table and short text.

[0016] In this implementation, the solution incorporates differentiated logging rules for different data attribute types and operation types, adapting to a variety of complex business scenarios. Different business objects and attributes can have distinct logging strategies. This design makes the solution highly scalable and flexible, making it applicable to a wide range of software systems and business processes. Specifically, the solution records different types of data operations, including changes to data structures, content, and data tables, ensuring a traceable record of every operation. Whether inserting, updating, or deleting data, each operation is accurately recorded, significantly enhancing audit tracking capabilities. This comprehensive logging ensures that all important operations in the system can be tracked and audited, making it suitable for business scenarios with compliance requirements (such as finance and healthcare). The introduction of associated object types (such as multiple-select personnel, multiple-select button groups, JSON tables, and short text) provides significant flexibility in log generation. Differentiated logging rules can be customized for different data types and operation scenarios, ensuring that log content is both accurate and adaptable to diverse business needs. For example, JSON table-type logging accurately captures changes in complex data structures, preventing information loss. For multiple-select personnel, the specific personnel data selected by each user is recorded, ensuring operational transparency.

[0017] As an achievable implementation method, the difference recording log is generated based on the target difference recording rule, including: when the associated object type is multiple selection of personnel, obtaining the operation type of the user's operation on the corresponding object in the multiple selection of personnel; based on the operation type, recording the personnel deleted and / or added in the multiple selection of personnel indicated by the operation type as change description information of the first value and the second value.

[0018] In this implementation, the solution accurately tracks every action in the personnel checkbox, particularly when adding or deleting personnel, clearly recording the specific content of each change. By recording the first and second values, the system clearly indicates which personnel were deleted or added, providing a clear basis for audits, investigations, and backtracking. Furthermore, only recording the changed values reduces log size and reduces database pressure.

[0019] As an achievable implementation method, the difference recording log is generated based on the target difference recording rule, including: when the associated object type is a multiple-choice button group, obtaining the operation type of the user's operation on the corresponding object in the multiple-choice button group; based on the operation type, recording the buttons in the multiple-choice button group that are selected and / or canceled under the operation type indication as change description information of the first value and the second value.

[0020] In this implementation, by recording each selection and cancellation button operation, the system accurately captures each change in button state. This is particularly important for applications that require precise recording of user actions or data changes, such as form filling, questionnaires, and settings modifications. The comparison of the first and second values ensures a clear description of each change. Users can quickly view the difference in button state before and after each operation, understanding which buttons were selected or deselected.

[0021] As an achievable implementation method, the difference record log is generated based on the target difference record rule, including: when the associated object type is a JSON table, obtaining the operation type of the user on the corresponding object in the JSON table; based on the operation type, recording the corresponding modified fields and modification content in the JSON table indicated by the operation type as change description information of the first value and the second value.

[0022] In this embodiment, the JSON table format supports complex nested data structures and can contain hierarchical data such as objects and arrays. The solution can flexibly record field changes in these complex structures. It is not only suitable for simple data tables, but can also handle more complex data structures, such as modifications to nested objects, additions or deletions to arrays, etc. When operating on complex data structures, the system will record specific changes according to the operation type (such as addition, modification, deletion) and ensure that the changes are clearly displayed. By recording changes in JSON table fields and using the values before and after the field changes as change descriptions, the system can accurately and transparently record each user operation. The advantages of the solution include precise operation tracking, data recovery support, operation auditing, convenient error repair, and enhanced system security and traceability. It is particularly suitable for scenarios where complex data changes need to be recorded, such as database management, configuration management, enterprise systems, etc.

[0023] As an achievable implementation method, the difference recording log is generated based on the target difference recording rule, including: when the associated object type is a short text, obtaining the operation type of the user's operation on the corresponding object in the short text; based on the operation type, recording the modified text content in the short text indicated by the operation type as the change description information of the first value and the second value.

[0024] In this implementation, a difference record is generated for each operation by recording in detail the type of user operation on short text fields and the content of the changes. Each record contains not only the text content before and after the modification, but also important information such as the operation time and user information. This mechanism provides precise change tracking, data recovery support, operation auditing, and error troubleshooting capabilities, while enhancing the transparency, traceability, and security of the system. Its advantages are widely applicable to various application scenarios requiring efficient auditing, data protection, compliance assurance, and operational transparency.

[0025] As a feasible implementation method, the database includes at least one of an object record table, an object attribute change record table and an object attribute history record table; wherein, the object record table includes the object index, object name, field and attribute value of the target data; the object attribute change record table includes the object index, associated object type, associated object index, operation type, operation time and attribute value of the target data; the object attribute history record table includes the object index, associated object type, associated object index, attribute name of the changed object, record before change, record after change, change description, operator, operation time, effective start time, effective end time and attribute value.

[0026] In this implementation, the object record table is used to record the current status of the target data object. The object attribute change table records changes to object attributes after each operation. It details the specific operation performed on a particular object, the time of the operation, and the content of the modification. The object attribute history table is used to record historical changes to object attributes, tracking each change in detail, including the before and after values, description, operator, and time period during which the change took effect. By designing three tables—the object record table, the object attribute change record table, and the object attribute history table—each operation and change on the target data object can be effectively managed and tracked. The advantages of this solution lie in its detailed change tracking, flexible history management, efficient recovery mechanisms, strong audit support, data consistency, and security. This design not only meets complex business needs but also provides strong support for data management, compliance assurance, and business optimization. Furthermore, by recording data change information, the log size is reduced, saving storage space and alleviating database pressure.

[0027] In the second aspect, an embodiment of the present application provides an operation log recording system, including: a log aspect module, a data comparison module and a log data storage module; wherein the log aspect module is used to obtain the operations performed by the user on the target data; the data comparison module is used to obtain the first value of the target data before the change and the second value of the target data after the change when the user operates on the target data; it is specifically used to generate a difference recording log based on the target difference recording rule, and the difference recording log records the change description information of the first value and the second value; the log data storage module saves the difference recording log to a database.

[0028] As an achievable implementation method, the data comparison module is used to obtain a first value of the target data before the change and a second value of the target data after the change, and is specifically used to: when a user operates on the target data, determine at least one object of the target data and the attribute value of each object before modification in the data table corresponding to the target data according to the object index of the target data, as the first value; when the user operates on the target data, obtain the type of operation performed by the user on the object corresponding to the target data; according to the modification operation of the associated object type, associated object index and attribute value of each attribute in at least one attribute associated with the object attribute type of the target data indicated by the operation type, obtain the attribute value of the target data after modification according to the operation type as the second value.

[0029] As an achievable implementation method, the data comparison module is used to generate a difference record log based on the target difference recording rules, specifically used to: record the user name, the operation time when the user operates the target data, the effective start time of the first value before the target data changes, and the effective end time of the second value after the target data changes.

[0030] As an achievable implementation method, the data comparison module is used to generate a difference record log based on the target difference record rule, specifically for: when the associated object type is multiple selection of personnel, obtaining the operation type of the user's operation on the corresponding object in the multiple selection of personnel; based on the operation type, recording the personnel deleted and / or added in the multiple selection of personnel indicated by the operation type as the change description information of the first value and the second value.

[0031] As an achievable implementation method, the data comparison module is used to generate a difference record log based on the target difference recording rule, specifically for: when the associated object type is a multiple-choice button group, obtaining the operation type of the user's operation on the corresponding object in the multiple-choice button group; based on the operation type, recording the buttons in the multiple-choice button group that are selected and / or canceled under the operation type indication as change description information of the first value and the second value.

[0032] As an achievable implementation method, the data comparison module is used to generate a difference record log based on the target difference record rule, specifically for: when the associated object type is a JSON table, obtaining the operation type of the user on the corresponding object in the JSON table; based on the operation type, recording the corresponding modified fields and modification content in the JSON table indicated by the operation type as change description information of the first value and the second value.

[0033] As an achievable implementation method, the data comparison module is used to generate a difference record log based on the target difference record rule, specifically for: when the associated object type is a short text, obtaining the operation type of the user on the corresponding object in the short text; based on the operation type, recording the modified text content in the short text indicated by the operation type as change description information of the first value and the second value.

[0034] In a third aspect, an embodiment of the present application further provides a computing device comprising at least one memory for storing programs; and at least one processor for executing the programs stored in the memory; wherein the memory is coupled to the processor, and when the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.

[0035] In a fourth aspect, an embodiment of the present application further provides a server cluster comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method described in any possible implementation of the first aspect.

[0036] In the fifth aspect, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions in the computer-readable storage medium are executed by a computing device, the computing device executes the method involved in the first aspect and its possible implementation methods.

[0037] In a sixth aspect, an embodiment of the present application further provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computing device, the computing device executes the method described in the first aspect and its possible implementation methods.

[0038] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0039] In summary, the embodiments of the present application have at least one of the following advantages:

[0040] 1. Object attribute change record table

[0041] Improve storage efficiency by recording data change points and discarding unchanged values, significantly saving storage space. In addition, data models of different objects can be recorded in the same table, further saving storage space.

[0042] 2. Object attribute change record object

[0043] Improve user experience: By obtaining a set of object difference values and assembling a description of the difference between the old and new values, log records are made more accurate and detailed, facilitating subsequent tracking and analysis of historical data and enabling users to more clearly understand operation records.

[0044] Strong versatility: This patent is applicable to various types of data formats, including multiple selections of personnel, multiple selection button groups, JSON tables, short texts, etc., and has wide adaptability.

[0045] 3. Data effective time period

[0046] Facilitates subsequent tracking and analysis of historical data: By recording the effective time period of the data, the data life cycle is clear at a glance, which greatly facilitates subsequent data tracking and analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 FIG. 1 is a schematic diagram of the architecture of an operation log recording system provided by an embodiment of the present application;

[0048] Figure 2 A schematic diagram of a process flow of an operation log recording method provided by an embodiment of the present application is shown;

[0049] Figure 3 A schematic diagram of the structure of an operation log recording device provided in an embodiment of the present application is shown;

[0050] Figure 4 A schematic diagram of the structure of a computing device provided in an embodiment of the present application is shown;

[0051] Figure 5 A schematic diagram of the architecture of a computing device cluster provided in an embodiment of the present application;

[0052] Figure 6 This is a schematic diagram of the architecture of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0054] In the description of the embodiments of the present application, words such as "exemplary," "for example," or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary," "for example," or "for example" in the embodiments of the present application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.

[0055] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the term "plurality" means two or more. For example, "multiple systems" refers to two or more systems, and "multiple terminals" refers to two or more terminals.

[0056] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly identifying the technical features being referred to. Thus, features specified as "first" or "second" may explicitly or implicitly include one or more of such features. The terms "include," "comprising," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.

[0057] In the description of the embodiments of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

[0058] In the description of the embodiments of the present application, the terms "first\second\third, etc." or module A, module B, module C, etc. are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0059] In the description of the embodiments of the present application, the numbers representing the steps, such as S101, S102, etc., do not necessarily mean that the steps must be executed in this manner. If permitted, the order of the previous and next steps can be interchanged, or they can be executed simultaneously.

[0060] Related terms involved in the embodiments of this application:

[0061] Log: refers to the recorded information generated by systems, applications, devices, etc., which is used to record operating status, events, error messages, or operational behaviors. It is usually used for monitoring, troubleshooting, analysis, auditing, etc.

[0062] An operation log is a log file that records various operations within a system, software, or device. It records in detail various operations performed by users or systems, including timestamps, operation content, operator, and results. The purpose of operation logs is to help system administrators, developers, and security personnel monitor system activity, track issues, conduct audits, and ensure system security and reliability.

[0063] Aspect-oriented programming (AOP) refers to the process of extracting, processing, and analyzing specific information from logs generated by software systems. Log aspecting allows you to extract critical log information from the vast log volumes, analyze and monitor it, and identify and resolve system errors and issues. Log aspecting can be used for system performance optimization, troubleshooting, and security testing. Common log aspecting techniques include log filtering, log parsing, log display, log aggregation, and log analysis.

[0064] JSON table: JSON (JavaScript Object Notation) is a lightweight data exchange format that is easy to read and write. It uses key-value pairs to organize data and is typically used to transfer data between a server and a client. A JSON table typically refers to formatting JSON data into a tabular structure for easy viewing and processing. In practical applications, converting JSON data into a "table" format helps visualize the data and process it more intuitively. Especially when the JSON data contains nested structures or arrays, presenting the data in a tabular format can greatly improve the efficiency of understanding and analysis. In an embodiment of the present application, a JSON table can be used to store and display data.

[0065] Data model: It is an abstraction of data characteristics. It describes the static characteristics, dynamic behavior and constraints of the system at an abstract level, and provides an abstract framework for information representation and operation of the database system.

[0066] Entity-Relationship (ER) model: also known as entity-relationship model or entity-relationship pattern diagram, is a data model or pattern diagram used for high-level description of conceptual data models.

[0067] Object attributes: In object-oriented software design, everything is an object. Object attributes are a key component of an object, defining its state and data. Attributes allow the outside world to understand specific information about an object, such as user information, order status, and inventory quantities.

[0068] Object property type: In object-oriented design, the type of an object property (also called its data type) refers to the type of value that the property holds. The property type determines the kind of data that the property can store, such as numeric values, characters, Boolean values, sets, and class objects.

[0069] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0070] The embodiment of the present application provides an operation log recording method. When the log data is collected, the method records the data change point when the data changes, records the before and after values of the attributes that have changed in the data model, and discards the unchanged values to save storage space. In addition, the data models of different objects can also be recorded in the same table to further save storage space. Afterwards, different data comparison schemes are selected according to different data types. For example, the before and after values of the attributes that have changed in the data model are compared according to the time period when the data is effective, and a difference result is generated. This can more accurately reflect the user's operation, thereby improving the accuracy of the log record and making the changes in the data more intuitively displayed to the user.

[0071] Next, the architecture of an operation log recording system provided in an embodiment of the present application is introduced.

[0072] Figure 1 The diagram in FIG. 1 is a schematic diagram of the architecture of an operation log recording system provided by an embodiment of the present application. Figure 1As shown, the operation logging system includes a log section module, a data comparison module, and a log data storage module. When users manipulate data, the log section module records the data values before and after the change and stores them in the data comparison module. The data comparison module uses specific logic based on the data type to generate corresponding difference results. The log data storage module saves the generated difference results, along with information such as the old and new data values and the effective time period, to a database.

[0073] In order to better understand the technical solutions and technical effects of the present application, specific embodiments will be described in detail below.

[0074] In an embodiment of the present application, the log section module is used to obtain the operation code of the operation behavior and perform custom annotations on the operation code to obtain operation data corresponding to the custom annotations.

[0075] Specifically, an operation behavior is an action used to manipulate an operation object or its attributes using a business operation. Therefore, operation data includes both operation object data and operation attribute data. An operation object includes multiple operation attributes, and an operation object is a collection of similar data. For example, an operation object can be a user or an item. Changes in operation attribute data can include user information, order status, inventory quantity, and other information.

[0076] You can obtain the operation codes corresponding to the operation object and operation attributes respectively, and customize the operation codes corresponding to the operation object and operation attributes respectively to obtain the corresponding operation object data and operation attribute data respectively.

[0077] It should be noted that, in this embodiment, not all object properties need to be recorded. For example, some properties are unimportant, immutable, or do not change in the current business logic. We can use custom annotations to mark which properties need to be compared and which do not. Annotation is a kind of metadata that does not change the actual behavior of the program, but provides a marking system. Through annotations, you can check which fields need to be recorded when the program is running. In this embodiment, annotations refer to the content that marks each field of the operation data in the index entity class that corresponds one-to-one to the object record table of the operation behavior.

[0078] As an example, the process of custom annotation of the operation code corresponding to the operation object and operation attributes is as follows:

[0079] @LogRecord OperateAction applies to action objects, while @LogRecord OperateContent applies to action attributes. This annotation is used to add @LogRecord annotations to code that needs to record action behaviors and attributes within action objects. After custom annotations are applied to the action code, you can use AOP (Aspect-Oriented Programming) in the logging aspect module to set pointcuts and retrieve action data from them.

[0080] It's important to note that AOP is a technology that achieves unified maintenance of program functionality through precompilation and dynamic proxies during runtime. AOP is a derivative of functional programming. AOP can be used to isolate different parts of business logic, reducing coupling between them, improving program reusability, and increasing development efficiency. After obtaining a custom annotation, the content within the annotation is read to obtain the specific values of the operation objects to be recorded in the operation log.

[0081] In the embodiment of the present application, the data comparison module determines whether the specific values of the operation object need to be compared based on the annotations, and selects specific logic based on the obtained field type to generate the corresponding difference value set. In other words, the data comparison module can obtain the difference value by comparing the specific values of the operation object before and after the operation.

[0082] It's understandable that the log-aspect module not only captures business object data after an operation, but also captures operational data before the operation, specifically historical object data before the operation. Specifically, when a user performs an operation, the log-aspect module records the pre-operation data and stores it in Redis. After the user completes the operation, the old and new values are stored in a data comparison tool. It's important to note that Redis is a high-performance key-value store, commonly used for caching, enabling fast data access. Storing pre-operation data in Redis here allows for temporary storage and facilitates subsequent data storage. This avoids frequent database reads and writes, improving system performance.

[0083] The data comparison module can compare the historical object data with the business object data after the operation to obtain a difference value. In other words, the data comparison module can compare the historical object data and the business object data under the same business operation to obtain a difference value data set.

[0084] Exemplarily, the data comparison module is also used to assemble a description of the difference between the old and new values based on a set of difference values. It should be noted that the operation log usually has different object attribute types, so the recording format of the operation log will also be different. The object attribute type of the target data includes the object index corresponding to the target data object, and at least one attribute associated with the target data object, the associated object type, associated object index and attribute value record table of each attribute. Among them, the associated object type in the object attribute type of the operation log may include but is not limited to a string (String, recording the description of the operation, user name, IP address and other information), an integer (Integer, recording the count of the operation, user ID or status code, etc.), a Boolean value (Boolean, recording whether the operation is successful), a timestamp (Timestamp, recording the specific time when the operation occurred), multiple selection of personnel, a multiple selection button group, a JSON table and a short text.

[0085] In one embodiment, the data comparison module uses different logic to assemble the description of the difference between the old and new values according to different object attribute types to obtain the difference results. For example, multiple selection of personnel: when the value of the personnel multiple selection box changes, the log record will clearly mark which personnel are deleted and which personnel are added. Multiple selection button group: For changes to the multiple selection button group, the log record will list in detail which buttons are selected and which buttons are unselected. JSON table: For modifications to the JSON table, the log record will clearly indicate which fields in the table are modified, as well as the specific content before and after the modification. Short text: For modifications to short text, the log record will display the text content before and after the modification.

[0086] In this way, the data comparison module can produce more accurate difference results by splicing and assembling them according to different logics based on the data type, making it easier for users to understand the change points.

[0087] In the embodiments of the present application, the log data storage module is used to record the values before and after the change and the difference information. Optionally, when recording operations, the log data storage module not only retains the old and new values and the effective time period, but also processes and concatenates the difference values. This facilitates front-end display and allows users to more clearly understand the operation records.

[0088] In one embodiment, the log data storage module includes an object attribute record table, an object attribute change record table, and an object attribute history record table. The previous value of an object attribute is recorded in the object attribute record table, the next value of an object attribute is saved in the object attribute change record table, and the difference value of an object attribute is saved in the object attribute history record table, thereby providing a more detailed record of the data included in the operation behavior.

[0089] It should be noted that the data model mentioned in this embodiment is a data model used for high-level description of a conceptual data model established through an Entity-Relationship (ER) model.

[0090] For example, the object attribute change record table is used to efficiently record and manage object attribute changes. The entity fields of the object attribute types recorded therein mainly include:

[0091] id: unique index, a unique identifier for each record, ensuring that an attribute change record can be uniquely identified in the entire table;

[0092] Type: records the type of operation, such as add, delete, and update, which helps to understand the type of operation that occurred later;

[0093] object_id: Associated object index, used to associate the object whose changes are recorded. Each object has a unique identifier (such as user ID, product ID, etc.) to help users find specific objects;

[0094] field_id: The associated object attribute index, which specifies the specific object attribute that has changed. For example, a user object may have multiple attributes (such as name, email address, address, etc.). This field indicates which attribute has changed.

[0095] old_data: attribute value before the operation, records the attribute value before the operation to help understand how the data changes;

[0096] new_data: The attribute value after the operation, which records the attribute value after the operation. It can be compared with old_data to understand the specific content of the change;

[0097] content: The concatenation result of the difference between the old and new values. This is a comprehensive field used to show the difference between old_data and new_data. By concatenating this information, it is easy to compare and analyze the changed content.

[0098] valid_start_date: The time when the old attribute value takes effect, indicating the time when the old attribute value takes effect, so as to track when the change occurs;

[0099] valid_end_date: The expiration date of the old attribute value, which records the time when the old attribute value becomes invalid, helping to understand when the new value is applied;

[0100] create_by: records the operator, or the system that executed the change, for traceability;

[0101] create_time: records the generation time, records the creation time of this change record, and adds a timestamp to each record to facilitate subsequent review and analysis.

[0102] It can be seen from the object attribute change record table that the object attribute change record table not only records some basic information of business operations, such as operator, business object or operation time, but also records the modification of business objects or business attributes before and after the operation behavior. When the data in the operation log changes, only the change point of the data is recorded, and the values before and after the changed attributes in the data model are recorded, and the unchanged values are discarded. This greatly saves storage space, and the data models of different objects can be recorded in the same table, further saving storage space. In addition, the object attribute change record table supports a new line for each modification, that is, different modifications are recorded in different lines, and there is no need to record multiple modification records in the same line, which greatly saves the field record space reserved for each line in the operation log information table, further reducing the storage space occupied by the operation log.

[0103] In an embodiment of the present application, when a user performs an operation (such as adding, deleting, updating settings, etc.), a corresponding log aspect module will be triggered to record relevant data changes in real time when the user performs key operations. Before the operation is executed, the log aspect module will obtain the attribute value (old value) of the user's current object from the database. The log aspect module records the data before the operation and puts it into redis for recording. The user's operation instructions will be executed, and certain attributes of the object may be modified according to the operation. At this time, after the user operation is completed, the log aspect module can obtain the modified attribute value (new value) of the current object. Afterwards, the log aspect module puts the old and new values into the data comparison module to obtain a difference information set and a difference description, and obtains operation log information. The operation log information contains which fields have changed at a certain time and a specific description of the change, and then stores the operation log information in a log database table (such as an object attribute change record table).

[0104] The operation log recording system of the embodiment of the present application is applicable to various types of data formats, including multiple selection of personnel, multiple selection button groups, JSON tables, short texts, etc., and has wide adaptability. The storage efficiency is improved by recording the object attribute change record table. Specifically, by only recording the change points of the data and discarding the values that have not changed, storage space is greatly saved. In addition, the data models of different objects can be recorded in the same table, further saving storage space. At the same time, by obtaining the object difference value set and assembling the difference description between the old and new values, the log records are made more accurate and detailed, which facilitates the subsequent tracking and analysis of historical data, and enables users to understand the operation records more clearly, thereby improving the user experience. Finally, by recording the effective time period of the data, the life cycle of the data is clear at a glance, which provides great convenience for subsequent data tracking and analysis.

[0105] Based on the operation log recording system provided in the above embodiment, the embodiment of the present application further provides an operation log recording method, and its workflow is described in detail below with reference to the accompanying drawings.

[0106] Figure 2 The flowchart of the operation log recording method provided by the embodiment of the present application is shown. Figure 2 As shown, the operation log recording method provided by the embodiment includes the following steps:

[0107] S101 , when a user operates target data, a first value before the target data changes and a second value after the target data changes are obtained.

[0108] This step is mainly used to accurately record data changes when the user operates on the target data, and trace back to the state before and after the data change. Specifically, when the user operates on the target data of the system (such as modifying the value of a certain field), the system will first obtain the data value before the operation (the first value) and the data value after the operation (the second value). For example, if the user changes the email address of the account, the system will obtain the email address before the change (the first value) and the email address after the change (the second value).

[0109] It should be noted that each target data has a different object attribute type. Optionally, the object attribute type of the target data includes the object index corresponding to the target data object, and the associated object type, associated object index and attribute value record table of each attribute in at least one attribute associated with the target data object. Among them, object index: each target data object has a unique object index, which is used to identify the location of the data in the database or data table. This is the basic identifier of the target data, ensuring fast positioning and operation in the data table. Attribute: The target data object may be associated with multiple attributes. Each attribute consists of the following information: Associated object type: The object type associated with each attribute, which may be an entity, another data object or external related data. Associated object index: The unique index of the object associated with the attribute, used to locate the external or internal data on which the attribute depends. Attribute value record table: records the attribute value of each attribute, such as modification time and modification content.

[0110] In some implementations, when a user operates on target data, the system determines, based on the target data's object index, at least one object in the target data, as well as the attribute values of each object before the modification, in the data table corresponding to the target data, as the first value. When a user operates on data, the system first locates the target data object in the data table based on the target data's object index. The system then uses this index to retrieve the attribute values of the object and its associated attributes, determining the value of each attribute before the data modification as the first value. These attribute values represent the data state before the operation, providing a snapshot of the data before the modification, facilitating subsequent comparison and recovery.

[0111] In some embodiments, when a user operates on target data, the type of operation performed by the user on the object corresponding to the target data is obtained; based on the modification operation of the associated object type, associated object index and attribute value of each attribute in at least one attribute associated with the object attribute type of the target data indicated by the operation type, the attribute value of the target data modified according to the operation type is obtained as the second value.

[0112] It is worth mentioning that the types of operations that users perform on target data include data structure deletion (drop), truncation (truncate), insertion (insert), data content deletion (delete), update (update), change (alter), and selection (select). When users operate on target data, the system will also record the operation type, such as insert, update, delete, etc. The system parses the attribute type of the target data and the corresponding attribute modification content through the operation type. Specifically: Associated object type: Determine the attribute type targeted by the operation. Associated object index: Identifies the specific associated object being modified. Attribute value modification: Obtain the modified new value based on the attribute value modification made by the operation type. The system records the modified new value as the second value.

[0113] Through this step, the change of data can be accurately captured, and the change process of the data can be traced by comparing the first value and the second value.

[0114] S102: Determine a target difference recording rule based on the object attribute type of the target data, where the target difference recording rule is used to represent the logic for generating a difference recording log.

[0115] In this step, each target data item has a different object attribute type, and these different object attribute types have different recording rules. The system determines the logical rules for generating difference logs (i.e., difference recording rules) based on the attribute type of the target data. The target difference recording rules indicate that the logic for generating difference logs is generated based on the associated object type within the object attribute type. The associated object type includes at least one of a person multiple-selection, a multiple-select button group, a JSON table, and a short text.

[0116] In some implementations, in order to facilitate subsequent recording of the specific circumstances of each data change and ensure that the operation can be traced, the target difference recording rules are generated according to the following rules:

[0117] Associated Object Type: Each target data object has associated attributes (such as multiple-selection of people, checkbox groups, JSON tables, short text, etc.). Changes in these attributes influence the rules for generating difference records. Specifically, multiple-selection of people: This indicates that multiple users can be selected. Changes in a user's selection status (such as checking or unchecking a button) are recorded as differences. Checkbox groups: Similar to multiple-selection of people, multiple buttons can be selected. Changes in a user's selection status (such as checking or unchecking a button) affect difference records. JSON tables: Store structured data. Modifications to table items (such as adding or deleting rows or modifying table content) are reflected as difference records. Short text: This represents simple text data. Modifications to text content (such as inserts, updates, or deletes) generate difference records. Difference log generation logic: During operations, the system determines how to generate difference records based on the type of each associated object (such as multiple-selection of people, JSON tables, etc.) and the specific operation type (such as inserts, deletes, and updates). For example, in a multiple-selection of people operation, the system records the information of each selected or unselected person and compares it with the original state to generate differences. In the JSON table, the system will compare the changes in the table (such as newly added, deleted, or modified data rows) and generate a corresponding difference log. The specific content of the difference record can be: the difference record will contain detailed information such as the operation type, the data object being operated, the change in the attribute, the values before and after the change. Specifically including: operation type (such as insert, update, delete, etc.). Object attribute changes: record which attributes have changed, including the original value and the changed value. Associated object type: For example, if the operation involves "multiple selection of personnel", it records which personnel are selected or cancelled. Specific values before and after the change: including the data value before the change and the data value after the change (for example, text modification, button selection status, changes in JSON data, etc.).

[0118] S103: Generate a difference recording log based on the target difference recording rule, where the difference recording log records change description information of the first value and the second value.

[0119] In this step, based on the predefined target difference recording rules, the system will record the description of the data changes rather than the entire data content. The difference record log contains the change information of the previous and subsequent data, and condenses these changes into key information. In other words, the difference record log only records the changed parts, and through the predefined difference recording rules, the log can be made more concise and easy to understand. For example, the log content may be "User A's email address changed from xxx@abc.com to yyy@xyz.com", rather than the lengthy details of the entire object, which helps to quickly trace the problem and analyze it.

[0120] In some embodiments, when the associated object type is multiple selection of personnel, the operation type of the user's operation on the corresponding object in the multiple selection of personnel is obtained; based on the operation type, the personnel deleted and / or added in the multiple selection of personnel indicated by the operation type are recorded as change description information of the first value and the second value.

[0121] In this embodiment, a difference log is generated for a multi-select personnel object during operation. Multi-select personnel refers to the ability for users to select multiple candidates (e.g., multiple personnel) and perform related addition and deletion operations. The generation of difference logs is based on specific rules to ensure that changes in each operation are accurately recorded and traceable. Specifically, the user's operation type on the "multi-select personnel" object is first obtained. Operation types can include: Insert (Add): This means the user has selected a new person. Delete: This means the user has deselected an already selected person. It should be noted that the operation type is crucial for the subsequent generation of difference logs, as it determines which personnel are added, deleted, or maintained. After obtaining the operation type, when the user operates on the multi-select personnel object, the system will identify and record the operation type, for example, if the user has added or deselected certain personnel. In the case of an Add operation, the system will record the newly added personnel as part of the change description information. These newly added personnel will be treated as a difference from the "first value" (the value before the change) to the "second value" (the second value after the change). During a delete operation, the system records the deleted personnel, marking the change from "first value" to "second value." These personnel are considered to have changed from selected to unselected. The change descriptions for the first and second values can be: First value (before change): represents the personnel selection status before the operation, including all selected personnel. Second value (after change): represents the personnel selection status after the operation, including added or deleted personnel. The system records the difference between these two values as the change description in the difference log. Recording the before and after values ensures a clear understanding of the changes in personnel selection status before and after the operation. Details of the difference log: Each generated difference log includes the following information: Operation type (e.g., add or delete). Changed personnel: Records the identity of each added or deleted personnel. First and second values: Compare the personnel selection status before and after the operation to clearly indicate which personnel were added and which were deleted. Timestamp and operator information: To ensure operation traceability, the change time and the user information of the user who performed the operation are recorded.

[0122] In some embodiments, when the associated object type is a multiple-choice button group, the user's operation type on the corresponding object in the multiple-choice button group is obtained; based on the operation type, the buttons in the multiple-choice button group that are selected and / or canceled as indicated by the operation type are recorded as change description information for the first value and the second value. The purpose of this embodiment is to generate a difference record log based on the change operation of the multiple-choice button group and to record the change content in detail based on the user operation type. The core of this solution is to automatically capture and record button changes when the user interacts with the multiple-choice button group (i.e., a button group consisting of multiple selectable items), ensuring that the changes of each operation are clearly recorded and traceable.

[0123] Specifically, when the associated object type is a multiple-choice button group, the multiple-choice button group typically includes multiple buttons, and users can select one or more options by clicking these buttons. This type of button group may include different options, such as "Yes / No" and "Option A / Option B." When a user operates these buttons, the system identifies the operation type, which is generally divided into two types: Selecting a button (selected): The user selects a button, indicating that the option is selected. Deselecting a button (deselected): The user deselects a button, indicating that the option is no longer selected. When a user selects a button, the system records the change to the button, indicating that the button is selected, and updates the change information. When a user deselects a button, the system records the change to the button, indicating that the button is deselected. The first value (before change): indicates the button selected by the user before the operation (i.e., the button's selected state). The second value (after change): indicates the button's state after the operation (i.e., which buttons are selected or deselected). The system uses the difference between the first and second values as the change description, recording each button's change (selection or deselection) in detail to ensure that the user's operation is accurately recorded.

[0124] For example, the specific contents of the difference record may include: Operation type: records whether the operation is "selecting a button" or "deselecting a button." Changed button: records the specific button that was selected or deselected. The difference between the first and second values: indicates the button state before and after the operation, recording which buttons were selected and which were deselected. Timestamp and operator information: ensures that each operation can be traced back to the specific time and operator.

[0125] In some implementations, when the associated object type is a JSON table, the user's operation type on the corresponding object in the JSON table is obtained; based on the operation type, the corresponding modified field in the JSON table indicated by the operation type and the modified content are recorded as change description information for the first value and the second value. The purpose of this implementation is to generate a change log based on the target difference recording rule when a user operates on a JSON table. The operation log will record the modified fields and modified content in detail, and use the values before and after the operation (i.e., the first value and the second value) as the change description, helping the system capture all changes during the operation.

[0126] Specifically, when the associated object type is a JSON table, a JSON table is typically a data table presented in JSON format. Each row in the table represents an object (e.g., a data record), and each column represents an attribute (i.e., a field) of that object. The data structure of a JSON table is flexible and easily extensible, and can contain complex data types such as nested objects and arrays. When a user modifies each field in a JSON table, the system identifies the type of operation. Operation types may include: add field (adding a new field and its value to the table); modify field value (updating the value of an existing field); delete field (deleting a field); and replace field value (replacing or updating the value of an existing field). The system then records the modified field and its contents: When a user performs any operation on a field in a JSON table, the system automatically records the modified field and its contents. For example, if a user modifies the value of a field, the system records the original value (first value) and the updated value (second value). The first value represents the original value of the field before the operation, or the state of the field before the user's operation. The second value represents the new value of the field after the operation, i.e., the state of the field after the user's modification. The system records each changed field and its content (values before and after modification) to form a specific difference record log.

[0127] Exemplarily, the log content may include the following information: Field name, which is the name of the modified field. Operation type, which is the specific operation type performed by the user on the field (such as add, modify, delete, etc.). The first value and the second value, which represent the specific values before and after the modification. The first value identifies the value of the field before the modification (which may be empty or the original value). The second value is the new value of the field after the modification. Modification time: The timestamp of the operation. Operation user information, which records the user information who performed the operation for easy tracing.

[0128] In some implementations, when the associated object type is short text, the user's operation type on the corresponding object in the short text is obtained; based on the operation type, the modified text content in the short text indicated by the operation type is recorded as a description of the change between the first value and the second value. The goal of this implementation is to record the differences between user operations on short text objects, detailing the modifications to the text content and its state before and after the changes. The system generates a change log based on specific target difference recording rules, ensuring that every user operation is clearly and accurately tracked and recorded.

[0129] Specifically, when the associated object type is short text, in this scenario, short text refers to a short text field typically used to store simple text data such as names, descriptions, and notes. The system identifies user operations on the short text object. Common operation types include: Add text: The user adds a new text content. Modify text: The user modifies existing text. Delete text: The user deletes part or all of the text content. The target difference record rule indicates the difference record generation logic: Record modified text content: For each operation, the system determines the specific changes based on the operation type. Specifically: When adding text, the added text content is recorded. When modifying text, the system records the text content before and after the modification, that is, the first value before the modification and the second value after the modification. When deleting text, the deleted text content is recorded and, depending on the situation, the text before the deletion (first value) and a null value or "deleted" indicator may be saved as the second value. Description of the changes between the first and second values: First value: Represents the original content of the text field before the operation, that is, the text before the user modified it. The second value represents the modified content of the text field after the operation, that is, the text modified by the user. Generate a difference record: The system logs the changes made to each operation, along with information such as the operation time, operation type, and modified fields. For example, if a user modifies the name field in a short text field, the system will record the values before and after the modification, along with information such as the user and operation time.

[0130] For example, the log content may include: Field Name: The short text field name that was modified, such as "description" or "comment." Operation Type: The type of operation performed by the user on the field, such as add, modify, or delete. First Value: The text content of the field before the operation. Second Value: The text content of the field after the operation. Timestamp: The time when the operation occurred. Operation User Information: The ID of the user who performed the operation.

[0131] In some implementations, in step S103, the generated difference record log may also record the user name, the time when the user operated on the target data, the effective start time of the first value before the target data changed, and the effective end time of the second value after the target data changed. By further improving the content of the operation log record, additional information is added to the difference record log, making each data change operation more accurate, detailed, and traceable. Specifically, in addition to recording the content of the data change, key information such as the user name, operation time, effective start time before the change, and effective end time after the change is also added.

[0132] By recording the user name of the user who performed an operation, it's possible to clearly trace the specific user who performed the action. This is particularly important in multi-user systems, helping administrators understand and audit who performed specific operations, facilitating accountability and permission management. The operation time is the specific timestamp of the user performing the operation. It's crucial information for each operation, used to track the exact moment of data changes. By recording the operation time, the system can accurately capture the timing of each data change, providing a time basis for subsequent analysis, auditing, or troubleshooting. Recording the effective start time before the change (first value effective start time): This time point is the effective start time before the data change (i.e., when the first value exists). That is, the initial value of a data item becomes effective at this time. Recording this time point helps clarify the specific moment the data item becomes effective and allows for comparison and analysis with subsequent changes. This helps trace data change history, especially when multiple data changes occur, by distinguishing the lifecycle of each state. Recording the effective end time after the change (second value effective end time): This time point is the effective end time after the data change (i.e., when the second value takes effect), indicating the point in time when the new data state remains effective. By recording the effective expiration time of the second value, you can clearly understand when the data's latest state ends and any subsequent modifications or changes. This is crucial for multiple changes and rollbacks. By recording the effective time period of data, the data lifecycle is clearly visible, greatly facilitating subsequent data tracking and analysis.

[0133] S104: Save the difference record log to the database.

[0134] Exemplarily, the difference record log stored in the database includes at least an object record table, an object attribute change record table, and an object attribute history record table. The object record table includes the object index, object name, field, and attribute value of the target data; the object attribute change record table includes the object index, associated object type, associated object index, operation type, operation time, and attribute value of the target data; and the object attribute history record table includes the object index, associated object type, associated object index, attribute name of the changed object, pre-change record, post-change record, change description, operator, operation time, effective start time, effective end time, and attribute value.

[0135] Specifically, the object record table stores basic information related to the target data, including the data object's index, name, fields, and the attribute values of each field. The object index uniquely identifies each target data item, typically the primary key. The object name describes the object. Fields describe the attributes or fields contained in the object. Attribute values describe the actual values of the fields or attributes. This table records the current status of the target data object. Whenever data changes, the associated data object updates the attribute values in this table.

[0136] The object attribute change record table is used to record changes each time an operation is performed on the target data object's attributes, including the operation type, time, and related attribute values. This table is mainly used to track modifications to attribute values and changes to associated objects. Among them, the object index: corresponds to the object index in the object record table, indicating which data object the record belongs to. The associated object type: this field indicates the object type of the operation, such as user, system, order, etc. The associated object index: identifies the index of the object associated with the target object, usually used to mark the relationship between data. Operation type: describes the type of operation performed on the object attribute, such as add, modify, delete, etc. Operation time: the time when the operation occurs. Attribute value: the attribute value after the change, recording the new value after the field is changed. This table records the changes in object attributes after each operation. It records in detail the specific operation performed on a certain object, the time of the operation, and the content of the modification. Its purpose is to achieve auditing and change tracking of the operation process.

[0137] The object attribute history table records changes to object attributes, tracking each change in detail, including the values before and after each modification, description, operator, and the effective time period. The object index, corresponding to the object record table, uniquely identifies the data object. The associated object type indicates the type of the object being modified, such as association with a user or business unit. The associated object index identifies the index of the object associated with the target object. The attribute name of the modified object specifies the attribute or field being modified. The pre-change record records the attribute value before the modification. The post-change record records the attribute value after the modification. The change description describes the specifics of the attribute change. The operator is the user or system that performed the change. The operation time records the time the change occurred. The effective start time is the time when the change takes effect. The effective end time is the time when the change ends. The attribute value is the value of the attribute after the change. This table records historical attribute changes, including the modification time, modifier, and effective period. This long-term tracking record helps system administrators and auditors trace data change history.

[0138] This technical solution achieves refined management of target data objects through three different tables. Its core principle is as follows: the object record table stores the current state of the target data. The object attribute change record table records changes to data objects and provides traceability of the operation type and modification time. The object attribute history record table provides a more detailed historical record, including the previous and next values of each change, the operator, the time, and the effective period, thereby enabling comprehensive traceability of attribute changes.

[0139] In order to more clearly illustrate the object record table, object attribute table record table and object attribute history record table provided in this embodiment, the operation log recording method provided in the embodiment of the present application is exemplified below using a specific application scenario.

[0140] In one application scenario, the operation log recording method provided in the embodiment of the present application can be applied to the personnel multiple-selection box operation log recording.

[0141] Table 1. Object record table

[0142]

[0143] Table 2. Object attribute change record table

[0144]

[0145] Table 3. Object attribute history table

[0146]

[0147]

[0148] In this application scenario, combined with Table 1-3, the specific steps of the operation log recording method are as follows:

[0149] 1. The user modifies the object attribute responsible person field from "Personnel A" to "Personnel A, Personnel B".

[0150] In this step, the user changes the "Responsible Person" field of the object from its original value of "Person A" to "Person A, Person B." This operation is a user interaction within the system and, in one implementation, can be implemented through the user interface (UI) or API. The original value is "Person A," and the modified value is "Person A, Person B." This is a "personnel multiple-select box" type of attribute change. The Responsible Person field in the system supports the selection of multiple persons, so multiple selections can be included during the modification.

[0151] 2. The system log section detects user modification operations and puts the new and old values into the data comparison tool.

[0152] In this step, when a user performs an operation, the log aspect AOP captures the user's modification behavior. The system log aspect captures the "new value" and "old value" of the user operation, that is, the data values before and after the modification. In this example, the old value is "Person A" and the new value is "Person A, Person B." This information is passed to the next step, the data comparison tool, for further differential analysis.

[0153] 3. The data comparison tool determines that the object attribute type is "Personnel Multiple Selection Box", selects the log recording rule of "Personnel Multiple Selection Box" to assemble the difference results; and returns the new and old values and the difference results.

[0154] In this step, the data comparison tool primarily identifies and compares the types of object attributes to determine the data change category for the modification. In this example, the system identifies the "Responsible Person" field as a "Personnel Multiple-Select Box" attribute, meaning it allows multiple values to be selected. For this type of "Personnel Multiple-Select Box," the data comparison tool handles differences based on predefined target difference recording rules. For this type of multiple-select box data change, two types of differences are typically recorded: Added Persons: In this example, "Personnel B" was added. Deleted Persons: If a person was removed, the deletion operation would be recorded, but in this example, no person was deleted. Difference Result Assembly: The difference result records the specific details of the data change. The comparison tool generates a difference record for the "Responsible Person" field, indicating that "Personnel B" has been added to the list of responsible persons. The system also returns the specific differences for this modification: the old value was "Personnel A" and the new value was "Personnel A, Personnel B." A difference record is generated, noting the addition of "Personnel B."

[0155] 4. Calculate the data’s effective start time and effective end time.

[0156] In this step, it is worth mentioning that for the effective start time, generally speaking, the data will take effect immediately after modification. Therefore, the effective start time is usually the time point when the modification operation occurs. For example, the exact time when the user modifies the responsible person field is recorded as the data effective start time. As for the effective end time, the effective end time usually depends on the system rules. It may be a fixed duration (for example, 1 hour later), or in some cases it is manually set by the user. For this type of modification, the system may set the effective end time to a specific date, or set it according to the data life cycle rules.

[0157] 5. Insert the object index, object attribute index, old and new values, difference information, and effective start and end times into the database.

[0158] In this step, after the system generates the difference information through the data comparison tool and calculates the effective time period, the information needs to be persisted in the database. Among them, object index: a field that uniquely identifies the object (for example, the task or project to which the responsible person belongs). This field can be used to identify and associate data. Object attribute index: identifies the modified attribute in the object (such as the responsible person field). It indicates the specific attribute modified by this operation. New and old values: record the data before and after the modification. For example, the new value is "Personnel A, Personnel B", and the old value is "Personnel A". Difference information: records the specific differences of this modification. For example, "Personnel B" is added as the responsible person. Effective start time and effective end time: these two fields record the effective time interval of the data to help the system track the validity and life cycle of the data. All this information will be inserted into the database table to provide support for subsequent data query, analysis and tracing.

[0159] In the operation log recording method of this application scenario, the system captures the user's modification behavior through log aspects and uses data comparison tools to identify the specific changes. For data of the "personnel multiple-choice box" type, the system identifies the new content of the responsible person field and records the differences. By calculating the effective time period of the data and inserting all modification information into the database, the system provides strong support for subsequent data tracking, analysis and management. These steps not only improve the efficiency of data management, but also make historical data tracking clearer and more accurate. Since only the difference in data changes (that is, the values before and after the change) is recorded instead of recording complete data for each operation, the redundant information stored in the log is reduced. Recording only the changes each time makes the log data more concise and greatly saves storage space.

[0160] Compared with other solutions, this embodiment has the following improvements:

[0161] 1. Improved storage efficiency: By only recording data change points and discarding unchanged values, storage space is significantly reduced. Furthermore, data models for different objects can be recorded in the same table, further saving storage space and reducing database pressure.

[0162] 2. Facilitates historical data tracking and analysis: When recording operations, the system processes and splices the difference results, and records information such as the old and new values, and the effective time period, making the data life cycle clear at a glance.

[0163] In another scenario, the operation log recording method provided in the embodiment of the present application can be applied to JSON table type operation log recording:

[0164] Table 4. Object record table

[0165]

[0166] Table 5. Object attribute change record table

[0167]

[0168] Table 6. Object attribute history table

[0169]

[0170]

[0171] In this application scenario, combined with Table 4-6, the specific steps for using this operation log recording method are as follows:

[0172] 1. The user modifies the object property requirement entry list field from "[{"Requirement Name":"Patent Document Writing","Requirement Description":"Writing a log patent ideaPPT"},{"Requirement Name":"Name Display Abnormal BUG","Requirement Description":"Fix the page user name display abnormal defect"}]" to "[{"Requirement Name":"Patent Document Writing","Requirement Description":"Writing a log patent ideaPPT"},{"Requirement Name":"Name Display Abnormal BUG","Requirement Description":"Fix the page user name display abnormal defect"}]".

[0173] 2. The system log section detects user modification operations and puts the new and old values into the data comparison tool.

[0174] When a user modifies a requirement field, the system detects the modification and compares the old and new values in the data comparison tool. The old and new values represent the states of the corresponding field before and after the modification.

[0175] 3. The data comparison tool determines that the object attribute type is "json table", selects the logging rule of "json table" to assemble the difference results; and returns the new and old values and the difference results.

[0176] After receiving the old and new values, the data comparison tool determines the type of the object attribute. In this case, the attribute type is identified as "json table" (i.e., structured JSON data). Depending on the object attribute type, the data comparison tool will select the corresponding target difference recording rule. In this example, because the data type is JSON, the system will use specific rules to parse and compare the differences between the two JSON objects: comparing the difference between the requirement name and the requirement description. It will determine whether there are any new, deleted, or modified elements. It will provide a difference report that records all changed fields.

[0177] As shown in Table 6, the updated description for the difference results is as follows: Change the requirement description field for the record [Name Display Abnormal Bug] in the [Requirement Item List] to: Fix the abnormal display of user names on the page. This updated description not only records which fields were modified but also tracks the field value that changed.

[0178] 4. Calculate the data's effective start and end times. These times are calculated based on business rules and associated with the modification operation, typically recorded using system timestamps.

[0179] 5. Insert the object index, object attribute index, old and new values, difference information, and effective start and end times into the database.

[0180] In this step, the system needs to record all modification information in the database, including: Object index: a unique identifier that identifies the object, used to distinguish different objects. Object attribute index: identifies the modified attribute, usually refers to the specific field or attribute within the object. Old and new values: the old and new values mentioned above, that is, the status before and after the data is modified. Difference information: indicates the changes generated during the modification process, such as adding, deleting or modifying fields. Effective start time and effective end time: indicates the time period when the data is effective, which is convenient for system management and historical backtracking. In this way, the records in the database can ensure that each operation has detailed historical data, including information such as the status before and after the operation, the changed fields, and the effective time. This not only helps system administrators to audit and troubleshoot problems, but also helps business personnel understand the specific impact of each operation in the system.

[0181] Compared with other solutions, this embodiment has the following improvements:

[0182] Prompt the user's usage experience. After processing the logs with specific logic, the originally huge data is accurately pinpointed to the specific change points, and the parts irrelevant to the change are discarded, which is more convenient for users to understand and enables users to more clearly understand the change points of the data at that time.

[0183] The above are only some of the possible application scenarios. In fact, any software system involving large amounts of data storage and changes can consider adopting the technical solution of this patent.

[0184] For example, the following is a detailed description of other possible application scenarios:

[0185] Enterprise Resource Planning (ERP) system: In an ERP system, data changes frequently, and effective management of historical data is particularly important. The technical solution of this patent can help enterprises better track and manage data changes. For example, in an enterprise resource planning system, enterprise management involves multiple modules, such as finance, inventory, and human resources, and the data in these modules changes frequently and complexly. Through this solution, enterprises can effectively track each data change, including updates to inventory quantities, adjustments to financial data, etc., to facilitate subsequent audits and analysis. At the same time, this tracking capability can also help enterprises make more efficient plans and decisions, and avoid errors caused by data changes.

[0186] Customer Relationship Management (CRM) system: The CRM system involves the storage and changes of a large amount of customer information. The technical solution of this application can more accurately record and understand each data change. For example, CRM systems often store a large amount of customer information, such as contact information, purchase history, and customer preferences. Real-time updates of customer information are crucial. Through this technical solution, the system can efficiently record changes in each customer's information, including the specific fields changed and historical records. This helps sales and customer service teams better understand customer needs and improve customer experience and relationships.

[0187] E-commerce platforms: Product information, order information, and other information on e-commerce platforms frequently change. This patented solution allows for more efficient management of this historical data. Product information (such as price, inventory, description, etc.) and order information on e-commerce platforms are constantly changing. This solution can promptly record changes as product information is updated, helping merchants accurately grasp market trends and analyze consumer behavior. Furthermore, recording order status changes can support subsequent customer service, ensuring that customers receive accurate information and services.

[0188] Social networking platforms: For social networking platforms, user information, dynamic information, and other data are their key assets. The technical solution of this patent can help social networking platforms better track and understand data changes. The core of social networking platforms lies in user-generated content and interaction, and frequent data changes include user profile updates and dynamic postings. Adopting this technical solution can help platforms manage this rich data, trace user behavior, filter inappropriate content, and support data mining and user analysis, providing data support for the platform's operational decisions.

[0189] Online education platforms: Online education platforms need to manage large amounts of data, including course information and student information. This patented technical solution can improve the efficiency and accuracy of historical data management. Online education platforms need to manage a variety of data, including courses, student information, and grades, which changes during the learning process. Implementing this solution can improve data management efficiency, allowing both teachers and students to stay up to date on the latest course schedules and learning progress, while ensuring the accuracy of records and supporting the evaluation and improvement of educational effectiveness.

[0190] Medical information management systems: In healthcare systems, patient medical records, medication lists, diagnostic information, and other data frequently change. This technology solution can help medical institutions effectively track changes in patient medical records and ensure the accuracy of clinical decision-making.

[0191] Financial Industry: In banks and other financial institutions, timely updating and recording of account information and transaction records is crucial. This solution can support anti-fraud, customer service, and compliance audits, improving the transparency and security of financial data management.

[0192] Human Resources (HR) systems: Employee information, salary, and attendance data in HR management systems frequently change. By implementing this technical solution, the HR department can clearly identify each employee's information change history, facilitating performance management and personnel audits.

[0193] Data Analysis and Machine Learning Platform: Data preprocessing and change tracking are crucial in data analysis and machine learning. This solution allows data scientists to track data changes during feature engineering, providing a basis for model optimization.

[0194] Content Management System (CMS): For website content management, users must frequently update page information and articles. This solution allows content creators to understand historical versions and supports version control and content review processes.

[0195] In summary, this technical solution demonstrates significant potential and can be applied to virtually any software system involving data storage, modification, and management. By implementing this solution, various industries can achieve more efficient and reliable data management, improving operational efficiency.

[0196] like Figure 3 As shown, an embodiment of the present application further provides an operation log recording device 500, comprising: an acquisition module 501 and a processing module 502. The acquisition module 501 is used to obtain operations performed by a user on target data. The processing module 502 is used to obtain a first value of the target data before the change and a second value of the target data after the change when the user operates on the target data; specifically, it is used to generate a difference record log based on a target difference record rule, wherein the difference record log records change description information of the first value and the second value; and save the difference record log to a database.

[0197] In one possible implementation, the processing module 502 is used to obtain a first value before the target data changes and a second value after the target data changes, specifically for: when a user operates on the target data, according to the object index of the target data, in a data table corresponding to the target data, determining at least one object of the target data and the attribute value of each object before modification as the first value; when the user operates on the target data, obtaining the type of operation performed by the user on the object corresponding to the target data; according to the modification operation of the associated object type, associated object index and attribute value of each attribute in at least one attribute associated with the object attribute type of the target data indicated by the operation type, obtaining the attribute value of the target data after modification according to the operation type as the second value.

[0198] In one possible implementation, the processing module 502 is used to generate a difference record log based on the target difference record rule, specifically for: recording the user name, the operation time when the user operates the target data, the effective start time of the first value before the target data changes, and the effective end time of the second value after the target data changes.

[0199] In one possible implementation, the processing module 502 is used to generate a difference record log based on the target difference record rule, specifically for: when the associated object type is multiple selection of personnel, obtaining the operation type of the user's operation on the corresponding object in the multiple selection of personnel; based on the operation type, recording the personnel deleted and / or added in the multiple selection of personnel indicated by the operation type as change description information of the first value and the second value.

[0200] In one possible implementation, the processing module 502 is used to generate a difference recording log based on the target difference recording rule, specifically for: when the associated object type is a multiple-choice button group, obtaining the operation type of the user's operation on the corresponding object in the multiple-choice button group; based on the operation type, recording the buttons in the multiple-choice button group that are selected and / or canceled under the operation type indication as change description information of the first value and the second value.

[0201] In one possible implementation, the processing module 502 is used to generate a difference record log based on the target difference record rule, specifically for: when the associated object type is a JSON table, obtaining the operation type of the user performing the operation on the corresponding object in the JSON table; based on the operation type, recording the corresponding modified fields and modification content in the JSON table indicated by the operation type as change description information of the first value and the second value.

[0202] In one possible implementation, the processing module 502 is used to generate a difference record log based on the target difference record rule, specifically for: when the associated object type is a short text, obtaining the operation type of the user performing the operation on the corresponding object in the short text; based on the operation type, recording the modified text content in the short text indicated by the operation type as change description information of the first value and the second value.

[0203] It should be understood that both the acquisition module 501 and the processing module 502 can be implemented by software or hardware. For example, the implementation of the acquisition module 501 will be described below using the acquisition module 501 as an example. Similarly, the implementation of the processing module 502 can refer to the implementation of the acquisition module 501.

[0204] As an example of a software functional unit, the acquisition module 501 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the acquisition module 501 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.

[0205] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.

[0206] As an example of a hardware functional unit, acquisition module 501 may include at least one computing device, such as a server. Alternatively, acquisition module 501 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a CPLD, FPGA, GAL, or any combination thereof.

[0207] The multiple computing devices included in acquisition module 501 can be distributed in the same region or in different regions. The multiple computing devices included in acquisition module 501 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in acquisition module 501 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.

[0208] Based on the same inventive concept, the principles and beneficial effects of solving the problems provided by the server in the embodiments of the present application can be referred to the principles and beneficial effects of the implementation of the method. For the sake of concise description, they will not be repeated here.

[0209] like Figure 4 As shown, the embodiment of the present application further provides a computing device 600. For example, the computing device 600 can be a server or a terminal. When the computing device 600 is running, the computing device 600 can execute the method in the above embodiment.

[0210] The computing device includes a bus 601, a processor 602, a memory 603, and a communication interface 604. The processor 602, the memory 603, and the communication interface 604 communicate with each other via the bus 601. The computing device 600 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 600.

[0211] Bus 601 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, the figure shows only one line, but this does not imply a single bus or type of bus. Bus 601 may include a path for transmitting information between various components of computing device 600 (e.g., processor 602, memory 603, and communication interface 604).

[0212] The processor 602 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0213] The memory 603 may include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0214] The memory 603 stores executable program instructions, and the processor 102 executes the executable program instructions to implement the test methods involved in the above embodiments.

[0215] The communication interface 604 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 600 and other devices or a communication network.

[0216] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0217] like Figure 5 As shown, the computing device cluster includes at least one computing device 600A. The memory 603 in one or more computing devices 600A in the computing device cluster may store the same instructions for executing the operation log recording method.

[0218] In some possible implementations, the memory 603 of one or more computing devices 600A in the computing device cluster may also store partial instructions for executing the operation logging method. In other words, the combination of one or more computing devices 600A can jointly execute the instructions for executing the operation logging method.

[0219] It should be noted that the memory 603 in different computing devices 600A in the computing device cluster can store different instructions, each for executing part of the functions of the above-mentioned multiple modules. In other words, the instructions stored in the memory 603 in different computing devices 600A can implement the functions of one or more modules in the above-mentioned multiple modules.

[0220] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network, which may be a wide area network or a local area network. Figure 6 A possible implementation is shown. Figure 6 As shown, two computing devices, computing device 600A and computing device 600B, are connected via a network. Specifically, the connection to the network is achieved through a communication interface within each computing device. In this possible implementation, memory 603 within computing device 600A stores instructions for executing the functions of some of the aforementioned modules. Simultaneously, memory 603 within computing device 600B stores instructions for executing the functions of another portion of the aforementioned modules.

[0221] Figure 6 The connection method between the computing device clusters shown may be based on the consideration that the operation log recording method provided in this application requires a large amount of data storage, and therefore the functions implemented by another part of the multiple modules mentioned above may be handed over to the computing device 600B for execution.

[0222] It should be understood that Figure 6 The functionality of computing device 600A shown in FIG. 6 may also be implemented by multiple computing devices 600. Similarly, the functionality of computing device 600B may also be implemented by multiple computing devices 600.

[0223] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similarly referred to as Figure 5 and Figure 6 The connection mode of the computing device cluster is different in that the memory 603 of one or more computing devices 600 in the computing device cluster may store the same instructions for executing the operation log recording method.

[0224] In some possible implementations, the memory 603 of one or more computing devices 600 in the computing device cluster may also store partial instructions for executing the operation logging method. In other words, the combination of one or more computing devices 600 can jointly execute the instructions for executing the operation logging method.

[0225] It should be noted that the memory 603 in different computing devices 600 in the computing device cluster may store different instructions for executing part of the functions of the computing device 600. That is, the instructions stored in the memory 603 in different computing devices 600 may implement the functions of one or more of the multiple modules described above.

[0226] The present application also provides a computer-readable storage medium. The computer-readable storage medium is used to store computer program instructions. When the computer program instructions are executed on a computing device, the computing device executes the operation log recording method involved in the above embodiment. The computer-readable storage medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).

[0227] The present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the operation logging method.

[0228] Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present application. Those skilled in the art should understand that, although the present application has been described in detail with reference to the aforementioned embodiments, the technical solutions described in the aforementioned embodiments may be modified or some of the technical features thereof may be replaced with equivalents. However, such modifications or replacements do not deviate from the spirit and scope of the technical solutions in the various embodiments of the present application.

Claims

1. A method for recording an operation log, characterized in that: include: When a user operates target data, a first value before the target data changes and a second value after the target data changes are obtained; Determining a target difference recording rule based on an object attribute type of the target data, wherein the target difference recording rule is used to represent a logic for generating a difference recording log; generating a difference recording log based on the target difference recording rule, wherein the difference recording log records change description information of the first value and the second value; The difference record log is saved in a database.

2. The method according to claim 1, characterized in that The object attribute type of the target data includes the object index corresponding to the target data object, and the associated object type, associated object index and attribute value record table of each attribute in at least one attribute associated with the target data object; The obtaining of the first value before the target data changes and the second value after the target data changes includes: When a user operates on target data, determining, in a data table corresponding to the target data, according to an object index of the target data, at least one object of the target data and an unmodified attribute value of each object as the first value; When a user operates on target data, obtaining the type of operation performed by the user on the object corresponding to the target data; According to the modification operation of the associated object type, associated object index and attribute value of each attribute in at least one attribute associated with the object attribute type of the target data indicated by the operation type, the attribute value of the target data modified according to the operation type is obtained as the second value.

3. The method according to claim 1 or 2, characterized in that The generating of a difference record log based on the target difference record rule includes: The user name, the operation time when the user operates the target data, the effective start time of the first value before the target data changes, and the effective end time of the second value after the target data changes are recorded.

4. The method according to any one of claims 1 to 3, characterized in that The operation types performed by the user on the target data include at least one of data structure deletion drop, truncation truncate, insertion insert, data content deletion delete, update update, change alter and selection select; the target difference record rule is used to indicate that the logic for generating the difference record log is generated by the associated object type in the object attribute type, and the associated object type includes at least one of multiple selection of personnel, multiple selection button group, JSON table and short text.

5. The method according to claim 4, characterized in that The generating of a difference record log based on the target difference record rule includes: In the case where the associated object type is multiple selection of persons, obtaining the operation type of the user's operation on the corresponding object in the multiple selection of persons; Based on the operation type, the persons deleted and / or added in the multi-selection of persons indicated by the operation type are recorded as change description information of the first value and the second value.

6. The method according to claim 4, characterized in that The generating of a difference record log based on the target difference record rule includes: In a case where the associated object type is a multiple-choice button group, obtaining an operation type performed by the user on a corresponding object in the multiple-choice button group; Based on the operation type, the buttons in the multiple-choice button group that are selected and / or cancelled under the operation type indication are recorded as the change description information of the first value and the second value.

7. The method according to claim 4, characterized in that The generating of a difference record log based on the target difference record rule includes: In the case where the associated object type is a JSON table, obtaining the operation type of the user operating on the corresponding object in the JSON table; Based on the operation type, the corresponding modified field and the modified content in the JSON table indicated by the operation type are recorded as change description information of the first value and the second value.

8. The method according to claim 4, characterized in that The generating of a difference record log based on the target difference record rule includes: In the case where the associated object type is a short text, obtaining the operation type of the user on the corresponding object in the short text; Based on the operation type, the modified text content in the short text indicated by the operation type is recorded as change description information of the first value and the second value.

9. The method according to any one of claims 1 to 8, characterized in that The database includes at least one of an object record table, an object attribute change record table, and an object attribute history record table; Wherein, the object record table includes the object index, object name, field and attribute value of the target data; The object attribute change record table includes the object index, associated object type, associated object index, operation type, operation time and attribute value of the target data; The object attribute history record table includes object index, associated object type, associated object index, attribute name of the changed object, record before change, record after change, change description, operator, operation time, effective start time, effective end time and attribute value.

10. A computing device, characterized in that include: at least one memory for storing a program; at least one processor, configured to execute the program stored in the memory; The memory is coupled to the processor, and when the program stored in the memory is executed, the processor is configured to execute the method according to any one of claims 1 to 9.