Operation log processing method and device
By using proxy classes and configuration information in operation log processing, operation logs are generated and stored asynchronously, which solves the problem of coupling between the operation log generation process and the technical framework, achieves more flexible and efficient operation log processing, and reduces the burden on business code. Invasion and cost.
Patent Information
- Application Number
- CN202410764342.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-17
AI Technical Summary
The operation log generation process is coupled with a specific technical framework and lacks flexibility and scalability, resulting in intrusion into business code and increased R&D and maintenance costs.
By determining the target agent class from the pre-generated agent class, asynchronously execute the log generation logic, generate and store the operation log, use the configuration information and bytecode generator to reduce the intrusion into the business code, and improve the efficiency and flexibility of operation log generation sex.
It realizes the decoupling of the operation log processing process, reduces the intrusion into business code, improves the universal applicability and efficiency of the generation method, reduces R&D and maintenance costs, and enhances the scalability and user experience of the operation log.
Smart Images

Figure CN118656282A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for processing an operation log. Background Art
[0002] When a user changes business data in a business system, the business system usually needs to record the user's operation and generate corresponding operation logs. For example, when a user adds, modifies, or deletes business data, it is necessary to record the specific value of the business data after the change, as well as log information such as the operator, operation IP, and operation time. When generating operation logs, the change process of business data is usually intercepted through the MyBatis interceptor or the Spring MVC framework to generate operation logs.
[0003] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems:
[0004] The operation log generation process is coupled with a specific technical framework, lacks flexibility and scalability, and intrudes into business codes, increasing R&D and maintenance costs. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for processing an operation log, which can decouple the processing of the operation log from a specific technical framework, process the operation log more flexibly, and reduce the intrusion into the business code.
[0006] To achieve the above-mentioned purpose, according to the first aspect of an embodiment of the present invention, a method for processing an operation log is provided, comprising: determining a target proxy class corresponding to a received data update request from pre-generated proxy classes; the target proxy class includes a log generation logic for generating an operation log; asynchronously executing the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request; and storing the operation log in a pre-set database.
[0007] Optionally, before determining the target proxy class corresponding to the received data update request, determine the target business class from multiple original business classes according to pre-set configuration information, and determine the target business logic from the target business class; proxy the target business logic, and weave the log generation logic into the proxied target business logic to obtain the business proxy logic; and generate a proxy class including the business proxy logic according to a pre-set bytecode generator.
[0008] Optionally, after generating a proxy class including the business proxy logic, the proxy class is stored in a pre-set cache, and the association between different proxy classes and different business response logics is recorded in the cache; wherein, determining the target proxy class corresponding to the received data update request includes: determining the business response logic corresponding to the received data update request, and using the proxy class associated with the business response logic queried from the cache as the target proxy class.
[0009] Optionally, before determining the target service class from a plurality of original service classes according to preset configuration information, the configuration information is determined according to a received user input request; or the configuration information is determined according to a preset configuration file.
[0010] Optionally, before asynchronously executing the log generation logic included in the target proxy class, call a preset information acquisition interface to obtain additional information corresponding to the data update request; pass the additional information into the log generation logic; wherein, asynchronously executing the log generation logic included in the target proxy class includes: executing the log generation logic with the additional information passed in, and generating an operation log including the additional information.
[0011] Optionally, before storing the operation log in a preset database, data source information corresponding to multiple proxy classes is stored in a preset cache according to preset configuration information; wherein, storing the operation log in the preset database includes: determining target data source information corresponding to the target proxy class from the cache; determining the target data source from multiple preset data sources according to the target data source information, and storing the operation log in a target database corresponding to the target data source.
[0012] Optionally, the method of an embodiment of the present invention also includes: determining target data corresponding to a received log query request; querying a target operation log associated with the target data in a database corresponding to the target data, and obtaining multiple data update records corresponding to the target data from the target operation log; arranging the multiple data update records in reverse chronological order according to the generation time of the data update records; and comparing two adjacent data update records in the multiple data update records arranged in reverse chronological order to generate operation log details for the target data.
[0013] Optionally, before obtaining the operation log corresponding to the data update request, the execution process of the log generation logic is monitored, and the successful execution of the log generation logic is determined based on the monitoring result; and, in response to determining that there is an abnormality in the execution result based on the monitoring result, the cumulative number of executions of the log generation logic is determined, and in response to the cumulative number of executions being less than a preset execution number threshold, the cumulative number of executions is incremented, and the log generation logic is executed asynchronously; in response to the cumulative number of executions being not less than the execution number threshold, an exception log corresponding to the data update request is generated.
[0014] According to a second aspect of an embodiment of the present invention, there is provided an operation log processing device, comprising: a determination module, which determines a target proxy class corresponding to a received data update request from pre-generated proxy classes; the target proxy class comprises a log generation logic for generating an operation log; a generation module, which asynchronously executes the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request; and a storage module, which stores the operation log in a pre-set database.
[0015] Optionally, the device of the embodiment of the present invention also includes: a second determination module, which is used to determine the target business class from multiple original business classes according to pre-set configuration information, and determine the target business logic from the target business class; a proxy module, which is used to proxy the target business logic and weave the log generation logic into the proxied target business logic to obtain the business proxy logic; a second generation module, which is used to generate a proxy class including the business proxy logic according to a pre-set bytecode generator.
[0016] Optionally, the device of an embodiment of the present invention also includes: a second storage module, used to store the proxy class in a pre-set cache, and record the association between different proxy classes and different business response logics in the cache; wherein the determination module is also used to: determine the business response logic corresponding to the received data update request, and determine the proxy class associated with the business response logic queried from the cache as the target proxy class.
[0017] Optionally, the apparatus of the embodiment of the present invention further includes: a first parsing module, used to determine configuration information according to a received user input request; or a second parsing module, used to determine configuration information according to a preset configuration file.
[0018] Optionally, the device of an embodiment of the present invention also includes: a first acquisition module, used to call a preset information acquisition interface to obtain additional information corresponding to the data update request; an input module, used to input the additional information into the log generation logic; the generation module is also used to: execute the log generation logic with the additional information input, and generate an operation log including the additional information.
[0019] Optionally, the device of the embodiment of the present invention also includes: a third storage module, used to store data source information corresponding to multiple proxy classes in a preset cache according to preset configuration information; the storage module is also used to: determine the target data source information corresponding to the target proxy class from the cache; determine the target data source from the preset multiple data sources according to the target data source information, and store the operation log to the target database corresponding to the target data source.
[0020] Optionally, the device of an embodiment of the present invention also includes: a third determination module, used to determine the target data corresponding to the received log query request; a second acquisition module, used to query the target operation log associated with the target data in the database corresponding to the target data, and obtain multiple data update records corresponding to the target data from the target operation log; a sorting module, used to arrange the multiple data update records in reverse chronological order according to the generation time of the data update records; a query module, used to compare two adjacent data update records among the multiple data update records arranged in reverse chronological order, and generate operation log details for the target data.
[0021] Optionally, the device of the embodiment of the present invention also includes: a first determination module, which is used to monitor the execution process of the log generation logic and determine whether the log generation logic is executed successfully based on the monitoring results; the device of the embodiment of the present invention also includes: a second determination module, which is used to determine the cumulative number of executions of the log generation logic in response to determining that the execution result is abnormal based on the monitoring results; a repeated execution module, which is used to increase the cumulative number of executions in response to the cumulative number of executions being less than the execution number threshold, and asynchronously execute the log generation logic; a third generation module, which is used to generate an exception log corresponding to the data update request in response to the cumulative number of executions being not less than the execution number threshold.
[0022] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any of the above embodiments.
[0023] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method of any of the above embodiments is implemented.
[0024] According to a fifth aspect of an embodiment of the present invention, there is provided a computer program product, including a computer program, which implements the method of any of the above embodiments when executed by a processor.
[0025] An embodiment of the above invention has the following advantages or beneficial effects: determining the target proxy class corresponding to the received data update request from the pre-generated proxy class, asynchronously generating the operation log based on the target proxy class, decoupling the processing process of the operation log from the specific technical framework, more flexibly processing the operation log, reducing the intrusion into the business code, reducing the R&D cost and maintenance cost, and improving the universal applicability of the operation log generation method; determining the target business logic that needs to be proxied based on the configuration information, and improving the flexibility of the business proxy; using the bytecode generator to generate the proxy class can improve the efficiency of generating the operation log and avoid intrusion into the business code; storing the generated proxy class in the cache can improve the efficiency of obtaining the proxy class and further improve the efficiency of generating the operation log. ; Parse user requests or configuration files to obtain configuration information, which can flexibly obtain configuration information to meet various business needs and further improve the flexibility of business agents; based on the information acquisition interface, obtain additional information and write operation logs, which can improve the information volume and accuracy of operation logs and improve user experience; store operation logs in corresponding data sources according to configuration information, which can improve the scalability of operation log storage and facilitate compatibility with different data sources; compare different versions of operation logs to obtain operation log details, which can quickly show users the change process of business data and improve user experience; add an abnormal fault tolerance mechanism and repeatedly generate operation logs within a specified number of times, which can improve the success rate of operation log generation and improve the security of operation log generation.
[0026] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0028] Figure 1 is a schematic diagram of the main process of the method for processing an operation log according to an embodiment of the present invention;
[0029] Figure 2 is a schematic diagram of the overall process of generating an operation log according to a reference embodiment of the present invention;
[0030] Figure 3 It is a schematic diagram of the technical architecture of a method for processing an operation log according to a reference embodiment of the present invention;
[0031] Figure 4 is a schematic diagram of the main flow of a method for processing an operation log according to a reference embodiment of the present invention;
[0032] Figure 5is a schematic diagram of the main flow of a method for processing an operation log according to another reference embodiment of the present invention;
[0033] Figure 6 is a schematic diagram of the main flow of a method for processing an operation log according to yet another reference embodiment of the present invention;
[0034] Figure 7 is a schematic diagram of main modules of an operation log processing device according to an embodiment of the present invention;
[0035] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0036] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0038] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0039] When users change business data in a business system, the business system usually needs to record the user's operation and generate corresponding operation logs. For example, when users add, modify or delete business data on the WEB side or HTTP-based client, or when they change business data with a higher security level, they need to record the specific value of the business data after the change, as well as the operator, operation IP, operation time and other log information to achieve business compliance and security. When generating operation logs, the change process of business data is usually intercepted through MyBatis interceptor or the Spring MVC framework to generate operation logs.
[0040] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems: the generation process of the operation log is coupled with a specific technical framework, lacks flexibility and scalability, and intrudes into the business code, increasing R&D costs and maintenance costs.
[0041] In view of this, according to a first aspect of an embodiment of the present invention, a method for processing an operation log is provided.
[0042] Figure 1 FIG. 1 is a schematic diagram of the main flow of the method for processing an operation log according to an embodiment of the present invention. Figure 1 As shown, the method for processing the operation log according to the embodiment of the present invention mainly includes the following steps S101 to S103.
[0043] Step S101, determining a target proxy class corresponding to a received data update request from pre-generated proxy classes.
[0044] When a user changes business data on the WEB side or a client based on the HTTP protocol, a data update request is sent to the execution entity of the embodiment of the present invention. The execution entity of the embodiment of the present invention parses the data update request and determines a business method for processing the data update request. The business method includes business logic for processing the data update request.
[0045] The business method is the business method after being proxied, and the proxy class used to proxy the business method is used as the target proxy class corresponding to the data update request. For example, the execution subject of the embodiment of the present invention registers the object to which the business method belongs, parses the pre-set configuration file, and queries the target proxy class corresponding to the business method; for another example, the execution subject of the embodiment of the present invention obtains the business annotation marked on the business method, and determines the target proxy class corresponding to the business method according to the business annotation.
[0046] Exemplarily, the pointcut "@pointcut("execution(*com.example.service.*.*(..))")" is defined in proxy class A. The pointcut indicates that the business methods included in the business class "com.example.service" are all woven into the proxy logic. Therefore, the target proxy class of the business methods included in the business class "com.example.service" is proxy class A.
[0047] When processing a data update request, the execution subject of the embodiment of the present invention triggers a query to the corresponding target proxy class, and the target proxy class includes a business logic for processing the data update request and a proxy logic for generating an operation log.
[0048] Based on the proxy mode, business methods are proxied to facilitate the weaving of proxy logic related to operation logs into business methods; the proxy logic is decoupled from a specific technical framework to improve the flexibility of proxy logic execution, so that the operation log processing method of the present invention is widely applicable to various technical frameworks; the proxy mode can reduce the intrusion into business codes and reduce R&D costs and maintenance costs.
[0049] Step S102: asynchronously execute the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request.
[0050] After determining the target proxy class corresponding to the data update request, the log generation logic included in the target proxy class is executed asynchronously. It should be noted that the target proxy class includes the log generation logic for generating operation logs and the data update logic for processing data update requests. For example, the target proxy class includes two proxy methods, each including one of the above two logics. The log generation logic and the data update logic are executed asynchronously and do not interfere with or affect each other. The log generation logic and the data update logic are not coupled with each other.
[0051] For example, the execution subject of the embodiment of the present invention creates two threads, including thread B1 and thread B2, uses thread B1 to execute data update logic, and uses thread B2 to execute log generation logic. After the data update logic is executed, the subsequent business logic continues to be executed; after the log generation logic is executed, the corresponding operation log is obtained.
[0052] The operation log includes multiple data update records, each of which includes: the execution time of the data update request, the business method corresponding to the data update request, whether the update is successful, the updated business data, the type of data update (for example, add, modify or delete), the user name and IP address of the user who sent the data update request, etc. Specifically, each data update request corresponds to a data update record, and the log generation logic is executed to obtain the corresponding data update record. If the operation log already exists, the data update record is written into the operation log and the operation log is updated. If the operation log does not exist, the operation log is generated first, and then the data update record is written into the newly generated operation log.
[0053] Asynchronous execution of log generation logic can improve the efficiency of generating operation logs and processing data update requests, avoid affecting the operation of business systems, and improve the high availability of business systems.
[0054] Step S103: storing the operation log in a preset database.
[0055] After obtaining the operation log corresponding to the data update request, the operation log is stored in the corresponding database. For example, if the operation log does not exist, the operation log is first generated, the data update record is written into the newly generated operation log, and then the operation log after the record is written is stored in the database.
[0056] As another example, when an operation log already exists, the log generation logic is executed asynchronously to obtain the corresponding data update record, determine the database for storing the operation log, determine the write location of the data update record in the database, and then write the data update record into the operation log in the database, that is, store the operation log after writing the data update record into the database.
[0057] Persisting operation logs can improve the query efficiency of operation logs, make it easier for users to analyze business data based on operation logs, and improve user experience.
[0058] According to a reference embodiment of the present invention, before determining the target proxy class corresponding to the data update request, the target business class is determined from multiple original business classes according to the preset configuration information, the target business class includes one or more business logics, and the target business logic is determined from the target business class. The original business class is a business class used to process user requests (for example, data update requests), and the original business class is not a proxy class. The configuration information includes the class name of the target business class to be proxied, the method name of the business method to be proxied, the identifier of the application to which the target business class belongs, and other information.
[0059] After determining the target business logic, the target business logic is proxied, for example, annotations are marked on the business methods corresponding to the target business logic, or the business methods corresponding to the target business logic are written into the configuration file. The log generation logic is woven into the proxied target business logic to obtain the business proxy logic, for example, the annotation "@Before" is used to weave the log generation logic before executing the target business logic, and the annotation "@After" is used to weave the log generation logic after executing the target business logic.
[0060] Weaving refers to enhancing the additional log generation logic into the target business class in the form of a proxy class. Specifically, it is enhanced into the execution process of the target business logic, for example, the log generation logic is executed before the target business logic is executed, or the log generation logic is executed after the target business logic is executed.
[0061] According to the pre-set bytecode generator, a proxy class including the business proxy logic is generated. The bytecode generator applicable to the embodiment of the present invention includes: ASM bytecode generation framework (a Java bytecode manipulation framework that dynamically changes the behavior of a class before the class is loaded into the Java virtual machine), Javassist class library (a class library for processing Java bytecode), CGlib (Code Generation Libray, code generation library, providing dynamic proxy for classes), etc. The proxy class includes log generation logic and data update logic, wherein the data update logic is the target business logic included in the target business class for processing data update requests.
[0062] The bytecode technology used by the execution subject of the embodiment of the present invention is a technology that directly operates compiled code, modifies existing classes in binary form or dynamically generates new classes. In Java applications, bytecode can directly operate or generate class files.
[0063] Generating proxy classes based on the bytecode generator can improve the processing efficiency of operation logs. At the same time, the proxy class has zero intrusion on the business code, decoupling the execution process of the target business logic from the execution process of the operation log-related logic. The two processes are not dependent on each other, avoiding logical anomalies when generating operation logs and causing the target business logic to fail to execute normally.
[0064] According to another reference embodiment of the present invention, after generating a proxy class including a business proxy logic, the proxy class is stored in a pre-set cache, and the association between different proxy classes and different business response logics is recorded in the cache. For example, after generating the proxy class based on a bytecode generator, the proxy class is stored in the cache. For another example, the proxy classes in the cache are classified, and multiple proxy class sets are created. The proxy classes corresponding to the business classes under the same path are stored in the same proxy class set, or the proxy classes corresponding to different business classes are dispersedly stored in different proxy class sets according to business needs, so as to facilitate querying and obtaining the proxy classes.
[0065] When determining the target proxy class corresponding to the received data update request, determine the business response logic corresponding to the received data update request, the business response logic is the data update logic for processing the data update request, and use the proxy class associated with the business response logic queried from the cache as the target proxy class. For example, query a pre-set configuration file to determine the proxy class name associated with the business response logic, and query the target proxy class corresponding to the proxy class name from the cache.
[0066] When processing data update requests and generating operation logs corresponding to the data update requests, there is no need to regenerate a new proxy class each time. The target proxy class can be directly obtained from the cache, thereby improving the processing efficiency of the operation logs and improving the execution performance.
[0067] According to another reference embodiment of the present invention, before determining the target business class from multiple original business classes according to the preset configuration information, the configuration information is determined according to the received user input request. For example, the execution body of the embodiment of the present invention displays the configuration page of the original business class to the user, the user enters the configuration information on the page form of the configuration page, and then clicks "OK", that is, the user input request is sent to the execution body of the embodiment of the present invention, and the execution body of the embodiment of the present invention determines the page form according to the user input request, and reads the configuration information input by the user from the page form.
[0068] Alternatively, the configuration information is determined based on a pre-set configuration file. For example, the execution subject of the embodiment of the present invention provides a file upload interface to the user, and the user sends a file upload request to the execution subject of the embodiment of the present invention through the file upload interface. The execution subject of the embodiment of the present invention determines the configuration file carried by the file upload request based on the file upload request, reads the configuration file, and obtains the corresponding configuration information. The file types of the configuration file include: properties file, config file, xml file, ini file, etc.
[0069] The execution subject of the embodiment of the present invention implements multiple configuration information initialization methods, improves the flexibility and accuracy of configuration information acquisition, meets user needs, and improves user experience.
[0070] According to another reference embodiment of the present invention, before the log generation logic included in the target proxy class is asynchronously executed, a pre-set information acquisition interface is called to obtain additional information corresponding to the data update request. The additional information includes: the user name, user ID, IP address, etc. of the user who sent the data update request. The information acquisition interface is configured. The execution subject of the embodiment of the present invention pre-sets multiple information acquisition interfaces. Before executing the log generation logic, it is determined whether the status of multiple information acquisition interfaces is available, and the information acquisition interface with an available status is called to obtain the corresponding additional information.
[0071] After obtaining the additional information, the additional information is passed into the log generation logic as a method parameter. When the log generation logic included in the target proxy class is asynchronously executed, the log generation logic with the additional information passed in is executed, so that the additional information participates in the execution process of the log generation logic, and an operation log including the additional information is generated.
[0072] Based on the information acquisition interface, additional information is obtained and written into the operation log, which can improve the information volume and accuracy of the operation log, improve the user experience, and improve the scalability of the operation log processing.
[0073] According to a reference embodiment of the present invention, before the operation log is stored in a preset database, the data source information corresponding to the multiple proxy classes is stored in a preset cache according to the preset configuration information. Specifically, multiple data source information is preset, and the data source information is used to connect to the database. The data source information includes: database type, data source address, data table name, database user name and password, etc. Different types of databases have different data source information. The databases to which the multiple data source information is applicable include: MySQL database, HBase database, ElasticSearch database, etc.
[0074] Corresponding data source information is configured for each proxy class, and each proxy class is associated with one or more data source information. The database corresponding to the data source information associated with the proxy class is used to store the operation log generated by the proxy class. Exemplarily, the data source information is stored in a configuration file, and then the association relationship between the proxy class and the data source information is stored in the configuration file, and then the configuration file is stored in the cache.
[0075] When storing the operation log in a preset database, first determine the target data source information corresponding to the target proxy class from the cache; determine the target data source from multiple preset data sources according to the data source address, database user name and password included in the target data source information, establish a connection with the target database, and store the operation log in the target database corresponding to the target data source. Exemplarily, the execution subject of the embodiment of the present invention parses the data source information, converts the data source information into a corresponding Java Config object instance, calls the relevant method of the Java Config object instance, and establishes a connection with the corresponding database.
[0076] Storing the operation log in the corresponding data source according to the configuration information can improve the scalability of the operation log storage and facilitate compatibility with different data sources.
[0077] According to another reference embodiment of the present invention, the method of the embodiment of the present invention further includes: determining the target data corresponding to the received log query request. The log detail query request is used to query the historical change information of the business data. In the database storing the operation log, the target operation log associated with the target data is queried, and the data update records of different business data can be stored in the same operation log or in different operation logs.
[0078] A plurality of data update records corresponding to the target data are obtained from the target operation log. The target operation log includes data update records of a plurality of business data, from which data update records related to the target data are obtained.
[0079] According to the generation time of the data update records, multiple data update records are arranged in reverse chronological order. The data update records whose generation time is closer to the current time are arranged in front, and the data update records whose generation time is farther from the current time are arranged in the back. Among the multiple data update records arranged in reverse chronological order, two adjacent data update records are compared to generate the operation log details of the target data.
[0080] Exemplarily, the data fields of the business data include: name field and age field; wherein, when processing the first data update request, the name field is set to 'a' and the age field is set to '1'; when processing the second data update request, the name field is changed to 'b'; when processing the data update request for the third time, the name field is changed to 'c'; then for the business data, three versions of data update records are generated, namely: version C1: name = a, age = 1; version C2: name = b, age = 1; version C3: name = c, age = 1; the latest data value of the business data is the value of version C3: name = c, age = 1; comparing version C3 with version C2, the corresponding operation log details are obtained: the value of the name field changes from b to c; comparing version C2 with version C1, the corresponding operation log details are obtained: the value of the name field changes from a to b. Compare the different contents of each data update record with the data update record details of the most recent previous version to obtain the operation log details.
[0081] By comparing different versions of operation logs and obtaining operation log details, the change process of business data can be quickly displayed to users, improving user experience.
[0082] According to another reference embodiment of the present invention, before obtaining the operation log corresponding to the data update request, the execution process of the log generation logic is monitored, and the success of the execution of the log generation logic is determined based on the monitoring result. For example, when the generated operation log does not include abnormal information, the execution of the log generation logic is determined to be successful. For another example, when the generated operation log does not contain any missing content, the execution of the log generation logic is determined to be successful.
[0083] In response to determining that an execution result is abnormal according to the monitoring result, triggering an abnormal fault tolerance mechanism, the method of the embodiment of the present invention further includes: determining a cumulative number of executions of the log generation logic.
[0084] The execution count threshold is the maximum number of times the log generation logic is executed cumulatively. In response to the cumulative execution count being less than the execution count threshold, it means that the cumulative execution count of the log generation logic has not reached the maximum value, so the cumulative execution count is incremented and the log generation logic is executed asynchronously; in response to the cumulative execution count being not less than the execution count threshold, it means that the cumulative execution count of the log generation logic has exceeded the count limit, and an exception log corresponding to the data update request is generated.
[0085] The exception log includes: the location where the exception information is thrown (for example, the exception information is thrown at the D3 line of the D2 method of the D1 class), the time when the exception information is thrown, the specific exception information, etc. Exemplarily, the generation logic of the exception log is set in the exception capture mechanism. When it is detected that the log generation logic is executed abnormally and the cumulative number of executions is greater than or equal to the execution number threshold, the generation logic of the exception log is executed, and after the exception log is generated, the program is exited. The exception log and the operation log can be the same log file or different log files. The preset execution number threshold can be: 3 times, 5 times, 10 times, etc.
[0086] Adding an abnormal fault tolerance mechanism and repeatedly generating operation logs within a specified number of times can improve the success rate of operation log generation and improve the security of operation log generation.
[0087] Figure 2 FIG. 1 is a schematic diagram of the overall process of generating an operation log according to a reference embodiment of the present invention. Figure 2 As shown, the overall process of generating operation logs is divided into four stages, namely: parsing layer, proxy layer, fault-tolerant layer and storage layer. Specifically, the execution subject of the embodiment of the present invention determines the configuration information according to the received user input request and configuration file; obtains the data source information from the configuration information and generates the data source class; generates the proxy class according to the configuration information, stores the generated proxy class in the cache, and records the association between different proxy classes and different business response logics in the cache; determines the target proxy class corresponding to the received data update request from the cache; asynchronously executes the log generation logic and data update logic included in the target proxy class; determines whether the log generation logic is executed successfully, and if the log generation logic is not executed successfully, repeatedly executes the log generation logic until the execution is successful or the cumulative execution times are greater than or equal to the execution times threshold; if the log generation logic is executed successfully, establishes a connection with the database according to the pre-generated data source class; and stores the generated operation log in the database.
[0088] Figure 3 FIG. 1 is a schematic diagram of a technical architecture of a method for processing an operation log according to a reference embodiment of the present invention. Figure 3As shown, the execution subject of the embodiment of the present invention includes multiple modules such as request parsing module, file parsing module, business proxy module, data connection module, instance storage module, interface extension module, log storage module, log query module and abnormal fault tolerance module. Among them, the request parsing module is used to parse the data update request sent by the user (for determining the target proxy class) and the user input request (for obtaining configuration information); the file parsing module is used to determine the configuration information according to the configuration file; the business proxy module is used to generate the proxy class, asynchronously execute the log generation logic and the data update logic, and obtain the operation log; the data connection module is used to establish a connection with multiple databases according to the data source configuration information; the instance storage module is used to store the newly generated proxy class and delete the proxy class whose cumulative storage time is greater than the preset storage time threshold; the interface extension module is used to obtain additional information and pass the additional information to the log generation logic; the log storage module is used to store the newly generated or updated operation log; the log query module is used to query the operation log and the operation log details, compare the operation logs of multiple versions, and obtain the operation log details; the abnormal fault tolerance module is used to repeat the log generation logic when the log generation logic is not successfully executed to obtain the operation log or abnormal log.
[0089] Figure 4 FIG. 1 is a schematic diagram of the main flow of a method for processing an operation log according to a reference embodiment of the present invention. Figure 4 As shown, the operation log processing method may include:
[0090] Step S401, determining a target business class and a target business logic from a plurality of original business classes according to preset configuration information;
[0091] Step S402, proxying the target business logic, weaving the log generation logic into the proxy target business logic to obtain the business proxy logic;
[0092] Step S403, generating a proxy class including business proxy logic according to a preset bytecode generator;
[0093] Step S404, storing the proxy class in a preset cache, and recording the association between different proxy classes and different business response logics in the cache;
[0094] Step S405, determining the target proxy class corresponding to the received data update request from the cache;
[0095] Step S406, asynchronously executing the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request;
[0096] Step S407: store the operation log in a preset database.
[0097] The specific implementation content of the operation log processing method of the above-mentioned reference embodiment of the present invention has been described in detail in the above operation log processing method, so the repeated content will not be described again here.
[0098] Figure 5 FIG. 1 is a schematic diagram of the main flow of a method for processing an operation log according to another reference embodiment of the present invention. Figure 5 As shown, the operation log processing method may include:
[0099] Step S501, determining configuration information according to a received user input request;
[0100] Step S502, generating a proxy class according to the configuration information, storing the proxy class in a preset cache, and recording the association between different proxy classes and different business response logics in the cache;
[0101] Step S503, determining the target proxy class corresponding to the received data update request from the cache;
[0102] Step S504, calling a preset information acquisition interface to acquire additional information corresponding to the data update request;
[0103] Step S505, passing the additional information into the log generation logic;
[0104] Step S506, asynchronously executing the log generation logic after the additional information is passed in;
[0105] Step S507, determine whether the log generation logic is executed successfully, if so, jump to step S510, otherwise, jump to step S508;
[0106] Step S508, determine whether the cumulative number of executions is greater than the execution number threshold, if so, jump to step S509, otherwise, jump to step S509;
[0107] Step S509, storing the generated operation log in a preset database;
[0108] Step S510, increment the accumulated execution times;
[0109] Step S511: determine that the log generation logic execution fails and generate an abnormal log.
[0110] The specific implementation content of the operation log processing method of another reference embodiment of the present invention has been described in detail in the above operation log processing method, so the repeated content will not be described again here.
[0111] Figure 6FIG. 1 is a schematic diagram of the main flow of a method for processing an operation log according to another reference embodiment of the present invention. Figure 6 As shown, the operation log processing method may include:
[0112] Step S601, according to the preset configuration information, storing the data source information corresponding to the plurality of proxy classes into the preset cache;
[0113] Step S602, determining a target proxy class corresponding to the received data update request;
[0114] Step S603, asynchronously executing the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request;
[0115] Step S604, determining the target data source information corresponding to the target proxy class from the cache;
[0116] Step S605, determining a target data source from a plurality of pre-set data sources according to the target data source information, and storing the operation log in a target database corresponding to the target data source;
[0117] Step S606, determining target data corresponding to the received log query request;
[0118] Step S607, querying a target operation log associated with the target data in a database corresponding to the target data, and obtaining a plurality of data update records corresponding to the target data from the target operation log;
[0119] Step S608, arranging the multiple data update records in reverse chronological order according to the generation time of the data update records;
[0120] Step S609: compare two adjacent data update records among the multiple data update records arranged in reverse chronological order to generate operation log details of the target data.
[0121] The specific implementation content of the operation log processing method of another reference embodiment of the present invention has been described in detail in the above operation log processing method, so the repeated content will not be described here.
[0122] According to a second aspect of an embodiment of the present invention, a device for processing an operation log is provided.
[0123] Figure 7 is a schematic diagram of main modules of an operation log processing device according to an embodiment of the present invention, such as Figure 7 As shown, the operation log processing device 700 mainly includes:
[0124] The determination module 701 determines a target proxy class corresponding to the received data update request from pre-generated proxy classes; the target proxy class includes a log generation logic for generating an operation log;
[0125] A generation module 702 asynchronously executes the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request;
[0126] The storage module 703 stores the operation log in a preset database.
[0127] According to a reference embodiment of the present invention, the operation log processing device 700 also includes: a second determination module, which is used to determine the target business class from multiple original business classes according to preset configuration information, and determine the target business logic from the target business class; a proxy module, which is used to proxy the target business logic, weave the log generation logic into the proxied target business logic, and obtain the business proxy logic; a second generation module, which is used to generate a proxy class including the business proxy logic according to a preset bytecode generator.
[0128] According to another reference embodiment of the present invention, the operation log processing device 700 also includes: a second storage module, used to store the proxy class in a pre-set cache, and record the association between different proxy classes and different business response logics in the cache; wherein the determination module is also used to: determine the business response logic corresponding to the received data update request, and use the proxy class associated with the business response logic queried from the cache as the target proxy class.
[0129] According to another reference embodiment of the present invention, the operation log processing device 700 also includes: a first parsing module, used to determine configuration information according to a received user input request; or, a second parsing module, used to determine configuration information according to a preset configuration file.
[0130] According to another reference embodiment of the present invention, the operation log processing device 700 also includes: a first acquisition module, used to call a preset information acquisition interface to obtain additional information corresponding to the data update request; an input module, used to input the additional information into the log generation logic; the generation module is also used to: execute the log generation logic with the additional information input, and generate an operation log including the additional information.
[0131] According to another reference embodiment of the present invention, the operation log processing device 700 also includes: a third storage module, used to store data source information corresponding to multiple proxy classes in a preset cache according to preset configuration information; the storage module is also used to: determine the target data source information corresponding to the target proxy class from the cache; determine the target data source from the preset multiple data sources according to the target data source information, and store the operation log in the target database corresponding to the target data source.
[0132] According to a reference embodiment of the present invention, the operation log processing device 700 also includes: a third determination module, used to determine the target data corresponding to the received log query request; a second acquisition module, used to query the target operation log associated with the target data in the database corresponding to the target data, and obtain multiple data update records corresponding to the target data from the target operation log; a sorting module, used to arrange the multiple data update records in reverse chronological order according to the generation time of the data update records; a query module, used to compare two adjacent data update records among the multiple data update records arranged in reverse chronological order, and generate operation log details for the target data.
[0133] According to another reference embodiment of the present invention, the operation log processing device 700 further includes: a first determination module, configured to monitor the execution process of the log generation logic, and determine whether the log generation logic is executed successfully according to the monitoring result;
[0134] The operation log processing device 700 also includes: a second determination module, which is used to determine the cumulative number of executions of the log generation logic in response to determining that the execution result is abnormal based on the monitoring result; a repeated execution module, which is used to increase the cumulative number of executions and asynchronously execute the log generation logic in response to the cumulative number of executions being less than the execution number threshold; and a third generation module, which is used to generate an exception log corresponding to the data update request in response to the cumulative number of executions being not less than the execution number threshold.
[0135] It should be noted that the specific implementation content of the operation log processing device in the embodiment of the present invention has been described in detail in the above operation log processing method, so the repeated content will not be described again here.
[0136] According to the technical solution of the embodiment of the present invention, a target proxy class corresponding to a received data update request is determined from pre-generated proxy classes, and an operation log is asynchronously generated based on the target proxy class, so that the processing of the operation log is decoupled from a specific technical framework, the operation log is processed more flexibly, the intrusion into the business code is reduced, the R&D cost and the maintenance cost are reduced, and the universal applicability of the method for generating the operation log is improved; the target business logic to be proxied is determined based on the configuration information, so as to improve the flexibility of the business proxy; the proxy class is generated by a bytecode generator, so as to improve the efficiency of generating the operation log and avoid intrusion into the business code; the generated proxy class is stored in a cache, so as to improve the efficiency of obtaining the proxy class and further improve the efficiency of generating the operation log; for users Request or configuration file is parsed to obtain configuration information, which can flexibly obtain configuration information to meet various business needs and further improve the flexibility of business agents; based on the information acquisition interface, additional information is obtained and written into the operation log, which can improve the information volume and accuracy of the operation log and improve the user experience; according to the configuration information, the operation log is stored in the corresponding data source, which can improve the scalability of the operation log storage and facilitate compatibility with different data sources; by comparing different versions of operation logs to obtain operation log details, the change process of business data can be quickly displayed to users, improving user experience; adding an abnormal fault tolerance mechanism and repeatedly generating operation logs within a specified number of times can improve the success rate of operation log generation and improve the security of operation log generation.
[0137] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present invention.
[0138] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.
[0139] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and the computer program implements the method of any of the above embodiments when executed by a processor.
[0140] Figure 8 An exemplary system architecture 800 is shown to which the method for processing an operation log or the apparatus for processing an operation log according to the embodiment of the present invention can be applied.
[0141] like Figure 8As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0142] The user can use the terminal devices 801, 802, 803 to interact with the server 805 through the network 804 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 801, 802, 803, such as log generation applications, log storage applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0143] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0144] The server 805 may be a server that provides various services, such as a background management server (only an example) that provides support for processing requests for operation logs sent by the upstream terminal devices 801, 802, and 803. The background management server may determine the target proxy class corresponding to the received data update request; asynchronously execute the log generation logic included in the target proxy class to obtain the operation log corresponding to the data update request; store the operation log in a pre-set database; and feed back the processing status of the operation log (only an example) to the terminal device.
[0145] It should be noted that the operation log processing method provided in the embodiment of the present invention is generally executed by the server 805, and accordingly, the operation log processing device is generally set in the server 805. The operation log processing method provided in the embodiment of the present invention can also be executed by the terminal devices 801, 802, and 803, and accordingly, the operation log processing device can be set in the terminal devices 801, 802, and 803.
[0146] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0147] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0148] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0149] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0150] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the embodiment of the present invention are executed.
[0151] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In an embodiment of the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0152] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a determination module, a generation module, and a storage module, wherein the names of these modules do not constitute a limitation on the module itself under certain circumstances, for example, the determination module may also be described as "a module for determining a target proxy class corresponding to a received data update request".
[0154] As another aspect, an embodiment of the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method: determining a target proxy class corresponding to a received data update request, the target proxy class including a log generation logic for generating an operation log; asynchronously executing the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request; and storing the operation log in a pre-set database.
[0155] According to the technical solution of the embodiment of the present invention, a target proxy class corresponding to the received data update request is determined in the pre-generated proxy class, and an operation log is asynchronously generated based on the target proxy class, so that the processing process of the operation log is decoupled from the specific technical framework, the operation log is processed more flexibly, the intrusion into the business code is reduced, the R&D cost and the maintenance cost are reduced, and the universal applicability of the operation log generation method is improved; the target business logic to be proxied is determined based on the configuration information, and the flexibility of the business proxy is improved; the proxy class is generated by using a bytecode generator, which can improve the generation efficiency of the operation log and avoid intrusion into the business code; the generated proxy class is stored in the cache, which can improve the acquisition efficiency of the proxy class and further improve the generation efficiency of the operation log; the user request The system can parse the request or configuration file to obtain the configuration information, and can flexibly obtain the configuration information to meet various business needs, further improving the flexibility of the business agent; based on the information acquisition interface, additional information is obtained and written into the operation log, which can improve the information volume and accuracy of the operation log and improve the user experience; according to the configuration information, the operation log is stored in the corresponding data source, which can improve the scalability of the operation log storage and facilitate compatibility with different data sources; by comparing different versions of operation logs to obtain the operation log details, it can quickly show the change process of business data to the user and improve the user experience; adding an abnormal fault tolerance mechanism and repeatedly generating the operation log within a specified number of times can improve the success rate of the generation of the operation log and improve the security of the generation of the operation log.
[0156] The above specific implementations do not constitute a limitation on the protection scope of the embodiments of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A method for processing an operation log, characterized in that: include: Determine, from pre-generated proxy classes, a target proxy class corresponding to the received data update request; The target proxy class includes a log generation logic for generating an operation log; Asynchronously executing the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request; The operation log is stored in a preset database.
2. The method according to claim 1, characterized in that: Before determining the target proxy class corresponding to the received data update request, the method further includes: Determine a target business class from a plurality of original business classes according to preset configuration information, and determine a target business logic from the target business class; Proxify the target business logic, weave the log generation logic into the proxied target business logic, and obtain the business proxy logic; According to a preset bytecode generator, a proxy class including the business proxy logic is generated.
3. The method according to claim 2, characterized in that After generating the proxy class including the business proxy logic, the method further comprises: storing the proxy class in a preset cache, and recording the association between different proxy classes and different business response logics in the cache; The step of determining a target proxy class corresponding to the received data update request includes: Determine the business response logic corresponding to the received data update request; The proxy class logically associated with the business response and retrieved from the cache is determined as the target proxy class.
4. The method according to claim 3, characterized in that Before determining the target service class from a plurality of original service classes according to the preset configuration information, the method further includes: Determining the configuration information according to the received user input request; Alternatively, the configuration information is determined according to a preset configuration file.
5. The method according to claim 1, characterized in that Before asynchronously executing the log generation logic included in the target proxy class, the method further includes: Calling a preset information acquisition interface to acquire additional information corresponding to the data update request; and passing the additional information into the log generation logic; The asynchronous execution of the log generation logic included in the target proxy class includes: The log generation logic having been passed in the additional information is executed to generate an operation log including the additional information.
6. The method according to claim 1, characterized in that Before storing the operation log in a preset database, the method further includes: storing data source information corresponding to a plurality of proxy classes in a preset cache according to preset configuration information; Wherein, storing the operation log in a preset database includes: Determining target data source information corresponding to the target proxy class from the cache; According to the target data source information, a target data source is determined from a plurality of pre-set data sources, and the operation log is stored in a target database corresponding to the target data source.
7. The method according to claim 6, characterized in that The method further comprises: Determine target data corresponding to the received log query request; In a database corresponding to the target data, query a target operation log associated with the target data, and obtain a plurality of data update records corresponding to the target data from the target operation log; Arrange the multiple data update records in reverse chronological order according to the generation time of the data update records; Among the multiple data update records arranged in reverse chronological order, two adjacent data update records are compared to generate the operation log details of the target data.
8. The method according to any one of claims 1 to 7, characterized in that: Before obtaining the operation log corresponding to the data update request, the method further includes: monitoring the execution process of the log generation logic, and determining that the log generation logic is executed successfully according to the monitoring result; and In response to determining that the execution result has an execution anomaly according to the monitoring result, determining a cumulative number of executions of the log generation logic; In response to the cumulative number of executions being less than a preset execution number threshold, the cumulative number of executions is incremented, and the log generation logic is asynchronously executed; In response to the accumulated execution times being not less than the execution times threshold, an exception log corresponding to the data update request is generated.
9. A device for processing operation logs, characterized in that: include: A determination module determines a target proxy class corresponding to the received data update request from pre-generated proxy classes; the target proxy class includes a log generation logic for generating an operation log; A generation module asynchronously executes the log generation logic included in the target proxy class to obtain an operation log corresponding to the data update request; The storage module stores the operation log in a pre-set database.
10. An electronic device, characterized in that: include: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 8.
