A method and device for auditing user operations in clinical research, and a computer device
By using a combination of Skywalking, ClickHouse, and MySQL databases, the difficulties and high costs of data collection at the data operation level in clinical research were solved, enabling efficient data storage and retrieval for operational audits.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies for collecting operational information at the data manipulation level in clinical research suffer from difficulties in integrating auditing functions, high costs, and slow development efficiency.
The Skywalking data acquisition tool and custom plugins are used to collect Spring MVC interface data, which is stored in the ClickHouse database. Messages are subscribed to and distributed through the Kafka message queue, and operation audit data is generated and stored in the MySQL database. Audit data can be queried by user ID or time period.
It simplifies the access process for operation auditing, reduces costs, improves development efficiency, and ensures data integrity and ease of querying.
Smart Images

Figure CN117033482B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of clinical research trial technology, and in particular to a user operation auditing method and apparatus, and computer equipment in clinical research. Background Technology
[0002] In the field of clinical research trials, there are strict requirements for the validity of data. Operations such as data creation, deletion, and modification require an auditing system to record which data was manipulated and what specific operations were performed. Current technology involves manually writing code to collect operation information at the data operation level and synchronizing this information to a MySQL database. User perception relies on these code-based tracking points, making it highly susceptible to bugs that can lead to the loss of audit data when business changes occur. Furthermore, because business services are built on microservices and distributed across different nodes, the complex call chains present challenges such as difficulty in integrating auditing functionality, high costs, and slow development efficiency.
[0003] Currently, there is no effective solution to the problems of difficulty in accessing and auditing functions, high cost, and slow development efficiency in collecting operational information at the data operation level using related technologies. Summary of the Invention
[0004] The purpose of this application is to address the shortcomings of existing technologies by providing a user operation auditing method, apparatus, and computer equipment for clinical research, so as to at least solve the problems of difficulty in access auditing functions, high cost, and slow development efficiency in the data operation level data collection and operation information collection.
[0005] To achieve the above objectives, the technical solution adopted in this application is as follows:
[0006] In a first aspect, embodiments of this application provide a method for auditing user operations in clinical research, including:
[0007] Use the java-agent command to add the Skywalking data collection tool and custom plugin to collect Spring MVC interface data, where the interface data includes business data and operational behavior data;
[0008] The operation behavior data is stored in the ClickHouse database;
[0009] The operation behavior data is extracted from the ClickHouse database according to the preset data extraction rules, and operation audit data is generated based on the operation behavior data;
[0010] The audit data of the operation is stored in a MySQL database.
[0011] In some embodiments, storing the operation behavior data in the ClickHouse database includes:
[0012] Configure the kafka-reporter-plugin to send the data from the interface to the Kafka message queue;
[0013] The broadcast message mode of the Kafka message queue is used for message subscription, and the subscription messages for business data and the subscription messages for operation behavior data are separated.
[0014] After receiving the operation behavior data, the subscribers store the operation behavior data in the ClickHouse database.
[0015] In some embodiments, after storing the operation audit data in a MySQL database, the method further includes:
[0016] Receive an operation audit data query request, wherein the operation audit data query request carries the user identifier to be queried;
[0017] In response to the operation audit data query request, the operation audit data corresponding to the user identifier is retrieved from the MySQL database.
[0018] The page displays the operation audit data corresponding to the user identifier.
[0019] In some embodiments, after storing the operation audit data in a MySQL database, the method further includes:
[0020] Receive an operation audit data query request, wherein the operation audit data query request carries the time period to be queried;
[0021] In response to the operation audit data query request, the operation audit data for the time period to be queried is retrieved from the MySQL database.
[0022] The page displays the operation audit data for the time period to be queried.
[0023] Secondly, embodiments of this application provide a user operation auditing device for clinical research, comprising:
[0024] The data collection unit is used to add the Skywalking data collection tool and custom plugins using the java-agent command to collect Spring MVC interface data, wherein the interface data includes business data and operational behavior data;
[0025] The first storage unit is used to store the operation behavior data into the ClickHouse database;
[0026] The extraction unit is used to extract the operation behavior data from the ClickHouse database according to preset data extraction rules, and generate operation audit data based on the operation behavior data;
[0027] The second storage unit is used to store the operation audit data in a MySQL database.
[0028] In some embodiments, the first storage unit includes:
[0029] The sending module is used to configure the kafka-reporter-plugin to send the interface data to the Kafka message queue.
[0030] The splitting module is used to subscribe to messages using the broadcast message mode of the Kafka message queue, and to split the subscription messages of the business data and the subscription messages of the operation behavior data.
[0031] The storage module is used by subscribers of the operation behavior data to store the operation behavior data in the ClickHouse database after receiving the operation behavior data.
[0032] In some embodiments, it also includes:
[0033] The first receiving unit is configured to receive an operation audit data query request after the operation audit data is stored in the MySQL database, wherein the operation audit data query request carries a user identifier to be queried;
[0034] The first query unit is used to respond to the operation audit data query request and query the operation audit data corresponding to the user identifier from the MySQL database.
[0035] The first display unit is used to display the operation audit data corresponding to the user identifier on the page.
[0036] In some embodiments, it also includes:
[0037] The second receiving unit is configured to receive an operation audit data query request after the operation audit data is stored in the MySQL database, wherein the operation audit data query request carries a time period to be queried;
[0038] The second query unit is used to respond to the operation audit data query request and query the operation audit data within the time period to be queried from the MySQL database.
[0039] The second display unit is used to display the operation audit data within the time period to be queried on the page.
[0040] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the user operation auditing method in clinical research as described in the first aspect above.
[0041] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a user operation auditing method in clinical research as described in the first aspect above.
[0042] This application adopts the above technical solution. Compared with the prior art, the user operation auditing method in clinical research provided by this application uses the java-agent command to add the Skywalking data collection tool and a custom plugin to collect Spring MVC interface data. The interface data includes business data and operation behavior data. The operation behavior data is stored in the ClickHouse database. The operation behavior data is extracted from the ClickHouse database according to preset data extraction rules, and operation audit data is generated based on the operation behavior data. The operation audit data is stored in the MySQL database. By utilizing Skywalking + ClickHouse + Kafka + MySQL + WEB technology, this method solves the problems of difficulty in accessing auditing functions, high cost, and slow development efficiency in data operation layer data collection and tracking of operation information. It achieves the technical effects of reducing the difficulty of operation auditing, reducing costs, and improving development efficiency.
[0043] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0044] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0045] Figure 1 This is a structural block diagram of a mobile terminal according to an embodiment of this application;
[0046] Figure 2 This is a flowchart of a user operation auditing method in clinical research according to an embodiment of this application;
[0047] Figure 3 This is a schematic diagram of the data collection and storage process according to a preferred embodiment of this application;
[0048] Figure 4 This is a schematic diagram of the audit data generation process according to a preferred embodiment of this application;
[0049] Figure 5 This is a schematic diagram illustrating the data viewing process of the audit service according to a preferred embodiment of this application;
[0050] Figure 6 This is a schematic diagram of a user operation auditing process based on APM technology according to a preferred embodiment of this application;
[0051] Figure 7 This is a structural block diagram of a user operation auditing device in a clinical study according to an embodiment of this application;
[0052] Figure 8 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0054] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0055] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0056] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0057] This embodiment provides a mobile terminal. Figure 1 This is a structural block diagram of a mobile terminal according to an embodiment of this application. For example... Figure 1 As shown, the mobile terminal includes: a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (WiFi) module 170, a processor 180, and a power supply 190, among other components. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0058] The following is combined Figure 1 A detailed introduction to each component of a mobile terminal:
[0059] RF circuit 110 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 180; additionally, it transmits uplink data to the base station. Typically, RF circuitry includes, but is not limited to, antennas, at least one amplifier, transceiver, coupler, low-noise amplifier (LNA), duplexer, etc. Furthermore, RF circuit 110 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0060] The memory 120 can be used to store software programs and modules. The processor 180 executes various functional applications and data processing of the mobile terminal by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile terminal (such as audio data, phone book, etc.). In addition, the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0061] The input unit 130 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 131), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 131 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch panel 131 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 131, the input unit 130 may also include other input devices 132. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0062] Display unit 140 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile terminal. Display unit 140 may include a display panel 141, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 141. Further, touch panel 131 may cover display panel 141. When touch panel 131 detects a touch operation on or near it, it transmits the information to processor 180 to determine the type of touch event. Subsequently, processor 180 provides corresponding visual output on display panel 141 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 131 and the display panel 141 are two separate components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 131 and the display panel 141 can be integrated to realize the input and output functions of the mobile terminal.
[0063] The mobile terminal may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 141 according to the ambient light level, and the proximity sensor can turn off the display panel 141 and / or backlight when the mobile terminal is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that identify the mobile terminal's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometers, taps), etc. Other sensors that may be configured in the mobile terminal, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0064] The speaker 161 and microphone 162 in the audio circuit 160 provide an audio interface between the user and the mobile terminal. The audio circuit 160 can convert the received audio data into electrical signals and transmit them to the speaker 161, where the speaker 161 converts them into sound signals for output. On the other hand, the microphone 162 converts the collected sound signals into electrical signals, which are received by the audio circuit 160, converted into audio data, and then output to the processor 180 for processing. After processing, the audio data is transmitted via the RF circuit 110 to, for example, another mobile terminal, or the audio data is output to the memory 120 for further processing.
[0065] WiFi is a short-range wireless transmission technology. Mobile terminals using a WiFi module 170 can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 170 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted or replaced with other short-range wireless transmission modules, such as Zigbee modules or WAPI modules, as needed without changing the nature of the invention.
[0066] The processor 180 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 120, and by calling data stored in the memory 120, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. Optionally, the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 180.
[0067] The mobile terminal also includes a power supply 190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 180 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0068] Although not shown, mobile terminals may also include cameras, Bluetooth modules, etc., which will not be elaborated here.
[0069] In this embodiment, the processor 180 is configured as follows:
[0070] Use the java-agent command to add the Skywalking data collection tool and custom plugin to collect Spring MVC interface data, where the interface data includes business data and operational behavior data;
[0071] The operation behavior data is stored in the ClickHouse database;
[0072] The operation behavior data is extracted from the ClickHouse database according to the preset data extraction rules, and operation audit data is generated based on the operation behavior data;
[0073] The audit data of the operation is stored in a MySQL database.
[0074] In some embodiments, the processor 180 is further configured to:
[0075] Configure the kafka-reporter-plugin to send the data from the interface to the Kafka message queue;
[0076] The broadcast message mode of the Kafka message queue is used for message subscription, and the subscription messages for business data and the subscription messages for operation behavior data are separated.
[0077] After receiving the operation behavior data, the subscribers store the operation behavior data in the ClickHouse database.
[0078] In some embodiments, the processor 180 is further configured to:
[0079] Receive an operation audit data query request, wherein the operation audit data query request carries the user identifier to be queried;
[0080] In response to the operation audit data query request, the operation audit data corresponding to the user identifier is retrieved from the MySQL database.
[0081] The page displays the operation audit data corresponding to the user identifier.
[0082] In some embodiments, the processor 180 is further configured to:
[0083] Receive an operation audit data query request, wherein the operation audit data query request carries the time period to be queried;
[0084] In response to the operation audit data query request, the operation audit data for the time period to be queried is retrieved from the MySQL database.
[0085] The page displays the operation audit data for the time period to be queried.
[0086] This embodiment provides a method for auditing user actions in clinical research. Figure 2 This is a flowchart of a user operation auditing method in clinical research according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0087] Step S201: Use the java-agent command to add the Skywalking data collection tool and custom plugin to collect Spring MVC interface data, wherein the interface data includes business data and operation behavior data;
[0088] Step S202: Store the operation behavior data in the ClickHouse database;
[0089] Step S203: Extract the operation behavior data from the ClickHouse database according to the preset data extraction rules, and generate operation audit data based on the operation behavior data;
[0090] Step S204: Store the operation audit data in a MySQL database.
[0091] In some embodiments, storing the operation behavior data in the ClickHouse database includes:
[0092] Configure the kafka-reporter-plugin to send the data from the interface to the Kafka message queue;
[0093] The broadcast message mode of the Kafka message queue is used for message subscription, and the subscription messages for business data and the subscription messages for operation behavior data are separated.
[0094] After receiving the operation behavior data, the subscribers store the operation behavior data in the ClickHouse database.
[0095] In some embodiments, after storing the operation audit data in a MySQL database, the method further includes:
[0096] Receive an operation audit data query request, wherein the operation audit data query request carries the user identifier to be queried;
[0097] In response to the operation audit data query request, the operation audit data corresponding to the user identifier is retrieved from the MySQL database.
[0098] The page displays the operation audit data corresponding to the user identifier.
[0099] In some embodiments, after storing the operation audit data in a MySQL database, the method further includes:
[0100] Receive an operation audit data query request, wherein the operation audit data query request carries the time period to be queried;
[0101] In response to the operation audit data query request, the operation audit data for the time period to be queried is retrieved from the MySQL database.
[0102] The page displays the operation audit data for the time period to be queried.
[0103] The above steps have solved the problems of difficulty, high cost, and slow development efficiency in integrating auditing functions.
[0104] The embodiments of this application will be described and illustrated below through preferred embodiments.
[0105] Figure 3 This is a schematic diagram of the data collection and storage process according to a preferred embodiment of this application, such as... Figure 3 As shown, the specific steps include: a user making a normal business operation request to start the program's backend service; JavaAgent collecting SpringMvc interface data and sending the data to Kafka; Kafka message queue receiving the data; message consumer determining the message type after receiving the Kafka message; if the message type is operation behavior data, then formatting the operation behavior data and storing it in the ClickHouse database.
[0106] Figure 4 This is a schematic diagram of the audit data generation process according to a preferred embodiment of this application, such as... Figure 4As shown, the specific steps include: when a timed task is detected, generating a timed task from audit data; querying the ClickHouse database to extract data according to rules; generating operation audit data; and saving the operation audit data to a MySQL database.
[0107] Figure 5 This is a schematic diagram illustrating the data viewing process of the audit service according to a preferred embodiment of this application, such as... Figure 5 As shown, this specifically includes: users querying data through the audit web page; the audit service querying the MySQL database and returning data based on conditions such as time and user ID; and displaying the data on the web page.
[0108] The preferred embodiment provides a user operation auditing solution based on APM technology, and the overall processing flow is as follows: Figure 6 As shown, the specific steps include: users making normal business operations by requesting application backend services; JavaAgent collecting SpringMvc interface data and sending it to Kafka; receiving Kafka messages, formatting and storing them; extracting operation data and generating audit records according to user-defined rules in the audit service; defining custom rules by specifying the URL path of the interface, and querying and extracting operation data through the URL specified by the rules; storing operation audit records in a MySQL database; and audit service users querying and displaying the audit data through a web platform.
[0109] This preferred embodiment may include the following steps during actual implementation:
[0110] Step 1. The application uses the java-agent command to add Skywalking's data acquisition tools and plugins.
[0111] Step 2. Use a custom auto-collection plugin to collect Spring MVC API data, including request parameters and return results.
[0112] Step 3. The kafka-reporter-plugin sends the collected data to the Kafka message queue.
[0113] Step 4. Subscribe to messages using Kafka's broadcast message pattern to separate the AMP data messages collected by Skywalking from the operation audit data messages.
[0114] Step 5. The Kafka message consumer formats the messages.
[0115] Step 6. The Kafka message consumer stores the records in the ClickHouse database.
[0116] Step 7. The audit log generation task is triggered periodically to generate operation audit logs based on dynamically customized rules.
[0117] Step 8. Store the audit logs in the MySQL database.
[0118] Step 9. Audit service operators select the user they need to view through the web page to perform the query.
[0119] Step 10. The audit service backend queries the MySQL database to retrieve audit records and returns them to the web page.
[0120] Step 11. Display the audit logs on the web page.
[0121] This preferred embodiment can solve the following technical problems:
[0122] 1. Implement auditing functions for operations such as adding, deleting, and modifying clinical trial data.
[0123] 2. Solve the problems of difficulty in embedding audit data and high labor costs.
[0124] 3. Resolve the issue of audit data loss caused by bugs resulting from business changes.
[0125] 4. It has the ability to trace back data operations that are not included in the audit scope.
[0126] This application embodiment utilizes Skywalking+ClickHouse+Kafka+MySQL+WEB technology to implement a user operation audit service that can transparently access data tracking and data upload collection, reducing application access costs. All interface data is stored in the ClickHouse database, providing data backtracking capabilities, and operation audit records can be conveniently and quickly queried through a WEB page.
[0127] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0128] This embodiment provides a user operation auditing device for clinical research. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0129] Figure 7This is a structural block diagram of a user operation auditing device in clinical research according to an embodiment of this application, such as... Figure 7 As shown, the device includes:
[0130] The data collection unit 71 is used to add the Skywalking data collection tool and custom plugins using the java-agent command to collect interface data of Spring MVC, wherein the interface data includes business data and operation behavior data;
[0131] The first storage unit 72 is used to store the operation behavior data into the ClickHouse database;
[0132] Extraction unit 73 is used to extract the operation behavior data from the ClickHouse database according to preset data extraction rules, and generate operation audit data based on the operation behavior data;
[0133] The second storage unit 74 is used to store the operation audit data in a MySQL database.
[0134] In some embodiments, the first storage unit 72 includes:
[0135] The sending module is used to configure the kafka-reporter-plugin to send the interface data to the Kafka message queue.
[0136] The splitting module is used to subscribe to messages using the broadcast message mode of the Kafka message queue, and to split the subscription messages of the business data and the subscription messages of the operation behavior data.
[0137] The storage module is used by subscribers of the operation behavior data to store the operation behavior data in the ClickHouse database after receiving the operation behavior data.
[0138] In some embodiments, it also includes:
[0139] The first receiving unit is configured to receive an operation audit data query request after the operation audit data is stored in the MySQL database, wherein the operation audit data query request carries a user identifier to be queried;
[0140] The first query unit is used to respond to the operation audit data query request and query the operation audit data corresponding to the user identifier from the MySQL database.
[0141] The first display unit is used to display the operation audit data corresponding to the user identifier on the page.
[0142] In some embodiments, it also includes:
[0143] The second receiving unit is configured to receive an operation audit data query request after the operation audit data is stored in the MySQL database, wherein the operation audit data query request carries a time period to be queried;
[0144] The second query unit is used to respond to the operation audit data query request and query the operation audit data within the time period to be queried from the MySQL database.
[0145] The second display unit is used to display the operation audit data within the time period to be queried on the page.
[0146] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0147] An embodiment provides a computer device. The user operation auditing method in clinical studies, in conjunction with this embodiment, can be implemented using a computer device. Figure 8 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application.
[0148] The computer device may include a processor 81 and a memory 82 storing computer program instructions.
[0149] Specifically, the processor 81 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0150] The memory 82 may include a mass storage device for data or instructions. For example, and not limitingly, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 82 may include removable or non-removable (or fixed) media. Where appropriate, the memory 82 may be internal or external to a data processing device. In a particular embodiment, the memory 82 is non-volatile memory. In a particular embodiment, the memory 82 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0151] The memory 82 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 81.
[0152] The processor 81 implements any of the user operation auditing methods in clinical research in the above embodiments by reading and executing computer program instructions stored in the memory 82.
[0153] In some embodiments, the computer device may further include a communication interface 83 and a bus 80. For example, Figure 8 As shown, the processor 81, memory 82, and communication interface 83 are connected through bus 80 and complete communication with each other.
[0154] The communication interface 83 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of this application. The communication interface 83 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0155] Bus 80 includes hardware, software, or both, that couples components of a computer device together. Bus 80 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0156] Furthermore, in conjunction with the user operation auditing method in clinical studies described in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the user operation auditing methods in clinical studies described in the above embodiments.
[0157] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0158] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for auditing user operations in a clinical study, the method comprising: The method comprises the steps of: adding a Skywalking data collection tool and a custom plug-in using a java-agent command to collect interface data of a spring mvc, wherein the interface data comprises business data and operation behavior data; configuring a kafka-reporter-plugin plug-in to send the interface data to a kafka message queue; subscribing to messages by using a broadcast message mode of the kafka message queue, and shunting a subscription message of the business data and a subscription message of the operation behavior data; storing the operation behavior data into a ClickHouse database by a subscriber of the operation behavior data after receiving the operation behavior data; extracting the operation behavior data from the ClickHouse database according to a preset data extraction rule, and generating operation audit data according to the operation behavior data; storing the operation audit data into a Mysql database; receiving an operation audit data query request, wherein the operation audit data query request carries a user identifier to be queried and / or a time period to be queried; querying the operation audit data corresponding to the user identifier and / or the operation audit data in the time period to be queried from the Mysql database in response to the operation audit data query request; displaying the operation audit data corresponding to the user identifier and / or the operation audit data in the time period to be queried in a page.
2. A user operation audit apparatus in a clinical study for executing the user operation audit method in a clinical study according to claim 1, characterized by, The method comprises the steps of: collecting interface data of a spring mvc using a java-agent command to add a Skywalking data collection tool and a custom plug-in, wherein the interface data comprises business data and operation behavior data; storing the operation behavior data into a ClickHouse database by a first storage unit; extracting the operation behavior data from the ClickHouse database according to a preset data extraction rule, and generating operation audit data according to the operation behavior data by an extraction unit; storing the operation audit data into a Mysql database by a second storage unit; receiving an operation audit data query request after storing the operation audit data into the Mysql database by a first receiving unit, wherein the operation audit data query request carries a user identifier to be queried; querying the operation audit data corresponding to the user identifier from the Mysql database in response to the operation audit data query request by a first query unit; displaying the operation audit data corresponding to the user identifier in a page by a first display unit; receiving an operation audit data query request after storing the operation audit data into the Mysql database by a second receiving unit, wherein the operation audit data query request carries a time period to be queried; querying the operation audit data in the time period to be queried from the Mysql database in response to the operation audit data query request by a second query unit; displaying the operation audit data in the time period to be queried in a page by a second display unit; the first storage unit comprises: The sending module is configured to send interface data to a kafka message queue by using a kafka-reporter-plugin plug-in. The shunting module is configured to subscribe to the message by using a broadcast message mode of the kafka message queue, and to shunt the subscription message of the business data and the subscription message of the operation behavior data. The storage module is configured to store the operation behavior data into a ClickHouse database after the operation behavior data is received by the subscriber of the operation behavior data.
3. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method in claim 1.
4. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method in claim 1.
Citation Information
Patent Citations
Method and device for auditing data operation of database
CN113836237A