CN112416710A - User operation recording method and device, electronic equipment and storage medium - Google Patents

User operation recording method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112416710A
CN112416710A CN202011307605.7A CN202011307605A CN112416710A CN 112416710 A CN112416710 A CN 112416710A CN 202011307605 A CN202011307605 A CN 202011307605A CN 112416710 A CN112416710 A CN 112416710A
Authority
CN
China
Prior art keywords
user operation
modified
sql statement
operation record
field
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.)
Pending
Application number
CN202011307605.7A
Other languages
Chinese (zh)
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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202011307605.7A priority Critical patent/CN112416710A/en
Publication of CN112416710A publication Critical patent/CN112416710A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Landscapes

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

Abstract

The embodiment of the invention relates to a recording method and a recording device for user operation, electronic equipment and a storage medium, wherein the recording method comprises the following steps: enabling a binlog log of a service database, and monitoring the binlog log; when the binlog log is monitored to be triggered, acquiring the latest written SQL statement in the binlog log; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log; and generating a user operation record based on the obtained SQL statement. Therefore, user operation can be recorded, and compared with the prior art that user operation is monitored in a point embedding mode, the method can avoid embedding point embedding codes into original service codes and has high expansibility.

Description

User operation recording method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a recording method and device for user operation, electronic equipment and a storage medium.
Background
Currently, a buried point code can be manually added to each service function requiring monitoring of user operation in a hard coding manner to monitor and collect user operation.
However, this method requires embedding a point code in the original service code, which reduces the readability of the original service code, increases the complexity of the original service code, and requires manually adding the point code when a new monitoring point is required, and thus, the method has no expansibility.
Disclosure of Invention
In view of the above, to solve the technical problems or some technical problems, embodiments of the present invention provide a recording method and apparatus for user operation, an electronic device, and a storage medium.
In a first aspect, an embodiment of the present invention provides a method for recording a user operation, including:
enabling a binlog log of a service database, and monitoring the binlog log;
when the binlog log is monitored to be triggered, acquiring the latest written SQL statement in the binlog log; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log;
and generating a user operation record based on the obtained SQL statement.
In one possible embodiment, the method further comprises:
after receiving a user operation and before modifying the business database based on the user operation, determining a field to be modified in the business database based on the user operation, and acquiring a current field value of the field to be modified;
the generating of the user operation record based on the obtained SQL statement includes:
and generating a user operation record based on the obtained SQL statement and the current field value of the field to be modified.
In a possible implementation manner, the generating a user operation record based on the obtained SQL statement and the current field value of the field to be modified includes:
acquiring the field value of the modified field to be modified based on the SQL statement;
determining a target user operation record template matched with the field to be modified from a plurality of preset user operation record templates;
and writing the current field value and the modified field value of the field to be modified into the target user operation record template to obtain a user operation record.
In one possible embodiment, the method further comprises:
storing the obtained SQL sentences into a production buffer area;
the generating of the user operation record based on the obtained SQL statement includes:
and calling a setting interface to acquire the SQL statement from the production buffer, and generating a user operation record based on the acquired SQL statement.
In one possible embodiment, the method further comprises:
and storing the user operation record into an Elasticissearch database for a plurality of users to view.
In a second aspect, an embodiment of the present invention provides a recording apparatus operated by a user, including:
the starting module is used for starting a binlog log of the business database and monitoring the binlog log;
the first acquisition module is used for acquiring the latest written SQL statement in the binlog log when the binlog log is monitored to be triggered; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log;
and the generating module is used for generating a user operation record based on the obtained SQL statement.
In one possible embodiment, the method further comprises:
the second obtaining module is used for determining a field to be modified in the business database based on the user operation after the user operation is received and before the business database is modified based on the user operation, and obtaining the current field value of the field to be modified;
the generation module generates a user operation record based on the obtained SQL statement, and specifically is used for:
and generating a user operation record based on the obtained SQL statement and the current field value of the field to be modified.
In a possible implementation manner, the generating module generates a user operation record based on the obtained SQL statement and the current field value of the field to be modified, including:
acquiring the field value of the modified field to be modified based on the SQL statement;
determining a target user operation record template matched with the field to be modified from a plurality of preset user operation record templates;
and writing the current field value and the modified field value of the field to be modified into the target user operation record template to obtain a user operation record.
In one possible embodiment, the method further comprises:
the production module is used for storing the obtained SQL sentences into a production buffer area;
the generation module generates a user operation record based on the obtained SQL statement, and the generation module comprises the following steps:
and calling a setting interface to acquire the SQL statement from the production buffer, and generating a user operation record based on the acquired SQL statement.
In one possible embodiment, the method further comprises:
and the storage module is used for storing the user operation records into an Elasticissearch database for being checked by a plurality of users.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory, wherein the processor is configured to execute a recording program of a user operation stored in the memory to implement the recording method of a user operation according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the recording method for a user operation according to any one of the first aspect.
According to the technical scheme provided by the embodiment of the invention, the binlog log of the business database is started and monitored, when the binlog log is triggered, the latest written SQL statement in the binlog log is obtained, and the user operation record is generated based on the obtained SQL statement.
Drawings
Fig. 1 is a flowchart illustrating an implementation of a recording method for user operation according to an embodiment of the present invention;
fig. 2 is a flowchart of another implementation of a recording method performed by a user according to an embodiment of the present invention;
FIG. 3 is a block diagram of an embodiment of a recording apparatus operated by a user according to the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following further explains the recording method of user operation provided by the present invention with specific embodiments in conjunction with the drawings, and the embodiments do not limit the embodiments of the present invention.
Referring to fig. 1, a flowchart of an implementation of a recording method for user operation according to an embodiment of the present invention is shown in fig. 1, where the method may include the following steps:
step 101, starting a binlog log file of the service database, and monitoring the binlog log file.
binlog is a binary log of the MySQL database and is used for recording SQL statements, such as insert statements, update statements, delete statements, and the like, except query statements operating on the MySQL database. Presently, the binlog log of the MySQL database is not enabled by default, so in this step 101, the binlog log of the traffic database may be enabled first.
In the application, as an optional implementation manner, the following three rows of contents may be added to the my.inf master configuration file of the service database by a user, and then the service database is restarted, and in the process of restarting the service database, a binlog log may be started according to the my.inf master configuration file of the service database.
Log _ bin ON/open bin log
Log _ bin _ baseline ═ var/lib/mysql/mysql-bin// set the base filename of the binlog log
log _ bin _ index ═ var/lib/mysql/mysql-bin index// index file specifying binlog file
It should be noted that the above is only one implementation manner of enabling the binlog log of the service database, and other manners may also exist in practical applications, and the present invention is not limited to this.
Further, after the binlog log of the traffic database is enabled, the binlog log may be snooped. As an alternative implementation, the binlog log may be snooped by canal middleware.
102, when it is monitored that the binlog log is triggered, acquiring the latest written SQL statement in the binlog log; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log.
In the embodiment of the present invention, triggering the binlog means writing a new SQL statement in the binlog log, and based on this, in this step 102, when it is monitored that the binlog is triggered, the latest written SQL statement in the binlog is obtained. The following description is given in connection with the practical application of the procedure for writing SQL statements in binlog logs:
in the application, when a user performs an operation, the modification of the service database is usually involved, for example, the user changes the activity audit state of a certain activity from to be audited to be on-line, and then the activity audit state of the activity is modified to be on-line in a related service table of the service database; for another example, if the user changes the stock of a certain product from 100 to 0, then in the relevant service table of the service database, the stock of the product is changed to 0; for another example, if a user adds a commodity in a shopping cart, a record of the commodity will be added to the relevant service table of the service database. Further, when the business database is modified, the SQL statements corresponding to the modification operations are written into the binlog log of the business database. In other words, when the business database is modified based on a user operation, the binlog log is triggered and the SQL statement corresponding to the user operation is written into the binlog log.
And 103, generating a user operation record based on the obtained SQL statement.
As can be seen from the above description in step 102, since the binlog log has written therein the SQL statements corresponding to the user operations, in this step 103, the user operation records can be generated based on the obtained SQL statements.
For example, if the obtained SQL statement indicates that the activity audit state of a certain activity is modified to be online, a user operation record indicating that the activity audit state of the activity is modified to be online by the user may be generated based on the SQL statement; for another example, if the obtained SQL statement indicates that the stock of a certain product is modified to 0, a user operation record indicating that the user modifies the stock of the certain product to 0 may be generated based on the SQL statement; for another example, assuming that the obtained SQL statement represents a record of adding a new item, a user operation record indicating that the user adds an item of item in the shopping cart may be generated based on the SQL statement.
How to generate the user operation record based on the obtained SQL statement will be described below, and will not be described in detail here.
According to the technical scheme provided by the embodiment of the invention, the binlog log of the business database is started and monitored, when the binlog log is triggered, the latest written SQL statement in the binlog log is obtained, and the user operation record is generated based on the obtained SQL statement.
As can be seen from the description of step 103 in the embodiment shown in fig. 1, a value after a certain service parameter is changed can be intuitively known from a user operation record generated based on an obtained SQL statement, for example, a value after an activity audit state of a certain activity is changed is an upper line, however, in practical applications, there is a scenario in which multiple users manage service information together, and in this scenario, there is a high possibility that different users modify the same service parameter in sequence, and in this scenario, if a change condition of a certain service parameter can be intuitively known, the work efficiency of a user can be certainly improved, and the communication cost between different users is reduced, and accordingly, the following embodiments are proposed:
according to one embodiment, after a user operation is received and before the business database is modified based on the user operation, a field to be modified in the business database is determined based on the user operation, a current field value of the field to be modified is obtained, and then a user operation record is generated based on the obtained SQL statement and the current field value of the field to be modified. It can be understood that the above-described current field value is a value of a field to be modified before the field to be modified is modified based on a user operation, and the SQL statement may include a value of a field to be modified after the field to be modified is modified based on the user operation, so that a user operation record generated based on the obtained SQL statement and the current field value of the field to be modified may reflect a change situation of the field to be modified.
For example, assuming that the user operation is to change the activity audit state of a certain activity to be online, it can be understood that, in this case, the activity audit state is a field to be modified, and the current field value of the field to be modified is assumed to be audited, then through the process described in the foregoing embodiment, the generated user operation record may be represented as that the activity audit state of a certain activity is changed from being audited to being online.
Therefore, the embodiment generates the user operation record based on the obtained SQL statement and the current field value of the field to be modified, so that the user operation record can reflect the change situation of the field to be modified, especially in a scene where multiple users manage service information together, the working efficiency of the users can be greatly improved, and the communication cost among different users can be reduced.
The following describes how to generate a user operation record based on the obtained SQL statement and the current field value of the field to be modified:
as an embodiment, service parameters may be configured in advance, and a user operation record template corresponding to each service parameter may be configured, for example, service parameters such as an activity audit state, an inventory state, an activity start-stop state, and the like are configured, where the user operation record template corresponding to the activity audit state is: the activity audit state of the activity is changed from the activity audit state to the activity audit state, and the user operation record template corresponding to the stock is as follows: the stock is changed from the original to the original, and the user operation recording template corresponding to the activity start-stop state is as follows: and changing the activity start-stop state of the activity from the state of the activity. Accordingly, in this embodiment, the target user operation record template matching the field to be modified may be determined from a plurality of preset user operation record templates, and the current field value and the modified field value of the field to be modified are written into the target user operation record template, so as to obtain the user operation record.
Optionally, the field to be modified may be consistent with the service parameter, and based on this, the target user operation record template matched with the field to be modified may be directly determined from a plurality of preset user operation record templates.
Optionally, the field to be modified may also be inconsistent with the service parameter, for example, the service parameter of the active audit state may correspond to two field names, which are state and actStatus, based on which, the field to be modified may be mapped to the configured service parameter according to the set mapping rule, then the user operation record template corresponding to the mapped service parameter is determined from the preset multiple user operation record templates, and the user operation record template is determined to be the target user operation record template matched with the field to be modified.
Optionally, the configuration of the service parameters and the user operation record template may be performed in the ducc memory configuration system.
Referring to fig. 2, a flowchart of another implementation of a recording method for user operation according to an embodiment of the present invention is shown in fig. 2, where the method may include the following steps:
step 201, starting a binlog log of the service database, and monitoring the binlog log.
Step 202, when it is monitored that the binlog log is triggered, acquiring the latest written SQL statement in the binlog log.
The detailed description of step 201 to step 202 can refer to the description in the embodiment shown in fig. 1, and is not repeated here.
And step 203, storing the obtained SQL statement into a production buffer area.
And 204, calling a setting interface to acquire the SQL statement from the production buffer, and generating a user operation record based on the acquired SQL statement.
As can be seen from step 202 and step 204, in the embodiment of the present invention, the producer-consumer mode may be adopted to implement concurrent execution of acquiring the SQL statement and generating the user operation record based on the SQL statement, and it can be understood that the processing may reduce the coupling degree between the two steps of acquiring the SQL statement and generating the user operation record based on the SQL statement, and simultaneously, in a scenario where the user operation is frequent, may support concurrent generation of multiple user operation records, and improve efficiency.
And step 205, storing the user operation records into an Elasticissearch database for a plurality of users to view.
The elastic search is a search server based on Lucene, provides a distributed full-text search engine with multi-user capability, and can meet the requirements of real-time search, stability, reliability, rapidness and the like in cloud computing, so that as an embodiment, user operation records are stored in an elastic search database to be checked by a plurality of users.
Corresponding to the embodiment of the recording method operated by the user, the invention also provides an embodiment of a recording device operated by the user.
Referring to fig. 3, a block diagram of an embodiment of a recording apparatus operated by a user according to an embodiment of the present invention is shown. As shown in fig. 3, the apparatus includes: an enabling module 31, a first obtaining module 32 and a generating module 33.
The enabling module 31 is configured to enable a binlog log of the service database, and monitor the binlog log;
a first obtaining module 32, configured to obtain a latest written SQL statement in the binlog log when it is monitored that the binlog log is triggered; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log;
and the generating module 33 is configured to generate a user operation record based on the obtained SQL statement.
In a possible embodiment, it also comprises (not shown in fig. 3):
the second obtaining module is used for determining a field to be modified in the business database based on the user operation after the user operation is received and before the business database is modified based on the user operation, and obtaining the current field value of the field to be modified;
the generating module 33 generates a user operation record based on the obtained SQL statement, specifically for:
and generating a user operation record based on the obtained SQL statement and the current field value of the field to be modified.
In a possible implementation manner, the generating module 33 generates a user operation record based on the obtained SQL statement and the current field value of the field to be modified, including:
acquiring the field value of the modified field to be modified based on the SQL statement;
determining a target user operation record template matched with the field to be modified from a plurality of preset user operation record templates;
and writing the current field value and the modified field value of the field to be modified into the target user operation record template to obtain a user operation record.
In a possible embodiment, it also comprises (not shown in fig. 3):
the production module is used for storing the obtained SQL sentences into a production buffer area;
the generating module 33 generates a user operation record based on the obtained SQL statement, including:
and calling a setting interface to acquire the SQL statement from the production buffer, and generating a user operation record based on the acquired SQL statement.
In one possible embodiment, the method further comprises:
and the storage module is used for storing the user operation records into an Elasticissearch database for being checked by a plurality of users.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 400 shown in fig. 4 includes: at least one processor 401, memory 402, at least one network interface 404, and other user interfaces 403. The various components in the electronic device 400 are coupled together by a bus system 405. It is understood that the bus system 405 is used to enable connection communication between these components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 404 in FIG. 4.
The user interface 403 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that memory 402 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 402 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 4021 and application programs 4022.
The operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application 4022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 4022.
In this embodiment of the present invention, by calling a program or an instruction stored in the memory 402, specifically, a program or an instruction stored in the application 4022, the processor 401 is configured to execute the method steps provided by the method embodiments, for example, including:
enabling a binlog log of a service database, and monitoring the binlog log;
when the binlog log is monitored to be triggered, acquiring the latest written SQL statement in the binlog log; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log;
and generating a user operation record based on the obtained SQL statement.
The method disclosed in the above embodiments of the present invention may be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 401. The processor 401 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be the electronic device shown in fig. 4, and may execute all steps of the recording method of the user operation shown in fig. 1-2, so as to achieve the technical effect of the recording method of the user operation shown in fig. 1-2.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the recording method of the user operation performed on the electronic device side as described above is realized.
The processor is used for executing the recording program of the user operation stored in the memory so as to realize the following steps of the recording method of the user operation executed on the electronic equipment side:
enabling a binlog log of a service database, and monitoring the binlog log;
when the binlog log is monitored to be triggered, acquiring the latest written SQL statement in the binlog log; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log;
and generating a user operation record based on the obtained SQL statement.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (12)

1. A recording method of a user operation, comprising:
enabling a binlog log of a service database, and monitoring the binlog log;
when the binlog log is monitored to be triggered, acquiring the latest written SQL statement in the binlog log; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log;
and generating a user operation record based on the obtained SQL statement.
2. The method of claim 1, further comprising:
after receiving a user operation and before modifying the business database based on the user operation, determining a field to be modified in the business database based on the user operation, and acquiring a current field value of the field to be modified;
the generating of the user operation record based on the obtained SQL statement includes:
and generating a user operation record based on the obtained SQL statement and the current field value of the field to be modified.
3. The method according to claim 2, wherein the generating a user operation record based on the obtained SQL statement and the current field value of the field to be modified comprises:
acquiring the field value of the modified field to be modified based on the SQL statement;
determining a target user operation record template matched with the field to be modified from a plurality of preset user operation record templates;
and writing the current field value and the modified field value of the field to be modified into the target user operation record template to obtain a user operation record.
4. The method of claim 1, further comprising:
storing the obtained SQL sentences into a production buffer area;
the generating of the user operation record based on the obtained SQL statement includes:
and calling a setting interface to acquire the SQL statement from the production buffer, and generating a user operation record based on the acquired SQL statement.
5. The method of claim 1, further comprising:
and storing the user operation record into an Elasticissearch database for a plurality of users to view.
6. A user-operated recording apparatus, comprising:
the starting module is used for starting a binlog log of the business database and monitoring the binlog log;
the first acquisition module is used for acquiring the latest written SQL statement in the binlog log when the binlog log is monitored to be triggered; when the business database is modified based on user operation, the binlog log is triggered and SQL sentences corresponding to the user operation are written into the binlog log;
and the generating module is used for generating a user operation record based on the obtained SQL statement.
7. The apparatus of claim 6, further comprising:
the second obtaining module is used for determining a field to be modified in the business database based on the user operation after the user operation is received and before the business database is modified based on the user operation, and obtaining the current field value of the field to be modified;
the generation module generates a user operation record based on the obtained SQL statement, and specifically is used for:
and generating a user operation record based on the obtained SQL statement and the current field value of the field to be modified.
8. The apparatus according to claim 7, wherein the generating module generates a user operation record based on the obtained SQL statement and a current field value of the field to be modified, and includes:
acquiring the field value of the modified field to be modified based on the SQL statement;
determining a target user operation record template matched with the field to be modified from a plurality of preset user operation record templates;
and writing the current field value and the modified field value of the field to be modified into the target user operation record template to obtain a user operation record.
9. The apparatus of claim 6, further comprising:
the production module is used for storing the obtained SQL sentences into a production buffer area;
the generation module generates a user operation record based on the obtained SQL statement, and the generation module comprises the following steps:
and calling a setting interface to acquire the SQL statement from the production buffer, and generating a user operation record based on the acquired SQL statement.
10. The apparatus of claim 6, further comprising:
and the storage module is used for storing the user operation records into an Elasticissearch database for being checked by a plurality of users.
11. An electronic device, comprising: a processor and a memory, the processor being configured to execute a recording program of a user operation stored in the memory to implement the recording method of a user operation according to any one of claims 1 to 5.
12. A storage medium storing one or more programs executable by one or more processors to implement the user-operated recording method of any one of claims 1 to 5.
CN202011307605.7A 2020-11-19 2020-11-19 User operation recording method and device, electronic equipment and storage medium Pending CN112416710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011307605.7A CN112416710A (en) 2020-11-19 2020-11-19 User operation recording method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011307605.7A CN112416710A (en) 2020-11-19 2020-11-19 User operation recording method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112416710A true CN112416710A (en) 2021-02-26

Family

ID=74773062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011307605.7A Pending CN112416710A (en) 2020-11-19 2020-11-19 User operation recording method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112416710A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190408A (en) * 2021-05-07 2021-07-30 北京金融资产交易所有限公司 Data operation and maintenance system
CN113836579A (en) * 2021-09-26 2021-12-24 多点生活(成都)科技有限公司 Data processing method and device, electronic equipment and storage medium
CN114970479A (en) * 2022-07-29 2022-08-30 飞狐信息技术(天津)有限公司 Chart generation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176887A (en) * 2018-11-09 2020-05-19 上海擎感智能科技有限公司 MySQL misoperation rollback method, equipment and system
CN111241125A (en) * 2020-01-08 2020-06-05 成都嗨学洛子教育科技有限公司 Method and device for recording operation log, electronic equipment and storage medium
WO2020147392A1 (en) * 2019-01-16 2020-07-23 平安科技(深圳)有限公司 Method and system for data synchronization between databases
CN111597257A (en) * 2020-05-09 2020-08-28 远光软件股份有限公司 Database synchronization method and device, storage medium and terminal
CN111625552A (en) * 2020-05-20 2020-09-04 北京百度网讯科技有限公司 Data collection method, device, equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176887A (en) * 2018-11-09 2020-05-19 上海擎感智能科技有限公司 MySQL misoperation rollback method, equipment and system
WO2020147392A1 (en) * 2019-01-16 2020-07-23 平安科技(深圳)有限公司 Method and system for data synchronization between databases
CN111241125A (en) * 2020-01-08 2020-06-05 成都嗨学洛子教育科技有限公司 Method and device for recording operation log, electronic equipment and storage medium
CN111597257A (en) * 2020-05-09 2020-08-28 远光软件股份有限公司 Database synchronization method and device, storage medium and terminal
CN111625552A (en) * 2020-05-20 2020-09-04 北京百度网讯科技有限公司 Data collection method, device, equipment and readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190408A (en) * 2021-05-07 2021-07-30 北京金融资产交易所有限公司 Data operation and maintenance system
CN113190408B (en) * 2021-05-07 2024-03-26 北京金融资产交易所有限公司 Data operation and maintenance system
CN113836579A (en) * 2021-09-26 2021-12-24 多点生活(成都)科技有限公司 Data processing method and device, electronic equipment and storage medium
CN113836579B (en) * 2021-09-26 2024-04-09 多点生活(成都)科技有限公司 Data processing method and device, electronic equipment and storage medium
CN114970479A (en) * 2022-07-29 2022-08-30 飞狐信息技术(天津)有限公司 Chart generation method and device

Similar Documents

Publication Publication Date Title
CN107463635B (en) Method for inquiring picture data and distributed NewSQL database system
CN112416710A (en) User operation recording method and device, electronic equipment and storage medium
CN107710202B (en) Cloud-native documents integrated with legacy tools
US11501317B2 (en) Methods, apparatuses, and devices for generating digital document of title
CN107710189B (en) Multimodal sharing of content between documents
CN109284066B (en) Data processing method, device, equipment and system
CN112527414B (en) Front-end-based data processing method, device, equipment and storage medium
US20140136578A1 (en) Techniques to manage virtual files
US10021187B2 (en) Presenting content using decoupled presentation resources
CN111639087B (en) Data updating method and device in database and electronic equipment
WO2008137296A1 (en) Distributed search in a casual network of servers
CN116414935A (en) Method for distributed Search space vector data based on Elastic Search
CN113076086B (en) Metadata management system and method for modeling model object using the same
CN109977317B (en) Data query method and device
CN114331745A (en) Data processing method, system, program product, medium, and electronic device
CN113687920A (en) Object strategy operation method, device and equipment of distributed system
US20070156775A1 (en) Metadata transformation in copy and paste scenarios between heterogeneous applications
CN111881220A (en) Data operation method and device under list storage, electronic equipment and storage medium
JP6688433B2 (en) Computer system
CN111221817B (en) Service information data storage method, device, computer equipment and storage medium
CN116450682B (en) Model generation method, device, equipment and medium based on data combination
CN111414162B (en) Data processing method, device and equipment thereof
US11301498B2 (en) Multi-cloud object store access
CN115757881A (en) Graph database updating method, graph database updating device, associated network back end and storage medium
WO2017007511A1 (en) Data management using index change events

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd