Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for collecting audit logs based on AOP aspect and readable medium

A log and facet technology, which is applied in the field of collecting audit logs based on AOP facets, can solve problems such as isolation and reduced coupling, and achieve the effect of reducing coupling, reducing coupling, and improving efficiency

Pending Publication Date: 2020-11-03
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical task of the present invention is to address the above deficiencies, and provide a method, device and readable medium for collecting audit logs based on AOP aspects, so as to solve the problem of how to isolate audit log records from business logic to reduce the degree of coupling between them question

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for collecting audit logs based on AOP aspect and readable medium
  • Method and device for collecting audit logs based on AOP aspect and readable medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] A method for collecting audit logs based on the AOP aspect of the present invention, based on the AOP aspect, realizes dynamically adding log records for the program without modifying the source code through the pre-compilation mode and the runtime dynamic proxy, and the method includes the following steps:

[0036] S100. Configure the basic class, including defining the annotation class and affirming the storage parameters of the annotation class, defining the AOP aspect class and annotating the method, customizing the enumeration class for the annotation class to perform parameter transfer, and defining the logging object class, which is stored in the method body There is log storage logic, and the attributes defined by the log record object class are called by the AOP aspect class for log storage;

[0037] S200. Define a common public visitLog tool class according to business requirements, customize attribute values ​​according to business requirements, and customize ...

Embodiment 2

[0051] An embodiment of the present invention provides a device, including: at least one memory and at least one processor; the at least one memory is used to store a machine-readable program; the at least one processor is used to call the machine-readable program, Execute the method disclosed in Example 1.

[0052] It should be understood that the structures shown in the embodiments of the present invention do not constitute a specific limitation on the device. In other embodiments of the present invention, the apparatus may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components. The illustrated components may be realized in hardware, software, or a combination of software and hardware.

[0053] The information exchange and execution process among the units in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific content ...

Embodiment 3

[0055] The embodiment of the present invention also provides a readable medium, which is a computer-readable medium, and computer instructions are stored on the computer-readable medium. When the computer instructions are executed by the processor, the processor executes the method in Embodiment 1 of the present invention. . Specifically, a system or device equipped with a storage medium may be provided, on which a software program code for realizing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU of the system or device) ) to read and execute the program code stored in the storage medium.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for collecting audit logs based on an AOP aspect and a readable medium, belongs to the technical field of log audit, and aims to solve the technical problemof how to isolate audit log records from business logic to reduce the coupling degree between the audit log records. The method comprises the following steps: S100, configuring basic classes, including defining annotation classes and declaring storage parameters of the annotation classes, defining AOP aspect classes and labeling methods, customizing enumeration classes for log storage of the annotation classes, and defining log record object classes; s200, defining a common pubic visitLog tool class according to a service demand, customizing an attribute value according to the service demand,and customizing a corresponding get method and a set method; and S300, marking names of annotation classes on the corresponding method bodies, wherein the parameters needing to be stored are member variables defined by the annotation classes.

Description

technical field [0001] The invention relates to the technical field of log auditing, in particular to a method, device and readable medium for collecting audit logs based on AOP aspects. Background technique [0002] Audit diary recording is a basic function. All business processes involving users require log records. If this block function is written into each business process, it will cause code redundancy and maintenance is very troublesome. When the log recording function is upgraded Or when it is perfect, it needs to be maintained one by one, which is obviously not advisable. A better way is to extract the log recording function to form an independent module. When the business process needs to record logs, the system will automatically cut the recording function into the business process, and at the same time facilitate the later upgrade and maintenance. [0003] Based on the above, how to isolate audit journal records from business logic to reduce the coupling between...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/18G06F8/36G06F8/41
CPCG06F16/1815G06F8/36G06F8/41
Inventor 田大贺吴辉
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products