CN114840379A - Log generation method, device, server and storage medium - Google Patents

Log generation method, device, server and storage medium Download PDF

Info

Publication number
CN114840379A
CN114840379A CN202210410136.4A CN202210410136A CN114840379A CN 114840379 A CN114840379 A CN 114840379A CN 202210410136 A CN202210410136 A CN 202210410136A CN 114840379 A CN114840379 A CN 114840379A
Authority
CN
China
Prior art keywords
log
target
server
service
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210410136.4A
Other languages
Chinese (zh)
Inventor
曹建锋
殷超
刘著
刘贤峰
赵芳华
王茹茹
王利波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CITIC Aibank Corp Ltd
Original Assignee
CITIC Aibank Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CITIC Aibank Corp Ltd filed Critical CITIC Aibank Corp Ltd
Priority to CN202210410136.4A priority Critical patent/CN114840379A/en
Publication of CN114840379A publication Critical patent/CN114840379A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes

Abstract

The disclosure provides a log generation method, a log generation device, a server, a storage medium and a log processing system. The system initiates a target log output request corresponding to a target event to a server at a terminal device, the server responds to the received target log output request sent by the terminal device to acquire service type information and service content information of the target event, determines a log assembly rule corresponding to the service type information, and generates a target log corresponding to the target event for the terminal device to present according to the log assembly rule and the service content information. The system can flexibly meet the requirements of different service types on the log output format.

Description

Log generation method, device, server and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a log generation method, apparatus, server, and storage medium.
Background
The log is a data file used for recording parameters such as user operation, equipment running state and the like, and can be used for related personnel to know the running condition and the service processing condition of the equipment. As the device operation continues, a large amount of log data is often generated. Various analysis processes are performed on log data, which is a conventional way to obtain effective information.
Disclosure of Invention
The disclosure provides a log generation method, a log generation device, a server and a storage medium.
In a first aspect, the present disclosure provides a log generating method applied to a server, including:
the method comprises the steps that a target log output request corresponding to a target event sent by a terminal device is received, the service type information and the service content information of the target event are obtained, the output request is generated by the terminal device in response to the detection of log output operation input by a user, and the target log is used for recording the target event;
determining a log assembly rule corresponding to the service type information;
generating a target log corresponding to the target event according to the log assembly rule and the service content information;
and sending the generated target log to the terminal equipment so that the terminal equipment presents or stores the received target log.
In some optional embodiments, the log assembly rule includes an assembly order, path information, a data processing manner, prefix information, and suffix information corresponding to a plurality of service fields and each service field, where the service fields include event exception/failure reasons, the service fields are associated with the service type information, and the data processing manner is associated with a type of the service fields.
In some optional embodiments, the generating a target log corresponding to the target event according to the log assembly rule and the service content information includes:
and acquiring log element data corresponding to the corresponding service field from the service content information according to the path information, and generating a target log by combining corresponding prefix information and suffix information according to and by adopting a corresponding data processing mode and an assembly sequence.
In a second aspect, the present disclosure provides a log generating apparatus applied to a server, the apparatus including:
an obtaining unit, configured to obtain service type information and service content information of a target event in response to receiving a target log output request sent by a terminal device, wherein the output request is generated by the terminal device in response to detecting a log output operation input by a user, and the target log is used for recording the target event;
a determining unit configured to determine a log assembly rule corresponding to the service type information;
a generating unit configured to generate a target log corresponding to the target event according to the log assembly rule and the service content information;
a first sending unit configured to send the generated target log to the terminal device for the terminal device to present or store the received target log.
In some optional embodiments, the first sending unit 504 is further configured to obtain log element data corresponding to a corresponding service field from the service content information according to the path information, and generate a target log by combining corresponding prefix information and suffix information with each log element data according to and by using a corresponding data processing manner and an assembly order.
In a third aspect, the present disclosure provides a log presenting method, applied to a terminal device, the method including:
in response to detecting a log output operation input by a user, sending a target log output request to a server, wherein the target log is used for recording a target event;
and in response to receiving a target log sent by the server, presenting or storing the received target log, wherein the target log is generated by the server according to a log assembly rule and service content information, the log assembly rule is determined by the server according to service type information, and the service type information and the service content information are acquired by the server in response to receiving a target log output request and correspond to the target time.
In a fourth aspect, the present disclosure provides a log presenting apparatus, applied to a terminal device, the apparatus including:
a second transmitting unit configured to transmit a target log output request to the server in response to detecting a log output operation input by a user, the target log being used to record a target event;
and the presenting unit is configured to present or store the received target log in response to receiving the target log sent by the server, wherein the target log is generated by the server according to a log assembly rule and service content information, the log assembly rule is determined by the server according to service type information, and the service type information and the service content information are acquired by the server in response to receiving a target log output request and correspond to the target time.
In a fifth aspect, an embodiment of the present disclosure provides a server, including: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the first aspect.
In a sixth aspect, an embodiment of the present disclosure provides a terminal device, including: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the second aspect.
In a seventh aspect, embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by one or more processors, implements the method as described in any of the implementations of the first aspect and/or the method as described in any of the implementations of the second aspect.
In an eighth aspect, an embodiment of the present disclosure provides a log processing system, including the server described in any implementation manner of the fifth aspect and the terminal device described in any implementation manner of the sixth aspect.
The disclosure provides a log generation method, a log generation device, a server, a storage medium and a log processing system. The system initiates a target log output request corresponding to a target event to a server at a terminal device, the server responds to the received target log output request sent by the terminal device to acquire service type information and service content information of the target event, determines a log assembly rule corresponding to the service type information, and generates a target log corresponding to the target event for the terminal device to present according to the log assembly rule and the service content information. Technical effects achieved include, but are not limited to:
1. the system can flexibly meet the requirements of different service types on the log output format.
2. Output log information desensitization is realized, and data safety is effectively guaranteed.
3. The service fields may be configured in advance in the log assembly rule as required.
4. The event abnormity/failure reason service field can be configured in advance, so that the output log presents the event abnormity/failure reason, and a user can conveniently and quickly position and examine.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a timing diagram for one embodiment of a log processing system according to the present disclosure;
FIG. 2A is a diagram of an example of a log assembly rule;
FIG. 2B is a schematic diagram of yet another example of a log assembly rule;
FIG. 3 is a flow diagram for one embodiment of a log generation method according to the present disclosure;
FIG. 4 is a flow diagram for one embodiment of a log presentation method according to the present disclosure;
FIG. 5 is a schematic block diagram of one embodiment of a log generation apparatus according to the present disclosure;
FIG. 6 is a schematic block diagram of one embodiment of a log presentation apparatus according to the present disclosure;
fig. 7 is a schematic structural diagram of a computer system suitable for use in implementing the electronic device (server or terminal device) of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary system architecture 100 to which one embodiment of a log processing system of the present disclosure may be applied.
As shown in fig. 1, the log processing system 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a log output application, a log processing application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting sound collection and/or video collection, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a background server that provides support for log output type applications displayed on the terminal devices 101, 102, 103. The background server can analyze and process the received data such as the log output request and the like, and feed back the processing result to the terminal equipment.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the log generating method applied to the server provided by the present disclosure is generally executed by the server 105, and accordingly, the log generating device applied to the server is generally provided in the server 105.
It should be noted that the log presenting method applied to the terminal device provided by the present disclosure is generally executed by the terminal devices 101, 102, 103, and accordingly, the log presenting apparatus applied to the terminal device is generally disposed in the terminal devices 101, 102, 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a timing diagram for one embodiment of the log processing system of the present disclosure is shown. The log processing system in the embodiment of the present disclosure may include a terminal device and a server. The sequence 200 includes the following steps:
in step 201, the terminal device sends a target log output request to the server in response to detecting a log output operation input by a user.
Here, the target log is used to record the target event. The log record corresponding to the target event comprises the time when the target event is generated and the event content of the target event. The target event may include, etc.
In this embodiment, a terminal device (e.g., terminal devices 101, 102, 103 shown in fig. 1) may generate a target log output request based on an output statement corresponding to a log output operation when the log output operation input by a user is detected. The terminal device may transmit the generated target log output request to the server.
For example, the target log output request includes output statement information and execution parameters. The output statement information may be an identifier of the output statement, and the execution parameter may be a user name, a user identifier, or a user account in the target event.
Here, the log output operation may be various preset operations that may trigger the output of the target log related to the output statement.
For example, the log output operation may be that the user inputs an output sentence in the search box and clicks a log output operation display object (for example, a preset log output button, an icon, or a designated key in a keyboard, etc.). Here, the user may be a customer service person or a user in a target event.
Step 202, the server responds to the received target log output request sent by the terminal device, and obtains the service type information and the service content information of the target event.
In this embodiment, a server (for example, the server 105 shown in fig. 1) may obtain the service type information and the service content information of the target event recorded by the target log in case of receiving the target log output request sent by the terminal device. Here, the traffic type information of the target event may be used to characterize the traffic type of the target event. The service type information may be a service type name or a service type identifier, and may be, for example, user login, user logout, or the like. The service content information may include a time when the target event is generated and an event content of the target event.
In one embodiment, the transaction type information may include transaction type information, such as money transfer, etc.
In step 203, the server determines a log assembly rule corresponding to the service type information.
In this embodiment, the server may determine the log assembly rule corresponding to the service type information of the target event according to a preset correspondence between the service type information and the log assembly rule. That is, the corresponding log assembly rule can be set in advance for different service type information.
Here, the log assembly rule may include an assembly order of the plurality of service fields corresponding to each service field, path information, a data processing method, prefix information, and suffix information.
The traffic field may be pre-set. The business field may be used to identify the meaning and category of log element data to be obtained. The service field may also be referred to as an attribute. The service field may be associated with service type information. For example, when the service type information is transfer, the service field may include fields such as a user name, a user account number from which the transfer is initiated, and a user account number from which the transfer is received.
The assembly order can be used for characterizing the arrangement order of the log element data corresponding to the service field in the output log.
The path information may be used to characterize the acquired path location information, e.g. 1, 2, etc., of the log element data corresponding to the service field.
The data processing mode may be used to characterize a processing mode of the log element data corresponding to the service field, such as splicing, clipping, desensitization, conversion, and the like. The data processing mode is associated with the type of the service field. For example, when the type of the service field is an account/account number, the corresponding data processing mode is splicing after desensitization.
FIG. 2A is a diagram of an example of a log assembly rule. Specifically, when the service type information is transfer, the corresponding log assembly rule is used.
In one embodiment, the traffic field may also include an event exception/failure reason.
FIG. 2B is a schematic diagram of yet another example of a log assembly rule. Specifically, when the service type information is transfer, a corresponding log assembly rule is adopted, wherein a service field comprises an event exception/failure reason (reason).
And step 204, the server generates a target log corresponding to the target event according to the log assembly rule and the service content information.
In this embodiment, the server may generate a target log corresponding to the target event based on the service content information acquired in step 202 according to the log assembly rule determined in step 203.
In an embodiment, the server may obtain log element data corresponding to the corresponding service field from the service content information according to the path information, and generate the target log by combining corresponding prefix information and suffix information according to and by using a corresponding data processing manner and an assembly sequence for each log element data.
For example, the target log may be "zhangsan (6228 × 19) of user transfers 100.00 yuan to the lisu account (6227 × 01) through the mobile banking app at 11 am 0 min 0 sec on 14 days 1 month (friday) in 2022, and the operation is successful. "
For example, the target log may be "zhangsan (6228 × 19) of user transfers 100.00 yuan to the lisu account (6227 × 01) through the mobile banking app at 11 am 0 min 0 sec on 14 days 1 month (friday) in 2022, operation failure, failure reason: and (6) timing out. "
In step 205, the server sends the generated target log to the terminal device.
In this embodiment, the server may transmit the target log generated in step 205 to the terminal device.
In step 206, the terminal device presents or stores the received target log.
In this embodiment, the terminal device may present the target log received from the server in various implementations, upon receiving the target log returned by the server in response to the log output request transmitted to the server in step 201.
In the log generating system provided by the above embodiment of the present disclosure, a target log output request corresponding to a target event is initiated at a terminal device to a server, and the server, in response to receiving the target log output request sent by the terminal device, obtains service type information and service content information of the target event, determines a log assembly rule corresponding to the service type information, and generates a target log corresponding to the target event for the terminal device to present according to the log assembly rule and the service content information. The technical effects that can be achieved include, but are not limited to:
1. the system can flexibly meet the requirements of different service types on the log output format.
2. Output log information desensitization is realized, and data safety is effectively guaranteed.
3. The service fields may be configured in advance in the log assembly rule as required.
4. The event abnormity/failure reason service field can be configured in advance, so that the output log presents the event abnormity/failure reason, and a user can conveniently and quickly position and examine.
With further reference to FIG. 3, a flow diagram of one embodiment of a log generation method is shown. The process 300 of the log generation method, applied to the server, includes the following steps:
step 301, in response to receiving a target log output request corresponding to a target event sent by a terminal device, obtaining service type information and service content information of the target event.
In the present embodiment, the detailed operation of step 301 and the technical effects thereof are substantially the same as the operation and effects of step 202 in the embodiment shown in fig. 2, and are not repeated herein.
Step 302, determining a log assembly rule corresponding to the service type information.
In the present embodiment, the detailed operation of step 302 and the technical effect thereof are substantially the same as the operation and effect of step 203 in the embodiment shown in fig. 2, and are not repeated herein.
Step 303, generating a target log corresponding to the target event according to the log assembly rule and the service content information.
In the present embodiment, the specific operation of step 303 and the technical effect thereof are substantially the same as the operation and effect of step 204 in the embodiment shown in fig. 2, and are not repeated herein.
And step 304, sending the generated target log to the terminal device, so that the terminal device presents or stores the received target log.
In the present embodiment, the detailed operation of step 304 and the technical effects thereof are substantially the same as the operation and effects of step 205 in the embodiment shown in fig. 2, and are not repeated herein.
With further reference to FIG. 4, a flow diagram of one embodiment of a log presentation method is shown. The process 400 of the log presenting method, applied to the terminal device, includes the following steps:
step 401, in response to detecting the log output operation input by the user, sending a target log output request to the server.
Step 402, in response to receiving the target log sent by the server, presenting or storing the received target log.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of a log generating apparatus, which corresponds to the method embodiment shown in fig. 3, and which can be specifically applied to various electronic devices.
As shown in fig. 5, the log generating apparatus 500 of the present embodiment includes an acquiring unit 501, a determining unit 502, a generating unit 503, and a first transmitting unit 504. The acquiring unit 501 is configured to acquire service type information and service content information of a target event in response to receiving a target log output request sent by a terminal device, where the output request is generated by the terminal device in response to detecting a log output operation input by a user, and the target log is used for recording the target event; a determining unit 502 configured to determine a log assembly rule corresponding to the service type information; a generating unit 503 configured to generate a target log corresponding to the target event according to the log assembly rule and the service content information; a first sending unit 504 configured to send the generated target log to the terminal device for the terminal device to present or store the received target log.
In some optional embodiments, the first sending unit 504 may be further configured to obtain log element data corresponding to a corresponding service field from the service content information according to the path information, and generate a target log by combining corresponding prefix information and suffix information with each log element data according to and by using a corresponding data processing manner and an assembly order.
In this embodiment, specific processes of the obtaining unit 501, the determining unit 502, the generating unit 503, and the first sending unit 504 of the log generating apparatus 500 and technical effects brought by the specific processes can refer to related descriptions of step 301, step 302, step 303, and step 304 in the corresponding embodiment of fig. 3, which are not described herein again.
It should be noted that details of implementation and technical effects of each unit in the log generating device provided by the present disclosure may refer to descriptions of other embodiments in the present disclosure, and are not described herein again.
With further reference to fig. 6, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of a log presenting apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 4, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 6, the log presenting apparatus 600 of the present embodiment includes a second sending unit 601 and a presenting unit 602. Wherein, the second sending unit 601 is configured to send a target log output request to the server in response to detecting a log output operation input by the user, the target log being used for recording a target event; and a presenting unit 602 configured to present or store the received target log in response to receiving the target log sent by the server, wherein the target log is generated by the server according to a log assembly rule and service content information, the log assembly rule is determined by the server according to the service type information, and the service type information and the service content information are acquired by the server in response to receiving a target log output request and correspond to the target time.
In this embodiment, specific processing of the second sending unit 601 and the presenting unit 602 of the log presenting apparatus 600 and technical effects thereof can refer to related descriptions of step 401 and step 402 in the corresponding embodiment of fig. 4, which are not described herein again.
It should be noted that details of implementation and technical effects of each unit in the log presenting apparatus provided by the present disclosure may refer to descriptions of other embodiments in the present disclosure, and are not described herein again.
Referring now to FIG. 7, a block diagram of a computer system 700 suitable for use in implementing the electronic device of the present disclosure is shown. The electronic device (server or user terminal) shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the present disclosure.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An Input/Output (I/O) interface 705 is also connected to the bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a touch panel, a tablet, a keyboard, a mouse, or the like; an output section 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709. The computer program, when executed by a Central Processing Unit (CPU)701, performs the above-described functions defined in the method of the present disclosure. It should be noted that the computer readable medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, Python, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in this disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a determination unit, a generation unit, and a first transmission unit. The names of these units do not constitute a limitation to the unit itself in some cases, and for example, the acquiring unit may also be described as "a unit that acquires the service type information and the service content information of the target event in response to receiving the target log output request transmitted by the terminal device". As another example, it can be described as: a processor includes a second sending unit and a rendering unit.
As another aspect, the present disclosure also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to implement the log generation method shown in fig. 3 and/or the log presentation method shown in fig. 4.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A log generation method is applied to a server and comprises the following steps:
the method comprises the steps that a target log output request corresponding to a target event sent by a terminal device is received, the service type information and the service content information of the target event are obtained, the output request is generated by the terminal device in response to the detection of log output operation input by a user, and the target log is used for recording the target event;
determining a log assembly rule corresponding to the service type information;
generating a target log corresponding to the target event according to the log assembly rule and the service content information;
and sending the generated target log to the terminal equipment so as to present or store the received target log by the terminal equipment.
2. The method of claim 1, wherein the log assembly rule comprises an assembly order, path information, a data processing manner, prefix information, and suffix information for a plurality of service fields corresponding to each service field, the service fields including event exception/failure reasons, the service fields being associated with the service type information, and the data processing manner being associated with a type of the service fields.
3. The method of claim 2, wherein the generating a target log corresponding to the target event according to the log assembly rule and the business content information comprises:
and acquiring log element data corresponding to the corresponding service field from the service content information according to the path information, and generating a target log by combining corresponding prefix information and suffix information according to and by adopting a corresponding data processing mode and an assembly sequence.
4. A log generating device applied to a server comprises:
an obtaining unit, configured to obtain service type information and service content information of a target event in response to receiving a target log output request sent by a terminal device, wherein the output request is generated by the terminal device in response to detecting a log output operation input by a user, and the target log is used for recording the target event;
a determining unit configured to determine a log assembly rule corresponding to the service type information;
a generating unit configured to generate a target log corresponding to the target event according to the log assembly rule and the service content information;
a first sending unit configured to send the generated target log to the terminal device for the terminal device to present or store the received target log.
5. A log presenting method is applied to terminal equipment and comprises the following steps:
in response to detecting a log output operation input by a user, sending a target log output request to a server, wherein the target log is used for recording a target event;
and in response to receiving a target log sent by the server, presenting or storing the received target log, wherein the target log is generated by the server according to a log assembly rule and service content information, the log assembly rule is determined by the server according to service type information, and the service type information and the service content information are acquired by the server in response to receiving a target log output request and correspond to the target time.
6. A log presenting device is applied to terminal equipment and comprises:
a second transmitting unit configured to transmit a target log output request to the server in response to detecting a log output operation input by a user, the target log being used to record a target event;
and the presenting unit is configured to present or store the received target log in response to receiving the target log sent by the server, wherein the target log is generated by the server according to a log assembly rule and service content information, the log assembly rule is determined by the server according to service type information, and the service type information and the service content information are acquired by the server in response to receiving a target log output request and correspond to the target time.
7. A server, comprising: one or more processors; a storage device having one or more programs stored thereon; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the log generation method of any of claims 1-4.
8. A terminal device, comprising: one or more processors; a storage device having one or more programs stored thereon; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the log presentation method of claim 5.
9. A computer readable medium having stored thereon a computer program, wherein the computer program, when executed by one or more processors, implements the log generation method of any one of claims 1-4 or the log presentation method of claim 5.
10. A log processing system comprising a server according to claim 7 and at least one terminal device according to claim 8.
CN202210410136.4A 2022-04-19 2022-04-19 Log generation method, device, server and storage medium Pending CN114840379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210410136.4A CN114840379A (en) 2022-04-19 2022-04-19 Log generation method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210410136.4A CN114840379A (en) 2022-04-19 2022-04-19 Log generation method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN114840379A true CN114840379A (en) 2022-08-02

Family

ID=82566549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210410136.4A Pending CN114840379A (en) 2022-04-19 2022-04-19 Log generation method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN114840379A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115408344A (en) * 2022-09-29 2022-11-29 建信金融科技有限责任公司 Log formatting method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115408344A (en) * 2022-09-29 2022-11-29 建信金融科技有限责任公司 Log formatting method and device, electronic equipment and storage medium
CN115408344B (en) * 2022-09-29 2023-12-08 建信金融科技有限责任公司 Log formatting method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110708346B (en) Information processing system and method
CN107622135B (en) Method and apparatus for displaying information
CN113987074A (en) Distributed service full-link monitoring method and device, electronic equipment and storage medium
CN109684188B (en) Test method and device
CN109359194B (en) Method and apparatus for predicting information categories
JP2021103506A (en) Method and device for generating information
CN109656799B (en) Test method and device
CN113505302A (en) Method, device and system for supporting dynamic acquisition of buried point data and electronic equipment
CN109902726B (en) Resume information processing method and device
CN112954056B (en) Method and device for processing monitoring data, electronic equipment and storage medium
CN107885872B (en) Method and device for generating information
CN114840379A (en) Log generation method, device, server and storage medium
CN109885564A (en) Method and apparatus for sending information
CN111813685B (en) Automatic test method and device
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
CN116662193A (en) Page testing method and device
CN112083982A (en) Information processing method and device
CN110110032B (en) Method and device for updating index file
CN115454956A (en) Log generation method and device, electronic equipment and storage medium
CN109889402B (en) Method and apparatus for generating information
CN111222067B (en) Information generation method and device
CN109756393B (en) Information processing method, system, medium, and computing device
CN113822745A (en) Article display method and device
CN111767486A (en) Method, device, electronic equipment and computer readable medium for displaying page
CN112084114A (en) Method and apparatus for testing an interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination