Dynamic self-adaptive application audit log acquisition and transmission method and device
By deploying audit agents in the log collection system and adopting dynamic adaptive transmission strategies, the problems of high network load and poor management in log collection and transmission are solved, and effective processing of different types of logs and resource utilization are achieved.
Patent Information
- Application Number
- CN202410727872.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-06-06
AI Technical Summary
The prior art lacks centralized management of agents and scheduling of log transmission tasks in log collection and transmission, resulting in high network load and poor management of agent life state, and unable to effectively process logs of different levels of urgency.
Deploy the audit agent to the target application server, centrally manage it through the audit server, adopt dynamic adaptive log transmission method, use the HyperBand method to calculate transmission parameters and build transmission queues based on the log packet size, priority and network status, push emergency logs in real time and The timed queue pulls normal logs to realize differential processing of different types of logs.
It realizes centralized management of audit agents and scheduling of log transmission tasks, balances system network load, and improves network resource utilization efficiency and audit server workload management.
Smart Images

Figure CN118972245A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of log collection and transmission, and in particular to a method and device for dynamically and adaptively collecting and transmitting application audit logs. Background Art
[0002] The requirements of national and industry standards for application security audits are constantly increasing, and the pressure of real-time transmission of massive log data is also increasing. At present, most Internet companies prefer to use distributed components when building log collection and management systems. The mainstream collection method is to install an agent on the host that generates the log, and each log host pushes the log information to the message queue; only when the application server does not support the installation of the agent, will the pull method be used for collection. However, these technologies usually lack centralized management of log collection agents and centralized scheduling of log transmission tasks, and lack different processing strategies for logs of different urgency.
[0003] Therefore, in the face of the problem that real-time log push technology may cause high network load, and the log audit center lacks effective management and control over the life status of the agent, a dynamic and adaptive application audit log collection and transmission solution is proposed. The application audit logs are collected by centralized control of audit agents, dynamic and adaptive pre-arrangement of log transmission queues and parameters, and hierarchical uploading of different types of logs. While meeting the requirements of application security audits, the real-time requirements of audit log collection and transmission and the efficiency of network resource utilization are balanced. Summary of the invention
[0004] The purpose of the embodiments of this specification is to provide a dynamic and adaptive application audit log collection and transmission method, device, electronic device and storage medium to address the above problems.
[0005] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0006] In the first aspect, a dynamic and adaptive application audit log collection and transmission method is proposed, including:
[0007] Deploy the audit agent to the target application server and register it to the audit server to accept the management of the audit center;
[0008] In response to the command of the console, the audit server generates and publishes a log collection policy;
[0009] According to the log collection strategy, the audit agent collects application audit logs of the target application server;
[0010] Match the status attributes of the events recorded in the collected application audit logs to determine the log transmission method;
[0011] For normal logs, the log transmission parameters are dynamically calculated and the audit agent transmission queue is constructed based on the recent log packet size, application priority and current network connection status of each audit agent.
[0012] The application audit logs are sequentially transmitted to the audit server so that the audit server can centrally store and perform statistical analysis on the application audit logs.
[0013] Furthermore, the audit agent is deployed to the target application server and registered with the audit server to accept the management of the audit center, including:
[0014] The audit agent sends a registration request to the audit server, the registration request including the audit agent identifier, the target application server identifier and the identity information of the audit agent;
[0015] After the audit server verifies the identity of the audit agent, the console completes the registration and allocates a public key to the audit agent;
[0016] The audit agent periodically sends heartbeat information to the audit server so that the audit server can monitor the survival status of the audit agent and the network connection status between the audit agent and the target server in real time.
[0017] Further, in response to the command of the console, the audit server generates and publishes a log collection strategy, including:
[0018] The console initiates an audit policy instruction to the audit server;
[0019] The audit server generates the log collection policy according to the audit policy instruction and sends it to the audit agent; wherein the log collection policy corresponds to the registered audit agent one by one.
[0020] Further, when the state attribute of the event recorded in the application log collected by the audit agent is normal, determining that the log transmission mode is timed queue pulling, the audit agent transmits the normal application audit log to the audit server, including:
[0021] The audit agent generates a log summary corresponding to the normal application audit log collected within a specified period; wherein the log summary includes log type, log transmission priority, application priority, log data volume and network connection status;
[0022] Sending the log summary to the audit server, and the audit server sending the summary content of all audit agents to the console;
[0023] The console adopts the HyperBand method to calculate the log transmission parameters and the transmission queue composed of all audit agents according to the recent log packet size, application priority and current network connection status of each audit agent, and allocates a transmission time period for each audit agent in the transmission queue, wherein the transmission time period includes the transmission start time and the maximum duration of the transmission connection;
[0024] The console sends the log pulling task including the log transmission parameters and the transmission queue to the audit server;
[0025] When the transmission start time of the transmission time period is reached, the audit server sends a log pull instruction to the audit agent to receive the normal application audit log and save it to the log database; if the amount of log data specified in the log summary has not been fully transmitted after the maximum duration of the transmission connection, the audit server sends a transmission end instruction to the audit agent, and the audit agent records the log data that has not been received by the audit server in this transmission, and leaves it for retransmission at the next transmission.
[0026] Further, when the status attribute of the event recorded in the application log collected by the audit agent is that emergency processing is required, the log transmission mode is determined to be real-time push, and the audit agent installed on the application server transmits the emergency application audit log to the audit server, including:
[0027] The audit agent sends the emergency application audit log to the audit server in real time;
[0028] After receiving the emergency application audit log, the audit server replies a confirmation message to the audit agent, and then generates corresponding alarm information based on the emergency application audit log; if the audit agent does not receive the confirmation message, it resends the emergency application audit log.
[0029] Furthermore, the console can also control the start and / or sleep of the audit agent through the audit server.
[0030] Furthermore, the console can also control the startup and / or sleep of the audit agent through the audit server; and / or, use the gRPC framework to establish a data and instruction communication connection between the audit server, the audit agent and the console.
[0031] In the second aspect, a dynamic and adaptive application audit log collection and transmission device is proposed, comprising:
[0032] The first module is configured to deploy the audit agent to the target application server and register it to the audit server to accept the management of the audit center;
[0033] The second module is configured to generate and publish a log collection strategy by the audit server in response to an instruction from the console;
[0034] A third module is configured to collect application audit logs of the target application server by the audit agent according to the log collection policy;
[0035] A fourth module is configured to match the state attributes of the events recorded in the collected application audit logs and determine the log transmission mode;
[0036] The fifth module is configured to dynamically calculate log transmission parameters and construct an audit agent transmission queue for normal state logs according to the recent log packet size, application priority and current network connection status of each audit agent;
[0037] The sixth module is configured to sequentially transmit the application audit logs to the audit server so that the audit server can centrally store and perform statistical analysis on the application audit logs. In a third aspect, an electronic device is provided, comprising: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the dynamic and adaptive application audit log collection and transmission method described in the first aspect.
[0038] In a fourth aspect, a computer-readable storage medium is proposed, characterized in that the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the dynamic and adaptive application audit log collection and transmission method described in the first aspect.
[0039] This manual can at least achieve the following technical effects:
[0040] The embodiment of the present application first deploys the audit agent to the target application server, and registers to the audit server, and accepts the management of the audit center; in response to the command of the console, the audit server generates and publishes the log collection strategy; according to the log collection strategy, the audit agent collects the application audit log; matches the state attributes of the event recorded by the collected application audit log, and determines the log transmission mode; for the normal state log, the HyperBand method is adopted, and the log transmission parameters and the audit agent transmission queue are dynamically calculated according to the recent log packet size, application priority and current network status of the audit agent; the application audit log is transmitted to the audit server in turn, so that the audit server can centrally store and statistically analyze the application audit log. The embodiment of the present application can realize the centralized management of the audit agent and the centralized scheduling of the log transmission task, and adopts different transmission modes for the state attributes of the events recorded by different application audit logs, effectively balancing the workload of the system network and the centralized audit server at different times. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0042] Figure 1 This is one of the schematic diagrams of the dynamic and adaptive application audit log collection and transmission method provided in the embodiments of this specification.
[0043] Figure 2 The second schematic diagram of the dynamic and adaptive application audit log collection and transmission method provided in the embodiment of this specification.
[0044] Figure 3 The third schematic diagram of the dynamic and adaptive application audit log collection and transmission method provided in the embodiment of this specification.
[0045] Figure 4 This is a fourth schematic diagram of the dynamic and adaptive application audit log collection and transmission method provided in an embodiment of this specification.
[0046] Figure 5 This is the fifth schematic diagram of the dynamic and adaptive application audit log collection and transmission method provided in the embodiments of this specification.
[0047] Figure 6 Schematic diagram six of the dynamic and adaptive application audit log collection and transmission method provided in the embodiments of this specification.
[0048] Figure 7 A schematic diagram of a dynamic and adaptive application audit log collection and transmission device provided in an embodiment of this specification.
[0049] Figure 8 A schematic diagram of the structure of an electronic device provided for one embodiment of the present specification. Fig. 9 It is a workflow diagram when the status attribute of the event recorded in the application log collected by the audit agent requires urgent processing. Fig.10 The workflow diagram is when the original application event recorded in the emergency log is an abnormal event that may affect the operation of the application program or the execution of normal business functions and needs to be processed in real time. Fig.11 A schematic diagram of the structure of a dynamic and adaptive application audit log collection and transmission device provided for one embodiment of the present specification. Fig.12The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present specification. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0051] As described in the background technology, with the increasing requirements of national and industry standards for application security audits, information systems require reliable and efficient application log collection and transmission methods, especially for centralized management and unified collection of multiple application software security logs and business logs in the system. At the same time, the massive logs generated by application software in real time have brought great pressure to data transmission.
[0052] At present, the mainstream log collection method in the industry is to install log collection agents on the host that generates logs. Each agent pushes the collected log records to the message queue, and then the audit node takes out the logs from the message queue and performs audit analysis; generally, only when the application server does not support the installation of log collection, will the pull method be used to collect logs scattered on each server. However, these technologies usually lack centralized management of log collection agents and scheduling of log transmission tasks, and do not consider different transmission methods for normal logs and emergency logs.
[0053] Therefore, in order to overcome the problem that the real-time log push technology may cause a high network load, and the problem that the log audit center lacks effective management and control over the life status of the agent, a scheme for collecting and transmitting application audit logs is proposed. The basic idea is to deploy audit agents on each application server in the information system, and collect normal logs and abnormal logs generated by the target application through the centralized management and unified control of the audit agent by the audit server. Among them, for normal logs that do not require real-time processing, a fixed time slice transmission method is adopted to reasonably utilize the idle network and audit server idle time for centralized transmission. Before centralized transmission, the HyperBand method is used to dynamically calculate the log transmission parameters and the transmission queue of the audit agent based on the recent log packet size, application priority and current network connection status of each audit agent; then the application audit logs are transmitted to the audit server in sequence, so that the audit server can centrally store and statistically analyze the application audit logs. For abnormal logs that need to be processed in real time, a real-time push method is adopted. After the audit agent finds it, it is immediately reported to the centralized audit server.
[0054] The following is a detailed description of an application audit log collection and transmission solution involved in this specification through a specific example.
[0055] Embodiment 1
[0056] like Figure 1 As shown, a dynamic and adaptive application audit log collection and transmission method according to an embodiment of the present application includes:
[0057] S101: Deploy the audit agent to the target application server and register it to the audit server to accept the management of the audit center.
[0058] S102: In response to the instruction of the console, the audit server generates and publishes a log collection policy.
[0059] S103: According to the log collection strategy, the audit agent collects application audit logs of the target application server.
[0060] S104: Matching the state attributes of the events recorded in the collected application audit logs, and determining the log transmission mode.
[0061] S105: For normal logs, the HyperBand method is used to dynamically calculate log transmission parameters and build an audit agent transmission queue based on the recent log packet size, application priority and current network connection status of each audit agent.
[0062] S106: Transmit the application audit logs to the audit server in sequence, so that the audit server can centrally store and perform statistical analysis on the application audit logs.
[0063] In some embodiments, the gRPC framework is used to implement the instruction and data communication between the audit center and the audit agent, wherein the audit center is composed of the console and the audit server. gRPC is an open source, high-performance remote procedure call RPC framework that can run in any environment, efficiently connect services within and across data centers, and support load balancing, tracking, health checks, and authentication; it is also suitable for connecting devices, mobile applications, and browsers to back-end services in distributed computing. It should be noted that the gRPC framework is only one of the ways to establish data and instruction communication connections between the audit server, the audit agent, and the console. Any way of establishing the above-mentioned data and instruction communication connections that can meet system requirements and network load requirements is within the protection scope of the embodiments of this application.
[0064] In some embodiments, the audit center can also control the startup and / or sleep of the audit agent. Specifically, the console initiates a startup or sleep instruction, the audit server receives and analyzes the startup or sleep instruction initiated by the console, and forwards it to the corresponding audit agent, which receives and executes the startup or sleep operation. Figure 2 shown.
[0065] In some embodiments, the audit agent is deployed to the target application server and registered with the audit server to accept the management of the audit center, such as Figure 3 As shown, including:
[0066] S311: The audit agent sends a registration request to the audit server, where the registration request includes an audit agent identifier, a target application server identifier, and identity information of the audit agent.
[0067] S312: After the audit server verifies the identity of the audit agent, the console completes the registration and allocates a public key to the audit agent.
[0068] S313: The audit agent periodically sends heartbeat information to the audit server so that the audit server can monitor the survival status of the audit agent and the network connection status between the audit agent and the target server in real time.
[0069] Specifically, the audit agent is deployed on the application server. After installation, it automatically sends a registration request to the audit server to apply to join the system. The registration request contains the audit agent ID, the target application server ID, and the identity information of the audit agent. The audit server checks the agent identity. If the verification is successful, it registers the audit agent on the console and completes the distribution of the public key for the agent. After the audit agent joins the system, it sends heartbeat information to the audit server at regular intervals. Each heartbeat message includes fields such as the agent ID, heartbeat count, and heartbeat sending time. The audit server receives the heartbeat rhythm information sent by the agent and records it in real time. When no message is received from the audit agent for N consecutive heartbeat cycles (the value of N is set according to the specific conditions of the system and network), the audit agent is judged to be faulty and an alarm is immediately issued. The above workflow is as follows: Figure 4 shown.
[0070] In some embodiments, in response to the console's instructions, the audit server generates and publishes a log collection policy, such as Figure 5 As shown, including:
[0071] S511: The console initiates an audit policy instruction to the audit server.
[0072] S512: The audit server generates the log collection policy according to the audit policy instruction and sends it to the audit agent; wherein the log collection policy corresponds to the registered audit agent one by one.
[0073] Specifically, the console initiates the audit policy, the audit server receives and analyzes the audit policy sent by the console, and generates a log collection policy based on it; the audit server transmits the log collection policy to the corresponding audit agent, and the audit agent updates the log collection policy accordingly. Figure 6 shown.
[0074] In some embodiments, when the status attribute of the event recorded in the application log collected by the audit agent is normal, the log transmission mode is determined to be timed queue pull, and the audit agent transmits the normal application audit log to the audit server, such as Figure 7 As shown, including:
[0075] S711: The audit agent generates a log summary corresponding to the normal application audit log collected within a specified period; wherein the log summary includes log type, log transmission priority, application priority, log data volume and network connection status.
[0076] S712: Send the log summary to the audit server, and the audit server sends the summary content of all audit agents to the console.
[0077] S713: The console adopts the HyperBand method to calculate the log transmission parameters and the transmission queue composed of all audit agents based on the recent log packet size, application priority and current network connection status of each audit agent, and allocates a transmission time period for each audit agent in the transmission queue. The transmission time period includes the transmission start time and the maximum duration of the transmission connection.
[0078] S714: The console sends the log pulling task including the log transmission parameters and the transmission queue to the audit server.
[0079] S715: When the transmission start time of the transmission time period is reached, the audit server sends a log pull instruction to the audit agent to receive the normal application audit log and save it to the log database; if the amount of log data specified in the log summary has not been fully transmitted after the maximum duration of the transmission connection, the audit server sends a transmission end instruction to the audit agent, and the audit agent records the log data that has not been received by the audit server in this transmission, and leaves it for retransmission at the next transmission.
[0080] Specifically, for the audit agents in the startup state, each audit agent reports the summary information of the application logs collected in the past period of time to the centralized audit server at a fixed time (for example, 3:00 every day), and informs the audit server of the type, priority and data volume of the application logs collected by itself. The audit server uploads the log summaries from all audit agents to the console. The console uses the HyperBand method to dynamically calculate the log transmission parameters and the transmission queue composed of all audit agents based on the recent log packet size, application priority and current network connection status of each audit agent, and allocates a transmission time period for each audit agent in the transmission queue, wherein the transmission time period includes the transmission start time and the maximum duration of the transmission connection.
[0081] Execute task scheduling and assign a transmission time period to each pull task, including the transmission start time and the maximum duration of the transmission connection. When the transmission start time assigned to each agent arrives, the audit server sends a log pull instruction to the corresponding agent, starts receiving the log data uploaded by the agent, and saves it to the log database; if the amount of log data specified in the log summary has not been fully transmitted after the maximum duration of the transmission connection, the audit server sends a transmission end instruction to the audit agent, and the audit agent records the log data that was not received by the audit server during this transmission, and re-uploads it during the next transmission. The above workflow is as follows: Figure 8 shown.
[0082] In some embodiments, when the status attribute of the event recorded in the application log collected by the audit agent is that it needs urgent processing, the log transmission mode is determined to be real-time push, and the audit agent installed on the application server transmits the emergency application audit log to the audit server, such as Fig. 9 As shown, including:
[0083] S911: The audit agent sends the emergency application audit log to the audit server in real time.
[0084] S912: After receiving the emergency application audit log, the audit server replies a confirmation message to the audit agent, and then generates corresponding alarm information based on the emergency application audit log; if the audit agent does not receive the confirmation message, it resends the emergency application audit log.
[0085] Specifically, the original application events recorded in the emergency log are abnormal events that may affect the operation of the application or the execution of normal business functions and need to be processed in real time. Once the audit agent in the startup state collects such logs, it will immediately upload them to the audit server in real time by push mode. After receiving the emergency log pushed by the audit agent, the audit server replies with a confirmation message to the agent, and then forwards it to the alarm module to generate an alarm message. If the audit agent does not receive a confirmation, it should resend the corresponding emergency log. The above workflow is as follows. Fig.10 shown.
[0086] The embodiment of the present application first deploys the audit agent to the target application server, and registers to the audit server, and accepts the management of the audit center; in response to the command of the console, the audit server generates and publishes the log collection strategy; according to the log collection strategy, the audit agent collects the application audit log; matches the state attributes of the event recorded by the collected application audit log, and determines the log transmission mode; for the normal state log, the HyperBand method is adopted, and the log transmission parameters and the audit agent transmission queue are dynamically calculated according to the recent log packet size, application priority and current network status of the audit agent; the application audit log is transmitted to the audit server in turn, so that the audit server can centrally store and statistically analyze the application audit log. The embodiment of the present application can realize the centralized management of the audit agent and the centralized scheduling of the log transmission task, and adopts different transmission modes for the state attributes of the events recorded by different application audit logs, effectively balancing the workload of the system network and the centralized audit server at different times.
[0087] Embodiment 2
[0088] Fig.11 This is a schematic diagram of a structure of a dynamic and adaptive application audit log collection and transmission device 1100 provided in accordance with an embodiment of this specification. Fig.11 In one implementation, a dynamic and adaptive application audit log collection and transmission device 1100 includes:
[0089] The first module 1101 is configured to deploy the audit agent to the target application server, register with the audit server, and accept the management of the audit center.
[0090] The second module 1102 is configured to generate and publish a log collection strategy by the audit server in response to an instruction from the console.
[0091] The third module 1103 is configured to collect application audit logs of the target application server by the audit agent according to the log collection policy.
[0092] The fourth module 1104 is configured to match the state attributes of the events recorded in the collected application audit logs and determine the log transmission mode.
[0093] The fifth module 1105 is configured to use the HyperBand method for normal state logs to dynamically calculate log transmission parameters and build audit agent transmission queues based on the recent log packet size, application priority and current network connection status of each audit agent.
[0094] The sixth module 1106 is configured to sequentially transmit the application audit logs to the audit server so that the audit server can centrally store and perform statistical analysis on the application audit logs.
[0095] It should be understood that the dynamic and adaptive application audit log collection and transmission device 1100 of the embodiment of the present specification can also execute Figures 1 to 10 The method executed by the dynamic and adaptive application audit log collection and transmission device (or equipment) in the embodiment of the present invention is realized by the dynamic and adaptive application audit log collection and transmission device (or equipment) 1100 in the embodiment of the present invention. Figures 1 to 10 The functions of the example shown will not be described in detail here.
[0096] Embodiment 3
[0097] Fig.12 This is a schematic diagram of the structure of an electronic device according to an embodiment of this specification. Fig.12 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0098] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0099] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0100] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a shared resource access control device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0101] Deploy the audit agent to the target application server and register it to the audit server to accept the management of the audit center;
[0102] In response to the command of the console, the audit server generates and publishes a log collection policy;
[0103] According to the log collection strategy, the audit agent collects application audit logs of the target application server;
[0104] Match the status attributes of the events recorded in the collected application audit logs to determine the log transmission method;
[0105] For normal logs, the HyperBand method is used to dynamically calculate log transmission parameters and build audit agent transmission queues based on the recent log packet size, application priority, and current network connection status of each audit agent.
[0106] The application audit logs are sequentially transmitted to the audit server so that the audit server can centrally store and perform statistical analysis on the application audit logs.
[0107] The above is as in this manual Figures 1 to 10The dynamic and adaptive application audit log collection and transmission method disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of this specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of this specification can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0108] Of course, in addition to software implementation, the electronic device of the embodiments of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0109] Embodiment 4
[0110] The embodiment of the present specification also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figures 1 to 10 The dynamically adaptive application audit log collection and transmission method of the embodiment shown is specifically used to perform the following steps:
[0111] Deploy the audit agent to the target application server and register it to the audit server to accept the management of the audit center;
[0112] In response to the command of the console, the audit server generates and publishes a log collection policy;
[0113] According to the log collection strategy, the audit agent collects application audit logs of the target application server;
[0114] Match the status attributes of the events recorded in the collected application audit logs to determine the log transmission method;
[0115] For normal logs, the HyperBand method is used to dynamically calculate log transmission parameters and build audit agent transmission queues based on the recent log packet size, application priority, and current network connection status of each audit agent.
[0116] The application audit logs are sequentially transmitted to the audit server so that the audit server can centrally store and perform statistical analysis on the application audit logs.
[0117] In short, the above description is only a preferred embodiment of this specification and is not intended to limit the protection scope of this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the protection scope of this specification.
[0118] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an electronic data carrier device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0119] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0120] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0121] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A dynamic and adaptive application audit log collection and transmission method, It is characterized in that include: Deploy the audit agent to the target application server and register it to the audit server to accept the management of the audit center; In response to the command of the console, the audit server generates and publishes a log collection policy; According to the log collection strategy, the audit agent collects application audit logs of the target application server; Match the status attributes of the events recorded in the collected application audit logs to determine the log transmission method; For normal logs, the log transmission parameters are dynamically calculated and the audit agent transmission queue is constructed based on the recent log packet size, application priority and current network connection status of each audit agent. The application audit logs are sequentially transmitted to the audit server so that the audit server can centrally store and perform statistical analysis on the application audit logs.
2. According to the dynamic and adaptive application audit log collection and transmission method described in claim 1, It is characterized in that Deploy the audit agent to the target application server and register it with the audit server to accept the management of the audit center, including: The audit agent sends a registration request to the audit server, the registration request including the audit agent identifier, the target application server identifier and the identity information of the audit agent; After the audit server verifies the identity of the audit agent, the console completes the registration and allocates a public key to the audit agent; The audit agent periodically sends heartbeat information to the audit server so that the audit server can monitor the survival status of the audit agent and the network connection status between the audit agent and the target server in real time.
3. According to the dynamic and adaptive application audit log collection and transmission method described in claim 1, It is characterized in that In response to the console's instructions, the audit server generates and publishes a log collection strategy, including: The console initiates an audit policy instruction to the audit server; The audit server generates the log collection policy according to the audit policy instruction and sends it to the audit agent; wherein the log collection policy corresponds to the registered audit agent one by one.
4. The method for collecting and transmitting application audit logs according to claim 1, It is characterized in that When the state attribute of the event recorded in the application log collected by the audit agent is normal, determining that the log transmission mode is timed queue pulling, and the audit agent transmits the normal application audit log to the audit server, including: The audit agent generates a log summary corresponding to the normal application audit log collected within a specified period; wherein the log summary includes log type, log transmission priority, application priority, log data volume and network connection status; Sending the log summary to the audit server, and the audit server sending the summary content of all audit agents to the console; The console adopts the HyperBand method to calculate the log transmission parameters and the transmission queue composed of all audit agents according to the recent log packet size, application priority and current network connection status of each audit agent, and allocates a transmission time period for each audit agent in the transmission queue, wherein the transmission time period includes the transmission start time and the maximum duration of the transmission connection; The console sends the log pulling task including the log transmission parameters and the transmission queue to the audit server; When the transmission start time of the transmission time period is reached, the audit server sends a log pull instruction to the audit agent to receive the normal application audit log and save it to the log database; if the amount of log data specified in the log summary has not been fully transmitted after the maximum duration of the transmission connection, the audit server sends a transmission end instruction to the audit agent, and the audit agent records the log data that has not been received by the audit server in this transmission, and leaves it for retransmission at the next transmission.
5. The dynamic and adaptive application audit log collection and transmission method according to claim 1, It is characterized in that When the state attribute of the event recorded in the application log collected by the audit agent is that emergency processing is required, determining that the log transmission mode is real-time push, and the audit agent installed on the application server transmits the emergency application audit log to the audit server, including: The audit agent sends the emergency application audit log to the audit server in real time; After receiving the emergency application audit log, the audit server replies a confirmation message to the audit agent, and then generates corresponding alarm information based on the emergency application audit log; if the audit agent does not receive the confirmation message, it resends the emergency application audit log.
6. The dynamic and adaptive application audit log collection and transmission method according to claim 1, It is characterized in that The console can also control the start and / or sleep of the audit agent through the audit server.
7. The method for collecting and transmitting application audit logs according to any one of claims 1 to 6, It is characterized in that The gRPC framework is used to establish a data and command communication connection between the audit server, the audit agent and the console.
8. A dynamic and adaptive application audit log collection and transmission device, It is characterized in that include: The first module is configured to deploy the audit agent to the target application server and register it to the audit server to accept the management of the audit center; The second module is configured to generate and publish a log collection strategy by the audit server in response to an instruction from the console; A third module is configured to collect application audit logs of the target application server by the audit agent according to the log collection policy; A fourth module is configured to match the state attributes of the events recorded in the collected application audit logs and determine the log transmission mode; The fifth module is configured to dynamically calculate log transmission parameters and construct audit agent transmission queues for normal state logs according to the recent log packet size, application priority and current network connection status of each audit agent; The sixth module is configured to sequentially transmit the application audit logs to the audit server so that the audit server can centrally store and perform statistical analysis on the application audit logs.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When executing the computer program, the processor implements the steps of the dynamic and adaptive application audit log collection and transmission method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the dynamic and adaptive application audit log collection and transmission method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Database self-auditing log processing method and device
CN115934668A
Processing system and method for log integrity protection of information system
CN117251885A
Information transmission method, lightweight processing method and related communication apparatus
WO2022088003A1
Cited By
Trusted DCS log arrangement and collection method and system
CN119884062A
Audit log control system and method of real-time operating system
CN122247843A
