Operation log generation method, terminal device, and computer-readable storage medium

By automatically generating operation logs, the problem of low reusability in existing technologies is solved, and efficient operation log recording applicable to various data types and nested objects is achieved.

CN115509879BActive Publication Date: 2026-06-19PING AN BANK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN BANK CO LTD
Filing Date
2022-10-11
Publication Date
2026-06-19

Smart Images

  • Figure CN115509879B_ABST
    Figure CN115509879B_ABST
Patent Text Reader

Abstract

This application discloses an operation log generation method, a terminal device, and a computer-readable storage medium. The operation log generation method includes: responding to a first operation instruction, acquiring object data of multiple first objects, wherein the object data includes at least attribute information of the first objects; acquiring the data type of the corresponding first object based on the attribute information of the first object; acquiring modification information and / or operation information of the first object based on the data type; and generating an operation log of the first object based on the modification information and / or operation information. The method of this application can generate corresponding operation logs based on the data type of the first object, applicable to objects of various data types, and improving recording efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to methods for generating operation logs, terminal devices, and computer-readable storage media. Background Technology

[0002] Operation logs are files that record various important information during system operation. They are created and logged by each process during system operation. Operation logs can record the system's operation process and exception information, providing detailed information for quickly locating problems that occur during system operation and for program debugging issues during development.

[0003] Currently, most business systems require writing a lot of code and comparing field values ​​one by one to implement the operation log recording function. This method has low reusability, cannot automatically generate operation logs based on the data type of the object, and is inefficient. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides an operation log generation method, a terminal device, and a computer-readable storage medium.

[0005] To address the aforementioned issues, this application provides a first technical solution: a method for generating operation logs, comprising: responding to a first operation instruction to acquire object data of a plurality of first objects, wherein the object data includes at least attribute information of the first objects; acquiring the data type of the corresponding first object based on the attribute information of the first objects; acquiring modification information and / or operation information of the first objects based on the data type; and generating an operation log of the first objects based on the modification information and / or the operation information.

[0006] The data type includes a basic data type, and the object data includes annotation information of multiple first objects. The step of obtaining modification information and / or operation information of the first object based on the data type includes: when the first object is a basic data type, obtaining a first attribute value and a second attribute value of the first object according to the annotation information of the first object; and obtaining the modification information and / or the operation information based on the comparison result of the first attribute value and the second attribute value.

[0007] The step of obtaining the modification information and / or the operation information based on the comparison result of the first attribute value and the second attribute value includes: determining whether the first attribute value and the second attribute value of the first object are equal; if not, generating difference information between the first attribute value and the second attribute value, and obtaining the modification information and / or the operation information based on the difference information.

[0008] Wherein, the first attribute value is the attribute value of the first object before modification, and the second attribute value is the attribute value of the first object after modification; the step of obtaining the modification information or the operation information based on the difference information includes: obtaining the modification result of the first object based on the difference information between the first attribute value and the second attribute value, so as to obtain the modification information; obtaining the operation status of the first object based on the first attribute value or the second attribute value, so as to obtain the operation information.

[0009] The step of obtaining the operation status of the first object based on the first attribute value and / or the second attribute value to obtain the operation information includes: determining whether the first attribute value and the second attribute value are empty; when both the first attribute value and the second attribute value are not empty, the first object is in a modification state; when the first attribute value is empty and the second attribute value is not empty, the first object is in a creation state; when the second attribute value is empty and the first attribute value is not empty, the first object is in a deletion state.

[0010] The step of obtaining modification information and / or operation information of the first object based on the data type further includes: when the first object is a reference data type, obtaining reference information of the first object based on the attribute information of the first object, wherein the reference information includes attribute information and annotation information of a second object referenced by the first object; determining whether the attribute of the second object is a basic data type based on the attribute information of the second object; when the second object is a basic data type, obtaining the third attribute value and the fourth attribute value of the second object based on the annotation information of the second object; and obtaining modification information and / or operation information of the first object based on the comparison result of the third attribute value and the fourth attribute value.

[0011] The step of generating the operation log of the first object based on the modification information and / or the operation information includes: generating a structure template of the first object in response to a second operation instruction; and generating the operation log according to the structure template based on the modification information and / or the operation information.

[0012] Prior to the step of generating the operation log of the first object based on the modification information and / or the operation information, the operation log generation method further includes: when the attribute information of the first object includes sensitive information, performing desensitization processing on the attribute values ​​of the first object.

[0013] To address the aforementioned issues, this application provides a second technical solution: a terminal device comprising a processor and a memory connected to the processor, wherein the memory stores program data, and the processor retrieves the program data stored in the memory to execute the operation log generation method described above.

[0014] To address the aforementioned issues, this application provides a third technical solution: a computer-readable storage medium storing program instructions, which are executed to implement the operation log generation method described above.

[0015] This application provides an operation log generation method, a terminal device, and a computer-readable storage medium. The operation log generation method includes: responding to a first operation instruction, acquiring object data of a plurality of first objects, wherein the object data includes at least attribute information of the first objects; acquiring the data type of the corresponding first object based on the attribute information of the first object; acquiring modification information and / or operation information of the first object based on the data type; and generating an operation log of the first object based on the modification information and / or operation information. The method of this application can generate corresponding operation logs based on the data type of the first object, applicable to objects of various data types, and improving recording efficiency. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0017] Figure 1 This is a flowchart illustrating an embodiment of the operation log generation method provided in this application;

[0018] Figure 2 This is a flowchart illustrating another embodiment of the operation log generation method provided in this application;

[0019] Figure 3 This is a flowchart illustrating another embodiment of the operation log generation method provided in this application;

[0020] Figure 4 This is a schematic diagram of the framework of an embodiment of the terminal device provided in this application;

[0021] Figure 5 This is a schematic diagram of the framework of another embodiment of the terminal device provided in this application;

[0022] Figure 6 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0025] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0026] With the further development of information technology and the needs of enterprise business operations, the demand for recording operation processes is increasing. Various systems need to record user operation logs. Currently, most systems do not have a unified and independent operation log recording module. They need to write a lot of code and extract field values ​​one by one to compare in order to generate operation logs. The existing operation log generation methods have low code reusability and cannot compare complex data types or support nested objects. Therefore, the recording efficiency of operation logs is low, and the corresponding operation records cannot be accurately obtained when faced with complex operation processes.

[0027] In view of this, this application first proposes an operation log generation method. This method can generate corresponding modification information and / or operation information based on the data type of the object, thereby improving the recording efficiency and reliability of the operation log. This operation log generation method can be applied to terminal devices and in the field of data processing. Specifically, when applied to fintech, this operation log generation method can be used in e-commerce, electronic payment, securities, e-banking, tax transactions, credit cards, online shopping, insurance, and other business scenarios, without further specific limitations.

[0028] The terminal device in this application can be a server or a system in which the server and a local terminal cooperate with each other. Accordingly, the various parts of the electronic terminal, such as each unit, subunit, module, and submodule, can be all set in the server, or they can be set in the server and the local terminal respectively.

[0029] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed servers, or as a single software program or software module; no specific limitation is made here. In some possible implementations, the operation log generation method of this application embodiment can be implemented by a processor calling computer-readable instructions stored in memory.

[0030] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the operation log generation method provided in this application. Figure 1 As shown, the operation log generation method includes the following steps:

[0031] Step S11: In response to the first operation instruction, obtain object data of multiple first objects, the object data including at least the attribute information of the first objects.

[0032] The first object is the user's operation object, and the first operation instruction can be an instruction generated when the user modifies or manages files or parameters of the business system or application on the front-end interface. The first operation instruction can also be generated based on the user's click or input on objects in a preset area on the front-end interface. No specific limitation is made on the first operation instruction here.

[0033] The object data of the first object includes the attribute information of the first object. By obtaining the attribute information of the first object, the specific data type of the first object can be obtained.

[0034] Step S12: Obtain the data type of the first object based on its attribute information.

[0035] Based on the attribute information of the first object, the corresponding data type of the first object is obtained. Here, the data type can refer to the machine language data type required to construct the first object. Depending on the machine language used by the business system, the specific data type may differ. For example, when developing software using Java, the specific data type of the first object needs to be specified to construct it. Java includes primitive data types and reference data types; when the first object belongs to different data types, different methods are needed to generate operation logs.

[0036] Step S13: Obtain the modification information and / or operation information of the first object based on the data type.

[0037] Based on the data type of the first object, obtain the modification information and / or operation information of the first object. Specifically, when the data type of the first object is a basic data type or a reference data type, the modification information and / or operation information of the first object can be obtained through different comparison methods.

[0038] The modification information of the first object can include the modification trajectory and modification results when the user modifies the first object. For example, when the user modifies the first object, the modification result can be obtained based on the data type of the first object and the attribute values ​​of the first object before and after the modification. If there are multiple modification results, the user's modification trajectory can be obtained to obtain the modification information of the first object. The operation information of the first object can include the operation status of the user on the first object. The operation status of the first object includes, but is not limited to, the add status, insert status, modify status, and delete status.

[0039] Step S14: Generate the operation log of the first object based on the modification information and / or operation information.

[0040] Specifically, the operation log of the first object can include records of the operation user, operation name, name of the first object, modification information, operation information, etc. The operation log can also record relevant business information, so that users can quickly understand their operation behavior or operation habits when viewing the operation log, and prevent and monitor users' operations on critical business.

[0041] Based on the modification information and / or operation information of the first object, an operation log for the first object is generated. Since users need to view and analyze the operation log, high readability is required. The descriptive statements in the operation log need to be generated according to a preset format and have high readability. For example, in one embodiment, when a user adds or deletes a certain attribute value of the first object, the operation information of the first object and the specific attribute value added or deleted can be obtained to generate a corresponding descriptive statement; in another embodiment, when a user modifies a first attribute value of the first object to a second attribute value, the modification information of the first object and the specific attribute value modified can be obtained to generate a corresponding descriptive statement.

[0042] Depending on the format in which the operation log is generated, the specific types of modification and operation information, as well as the descriptive statements, will differ. For example, when the operation log is a simple text record, the operation information may be the operation status of the first object, and the modification information may be information such as user operation parameters, operation time, and operating user. In this case, the descriptive statement may include: operation time, operator, the first object involved, and operation status. For example, the descriptive statement could be "2022-09-15 10:00, User, Order Creation".

[0043] When the operation log is a text record, the operation log can record the modification process in more detail. At this time, the operation information can be the operation status of the first object, and the modification information can be the parameters of the user operation, the operation time, the user of the operation, the changes in values ​​before and after the modification, etc. For example, the description statement can be: 2022-09-15 10:00, User Xiaoming changed the bound mobile phone number: from "18XXXX" to "19XXXX".

[0044] Therefore, the method of this embodiment can automatically generate corresponding operation logs based on the data type of the first object, which is applicable to objects of various data types, improves the recording efficiency of operation logs, and enables users to quickly obtain operation records corresponding to the operation process, prevent and monitor users' recording of key business operations, and facilitate subsequent investigation and supervision of users' operation behavior.

[0045] Please see Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the operation log generation method provided in this application. Figure 2 As shown, in this embodiment, the data type includes basic data types, and the object data includes annotation information of multiple first objects. The operation log generation method in this embodiment includes the following steps:

[0046] Step S21: In response to the first operation instruction, obtain object data of multiple first objects, wherein the object data includes at least the attribute information of the first objects.

[0047] Step S22: Obtain the data type of the first object based on its attribute information.

[0048] Steps S21-S22 are similar to steps S11-S12, and will not be described again here.

[0049] Step S23: When the first object is a basic data type, obtain the first attribute value and the second attribute value of the first object based on the annotation information of the first object.

[0050] The basic data types can be the primitive types supported by the Java language, including but not limited to boolean, float, char, byte, short, int, long, and double. When constructing the first object, the data type is set to specify the number of bytes, values, etc., ensuring that the first object can be implemented on multiple platforms.

[0051] When constructing the first object, annotations are used to identify the attributes that need to be recorded in the first object. These attributes include, but are not limited to, the object's field names, class path, and whether it is a collection class object. Annotations include, but are not limited to, Java-defined annotations such as Override, Deprecated, Suppress Warnings, Retention, Documented, Target, Inherited, SafeVarargs, Functional Interface, and Repeatable. During subsequent execution or invocation of this object, the identified content can be obtained through reflection using the annotations, thereby retrieving the attribute values ​​of the first object.

[0052] When the first object is a basic data type, variable conversion can be performed directly between the parameter variables of the first object. At this time, based on the annotation information of the first object, the first attribute value and the second attribute value of the first object are obtained. The first attribute value is the attribute value of the first object before modification, and the second attribute value is the attribute value of the first object after modification. It can be understood that the first attribute value and the second attribute value are the values ​​of the same attribute of the first object before and after modification.

[0053] Step S24: Based on the comparison results of the first attribute value and the second attribute value, obtain modification information and / or operation information.

[0054] After obtaining the first attribute value and the second attribute value of the first object, the first attribute value and the second attribute value are compared to obtain the modification information and / or operation information of the first object based on the comparison result of the first attribute value and the second attribute value.

[0055] Step S25: Generate an operation log for the first object based on the modification information and / or operation information.

[0056] Step S25 is similar to step S14, and will not be described again here.

[0057] Depending on the format in which the operation log is generated, it can be generated based on modification information and / or operation information. In one embodiment, when the operation log is a simple text record, it can be generated based on the modification information or operation information of the first object. For example, the description of the operation log may include "2022-09-15 10:00, address changed to XXX" or "2022-09-15 10:00, address changed". In another embodiment, when the operation log is a text record, it can be generated based on the operation information of the first object. The operation log is generated based on the modification information and operation information of the first object. For example, the description may be "2022-09-15 10:00, bound mobile phone number changed from 18XXXX to 19XXXX" or "2022-09-15 10:00, image named XXX deleted".

[0058] Therefore, using the method of this embodiment, when the data type of the first object is a basic data type, modification information and / or operation information can be directly obtained based on the comparison result of the first attribute value and the second attribute value, thereby improving the recording efficiency of the operation log.

[0059] Optionally, step S24 further includes the following steps: determining whether the first attribute value and the second attribute value of the first object are equal; if not, generating difference information between the first attribute value and the second attribute value, and obtaining modification information and / or operation information based on the difference information.

[0060] If the first attribute value and the second attribute value of the first object are equal, and the attribute of the first object has not been modified, or the attribute value before and after modification has not changed, then the next attribute of the first object or the attribute value of the next first object can be compared.

[0061] When the first attribute value and the second attribute value of a first object are not equal, it indicates that the user has modified, added, or deleted that attribute of the first object. In this case, the modification or operation information of the first object can be obtained based on the difference between the first and second attribute values. Specifically, the difference information can be the difference between the first and second attribute values, or simply the difference between the first and second attribute values. The difference can be understood as the difference in a mathematical subtraction operation, or a numerical difference. For example, in some implementations, the difference between the first and second attribute values ​​may be reflected in the first attribute value being a first value and the second attribute value being a second value, indicating that the first and second values ​​are not equal. In this case, the difference between the first and second attribute values ​​is reflected as the first and second values.

[0062] Furthermore, the first attribute value is the attribute value of the first object before modification, and the second attribute value is the attribute value of the first object after modification.

[0063] At this point, the steps for obtaining modification information or operation information based on the difference information further include the following steps: obtaining the modification result of the first object based on the difference information between the first attribute value and the second attribute value, so as to obtain modification information; and obtaining the operation status of the first object based on the first attribute value and the second attribute value, so as to obtain operation information.

[0064] Specifically, in this embodiment, the modification information includes the modification result, and the operation information includes the operation status. The difference information between the first attribute value and the second attribute value includes, but is not limited to, the difference between the first attribute value and the second attribute value. Based on the difference information between the first attribute value and the second attribute value, the modification result of the first object can be obtained. The modification result of the first object includes, but is not limited to, the attribute value of the first object before modification and / or the attribute value after modification. The operation status of the first object includes, but is not limited to, the addition status, the modification status, and the deletion status.

[0065] Depending on the format in which the operation log is generated, the specific types and descriptions of modification and operation information will differ. When the operation log is a simple text record, the description may only include the operation object, operator, and operation status. When the operation log is a text record, the description may include the operation object, operator, operation status, and modification result. Therefore, depending on the function of the object, business scenario, etc., the specific content of modification and operation information will vary, allowing for different levels of detail in the recording format to ensure that the operation log meets user needs.

[0066] Furthermore, the step of obtaining the operation state of the first object based on the first attribute value and the second attribute value also includes: determining whether the first attribute value and the second attribute value are empty; when both the first attribute value and the second attribute value are not empty, the first object is in the modification state; when the first attribute value is empty and the second attribute value is not empty, the first object is in the addition state; when the second attribute value is empty and the first attribute value is not empty, the first object is in the deletion state.

[0067] Specifically, the operation status of the first object can be determined by checking whether its attribute values ​​before and after modification are empty. If both the first and second attribute values ​​are not empty, it indicates that the first object's attribute values ​​before and after modification are not empty. In this case, the user modifies the first attribute value to the second attribute value, and the first object is in a modification state. If the first attribute value is empty but the second attribute value is not empty, the first object's attribute value changes from empty to the second attribute value. In this case, the user adds the second attribute value, and the first object is in a creation state. If the first attribute value is not empty but the second attribute value is empty, the first object's attribute value changes from the first attribute value to empty. In this case, the user deletes the first attribute value, and the first object is in a deletion state. If both the first and second attribute values ​​are empty, the comparison continues with the next attribute value.

[0068] In this embodiment, by determining whether the attribute values ​​of the first object before and after modification are empty, it is determined whether the user has performed operations such as modification, deletion, or addition on the first object, so as to enrich the recorded content of the operation log and improve the user's reading experience.

[0069] Please see Figure 3 , Figure 3 This is a flowchart illustrating another embodiment of the operation log generation method provided in this application. Figure 3 As shown, in this embodiment, step S13 further includes the following steps:

[0070] Step S31: When the first object is a reference data type, obtain the reference information of the first object based on the attribute information of the first object. The reference information includes the attribute information and annotation information of the second object referenced by the first object.

[0071] Specifically, a reference data type is a user-defined data type that references other objects. It can be understood that a reference data type is built on the basis of a basic data type. When the first object is a reference data type, the first object will indicate the data type of the object by referencing a second object. The data type of the second object referenced by the first object can be a basic data type or a reference data type.

[0072] When the first object is a reference data type, its reference information can be obtained based on its attribute information. This reference information includes at least the attribute information and annotation information of the second object referenced by the first object. Similarly, when constructing the second object, annotations are used to identify the attributes that the second object needs to record. These attributes include, but are not limited to, the field names, class paths, and whether the object is a collection class. The attribute values ​​identified by the second object can be retrieved later based on its annotation information.

[0073] Step S32: Based on the attribute information of the second object, determine whether the attribute of the second object is a basic data type.

[0074] Based on the attribute information of the second object, obtain the data type of the second object, and determine whether the data type of the second object is a basic data type.

[0075] Step S33: When the second object is a basic data type, obtain the third and fourth attribute values ​​of the second object based on the annotation information of the second object.

[0076] When the data type of the second object is a basic data type, the third and fourth attribute values ​​of the second object can be obtained through reflection based on the annotation information of the second object. The third attribute value is the attribute value of the second object before modification, and the fourth attribute value is the attribute value of the second object after modification.

[0077] Step S34: Based on the comparison results of the third attribute value and the fourth attribute value, obtain the modification information and / or operation information of the first object.

[0078] After obtaining the third and fourth attribute values ​​of the second object, the third and fourth attribute values ​​are compared to obtain the modification information and / or operation information of the first object based on the comparison results.

[0079] Specifically, the method for obtaining the modification information and / or operation information of the first object based on the comparison result of the third attribute value and the fourth attribute value is similar to the method for obtaining the modification information and / or operation information of the first object based on the comparison result of the first attribute value and the second attribute value in the above embodiment. It can be understood that the specific method includes the following steps: determining whether the third attribute value and the fourth attribute value are equal; when the third attribute value and the fourth attribute value are not equal, generating difference information between the third attribute value and the fourth attribute value, and obtaining the modification result of the first object based on the difference information between the third attribute value and the fourth attribute value; and obtaining the operation state of the first object based on whether the third attribute value and the fourth attribute value are empty, thereby obtaining the modification information and / or operation information of the first object.

[0080] Therefore, the method of this embodiment can compare the data of objects of reference data types to obtain the operation logs of the objects of reference data types. The generated operation logs are more complete, making the operation log generation method more suitable for complex business scenarios.

[0081] Optionally, step S14 further includes the following steps: generating a structure template for the first object in response to the second operation instruction; and generating an operation log based on the modification information and / or operation information, and in accordance with the structure template.

[0082] Specifically, the second operation command issued by the user is used to modify the generation framework or format of the operation log. In one embodiment, when setting up the relevant application for operation log generation, program code blocks corresponding to multiple structure templates can be encapsulated in corresponding nodes, allowing the user to select the appropriate generation format or framework by selecting the node. In another embodiment, the object's structure template consists of multiple parameters, such as the operation object, operation time, operation path, and operation content. In this case, program code blocks corresponding to multiple commonly used parameters of the structure template can be encapsulated in corresponding nodes, allowing the user to select the corresponding parameters by selecting the node, thus customizing the structure template for generating the operation log. These methods allow users to customize the operation log generation template according to their needs, making the generated operation logs more suitable for user reading habits and improving the user experience.

[0083] Optionally, before step S14, the operation log generation method may further include the following steps: when the attribute information of the first object includes sensitive information, the attribute values ​​of the first object are desensitized.

[0084] Specifically, since terminal devices are typically set up in important program nodes or interfaces to generate their operation logs, when sensitive data exists in the object attributes of program nodes or interfaces, the attribute values ​​of the objects can be anonymized. Sensitive data includes, but is not limited to, personal privacy data, property income data, information security data, and economic data, to protect users' personal information security and prevent the leakage of sensitive data. Anonymization methods include, but are not limited to, de-identification of personal information, a process of removing the association between object attribute information and the data subject, making it impossible for users or machines to identify the content of the data subject.

[0085] Please see Figure 4 , Figure 4 This is a schematic diagram of the framework of an embodiment of the terminal device provided in this application. Figure 4As shown, the terminal device 100 includes a processor 101 and a memory 102 connected to the processor 101. The memory 102 stores program data, and the processor 101 retrieves the program data stored in the memory 102 to execute the above-described operation log generation method.

[0086] Optionally, in one embodiment, the processor 101 is configured to execute program data to implement the following method: in response to a first operation instruction, acquiring object data of a plurality of first objects, the object data including at least attribute information of the first objects; acquiring the data type of the corresponding first object based on the attribute information of the first object; acquiring modification information and / or operation information of the first object based on the data type; and generating an operation log of the first object based on the modification information and / or operation information.

[0087] The processor 101 can also be referred to as a CPU (Central Processing Unit). The processor 101 may be an electronic chip with signal processing capabilities. The processor 101 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0088] The memory 102 can be a memory module, TF card, etc., and can store all information in the terminal device 100, including the input raw data, computer programs, intermediate running results, and final running results. It stores and retrieves information according to the location specified by the processor 101. With the memory 102, the terminal device 100 has a memory function and can ensure normal operation. The memory 102 of the terminal device 100 can be classified according to its purpose as main memory (RAM) and auxiliary memory (external storage), or it can be classified as external memory and internal memory. External storage is usually magnetic media or optical discs, which can store information for a long time. RAM refers to the storage components on the motherboard, used to store currently executing data and programs, but it is only used for temporary storage of programs and data; the data will be lost when the power is turned off.

[0089] Please see Figure 5 , Figure 5 This is a schematic diagram of another embodiment of the terminal device provided in this application. Figure 5 As shown, this application also provides another terminal device 100, which includes an operation module 103, an acquisition module 104, a modification module 105, and a generation module 106.

[0090] The operation module 103 is used to respond to the first operation instruction to obtain object data of multiple first objects, the object data including at least the attribute information of the first objects; the acquisition module 104 is used to obtain the data type of the corresponding first object based on the attribute information of the first object; the modification module 105 is used to obtain the modification information and / or operation information of the first object based on the data type; and the generation module 106 is used to generate the operation log of the first object based on the modification information and / or operation information.

[0091] In one embodiment of this application, the various modules in the terminal device 100 can be individually or entirely merged into one or more units, or some of the units can be further divided into multiple functionally smaller sub-units to achieve the same operation without affecting the technical effect of the embodiment of this application. The above modules are based on logical function division. In practical applications, the function of one module can also be implemented by multiple units, or the function of multiple modules can be implemented by one unit.

[0092] Please see Figure 6 , Figure 6 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium provided in this application. Figure 6 As shown, the computer-readable storage medium 110 stores program instructions 111 capable of implementing all of the above methods.

[0093] If the integrated units of the various functional units in the various embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium 110. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer-readable storage medium 110 includes several instructions in a program instruction 111 to cause a computer device (which may be a personal computer, system server, or network device, etc.), an electronic device (e.g., MP3, MP4, etc., or a mobile terminal such as a mobile phone, tablet, or wearable device, or a desktop computer, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of this application.

[0094] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media 110 (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0095] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable storage medium 110. These computer-readable storage media 110 can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that program instructions 111, executable by the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0096] These computer-readable storage media 110 may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that program instructions 111 stored in the computer-readable storage medium 110 produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0097] These computer-readable storage media 110 may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing program instructions 111 that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0098] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.

[0099] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (which may be a personal computer, server, network device or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0100] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for generating operation logs, characterized in that, include: In response to a first operation instruction, object data of a plurality of first objects is acquired, wherein the object data includes at least the attribute information of the first objects; Obtain the data type of the first object based on its attribute information; Based on the data type, obtain the modification information and / or operation information of the first object; Based on the modification information and / or the operation information, generate the operation log of the first object; The data type includes basic data types, and the object data includes annotation information of multiple first objects; The step of obtaining modification information and / or operation information of the first object based on the data type includes: When the first object is a basic data type, the first attribute value and the second attribute value of the first object are obtained according to the annotation information of the first object; Based on the comparison result between the first attribute value and the second attribute value, the modification information and / or the operation information are obtained; The step of obtaining modification information and / or operation information of the first object based on the data type further includes: when the first object is a reference data type, obtaining reference information of the first object according to the attribute information of the first object, wherein the reference information includes attribute information and annotation information of the second object referenced by the first object; Based on the attribute information of the second object, determine whether the attribute of the second object is a basic data type; When the second object is a basic data type, the third and fourth attribute values ​​of the second object are obtained according to the annotation information of the second object. Based on the comparison results of the third attribute value and the fourth attribute value, the modification information and / or operation information of the first object are obtained; The step of generating an operation log for the first object based on the modification information and / or the operation information includes: When adding or deleting attribute values ​​of the first object, obtain the operation information of the first object and the specific attribute values ​​added or deleted by the first object to generate a first description statement; When the first attribute value of the first object is modified to the second attribute value, the modification information of the first object and the specific attribute value modified by the first object are obtained to generate a second description statement.

2. The operation log generation method according to claim 1, characterized in that, The step of obtaining the modification information and / or the operation information based on the comparison result of the first attribute value and the second attribute value includes: determining whether the first attribute value and the second attribute value of the first object are equal; If not, then generate difference information between the first attribute value and the second attribute value, and obtain the modification information and / or the operation information based on the difference information.

3. The operation log generation method according to claim 2, characterized in that, The first attribute value is the attribute value of the first object before modification, and the second attribute value is the attribute value of the first object after modification. The step of obtaining the modification information and the operation information based on the difference information includes: obtaining the modification result of the first object based on the difference information between the first attribute value and the second attribute value, so as to obtain the modification information; Based on the first attribute value and the second attribute value, the operation state of the first object is obtained to obtain the operation information.

4. The operation log generation method according to claim 3, characterized in that, The step of obtaining the operation state of the first object based on the first attribute value and the second attribute value, and obtaining the operation information, includes: determining whether the first attribute value and the second attribute value are empty; When both the first attribute value and the second attribute value are not empty, the first object is in a modified state; When the value of the first attribute is empty and the value of the second attribute is not empty, the first object is in the newly created state; The first object is in a deleted state when the value of the second attribute is empty and the value of the first attribute is not empty.

5. The operation log generation method according to claim 1, characterized in that, The step of generating the operation log of the first object based on the modification information and / or the operation information includes: generating a structural template of the first object in response to a second operation instruction; The operation log is generated based on the modification information and / or the operation information, and according to the structure template.

6. The operation log generation method according to claim 5, characterized in that, Before the step of generating the operation log of the first object based on the modification information and / or the operation information, the operation log generation method further includes: when the attribute information of the first object includes sensitive information, performing desensitization processing on the attribute values ​​of the first object.

7. A terminal device, characterized in that, The system includes a processor and a memory connected to the processor, wherein the memory stores program data, and the processor retrieves the program data stored in the memory to execute the operation log generation method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The system stores program instructions that are executed to implement the operation log generation method as described in any one of claims 1-6.