CN111241125A - Method and device for recording operation log, electronic equipment and storage medium - Google Patents

Method and device for recording operation log, electronic equipment and storage medium Download PDF

Info

Publication number
CN111241125A
CN111241125A CN202010016589.XA CN202010016589A CN111241125A CN 111241125 A CN111241125 A CN 111241125A CN 202010016589 A CN202010016589 A CN 202010016589A CN 111241125 A CN111241125 A CN 111241125A
Authority
CN
China
Prior art keywords
operation log
information
structured query
service layer
business service
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.)
Granted
Application number
CN202010016589.XA
Other languages
Chinese (zh)
Other versions
CN111241125B (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 Shupeitong Network Technology Co ltd
Original Assignee
Chengdu Hi Xueluozi Education 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 Chengdu Hi Xueluozi Education Technology Co Ltd filed Critical Chengdu Hi Xueluozi Education Technology Co Ltd
Priority to CN202010016589.XA priority Critical patent/CN111241125B/en
Publication of CN111241125A publication Critical patent/CN111241125A/en
Application granted granted Critical
Publication of CN111241125B publication Critical patent/CN111241125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a method for recording an operation log, which comprises the following steps: after receiving a request of user operation, a WEB application program generates a link tracking identifier and calls a business service layer, wherein the WEB application program carries login information; the WEB application program sends the link tracking identification and the login information to a business service layer, the business service layer executes a logic code of a service operation request and assembles a structured query language statement, and an interceptor of the business service layer splices the link tracking identification and the login information into an annotation part of the structured query statement; the log file in the database management system records the structured query language statement, the value of the data before operation and the value of the data after operation. The invention strengthens the structured query language statement by the link tracking identification tracking operation and the interceptor records the information of the operation log by combining the log file in the database management system, thereby having strong universality, less invasion to the existing service and no additional coding work.

Description

Method and device for recording operation log, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the field, in particular to a method and a device for recording an operation log, electronic equipment and a storage medium.
Background
In the prior art, an operation log mainly records the following information: the system comprises six parts, namely an operator, operation time, an operation type, an operation object, data before operation and data after operation, and is mainly used for auditing and auditing work. The main method for recording the operation log can intercept three operations of adding, modifying and deleting the operation database in a mode of facing to the section programming. The operator, the operation time, the operation type, the operation object and the modified data can be obtained through the request information, and the data before modification can be read from the database in an SQL query mode.
The inventor discovers that in the process of implementing the invention: the operation logs are recorded based on the section-oriented programming, data before operation must be read from a database in an SQL query mode, and therefore the database needs to be queried more than once when the operation logs are recorded each time, and the problem of low efficiency exists.
Disclosure of Invention
In order to solve the problem of low efficiency of recording operation logs in the prior art,
in a first aspect, at least one embodiment of the present invention provides a method for recording an operation log, including:
after receiving an operation request of a user, a WEB application program generates a link tracking identifier and calls at least one business service layer, wherein the WEB application program carries login information;
after the at least one business service layer is called, the WEB application program sends the link tracking identification and the login information to the at least one business service layer, the at least one business service layer receives the link tracking identification and the login information, executes logic codes of a service operation request and assembles a first structured query language statement, and an interceptor of the business service layer splices the link tracking identification and the login information into the first structured query language comment statement;
a binary log file in the database management system records a first structured query language statement, a value of data before execution of the first structured query language statement, and a value of data after execution of the first structured query language statement.
In some embodiments, the above method further comprises:
reading a binary log file to obtain first operation log information;
and after the binary log file is analyzed, asynchronously caching the first operation log information.
In some embodiments, the above method further comprises:
the method comprises the steps of subscribing asynchronous cache first operation log information, and assembling the first operation log information into second operation log information;
the second operation log information is stored to the search engine.
In some embodiments, the above method further comprises:
receiving a trigger operation of inquiring second operation log information by a search engine;
and displaying the second operation log information.
In some embodiments, the first operation log information and the second operation log information in the above method each include: the system comprises an operator, operation time, an operation object, pre-operation data, post-operation data and a global link tracking identifier.
In a second aspect, an embodiment of the present invention provides an apparatus for recording an operation log, including:
the receiving and calling module is used for generating a link tracking identifier and calling at least one business service layer after the WEB application program receives an operation request of a user, wherein the WEB application program carries login information;
the system comprises a sending and executing module, a WEB application program, a link tracking identifier and login information, a service layer and an interceptor, wherein the sending and executing module is used for sending the link tracking identifier and the login information to at least one service layer after calling the at least one service layer, executing logic codes of a service operation request and assembling structured query language statements after the at least one service layer receives the link tracking identifier and the login information, and splicing the link tracking identifier and the login information into an annotation part of the structured query language statements by the interceptor of the service layer;
a recording module: a binary log file in the database management system records a first structured query language statement, a value of data before execution of the first structured query language statement, and a value of data after execution of the first structured query language statement.
In some embodiments, the above apparatus further comprises:
a reading module: the system comprises a first operation log information acquisition unit, a second operation log information acquisition unit and a first operation log information acquisition unit, wherein the first operation log information acquisition unit is used for reading a binary log file to obtain first operation log information;
an analysis module: and the cache module is used for asynchronously caching the first operation log information after the binary log file is analyzed.
In some embodiments, the above apparatus further comprises:
a subscription module: the first operation log information is used for subscribing the asynchronous cache first operation log information and assembling the first operation log information into second operation log information;
a storage module: for storing the second operation log information to the search engine.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory;
the processor is used to perform the steps of the method of logging oplogs as described above by calling a program or instructions stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of the above-described method for logging operations.
The embodiment of the invention has the advantages that: after receiving an operation request of a user, a WEB application program generates a link tracking identifier and calls a business service layer, wherein the WEB application program carries login information; the WEB application program sends the link tracking identification and the login information to a business service layer, the business service layer executes a logic code of an operation request and assembles a structured query language statement, and an interceptor of the business service layer splices the link tracking identification and the login information into an annotation part of the structured query language statement; the log file in the database management system records the structured query language statement, the value of the data before operation and the value of the data after operation. The invention tracks operation through the link tracking identification, the executed SQL sentences are spliced by the interceptor, and the information of the operation log is recorded by combining the log file in the database management system, thereby not only having strong universality, but also having less invasion to the existing service, having no additional coding work, and improving the efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a flowchart illustrating a method for recording an operation log according to an embodiment of the present invention;
fig. 2 is a second flowchart illustrating a method for recording an operation log according to an embodiment of the present invention;
fig. 3 is a third schematic flowchart of a method for recording an operation log according to an embodiment of the present invention;
FIG. 4 is a fourth flowchart illustrating a method for recording an operation log according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for recording an operation log according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, the present invention will be further described in detail with reference to the accompanying drawings and examples. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. The specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention, are within the scope of the invention.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
Fig. 1 is a flowchart illustrating a method for recording an operation log according to an embodiment of the present invention.
In a first aspect, in conjunction with fig. 1, at least one embodiment of the present invention provides a method for recording an operation log, including the following three steps:
s101, after receiving an operation request of a user, a WEB application program generates a link tracking identifier and calls at least one business service layer, wherein the WEB application program carries login information.
Specifically, in this embodiment of the present application, the WEB application may include: the method comprises the steps that when an application program such as a browser, a Taobao application program, a Jingdong application program and the like receives a service operation request, the user operation request can be an operation request of adding information, deleting information, modifying information and the like through a mobile phone and a mobile terminal, a link tracking identifier is generated, the link tracking identifier is unique, at least one business service layer is called, a plurality of business service layer services can be called in sequence, a WEB application program carries login information, and the login information can be a login ID, a user name and the like.
And S102, after the at least one business service layer is called, the WEB application program sends the link tracking identification and the login information to the at least one business service layer, the at least one business service layer executes the logic code of the operation request and assembles the structured query language statement after receiving the link tracking identification and the login information, and the interceptor of the business service layer splices the link tracking identification and the login information into an annotation part of the structured query language statement.
Specifically, in this embodiment of the application, the WEB application may sequentially invoke a plurality of service layers for services, and transmit the same link tracking identifier and login information to different service layers, and after one of the service layers receives the link tracking identifier and the login information, execute a logic code of the operation request and assemble a structured query language statement, where the structured query language statement is an SQL statement, and the service layer integrates LOG mybattis interrupt, which is a lightweight INTERCEPTOR for modifying the SQL statement generated by the service layer assembly. After the structured query language statement is assembled, the INTERCEPTOR generates a comment part of the structured query language statement from link tracking identification and login information of a WEB application program, the comment part is spliced to the original structured query language statement, namely the original structured query language statement is generated by a business service layer, the INTERCEPTOR strengthens the statement, the comment part does not influence an execution result and can carry operator information, and the INTERCEPTOR splices the comment statement in front of the original sql statement, for example, the sql statement executed by the business service is originally: update user set name is 1; after being processed by an interceptor (after splicing),/@ 189029,2599306654235230208 @/updateuser set name ═ zhang "where id ═ 1; here 189029 is the operator id2599306654235230208, which is a link tracking identifier representing a unique identifier for a request.
And S103, recording the structured query language statement, the value of the data before the operation of the structured query language statement and the value of the data after the operation of the structured query language statement by using a binary log file in the database management system.
Specifically, in the embodiment of the present application, in the database management system, that is, the binary file BINLOG of MYSQL, records the executed SQL statement, in the present application, it is necessary to set bin _ rows _ query _ log _ events to ON, and the value of the data before the operation of the SQL statement and the value of the data after the operation, and in the present application, bin _ row _ image needs to be set to FULL.
Fig. 2 is a second flowchart illustrating a method for recording an operation log according to an embodiment of the present invention.
In some embodiments, in conjunction with fig. 2, the method further comprises:
s201, reading a binary log file to obtain first operation log information;
specifically, in the embodiment of the application, the operator, the operation time, the operation object, the pre-operation data, the post-operation data, and the global link tracking identifier are obtained by reading the binary log file BINLOG, and the operation log information can be read through MYSQL BINLOG.
S202, after the binary log file is analyzed, the first operation log information is asynchronously cached.
Specifically, in the embodiment of the application, the BINLOG is a binary file, and the operation log information is analyzed directly by using CANAL without using MYSQL BINLOG protocol because the BINLOG file contains a large amount of information, and the first operation log information is asynchronously cached by using a KAFKA message queue, so that the first operation log information achieves asynchronous and buffering effects.
Fig. 3 is a third schematic flowchart of a method for recording an operation log according to an embodiment of the present invention.
In some embodiments, in conjunction with fig. 3, the method further comprises:
s301, subscribing to asynchronously cached first operation log information, and assembling the first operation log information into second operation log information;
specifically, after subscribing to the operation log information asynchronously cached in the message queue in the embodiment of the present invention, the second operation log information may be assembled according to different dates.
And S302, storing the second operation log information to a search engine.
Specifically, in the embodiment of the present invention, the second operation log information may be stored in ELASTIC SEARCH search engine, and the log query effect may be reached later through query ELASTIC SEARCH.
Fig. 4 is a fourth flowchart illustrating a method for recording an operation log according to an embodiment of the present invention.
In some embodiments, the above method further comprises:
s401, when receiving the trigger operation of inquiring second operation log information by the search engine;
and S402, displaying the second operation log information.
Specifically, the triggering operation in the embodiment of the present application may be that a user enters limited information in a search engine input to query, and details of an operation log are displayed on a page of the search engine.
In some embodiments, the first operation log information and the second operation log information in the above method each include: the system comprises an operator, operation time, an operation object, pre-operation data, post-operation data and a global link tracking identifier.
Fig. 5 is a schematic structural diagram of an apparatus for recording an operation log according to an embodiment of the present invention.
In a second aspect, in conjunction with fig. 5, an embodiment of the present invention provides an apparatus for recording an operation log, including:
and a receiving and calling module 501, where the receiving module is used for generating a link tracking identifier after the WEB application receives the service operation request, and the calling module is used for calling at least one service layer, and the WEB application carries login information.
Specifically, in this embodiment of the present application, the WEB application may be: the receiving module receives an operation request of a user, wherein the operation request can be an operation request that the user adds information, deletes information, modifies information and the like through a mobile phone and a mobile terminal to generate a link tracking identifier, the link tracking identifier is unique, the calling module calls at least one business service layer and possibly calls a plurality of business service layer services in sequence, and the WEB application program carries login information, wherein the login information can be a login ID, a user name and the like.
The sending and executing module 502 is used for the WEB application to send the link tracking identification and the login information to the at least one business service layer after the at least one business service layer is called, the executing module is used for executing the logic code of the service operation request and assembling the structured query language statement after the at least one business service layer receives the link tracking identification and the login information, and the interceptor of the business service layer splices the link tracking identification and the login information into the annotation part of the structured query language statement.
Specifically, in this embodiment of the application, the WEB application may sequentially invoke a plurality of service layers for services, and transmit the same link tracking identifier and login information to different service layers, and after one of the service layers receives the link tracking identifier and the login information, execute a logic code of the operation request and assemble a structured query language statement, where the structured query language statement is an SQL statement, and the service layer integrates LOG mybattis interrupt, which is a lightweight INTERCEPTOR for modifying the SQL statement generated by the service layer assembly. After the structured query language statement is assembled, the INTERCEPTOR generates a comment part of the structured query language statement from the link tracking identification and the login information of the WEB application program, the comment part is spliced to the original structured query language statement, namely the original structured query language statement is generated by a business service layer, the INTERCEPTOR strengthens the statement, the comment part does not influence the execution result, for example, the sql statement executed by the business service originally is: update user setname ═ zhangsan ═ where id ═ 1; after being processed by an interceptor (after splicing),/@ 189029,2599306654235230208 @/update user set name ═ zhang "where id ═ 1; here 189029 is the operator id2599306654235230208, which is a link tracking identifier representing a unique identifier for a request.
The recording module 503: a binary log file for use in a database management system records a first structured query language statement, a value of data prior to execution of the first structured query language statement, and a value of data after execution of the first structured query language statement.
Specifically, in the embodiment of the present application, in the database management system, that is, a binary file BINLOG of MYSQL, that is, a recording module records executed SQL statements, in the present application, it is necessary to set BINLOG _ rows _ query _ log _ events to ON, a value of data before operation of the SQL statements, and a value of data after operation, and in the present application, it is necessary to set BINLOG _ row _ image to FULL.
In some embodiments, the above apparatus further comprises:
a reading module: the method is used for reading the binary log file to obtain first operation log information.
Specifically, in the embodiment of the application, the operator, the operation time, the operation object, the pre-operation data, the post-operation data, and the global link tracking identifier are obtained by reading the binary log file BINLOG, and the operation log information can be read through MYSQL BINLOG.
An analysis module: and the cache module is used for asynchronously caching the first operation log information after the binary log file is analyzed.
Specifically, in the embodiment of the application, the BINLOG is a binary file, and the operation log information is analyzed directly by using CANAL without using MYSQL BINLOG protocol because the BINLOG file contains a large amount of information, and the first operation log information is asynchronously cached by using a KAFKA message queue, so that the first operation log information achieves asynchronous and buffering effects.
In some embodiments, the above apparatus further comprises:
a subscription module: the first operation log information is used for subscribing the asynchronous cache first operation log information and assembling the first operation log information into second operation log information.
Specifically, after subscribing the operation log information asynchronously cached in the message queue, the subscription module in the embodiment of the present invention may assemble the operation log information into the second operation log information according to different dates.
A storage module: for storing the second operation log information to the search engine.
Specifically, in the embodiment of the present invention, the storage module may store the second operation log information in the ELASTICSEARCH search engine, and the log query effect may be reached through the query ELASTIC SEARCH at a later stage.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory;
the processor is used to perform the steps of the method of logging oplogs as described above by calling a program or instructions stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of the above-described method for logging operations.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention, as shown in fig. 6, the electronic device may include a mobile phone and a PAD intelligent terminal, and the electronic device includes:
one or more processors 601, one processor 601 being illustrated in fig. 6; a memory 602; the electronic device may further include: an input device 603 and an output device 604.
The processor 601, the memory 602, the input device 603 and the output device 604 in the electronic apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5.
The memory 602, which is a non-transitory computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the interface display method of the application program in the embodiment of the present invention (for example, the receiving and calling module 501, the sending and executing module 502, and the recording module 503 shown in fig. 5). The processor 601 executes various functional applications of the server and data processing by executing software programs, instructions and modules stored in the memory 602, that is, implements the method of recording an operation log of the above-described method embodiment.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 may optionally include memory located remotely from the processor 601, which may be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 603 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. The output device 604 may include a display device such as a display screen.
Embodiments of the present invention also provide a computer-readable storage medium, which stores a program or instructions, where the program or instructions cause a computer to execute a method for recording an operation log, where the method includes:
and after receiving the service operation request, the WEB application program generates a link tracking identifier and calls at least one business service layer, wherein the WEB application program carries login information.
After the at least one business service layer is called, the WEB application program sends the link tracking identification and the login information to the at least one business service layer, the at least one business service layer receives the link tracking identification and the login information, executes logic codes of the service operation request and assembles a first structured query language statement, and an interceptor of the business service layer splices the link tracking identification and the login information into the first structured query language comment statement.
A binary log file in the database management system records a first structured query language statement, a value of data before execution of the first structured query language statement, and a value of data after execution of the first structured query language statement.
Optionally, the computer-executable instructions, when executed by a computer processor, may also be used to implement the technical solution of the method for logging operations provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments instead of others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method of logging operations, comprising:
after receiving an operation request of a user, a WEB application program generates a link tracking identifier and calls at least one business service layer, wherein the WEB application program carries login information;
after at least one business service layer is called, a WEB application program sends the link tracking identification and the login information to the at least one business service layer, the at least one business service layer receives the link tracking identification and the login information, executes a logic code of the operation request and assembles a structured query language statement, and an interceptor of the business service layer splices the link tracking identification and the login information into an annotation part of the structured query statement;
a binary log file in a database management system records the structured query language statement, the value of the data before the operation of the structured query language statement, and the value of the data after the operation of the structured query language statement.
2. The method of claim 1, further comprising:
reading the binary log file to obtain first operation log information;
and after the binary log file is analyzed, asynchronously caching first operation log information.
3. The method of claim 2, further comprising:
subscribing the asynchronous cache first operation log information, and assembling the first operation log information into second operation log information;
and storing the second operation log information to a search engine.
4. The method of claim 3, further comprising:
receiving a trigger operation of inquiring the second operation log information by the search engine;
and displaying the second operation log information.
5. The method of claim 4, wherein the first oplog information and the second oplog information each comprise: the system comprises an operator, operation time, an operation object, pre-operation data, post-operation data and a global link tracking identifier.
6. An apparatus for logging operations, comprising:
the receiving and calling module is used for generating a link tracking identifier and calling at least one business service layer after a WEB application program receives an operation request of a user, wherein the WEB application program carries login information;
the transmitting and executing module is used for transmitting the link tracking identification and the login information to at least one business service layer by a WEB application program after calling the at least one business service layer, executing a logic code of an operation request of the user and assembling a structured query language statement after the at least one business service layer receives the link tracking identification and the login information, and splicing the link tracking identification and the login information into an annotation part of the structured query statement by an interceptor of the business service layer;
a recording module: a binary log file in a database management system records the structured query language statement, the value of the data before the operation of the structured query language statement, and the value of the data after the operation of the structured query language statement.
7. The apparatus of claim 6, further comprising:
a reading module: the system comprises a first operation log file, a second operation log file and a third operation log file, wherein the first operation log file is used for reading the binary log file to obtain first operation log information;
an analysis module: and the cache module is used for asynchronously caching the first operation log information after the binary log file is analyzed.
8. The apparatus of claim 7, further comprising:
a subscription module: the first operation log information is used for subscribing the asynchronous cache first operation log information and assembling the first operation log information into second operation log information;
a storage module: for storing the second operation log information to a search engine.
9. An electronic device, comprising: the method comprises the following steps: a processor and a memory;
the processor is adapted to perform the steps of the method of any one of claims 1 to 5 by calling a program or instructions stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a program or instructions for causing a computer to carry out the steps of the method according to any one of claims 1 to 5.
CN202010016589.XA 2020-01-08 2020-01-08 Method and device for recording operation log, electronic equipment and storage medium Active CN111241125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010016589.XA CN111241125B (en) 2020-01-08 2020-01-08 Method and device for recording operation log, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010016589.XA CN111241125B (en) 2020-01-08 2020-01-08 Method and device for recording operation log, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111241125A true CN111241125A (en) 2020-06-05
CN111241125B CN111241125B (en) 2023-06-02

Family

ID=70874277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010016589.XA Active CN111241125B (en) 2020-01-08 2020-01-08 Method and device for recording operation log, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111241125B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752799A (en) * 2020-06-24 2020-10-09 中国建设银行股份有限公司 Service link tracking method, device, equipment and storage medium
CN112346721A (en) * 2020-10-23 2021-02-09 杭州安恒信息技术股份有限公司 Log acquisition method and device based on section-oriented programming and electronic equipment
CN112416710A (en) * 2020-11-19 2021-02-26 京东数字科技控股股份有限公司 User operation recording method and device, electronic equipment and storage medium
CN112491617A (en) * 2020-11-27 2021-03-12 深圳乐信软件技术有限公司 Link tracking method, device, electronic equipment and medium
CN113626423A (en) * 2021-06-29 2021-11-09 欧电云信息科技(江苏)有限公司 Log management method, device and system of service database
CN113885958A (en) * 2021-09-30 2022-01-04 杭州默安科技有限公司 Method and system for intercepting dirty data
CN116643733A (en) * 2023-07-26 2023-08-25 北京仁科互动网络技术有限公司 Service processing system and method
CN116881040A (en) * 2023-09-08 2023-10-13 杭州小电科技股份有限公司 Service operation processing method and device, electronic device and storage medium
CN117407369A (en) * 2023-12-14 2024-01-16 宁德时代新能源科技股份有限公司 Operation log recording method and device and electronic equipment

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7200588B1 (en) * 2002-07-29 2007-04-03 Oracle International Corporation Method and mechanism for analyzing trace data using a database management system
US20120117644A1 (en) * 2010-11-04 2012-05-10 Ridgeway Internet Security, Llc System and Method for Internet Security
US20120173490A1 (en) * 2010-12-30 2012-07-05 Verisign, Inc. Method and system for implementing business logic
EP2698966A2 (en) * 2011-09-05 2014-02-19 Deutsche Telekom AG Tracking end-users in web databases
CN103647794A (en) * 2013-12-31 2014-03-19 北京启明星辰信息安全技术有限公司 Data correlation method based on J2EE platform and correlation plug-in
CN105512284A (en) * 2015-12-07 2016-04-20 上海爱数信息技术股份有限公司 MySQL data protection method based on affair form data and binlog file
CN105912455A (en) * 2016-04-27 2016-08-31 努比亚技术有限公司 Business execution method and server
CN107122290A (en) * 2016-02-25 2017-09-01 阿里巴巴集团控股有限公司 The recording method of log information and device
CN107480009A (en) * 2017-08-18 2017-12-15 北京中电普华信息技术有限公司 A kind of transaction recovery method and device
CN108228628A (en) * 2016-12-15 2018-06-29 亿度慧达教育科技(北京)有限公司 Wide table generating method and its device in a kind of structured query language database
CN109284282A (en) * 2018-10-22 2019-01-29 北京极数云舟科技有限公司 One kind being based on MySQL database O&M method and system
CN109388631A (en) * 2018-10-11 2019-02-26 山东浪潮通软信息科技有限公司 A kind of database of multi-tenant divides library implementation method
CN109446262A (en) * 2018-10-31 2019-03-08 成都四方伟业软件股份有限公司 A kind of data assemblage method and device
CN110222028A (en) * 2019-04-30 2019-09-10 重庆小雨点小额贷款有限公司 A kind of data managing method, device, equipment and storage medium
CN110245035A (en) * 2019-05-20 2019-09-17 平安普惠企业管理有限公司 A kind of link trace method and device
CN110321273A (en) * 2019-07-09 2019-10-11 政采云有限公司 A kind of business statistical method and device

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7200588B1 (en) * 2002-07-29 2007-04-03 Oracle International Corporation Method and mechanism for analyzing trace data using a database management system
US20120117644A1 (en) * 2010-11-04 2012-05-10 Ridgeway Internet Security, Llc System and Method for Internet Security
US20120173490A1 (en) * 2010-12-30 2012-07-05 Verisign, Inc. Method and system for implementing business logic
EP2698966A2 (en) * 2011-09-05 2014-02-19 Deutsche Telekom AG Tracking end-users in web databases
CN103647794A (en) * 2013-12-31 2014-03-19 北京启明星辰信息安全技术有限公司 Data correlation method based on J2EE platform and correlation plug-in
CN105512284A (en) * 2015-12-07 2016-04-20 上海爱数信息技术股份有限公司 MySQL data protection method based on affair form data and binlog file
CN107122290A (en) * 2016-02-25 2017-09-01 阿里巴巴集团控股有限公司 The recording method of log information and device
CN105912455A (en) * 2016-04-27 2016-08-31 努比亚技术有限公司 Business execution method and server
CN108228628A (en) * 2016-12-15 2018-06-29 亿度慧达教育科技(北京)有限公司 Wide table generating method and its device in a kind of structured query language database
CN107480009A (en) * 2017-08-18 2017-12-15 北京中电普华信息技术有限公司 A kind of transaction recovery method and device
CN109388631A (en) * 2018-10-11 2019-02-26 山东浪潮通软信息科技有限公司 A kind of database of multi-tenant divides library implementation method
CN109284282A (en) * 2018-10-22 2019-01-29 北京极数云舟科技有限公司 One kind being based on MySQL database O&M method and system
CN109446262A (en) * 2018-10-31 2019-03-08 成都四方伟业软件股份有限公司 A kind of data assemblage method and device
CN110222028A (en) * 2019-04-30 2019-09-10 重庆小雨点小额贷款有限公司 A kind of data managing method, device, equipment and storage medium
CN110245035A (en) * 2019-05-20 2019-09-17 平安普惠企业管理有限公司 A kind of link trace method and device
CN110321273A (en) * 2019-07-09 2019-10-11 政采云有限公司 A kind of business statistical method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
SOLOMON OGBOMON UWAGBOLE: "Applied Machine Learning predictive analytics to SQL Injection Attack detection and prevention", 《IEEE XPLORE》 *
李芳: "语义出版本体模型的构成分析——以SPAR本体和Nature本体为例", 《图书情报工作》, no. 61 *
董慧慧: "基于struts2拦截器的操作日志系统设计", 《计算机光盘软件与应用》, no. 2012 *
韩言平: "SQL注入智能检测工具的设计与实现", 《CNKI中国知网》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752799A (en) * 2020-06-24 2020-10-09 中国建设银行股份有限公司 Service link tracking method, device, equipment and storage medium
CN112346721A (en) * 2020-10-23 2021-02-09 杭州安恒信息技术股份有限公司 Log acquisition method and device based on section-oriented programming and electronic equipment
CN112416710A (en) * 2020-11-19 2021-02-26 京东数字科技控股股份有限公司 User operation recording method and device, electronic equipment and storage medium
CN112491617A (en) * 2020-11-27 2021-03-12 深圳乐信软件技术有限公司 Link tracking method, device, electronic equipment and medium
CN113626423A (en) * 2021-06-29 2021-11-09 欧电云信息科技(江苏)有限公司 Log management method, device and system of service database
CN113626423B (en) * 2021-06-29 2024-01-30 欧电云信息科技(江苏)有限公司 Log management method, device and system of business database
CN113885958A (en) * 2021-09-30 2022-01-04 杭州默安科技有限公司 Method and system for intercepting dirty data
CN113885958B (en) * 2021-09-30 2023-10-31 杭州默安科技有限公司 Method and system for intercepting dirty data
CN116643733A (en) * 2023-07-26 2023-08-25 北京仁科互动网络技术有限公司 Service processing system and method
CN116643733B (en) * 2023-07-26 2023-10-13 北京仁科互动网络技术有限公司 Service processing system and method
CN116881040A (en) * 2023-09-08 2023-10-13 杭州小电科技股份有限公司 Service operation processing method and device, electronic device and storage medium
CN117407369A (en) * 2023-12-14 2024-01-16 宁德时代新能源科技股份有限公司 Operation log recording method and device and electronic equipment

Also Published As

Publication number Publication date
CN111241125B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN111241125B (en) Method and device for recording operation log, electronic equipment and storage medium
US8005806B2 (en) System and method for information retrieval using context information
US8056007B2 (en) System and method for recognizing and storing information and associated context
CN111752799A (en) Service link tracking method, device, equipment and storage medium
US9594845B2 (en) Automating web tasks based on web browsing histories and user actions
US10754628B2 (en) Extracting web API endpoint data from source code to identify potential security threats
CN113687974B (en) Client log processing method and device and computer equipment
CN112486708B (en) Page operation data processing method and processing system
CN110489315B (en) Operation request tracking method, operation request tracking device and server
KR102550540B1 (en) Landing page processing method, device, equipment and medium
CN113254320A (en) Method and device for recording user webpage operation behaviors
CN110825594A (en) Data reporting and issuing method, client and server
US11500652B2 (en) Method and system for application loading
CN111240847A (en) Data processing method, device, medium and computing equipment
CN111177623A (en) Information processing method and device
CN114443905A (en) Interface document updating method and device, electronic equipment and readable storage medium
CN108959294B (en) Method and device for accessing search engine
CN112800410A (en) Multi-product login management method, device, equipment and storage medium
JP7353076B2 (en) Methods, computer programs, computer equipment and server systems for collecting conversation-related data
CN116028479A (en) Data reconciliation system, method, equipment and storage medium
CN110858238B (en) Data processing method and device
CN113779122A (en) Method and apparatus for exporting data
CN113347052A (en) Method and device for counting user access data through access log
CN111078736A (en) Data aggregation processing method and device, terminal and storage medium
CN115455479A (en) Method and device for protecting sensitive information of mobile banking customer

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
TA01 Transfer of patent application right

Effective date of registration: 20220330

Address after: 100107 Room 501, 5 / F, 101, building 2, yard 36, Hongjunying South Road, Chaoyang District, Beijing

Applicant after: Beijing shupeitong Network Technology Co.,Ltd.

Address before: 610000 No. 6, unit 2, building 1, No. 57, community main street, Chang town, Xinglong Street, Tianfu new area, Chengdu, Sichuan

Applicant before: Chengdu hi xueluozi Education Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant