CN110489310B - Method and device for recording user operation, storage medium and computer equipment - Google Patents

Method and device for recording user operation, storage medium and computer equipment Download PDF

Info

Publication number
CN110489310B
CN110489310B CN201811112301.8A CN201811112301A CN110489310B CN 110489310 B CN110489310 B CN 110489310B CN 201811112301 A CN201811112301 A CN 201811112301A CN 110489310 B CN110489310 B CN 110489310B
Authority
CN
China
Prior art keywords
information
annotation information
annotation
recording
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811112301.8A
Other languages
Chinese (zh)
Other versions
CN110489310A (en
Inventor
曹文萃
赵鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shuju Xinyun Information Technology Co ltd
Original Assignee
Beijing Shuju Xinyun Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shuju Xinyun Information Technology Co ltd filed Critical Beijing Shuju Xinyun Information Technology Co ltd
Priority to CN201811112301.8A priority Critical patent/CN110489310B/en
Publication of CN110489310A publication Critical patent/CN110489310A/en
Application granted granted Critical
Publication of CN110489310B publication Critical patent/CN110489310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a device, a storage medium and computer equipment for recording user operation. The disclosed method comprises: obtaining annotation information about user operation from an annotation of a target method corresponding to the user operation; obtaining non-annotation information about user operation from the reference of the target method; and recording annotation information and non-annotation information, wherein the annotation information comprises the caption information of the specific function executed by the user operation, the caption information of the operation object related to the user operation and the placeholder information, and the non-annotation information comprises the specific information of the operation object used for replacing the placeholder information. The technical scheme disclosed provides a more flexible recording mode capable of simultaneously recording the annotation information and the non-annotation information of the user.

Description

Method and device for recording user operation, storage medium and computer equipment
Technical Field
The present invention relates to the field of computers, networks and databases, and in particular, to a method, an apparatus, a storage medium, and a computer device for recording user operations.
Background
In the era of rapid development of enterprise digital transformation, various information systems such as computers, networks, databases and the like are emerging, and the information security in the information systems is of great importance.
In the prior art, for example, for a network system, various policies are generally provided for ensuring security in terms of an external firewall of the network system, however, operations within account permissions inside the network system are hardly defensed, and no good defense manner is provided. That is, the related art information system rarely logs users of the internal network at the service level.
In addition, prior art oplogs are generally directed to technicians, not ordinary users. Therefore, the general user cannot usually find out the abnormal operation (careless misoperation or non-self operation) of the own account in time. Even if the ordinary user can find the abnormality, since the log record is not usually described in natural language, a professional technician is required to analyze and search the log to determine the specific abnormal operation information. The method is complicated and low in efficiency, and greatly increases the communication cost, so that common users cannot independently, timely and intuitively acquire the relevant operation information of the account numbers.
For example, the prior art generally adopts the following two methods to record the user operation log:
1. in the implementation of the backend interface, the code for logging the business log (i.e., the user oplog) and the specific business method are coupled together and committed with one transaction.
2. And (3) performing log point burying by utilizing the Aspectj technology of the AOP, and recording the method name and the parameters of the calling target method for technical personnel to use for troubleshooting.
If the service log and the service data are stored in the MySQL database in order to make compatibility between the development amount and the system performance, the two methods respectively have the following disadvantages:
1. the coupling of the service log code and the service method code is serious, and as the number of users increases and the system function increases, when the range of the log to be recorded is enlarged, the source code of each log recording method is required to be modified, and when the performance bottleneck comes, the service log cannot be migrated and expanded in a lightweight manner, so that the overall operation efficiency of the system is inevitably tired; secondly, the service log code and the service method are submitted together in one transaction to be successful or failed, and for the condition of operation failure, the transaction is rolled back, so that the transaction cannot be recorded, and certain potential safety hazard exists.
2. The target audience of the traditional service logs is a developer who knows the technology, common users cannot understand the system logs, and the main purpose of recording the logs is to conveniently perform problem troubleshooting. The common annotation mode can only describe fixed information, and cannot change the description information according to the change of the transmitted parameters, and when the user account has abnormal operation or misoperation, the common annotation cannot clearly describe and locate the problem, so that the problem is easily ignored, and chain reaction is caused.
In addition, before the problem is exposed, effective feedback information cannot be obtained in time from the recorded service log; and after the system runs for a period of time, various service logs can be mixed together, and a user can hardly find needed information from massive logs.
Therefore, in order to solve the above problems, a new technical solution needs to be proposed.
Disclosure of Invention
The method for recording the user operation comprises the following steps:
obtaining annotation information about user operation from an annotation of a target method corresponding to the user operation;
obtaining non-annotation information about user operation from the reference of the target method;
the annotation information and the non-annotation information are recorded,
the annotation information comprises the literal description information of the specific function executed by the user operation, the literal description information of the operation object related to the user operation and the placeholder information, and the non-annotation information comprises the specific information of the operation object used for replacing the placeholder information.
The method for recording the user operation further comprises the following steps:
analyzing the annotation information and the non-annotation information based on the log monitoring strategy to determine alarm information;
recording annotation information, non-annotation information and alarm information;
and informing the user of the annotation information, the non-annotation information and the alarm information.
According to the method of recording user operations of the present invention, the target method and the steps of recording the annotation information and the non-annotation information are performed in an asynchronous manner.
According to the method for recording the user operation, the step of acquiring annotation information related to the user operation from the annotation of the target method corresponding to the user operation comprises the following steps:
a custom interceptor instance is used to obtain the target method and annotations for the target method.
According to the method for recording user operation of the present invention, the step of obtaining the non-annotation information about the user operation from the entry of the target method comprises:
obtaining a target method by using a self-defined interceptor example;
and executing the target method by using the self-defined dynamic proxy example to acquire the non-annotation information.
According to the method for recording user operation of the present invention, the step of recording the annotation information and the non-annotation information comprises:
and calling the customized business log asynchronous processing example in the customized dynamic proxy example to asynchronously record the annotation information and the non-annotation information.
An apparatus for recording a user operation according to the present invention includes:
the first information acquisition module is used for acquiring annotation information about user operation from annotations of a target method corresponding to the user operation;
the second information acquisition module is used for acquiring non-annotation information about user operation from the access of the target method;
a first information recording module for recording the annotation information and the non-annotation information,
the annotation information comprises the literal description information of the specific function executed by the user operation, the literal description information of the operation object related to the user operation and the placeholder information, and the non-annotation information comprises the specific information of the operation object used for replacing the placeholder information.
The apparatus for recording a user operation according to the present invention further comprises:
the third information acquisition module is used for analyzing the annotation information and the non-annotation information based on the log monitoring strategy and determining the alarm information;
the second information recording module is used for recording annotation information, non-annotation information and alarm information;
and the alarm module is used for informing the user of the annotation information, the non-annotation information and the alarm information.
The apparatus for recording a user operation according to the present invention further comprises:
and the asynchronous execution module is used for executing the target method in an asynchronous mode and executing the step of recording the annotation information and the non-annotation information.
According to the apparatus for recording user operation of the present invention, the first information obtaining module is further configured to:
a custom interceptor instance is used to obtain the target method and annotations for the target method.
According to the apparatus for recording user operation of the present invention, the second information obtaining module is further configured to:
obtaining a target method by using a self-defined interceptor example;
and executing the target method by using the self-defined dynamic proxy example to acquire the non-annotation information.
According to the apparatus for recording user operation of the present invention, the first information recording module is further configured to:
and calling the customized business log asynchronous processing example in the customized dynamic proxy example to asynchronously record the annotation information and the non-annotation information.
According to the computer-readable storage medium of the invention, a computer program is stored on the storage medium, which program, when being executed by a processor, carries out the steps of the method as described above.
The computer device according to the invention comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method described above when executing the program.
According to the technical scheme of the invention, a more flexible recording mode capable of simultaneously recording the annotation information and the non-annotation information of the user is provided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention. In the drawings, like reference numerals are used to indicate like elements. The drawings in the following description are directed to some, but not all embodiments of the invention. For a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 schematically shows a flow chart of a method of recording user operations according to the invention.
Fig. 2 schematically shows a block schematic of an apparatus for recording user operations according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Fig. 1 schematically shows a flow chart of a method of recording user operations according to the invention.
As shown in a solid line box of fig. 1, the method of recording a user operation according to the present invention includes:
step S102: obtaining annotation information about user operation from an annotation of a target method corresponding to the user operation;
step S104: obtaining non-annotation information about user operation from the reference of the target method;
step S106: the annotation information and the non-annotation information are recorded,
the annotation information comprises the literal description information of the specific function executed by the user operation, the literal description information of the operation object related to the user operation and the placeholder information, and the non-annotation information comprises the specific information of the operation object used for replacing the placeholder information.
For example, taking the user add [ -d home ] username command of adding the user operation as an example, the annotation information may include the caption information of the specific function performed by the user operation (for example, adding the user), the caption information of the operation object related to the user operation, and the placeholder information (the root directory of the user is { home }, and the name of the user is { username }); the non-annotation information may include specific information for the operands that replace the placeholder information { home }, { username } (e.g., home is "/forest," username is "forest," etc.). That is, the specific information of the operation object may be used to replace the placeholder information { home }, { username }, so as to form the final record information "add user root directory/forest user name as forest".
For example, the user operation includes a database operation that is submitted by a user through a front end and executed at a back end. That is, the system operated by the user may be a network system implemented by separating a front end and a back end, the back end interface follows the restful style, and each operation of the user corresponds to a specific interface (method) of the back end.
For example, a user-defined annotation mode may be used to add annotations to the target method corresponding to the user operation. For example, the name of the added custom annotation is @ InterfaceActionLog; scope configuration is method level; the active period is configured to run-time; the attribute is defined as "description field message".
The above note is a description of program code labeled in the prior art, and may be labeled in front of classes, methods, fields, method parameters, and the like.
Optionally, as shown in a dashed box of fig. 1, the method for recording a user operation according to the present invention further includes:
step S108: analyzing the annotation information and the non-annotation information based on the log monitoring strategy to determine alarm information;
step S110: recording annotation information, non-annotation information and alarm information;
step S112: and informing the user of the annotation information, the non-annotation information and the alarm information.
Optionally, on the premise of not affecting user experience, a log monitoring policy may be executed for the annotation information and the non-annotation information to generate corresponding alarm information (i.e., alarm tags), so that tags of health conditions of various levels are marked for the log, which is beneficial to ensuring the security and stability of the system.
For example, a log security policy handling class may be customized and a log monitoring policy added and executed therein by:
1. and (3) increasing the relational mapping of the module, the calling state, the threshold value and the log alarm level, and setting a calling frequency strategy in a relative time period of the global or local module according to requirements.
2. Adding a strategy processing method, wherein the parameter is a log entity, judging the threshold values of the strategies such as normal calling frequency, allowable failure frequency and the like set by the module method by judging the module mapping strategy to which the log belongs, if the calling frequency in a set relative time period exceeds the threshold value, marking the corresponding warning labels such as 'low', 'medium', 'high' and the like for the service log, and otherwise marking the service log as 'normal'; for example, a login failure threshold value is set to be 10 times within 30 minutes of a login module, the alarm level is 'high-explosion login', and when the login failure of the same account exceeds the threshold value, a 'high-explosion login' level alarm tag is marked on a log which exceeds the threshold value.
For example, the user may be notified of the comment information, the non-comment information, and the alarm information (e.g., corresponding to the above-described alarm tag having the "high-explosive log-in" level) using an in-station mail, a mail, or the like, according to the log alarm level in the alarm information (after the log judgment process).
Optionally, the target method and the steps of recording the annotation information and the non-annotation information are performed in an asynchronous manner.
Where asynchronous is an existing mechanism that allows the operation (i.e., the target method) to continue without waiting for the return value of the called function.
For example, the asynchronous manner may be implemented based on an Excutor framework. The Excutor framework is a framework for executing asynchronous tasks called, scheduled, executed and controlled by a policy, and can be used for controlling the starting, execution and closing of threads.
1. The Callable interface is defined in the editor framework. The Callable interface uses a generic to define its return type.
2. An Executors class is defined in the editor framework. The Executors class provides a method for executing tasks within callables in a thread pool.
3. The Future class is defined in the Excutor framework. After the thread pool submits the Callable task, a Future object is returned, the state of the Callable task can be known by using the Future object, and an execution result returned by the Callable is obtained. Future provides a get method that can wait for the Callable to end and get its execution results.
4. An ExecutorService class is defined in the editor framework. A reload submit method is provided in an ExecutionService class, and the method can receive both a Runable instance and a Callable instance. For classes implementing Callable interfaces, the call method needs to be overwritten, and can only be started by the submit method of ExecutorService.
For example, the following specific development steps can be adopted to implement the asynchronous mode based on the editor framework:
1. the use of the Excutor thread pool saves system resources.
2. Inheriting a Callable interface and reloading a call method.
3. The save service log method may be performed in a call method; the log security policy processing method (i.e., step S108 described above) may be invoked to mark the security level of the log before saving the service log (i.e., step S110 described above); and then may also be persisted (i.e., log information is stored in a database).
4. And adding a common method, taking out an idle thread from the thread pool, transferring an asynchronous task by using a submit method of ExecutionService to call an asynchronous service log saving method, receiving a return result by Future, and recovering the thread after the call is finished.
According to the method, the service log can be recorded in an asynchronous mode, and the reaction speed is increased.
Optionally, the service log can be described by using a natural language, so that a user participates in becoming a log supervisor, the user can conveniently identify abnormal operation, and the integrity and the safety of the service log are improved.
Optionally, step S102 includes:
a custom interceptor instance is used to obtain the target method and annotations for the target method.
The interceptor is an object (class or instance) that acts between the client request and the backend processing class (or instance) in the prior art and can intercept the request method before the request method reaches the backend.
For example, the interceptor class or instance intercepts all interface calls (i.e., target methods) passing through the back end within a specified range, and determines whether the target methods are marked with custom annotations, and if so, the interceptor class or instance performs the next processing (e.g., executing the target methods, obtaining non-annotated information, recording information, etc.) for the target methods.
Optionally, step S104 includes:
obtaining a target method by using a self-defined interceptor example;
and executing the target method by using the self-defined dynamic proxy example to acquire the non-annotation information.
For example, the customized dynamic proxy described above may be implemented using a CGLIB dynamic proxy.
The CGLIB dynamic proxy generates a proxy class for a target class (containing the target method) at the running time, and the proxy class takes the target class as a parent class of the proxy class and creates two methods for the non-final proxy method: one is the same method as the delegated method signature, which will invoke the delegated method through the super when it is invoked; the other method is an exclusive (intercepting inside the CGLIB interceptor) method of the proxy class, and when dynamic proxy is carried out, whether an object which realizes a MethodeInterpreter interface exists is judged, if so, an interrupt method is called to proxy the proxy method, all methods of the target class are intercepted and executed by the proxy class, and some additional operations (for example, obtaining the non-annotation information) can be carried out before or after the target method is called.
That is, the following steps may be implemented using a CGLIB dynamic proxy: a MethodInterpreter interface; a heavy-duty interrupt method; adding a method for acquiring proxy class instances; the target method is executed by the proxy instance (i.e., the target method intercepted by the CGLIB interceptor is handed over to the dynamic proxy class for proxy).
For example, before or after the target method is called in the interrupt method, the following operations may be performed to obtain the above-mentioned non-annotation information:
1. before the target method is executed: acquiring all entries of a target method, acquiring the value of a description field message in ActionLo g custom annotation, and matching all places using { field } occupation in the message by using a regular expression \ { [ ^ } ] \ with a regular expression, such as: the method comprises the steps that a person is additionally arranged in { username } in { deparatment }, the name is { userban.name } ", three variable placeholders of { userbame } { deparatmen t } { userban.name } are matched during processing, the first two variables do not contain nested attributes, specific values can be obtained through analyzing attribute mapping of the entries, the third variable contains nested attributes, the entries are converted into json formats after the attributes needing to be analyzed into the entries, and then the values of mapping are analyzed through calling an open source tool class jsonnpath. The final effect may be that "Xiaoming adds a new person in the technical sector, called as Xiaolin", so that popular and easy-to-understand languages are available, and the templates can be combined in a self-defined way.
2. After the target method is executed: saving a service log; in the way of try, catch and finally, the operation is executed in the try code block, the service log is called in the finally block, the asynchronous processing class of the service log is stored, and each calling of the target method is ensured to be recorded.
According to the method, the annotation mode can be adopted, and the range of the business log can be flexibly controlled and recorded. The dynamic proxy technology can be utilized to obtain the required parameters before the target method is called, and the calling result is recorded after calling, so that the integrity of the service log can be ensured, and the part of the operation log is not lost along with the operation failure.
Optionally, an independent module can be extracted in the aspect of log processing, and unified management can be achieved. The method has natural advantages in expansibility and service log data migration.
Optionally, the main description information of the service log can define a template, log information convenient for a user to understand is formed by combining natural language with parameter analysis, the user can independently check and process some common problems by checking the operation record of the user account, the problems can be fed back more accurately, and the technical support cost of a software provider is saved.
Optionally, step S106 includes:
and calling the customized business log asynchronous processing example in the customized dynamic proxy example to asynchronously record the annotation information and the non-annotation information.
Fig. 2 schematically shows a block schematic of an apparatus 200 for recording user operations according to the present invention.
As shown in the solid line box of fig. 2, the apparatus 200 for recording a user operation according to the present invention includes:
a first information obtaining module 201, configured to obtain annotation information about a user operation from an annotation of a target method corresponding to the user operation;
a second information obtaining module 203, configured to obtain non-annotation information about a user operation from the reference of the target method;
a first information recording module 205 for recording annotation information and non-annotation information,
the annotation information comprises the literal description information of the specific function executed by the user operation, the literal description information of the operation object related to the user operation and the placeholder information, and the non-annotation information comprises the specific information of the operation object used for replacing the placeholder information.
Optionally, as shown in the dashed line box of fig. 2, the apparatus 200 for recording a user operation further includes:
the third information acquisition module 207 is configured to analyze the annotation information and the non-annotation information based on the log monitoring policy and determine alarm information;
the second information recording module 209 is used for recording annotation information, non-annotation information and alarm information;
and the alarm module 211 is configured to notify the user of the annotation information, the non-annotation information, and the alarm information.
Optionally, as shown in the dashed line box of fig. 2, the apparatus 200 for recording a user operation further includes:
an asynchronous execution module 213 for executing the target method and performing the step of recording the annotation information and the non-annotation information in an asynchronous manner.
Optionally, the first information obtaining module 201 is further configured to:
a custom interceptor instance is used to obtain the target method and annotations for the target method.
Optionally, the second information obtaining module 203 is further configured to:
obtaining a target method by using a self-defined interceptor example;
and executing the target method by using the self-defined dynamic proxy example to acquire the non-annotation information.
Optionally, the first information recording module 205 is further configured to:
and calling the customized business log asynchronous processing example in the customized dynamic proxy example to asynchronously record the annotation information and the non-annotation information.
Based on the above method and apparatus according to the present invention, a computer readable storage medium is also proposed, on which a computer program is stored, which when executed by a processor implements the steps of the above method.
Based on the above method and apparatus according to the present invention, there is also provided a computer device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method when executing the program.
According to the technical scheme of the invention, a more flexible recording mode capable of simultaneously recording the annotation information and the non-annotation information of the user is provided.
According to the technical scheme of the invention, the method also has the following advantages:
1. the method can realize the detailed recording of the operation log of the user on the specific data in a dynamic agent + self-defined annotation mode. The method and the device have the advantages that the common user can monitor the operation behaviors of the user (such as user account operation) by checking the operation records, and account safety awareness is enhanced. On the one hand, the user can track which data are operated by the account number of the user, and the user can find out the misoperation condition in time. On the other hand, the account behavior can be traced under the condition that the account is not operated by the user.
2. When the old system is upgraded and a service log record about new user operation needs to be added, the method avoids modifying a large amount of original codes and reduces debugging time.
3. The annotation mode is used to replace the traditional log recording mode of executing the log writing operation in the service execution method. The descriptive information (i.e., the recorded information) can be refined into natural language as the incoming parameters, increasing readability. The method can separate the log module from specific services, compared with the prior art, the thickness granularity of the log is flexible, the cost of the change along with the change of the requirement in the later period is greatly reduced, and the method is favorable for virtuous circle of the version iteration of the software system.
4. The integrity of the operation log can be ensured at the service level, and the robustness of the system is further improved. Besides the condition of normal user operation, abnormal user operation behaviors such as frequently-attempted intrusion such as violently breaking account passwords and the like, unauthorized operation and the like can be effectively recorded. Corresponding strategies can be formulated aiming at the log records, so that the system safety is ensured.
5. The target audience of the service log can be transferred to the user from the technical staff, so that the user can actually participate in the service log, the account safety awareness of the user can be improved, the operation is traceable every time, and the traceability of data is enhanced. The legality of the data can be judged independently by checking the service log, and the problem that the data cannot be positioned in time after misoperation is avoided.
6. The service logs can be saved in an asynchronous mode, so that core service logic does not need to wait for the completion of log logic execution, the log can be cached in a Buffer by the logic asynchronous execution of log records and written into a database in batches, a software system can show better performance by using asynchronization, some log security policy processing is carried out in asynchronous tasks, the robustness of the system is enhanced, and the user experience is improved.
7. Under the condition of not invading the original business method, a high-cohesion and low-coupling mode is adopted to record business logs, and a natural language is used for describing the business logs, so that users participate in becoming a log supervisor; and an asynchronous mode is adopted to record the service log, and an alarm tag is marked on the log through a strategy, so that a user is helped to identify abnormal operation, and the integrity and the safety of the service log are improved.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Finally, it should be noted that: the above examples are only for illustrating the technical solutions of the present invention, and are not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A method of recording user actions, comprising:
obtaining annotation information about user operation from an annotation of a target method corresponding to the user operation;
obtaining non-annotation information about the user operation from the reference of the target method;
recording the annotation information and the non-annotation information,
the annotation information comprises the literal description information of the specific function executed by the user operation, the literal description information of the operation object related to the user operation and the placeholder information, and the non-annotation information comprises the specific information of the operation object used for replacing the placeholder information;
analyzing the annotation information and the non-annotation information, executing a log monitoring strategy, setting a calling frequency threshold, marking a label of the health condition for the log when the calling frequency exceeds the set threshold, and determining alarm information;
recording the annotation information, the non-annotation information and the alarm information;
and notifying the user of the annotation information, the non-annotation information and the alarm information.
2. The method of recording user operations of claim 1, wherein the target method and the steps of recording the annotation information and the non-annotation information are performed in an asynchronous manner.
3. The method of recording user operations as claimed in claim 1, wherein the step of obtaining annotation information about the user operation from an annotation of a target method corresponding to the user operation comprises:
a custom interceptor instance is used to obtain the target method and an annotation of the target method.
4. The method of recording user actions according to claim 1, wherein the step of obtaining non-annotated information about the user action from the references to the target method comprises:
obtaining the target method using a custom interceptor instance;
and executing the target method by using a self-defined dynamic proxy instance to acquire the non-annotation information.
5. The method of recording user operations of claim 4, wherein the step of recording the annotation information and the non-annotation information comprises:
and calling a self-defined business log asynchronous processing example in the self-defined dynamic proxy example to asynchronously record the annotation information and the non-annotation information.
6. An apparatus for recording user operations, comprising:
the first information acquisition module is used for acquiring annotation information related to user operation from annotations of a target method corresponding to the user operation;
the second information acquisition module is used for acquiring non-annotation information about the user operation from the access of the target method;
a first information recording module for recording the annotation information and the non-annotation information,
the annotation information comprises the literal description information of the specific function executed by the user operation, the literal description information of the operation object related to the user operation and the placeholder information, and the non-annotation information comprises the specific information of the operation object used for replacing the placeholder information;
the third information acquisition module is used for analyzing the annotation information and the non-annotation information, executing a log monitoring strategy, setting a calling frequency threshold, marking a label of the health condition for the log when the calling frequency exceeds the set threshold, and determining alarm information;
the second information recording module is used for recording the annotation information, the non-annotation information and the alarm information;
and the alarm module is used for informing the annotation information, the non-annotation information and the alarm information to a user.
7. The apparatus to record user operations of claim 6, further comprising:
an asynchronous execution module for executing the target method and performing the step of recording the annotation information and the non-annotation information in an asynchronous manner.
8. The apparatus for recording user operations of claim 6, wherein the first information obtaining module is further configured to:
a custom interceptor instance is used to obtain the target method and an annotation of the target method.
9. The apparatus for recording user operations of claim 6, wherein the second information obtaining module is further configured to:
obtaining the target method using a custom interceptor instance;
and executing the target method by using a self-defined dynamic proxy instance to acquire the non-annotation information.
10. The apparatus for recording user operations of claim 9, wherein the first information recording module is further configured to:
and calling a self-defined business log asynchronous processing example in the self-defined dynamic proxy example to asynchronously record the annotation information and the non-annotation information.
11. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1 to 5 when executing the program.
CN201811112301.8A 2018-09-25 2018-09-25 Method and device for recording user operation, storage medium and computer equipment Active CN110489310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811112301.8A CN110489310B (en) 2018-09-25 2018-09-25 Method and device for recording user operation, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811112301.8A CN110489310B (en) 2018-09-25 2018-09-25 Method and device for recording user operation, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN110489310A CN110489310A (en) 2019-11-22
CN110489310B true CN110489310B (en) 2020-04-14

Family

ID=68545738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811112301.8A Active CN110489310B (en) 2018-09-25 2018-09-25 Method and device for recording user operation, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN110489310B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990153B (en) * 2019-11-27 2022-03-08 南京甄视智能科技有限公司 Dubbo interface caching method and device in distributed environment based on SpringCache
CN111709050A (en) * 2020-05-21 2020-09-25 四川虹美智能科技有限公司 Method and device for initializing permission configuration parameters
CN113778777A (en) * 2020-06-28 2021-12-10 北京沃东天骏信息技术有限公司 A log playback method and device
CN111881102A (en) * 2020-07-29 2020-11-03 浪潮云信息技术股份公司 Method, device and readable medium for collecting audit logs based on AOP (automatic optical plane protocol) section
CN112035858B (en) * 2020-08-28 2023-06-20 建信金融科技有限责任公司 API access control method, device, equipment and medium
CN118227202B (en) * 2024-05-21 2024-07-19 中邮消费金融有限公司 Buried data processing method, buried data processing device, buried data processing equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567400A (en) * 2010-12-31 2012-07-11 阿里巴巴集团控股有限公司 Method for realizing Web visit and Web server
CN104461929A (en) * 2013-09-23 2015-03-25 中国银联股份有限公司 Distributed type data caching method based on interceptor
CN106528391A (en) * 2016-12-16 2017-03-22 郑州云海信息技术有限公司 Recording method of operating log by management platform on SSR
CN107145437A (en) * 2016-03-01 2017-09-08 阿里巴巴集团控股有限公司 A kind of java explains method of testing and device
CN107766083A (en) * 2016-08-16 2018-03-06 中兴通讯股份有限公司 Interface document analysis method and device
CN108415834A (en) * 2018-02-12 2018-08-17 平安科技(深圳)有限公司 Explain rear end method of calibration, device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10380233B2 (en) * 2012-07-26 2019-08-13 International Business Machines Corporation Launching workflow processes based on annotations in a document
CN103793432B (en) * 2012-11-01 2018-04-06 深圳中兴网信科技有限公司 A kind of data base read-write separation method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567400A (en) * 2010-12-31 2012-07-11 阿里巴巴集团控股有限公司 Method for realizing Web visit and Web server
CN104461929A (en) * 2013-09-23 2015-03-25 中国银联股份有限公司 Distributed type data caching method based on interceptor
CN107145437A (en) * 2016-03-01 2017-09-08 阿里巴巴集团控股有限公司 A kind of java explains method of testing and device
CN107766083A (en) * 2016-08-16 2018-03-06 中兴通讯股份有限公司 Interface document analysis method and device
CN106528391A (en) * 2016-12-16 2017-03-22 郑州云海信息技术有限公司 Recording method of operating log by management platform on SSR
CN108415834A (en) * 2018-02-12 2018-08-17 平安科技(深圳)有限公司 Explain rear end method of calibration, device, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Spring AOP(获取入参和返回值)及其原理:动态代理;象话;《https://blog.csdn.net/qq_34908167/article/details/79219769 动态代理》;20180828;正文全文 *
快乐on9仔.自定义注解+springMVC配置拦截器记录用户操作的日志.(写入数据库).《https://blog.csdn.net/qq_42427924/article/details/81217812》.2018, *
自定义注解+springMVC配置拦截器记录用户操作的日志.(写入数据库);快乐on9仔;《https://blog.csdn.net/qq_42427924/article/details/81217812》;20180726;正文全文 *

Also Published As

Publication number Publication date
CN110489310A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN110489310B (en) Method and device for recording user operation, storage medium and computer equipment
US10423396B1 (en) Transforming non-apex code to apex code
CN110716910B (en) Log management method, device, equipment and storage medium
US9442822B2 (en) Providing a visual representation of a sub-set of a visual program
CN103559118A (en) Security auditing method based on aspect oriented programming (AOP) and annotation information system
CN115705294B (en) Method, device, electronic device and medium for obtaining function call information
CN105718796B (en) A kind of system call level monitoring method of Android privacy of user data access
US20130300744A1 (en) Creating dynamic interactive views from trace events for performing deterministic performance analysis
CN116561146A (en) Database log recording method, device, computer equipment and computer-readable storage medium
US10176011B2 (en) Automatically generating and executing a service operation implementation for executing a task
US10783245B2 (en) Feedback-directed static analysis
CN117009397A (en) Data query method, data query device, electronic equipment and storage medium
EP4542380A1 (en) Method and system for processing data conflict, and electronic device and computer-readable storage medium
CN119301583A (en) Blockchain rules engine
US12554860B2 (en) Detecting security issues in forked projects
CN120371273A (en) SQL sentence generation method and device, storage medium and electronic equipment
CN118916262A (en) Fault analysis method, device, apparatus, storage medium and program product
WO2021051583A1 (en) Method and apparatus for transmitting and collecting variable, and computer-readable storage medium
US8694596B2 (en) Systems and methods for information brokering in software management
CN119739737B (en) A method, device and apparatus for directly transferring context parameters to SQL statements
CN113900895B (en) Information processing method, information processing apparatus, storage medium, and electronic device
US20260111185A1 (en) Conversion of unstructured data using artificial intelligence
JP4937387B2 (en) Automatic rewriting program and automatic rewriting device
CN109308256A (en) A kind of java dynamically analyzing of program method, equipment and storage medium
CN121166135A (en) Container and large model-based code generation method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant