CN111241125B - 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
CN111241125B
CN111241125B CN202010016589.XA CN202010016589A CN111241125B CN 111241125 B CN111241125 B CN 111241125B CN 202010016589 A CN202010016589 A CN 202010016589A CN 111241125 B CN111241125 B CN 111241125B
Authority
CN
China
Prior art keywords
structured query
query language
information
service layer
operation log
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
CN202010016589.XA
Other languages
Chinese (zh)
Other versions
CN111241125A (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
Beijing Shupeitong Network 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 Shupeitong Network Technology Co ltd filed Critical Beijing Shupeitong Network 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for recording an operation log, which comprises the following steps: after receiving a request of user operation, the WEB application program generates a link tracking identifier and invokes a business service layer, and the WEB application program carries login information; the WEB application program sends the link tracking identification and login information to a service layer, the service layer executes a logic code of a service operation request and assembles a structured query language statement, and an interceptor of the 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 values of the structured query language statement, the data before operation and the data after operation. The invention tracks operation through the link tracking mark, the interceptor strengthens the structured query language statement, and records the information of the operation log by combining the log file in the database management system, thereby having strong universality, less intrusion to the existing service and no extra coding work.

Description

Method and device for recording operation log, electronic equipment and storage medium
Technical Field
Embodiments of the present invention relate to the field of recording operation logs, and in particular, to a method, an apparatus, an electronic device, and a storage medium for recording operation logs.
Background
In the prior art, the operation log mainly records the following information: the method comprises six parts, namely an operator, operation time, operation type, an operation object and pre-operation data, wherein the post-operation data 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 an operation database in a tangent plane-oriented programming mode. The operator, the operation time, the operation type, the operation object and the modified data can be obtained through request information, and the data before modification can be read from the database through SQL query.
The inventors found in the course of implementing the present invention that: based on the tangent plane-oriented programming record operation log, the data before operation must be read from the database in the SQL query mode, so that the database needs to be queried once for each record operation log, and the problem of low efficiency exists.
Disclosure of Invention
In order to solve the problem of inefficiency in recording operation logs in the prior art,
in a first aspect, at least one embodiment of the present invention provides a method of recording an operation log, including:
after receiving an operation request of a user, a WEB application program generates a link tracking identifier and invokes at least one business service layer, wherein the WEB application program carries login information;
after at least one business service layer is called, the WEB application program sends a link tracking identifier and login information to the at least one business service layer, after the at least one business service layer receives the link tracking identifier and the login information, logic codes of service operation requests are executed, first structured query language sentences are assembled, and an interceptor of the business service layer splices the link tracking identifier and the login information into first structured query language annotation sentences;
the binary log file in the database management system records the first structured query language statement, the value of the data before the first structured query language statement is executed, and the value of the data after the first structured query language statement is executed.
In some embodiments, the above method further comprises:
reading the binary log file to obtain first operation log information;
after the binary log file is analyzed, the first operation log information is asynchronously cached.
In some embodiments, the above method further comprises:
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:
when receiving triggering operation of inquiring second operation log information by the 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: operator, operation time, object of operation, pre-operation data, post-operation data, global link tracking identification.
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, and the WEB application program carries login information;
the sending and executing module is used for sending the link tracking identifier and the login information to at least one business service layer after calling the at least one business service layer, 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 identifier and the login information, and the interceptor of the business service layer splices the link tracking identifier and the login information into an annotation part of the structured query language statement;
and a recording module: the binary log file in the database management system records the first structured query language statement, the value of the data before the first structured query language statement is executed, and the value of the data after the first structured query language statement is executed.
In some embodiments, the apparatus further comprises:
and a reading module: the method comprises the steps of reading a binary log file to obtain first operation log information;
and an analysis module: and after the binary log file is analyzed, the first operation log information is asynchronously cached.
In some embodiments, the apparatus further comprises:
a subscription module: the method comprises the steps of subscribing to asynchronously cache first operation log information, and assembling the first operation log information into second operation log information;
and a storage module: for storing the second oplog 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 operable to perform the steps of the logged oplogging method described above by invoking a program or instruction stored in the memory.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing a program or instructions that cause a computer to perform the steps of the above-described method of 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 invokes a business service layer, wherein the WEB application program carries login information; the WEB application program sends the link tracking identification and login information to a service layer, the service layer executes a logic code of an operation request and assembles a structured query language statement, and an interceptor of the 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 values of the structured query language statement, the data before operation and the data after operation. According to the invention, the link tracking identification is used for tracking operation, the interceptor is used for splicing the executed SQL sentences, and the log file in the database management system is combined for recording the information of the operation log, so that the universality is strong, the intrusion to the existing business is less, no additional coding work is needed, and the efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the description of 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 may be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a flow chart of a method for recording operation logs according to an embodiment of the present invention;
FIG. 2 is a second flowchart of a method for recording operation logs according to an embodiment of the present invention;
FIG. 3 is a third flowchart illustrating a method for recording an operation log according to the embodiment of the present invention;
FIG. 4 is a flowchart of a method for recording operation logs 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-recited objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It is to be understood that the depicted embodiments are some, but not all, embodiments of the present invention. The specific embodiments described herein are to be considered in an illustrative rather than a restrictive sense. All other embodiments, which are obtained by a person skilled in the art based on the described embodiments of the invention, fall within the scope of protection of the invention.
It should be noted that in this document, relational terms such as "first" and "second" and the like are 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 flow chart of a method for recording an operation log according to an embodiment of the present invention.
In a first aspect, in connection 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 invokes at least one business service layer, wherein the WEB application program carries login information.
Specifically, in the embodiment of the present application, the WEB application may include: when receiving a service operation request, the browser, the naught, the jingdong and other application programs, wherein the operation request of the user can be an operation request of the user through a mobile phone, a mobile terminal, such as information addition, information deletion, information modification and the like, 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, the WEB application program carries login information, and the login information can be login ID, user name and the like.
S102, after at least one business service layer is called, the WEB application program sends the link tracking identification and login information to the at least one business service layer, after the at least one business service layer receives the link tracking identification and the login information, the logic code of the operation request is executed, the structured query language statement is assembled, 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.
Specifically, in the embodiment of the present application, the WEB application may call services of multiple service layers sequentially, and transmit the same link tracking identifier and login information to different service layers, and when one of the service layers receives the link tracking identifier and the login information, execute a logic code of an 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 MYBATIS INTERCEPTOR and is a lightweight interceptor for modifying the SQL statement generated by the service layer assembly. After the structured query language statement is assembled, LOG MYBATIS INTERCEPTOR of interception processing is performed, the interceptor generates a comment part of the structured query language statement from the link tracking identifier and 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 sentence, 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 originally is: update user set name = "Zhang Sano" where id=1; after processing by interceptor (post-splicing)/@ 189029,2599306654235230208 @/update user set name = "Zhang Sano" where id = 1; and here 189029 is that the operator id2599306654235230208 is a link tracking identifier, representing the unique identifier of a request.
S103, recording the structured query language statement, the value of the data before the structured query language statement is operated and the value of the data after the structured query language statement is operated in the binary log file in the database management system.
Specifically, in the embodiment of the present application, in the database management system, i.e., the binary file BINLOG of MYSQL, records the executed SQL statement, and in the present application, the binlog_row_query_log_events need to be set to be ON, and the value of the data before the operation of the SQL statement and the value of the data after the operation need to be set to be FULL.
Fig. 2 is a second flowchart of 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 object of the operation, the data before the operation, the data after the operation and the global link tracking identifier are obtained by reading the binary log file BINLOG, and the operation log information can be read through MYSQBINLOG.
S202, after the binary log file is analyzed, the first operation log information is asynchronously cached.
Specifically, in the embodiment of the present application, the binary log file BINLOG is parsed, and since BINLOG is a binary file, the operation log information is directly parsed by using CALNAL instead of using MYSQL BINLOG protocol, and because the binary log file BINLOG file contains a large amount of information, the first operation log information is asynchronously cached by using the KAFKA message queue, so that the first operation log information achieves the asynchronous and buffering effects.
Fig. 3 is a third 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 cache 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 invention, the operation log information can be assembled into the second operation log information according to different dates.
And S302, storing 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 the ELASTIC SEARCH search engine, and the log query effect may be reached through the query ELASTIC SEARCH in the later period.
Fig. 4 is a flowchart of 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 a trigger operation of inquiring second operation log information by a search engine is received;
and S402, displaying second operation log information.
Specifically, the triggering operation in the embodiment of the application may be that the user inputs the limiting information in the input of the search engine to query, and the details of the operation log are displayed on the 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: operator, operation time, object of operation, pre-operation data, post-operation data, global link tracking identification.
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:
the receiving and calling module 501 is used for generating a link tracking identifier after the receiving module receives a service operation request from the WEB application program, and the calling module is used for calling at least one business service layer, and the WEB application program carries login information.
Specifically, in the embodiment of the present application, the WEB application may be: the method comprises the steps that a receiving module receives an operation request of a user through application programs such as a browser, a Taobao application program, a Beijing application program and the like, wherein the operation request can be an operation request of the user through mobile phones, mobile terminals, information addition, information deletion, information modification and the like, a link tracking identifier is generated, the link tracking identifier is unique, a calling module calls at least one business service layer, 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 login ID, user name and the like.
And the sending and executing module 502 is used for sending the link tracking identification and the login information to at least one business service layer by the WEB application program after calling the at least one business service layer, and the executing module is used for executing the logic code of the service operation request and assembling the structured query language statement after receiving the link tracking identification and the login information by the at least one business service layer, and the interceptor of the business service layer splices the link tracking identification and the login information into the comment part of the structured query language statement.
Specifically, in the embodiment of the present application, the WEB application may call services of multiple service layers sequentially, and transmit the same link tracking identifier and login information to different service layers, and when one of the service layers receives the link tracking identifier and the login information, execute a logic code of an 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 MYBATIS INTERCEPTOR and is a lightweight interceptor for modifying the SQL statement generated by the service layer assembly. After the structured query language statement is assembled, LOG MYBATIS INTERCEPTOR of interception processing is performed, the interceptor generates a comment part of the structured query language statement from the link tracking identifier and login information of the WEB application program, and the comment part is spliced to the original structured query language statement, that is, the original structured query language statement is generated by a business service layer, the interceptor strengthens the sentence, and the comment part does not influence an execution result, for example, the sql statement of business service execution originally is: update user set name = "Zhang Sano" where id=1; after processing by interceptor (post-splicing)/@ 189029,2599306654235230208 @/update user set name = "Zhang Sano" where id = 1; and here 189029 is that the operator id2599306654235230208 is a link tracking identifier, representing the unique identifier of a request.
Recording module 503: the binary log file used in the database management system records the first structured query language statement, the value of the data before the first structured query language statement is executed and the value of the data after the first structured query language statement is executed.
Specifically, in the embodiment of the present application, in the database management system, i.e., binary file BINLOG of MYSQL, i.e., a recording module records the executed SQL statement, in the present application, the binlog_rows_query_log_events need to be set to be ON, and the value of the data before the operation of the SQL statement and the value of the data after the operation need to be set to be FULL.
In some embodiments, the apparatus further comprises:
and a reading module: and 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 object of the operation, the data before the operation, the data after the operation and the global link tracking identifier are obtained by reading the binary log file BINLOG, and the operation log information can be read through MYSQBINLOG.
And an analysis module: and after the binary log file is analyzed, the first operation log information is asynchronously cached.
Specifically, in the embodiment of the present application, the binary log file BINLOG is parsed, and since BINLOG is a binary file, the operation log information is directly parsed by using CALNAL instead of using MYSQL BINLOG protocol, and because the binary log file BINLOG file contains a large amount of information, the first operation log information is asynchronously cached by using the KAFKA message queue, so that the first operation log information achieves the asynchronous and buffering effects.
In some embodiments, the apparatus further comprises:
a subscription module: the method is used for subscribing to asynchronously cache the first operation log information and assembling the first operation log information into the second operation log information.
Specifically, after the subscription module subscribes to the operation log information asynchronously cached in the message queue, the subscription module may be assembled into the second operation log information according to different dates.
And a storage module: for storing the second oplog 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 ELASTIC SEARCH search engine, and may reach the log query effect through the query ELASTIC SEARCH in the later period.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory;
the processor is operable to perform the steps of the logged oplogging method described above by invoking a program or instruction stored in the memory.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing a program or instructions that cause a computer to perform the steps of the above-described method of logging operations.
Fig. 6 is a schematic hardware structure of an electronic device according to an embodiment of the present invention, where, as shown in fig. 6, the electronic device may include a mobile phone, an intelligent terminal of a PAD, 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 means 603 and the output means 604 in the electronic device may be connected by a bus or otherwise, in fig. 5 by way of example.
The memory 602 is used as a non-transitory computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the interface display method of an application program in an embodiment of the present invention (e.g., 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, that is, implements the method of logging operations of the above-described method embodiments, by running software programs, instructions, and modules stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the electronic device, etc. In addition, 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, memory 602 may optionally include memory located remotely from processor 601, such remote memory being connectable to the terminal device through 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 means 603 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. The output 604 may include a display device such as a display screen.
Embodiments of the present invention also provide a computer-readable storage medium storing a program or instructions that when executed by a computer cause the computer to perform a method of logging operations, the method comprising:
after receiving the service operation request, the WEB application program generates a link tracking identifier and invokes at least one business service layer, and the WEB application program carries login information.
After at least one business service layer is called, the WEB application program sends the link tracking identification and login information to the at least one business service layer, after the at least one business service layer receives the link tracking identification and the login information, the logic code of a service operation request is executed, a first structured query language statement is assembled, and an interceptor of the business service layer splices the link tracking identification and the login information into the first structured query language annotation statement.
The binary log file in the database management system records the first structured query language statement, the value of the data before the first structured query language statement is executed, and the value of the data after the first structured query language statement is executed.
Optionally, the computer executable instructions may also be used to perform the technical solution of the method of logging operations provided by any embodiment of the present invention when executed by a computer processor.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art 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 (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method 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 one … …" 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 while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. A method of recording an operation log, comprising:
after receiving an operation request of a user, a WEB application program generates a link tracking identifier and invokes at least one business service layer, wherein the WEB application program carries login information;
after at least one business service layer is called, the WEB application program sends the link tracking identification and 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 a structured query language sentence after receiving the link tracking identification and login information, and an interceptor of the business service layer splices the link tracking identification and login information into an annotation part of the structured query language sentence;
a binary log file in a database management system records the structured query language statement, the value of the data before the structured query language statement is operated, and the value of the data after the structured query language statement is operated;
the interceptor of the business service layer splicing the link tracking identifier and the login information into the comment part of the structured query language statement comprises:
the interceptor generates the annotation portion of the structured query language statement from the link tracking identification and login information from the WEB application and splices the annotation portion to the original structured query language statement.
2. The method according to claim 1, wherein the method further comprises:
reading the binary log file to obtain first operation log information;
and after the binary log file is analyzed, asynchronously caching the first operation log information.
3. The method according to claim 2, wherein the method further comprises:
subscribing the first operation log information of the asynchronous cache, and assembling the first operation log information into second operation log information;
and storing the second operation log information to a search engine.
4. A method according to claim 3, characterized in that the method further comprises:
when a triggering operation of inquiring the second operation log information by the search engine is received;
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: operator, operation time, object of operation, pre-operation data, post-operation data, global link tracking identification.
6. An apparatus for recording an operation log, 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 sending and executing module is used for sending the link tracking identification and login information to at least one business service layer after calling the at least one business service layer, executing the logic code of the operation request of the user and assembling a structured query language sentence after the at least one business service layer receives the link tracking identification and login information, and splicing the link tracking identification and login information into an annotation part of the structured query language sentence by an interceptor of the business service layer;
and 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 structured query language statement is operated, and the value of the data after the structured query language statement is operated;
the interceptor is specifically configured to generate an annotation portion of the structured query language statement from the link tracking identifier and the login information from the WEB application, and splice the annotation portion to the original structured query language statement.
7. The apparatus of claim 6, wherein the apparatus further comprises:
and a reading module: the method comprises the steps of reading the binary log file to obtain first operation log information;
and an analysis module: and after the binary log file is analyzed, the first operation log information is asynchronously cached.
8. The apparatus of claim 7, wherein the apparatus further comprises:
a subscription module: the method comprises the steps of subscribing to first operation log information of the asynchronous cache, and assembling the first operation log information into second operation log information;
and a storage module: for storing the second oplog information to a search engine.
9. An electronic device, comprising: a processor and a memory;
the processor is adapted to perform the steps of the method according to any one of claims 1 to 5 by invoking a program or instruction stored in the memory.
10. A computer readable storage medium storing a program or instructions for causing a computer to perform 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 CN111241125A (en) 2020-06-05
CN111241125B true 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)

Families Citing this family (8)

* 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
CN112491617B (en) * 2020-11-27 2023-06-09 深圳乐信软件技术有限公司 Link tracking method, device, electronic equipment and medium
CN113626423B (en) * 2021-06-29 2024-01-30 欧电云信息科技(江苏)有限公司 Log management method, device and system of business database
CN113885958B (en) * 2021-09-30 2023-10-31 杭州默安科技有限公司 Method and system for intercepting dirty data
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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647794A (en) * 2013-12-31 2014-03-19 北京启明星辰信息安全技术有限公司 Data correlation method based on J2EE platform and correlation plug-in
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

Family Cites Families (12)

* 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
US8578487B2 (en) * 2010-11-04 2013-11-05 Cylance Inc. System and method for internet security
US20120173490A1 (en) * 2010-12-30 2012-07-05 Verisign, Inc. Method and system for implementing business logic
IL214977A0 (en) * 2011-09-05 2012-02-29 Univ Ben Gurion Tracking end-users in web databases
CN105512284A (en) * 2015-12-07 2016-04-20 上海爱数信息技术股份有限公司 MySQL data protection method based on affair form data and binlog file
CN107122290B (en) * 2016-02-25 2020-06-09 阿里巴巴集团控股有限公司 Method and device for recording log information
CN105912455B (en) * 2016-04-27 2018-11-02 努比亚技术有限公司 Business executes method and server
CN108228628B (en) * 2016-12-15 2020-11-17 亿度慧达教育科技(北京)有限公司 Wide table generation method and device in structured query language database
CN107480009A (en) * 2017-08-18 2017-12-15 北京中电普华信息技术有限公司 A kind of transaction recovery method and device
CN110222028B (en) * 2019-04-30 2022-11-15 重庆小雨点小额贷款有限公司 Data management method, device, equipment and storage medium
CN110245035A (en) * 2019-05-20 2019-09-17 平安普惠企业管理有限公司 A kind of link trace method and device
CN110321273B (en) * 2019-07-09 2023-10-03 政采云有限公司 Service statistics method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647794A (en) * 2013-12-31 2014-03-19 北京启明星辰信息安全技术有限公司 Data correlation method based on J2EE platform and correlation plug-in
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

Non-Patent Citations (4)

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

Also Published As

Publication number Publication date
CN111241125A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN111241125B (en) Method and device for recording operation log, electronic equipment and storage medium
US8495484B2 (en) Intelligent link population and recommendation
US8005806B2 (en) System and method for information retrieval using context information
US10394925B2 (en) Automating web tasks based on web browsing histories and user actions
EP3273362A1 (en) Webpage access method, apparatus, device and non-volatile computer storage medium
US20080115086A1 (en) System and method for recognizing and storing information and associated context
US20120331372A1 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
KR102550540B1 (en) Landing page processing method, device, equipment and medium
US10284660B1 (en) Data flow tokens to trace execution of services in a service provider network
CN110489315B (en) Operation request tracking method, operation request tracking device and server
CN111046041B (en) Data processing method and device, storage medium and processor
US11500652B2 (en) Method and system for application loading
CN115329170A (en) Webpage crawling method, device, equipment and storage medium
CN110825594A (en) Data reporting and issuing method, client and server
CN112800410A (en) Multi-product login management method, device, equipment and storage medium
CN108959294B (en) Method and device for accessing search engine
CN113098854A (en) Task arranging method, system, storage medium and electronic equipment
CN116028479A (en) Data reconciliation system, method, equipment and storage medium
US10268536B2 (en) Secure debugging with an encrypted token
US10212116B2 (en) Intelligently condensing transcript thread history into a single common reduced instance
CN104391956B (en) The detection method and device of network upgrade content
CN114461909A (en) Information processing method, information processing apparatus, electronic device, and storage medium
CN108491448B (en) Data pushing method and device
US20130290830A1 (en) System and method for managing a viewstate of a web application
CN116610529A (en) Buried point data acquisition method and device, electronic equipment and storage medium

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