CN111367867B - Log information processing method and device, electronic equipment and storage medium - Google Patents

Log information processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111367867B
CN111367867B CN202010148717.6A CN202010148717A CN111367867B CN 111367867 B CN111367867 B CN 111367867B CN 202010148717 A CN202010148717 A CN 202010148717A CN 111367867 B CN111367867 B CN 111367867B
Authority
CN
China
Prior art keywords
log information
request
matched
output
log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010148717.6A
Other languages
Chinese (zh)
Other versions
CN111367867A (en
Inventor
韩时通
李斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Cloud Computing Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Cloud Computing Beijing Co Ltd
Priority to CN202010148717.6A priority Critical patent/CN111367867B/en
Publication of CN111367867A publication Critical patent/CN111367867A/en
Application granted granted Critical
Publication of CN111367867B publication Critical patent/CN111367867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention provides a log information processing method, which comprises the following steps: determining the structure of a storage container of corresponding log information according to the using environment of the log information; storing log information generated in the use environment based on a structure of a storage container of the log information; acquiring a corresponding first request mark set, and acquiring log information matched with the first request mark in the log information generated in the use environment according to the first request mark to determine a log information output mode matched with an output process of the log information; and outputting the log information according to a log information output mode matched with the output process of the log information. The invention also provides a log information processing device, an electronic device and a storage medium. The invention can realize more flexible output of the log information, so that the output log information has stronger relevance and higher efficiency of processing the log information in the use environment with a large number of concurrent processing requests.

Description

Log information processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to a log information processing technology, and in particular, to a log information processing method and apparatus, an electronic device, and a storage medium.
Background
In the process of program operation, in order to facilitate troubleshooting when problems occur, log information output is often performed in the process of program operation in a duplication site, and a large amount of log information output often causes negative problems, such as influence on program operation efficiency, consumption of system and hardware resources and the like, so that log information output of different levels can be performed according to different importance in a common scene.
In the related art, the output mode of the log information is single, and the log information can be output only according to the time sequence, which is specifically represented as: setting output log information levels, for example: the log information output level is set, and the output log information content cannot be dynamically changed; however, in the case of a relatively large number of request processing, that is, a large number of concurrent processing requests, log information output by time is a case where the log information is not consecutive log information for processing the same request, but a large number of request processing log information are output by time, and thus there is no correlation between the output log information.
Disclosure of Invention
In view of this, embodiments of the present invention provide a log information processing method and apparatus, an electronic device, and a storage medium, which can implement more flexible output of log information, where the log information can output log information in groups according to a request, and when an abnormality occurs or the log information needs to be retrieved, the log information can output the required log information timely and efficiently, and meanwhile, because the log information output is not output according to a fixed log information level, the location of a problem can also be quickly located, so that the fault repairing efficiency or the problem locating efficiency is improved, and the use experience of a user is effectively improved.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a log information processing method, which comprises the following steps:
determining the structure of a storage container of corresponding log information according to the using environment of the log information;
storing the log information generated in the use environment based on a structure of a storage container of the log information;
receiving a log information calling instruction, and analyzing the log information calling instruction to obtain a corresponding first request mark set, wherein the first request mark set comprises at least one first request mark;
according to the first request mark, obtaining log information matched with the first request mark from the log information generated in the using environment;
determining a log information output mode matched with the output process of the log information;
and outputting the log information respectively matched with different first request marks according to a request grouping mode according to a log information output mode matched with the output process of the log information.
An embodiment of the present invention further provides a log information processing apparatus, where the apparatus includes:
the information transmission module is used for determining the structure of a storage container of the corresponding log information according to the using environment of the log information;
an information processing module for storing the log information generated in the use environment based on a structure of a storage container of the log information;
the information processing module is used for receiving a log information calling instruction and analyzing the log information calling instruction to obtain a corresponding first request mark set, wherein the first request mark set comprises at least one first request mark;
the information processing module is used for acquiring log information matched with the first request mark from the log information generated in the using environment according to the first request mark;
the information processing module is used for determining a log information output mode matched with the output process of the log information;
and the information processing module is used for outputting the log information respectively matched with different first request marks according to a request grouping mode according to a log information output mode matched with the output process of the log information.
In the above-mentioned scheme, the first step of the method,
the information transmission module is used for determining that the structure of the storage container of the log information sequentially comprises the log information level parameter, the log information content and the time parameter of the log information according to the using environment of the log information.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a log information level parameter, a log information content and a time parameter corresponding to the log information according to the log information generated in the using environment;
the information processing module is used for determining a second request mark corresponding to the log information, wherein the second request mark is used for representing a log array corresponding to the log information;
the information processing module is used for grouping the storage containers of different log information based on the second request mark corresponding to the storage container of each log information;
and the information processing module is used for sequencing different log information included in the same second request mark according to the time parameter.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for traversing the log information generated in the using environment,
the information processing module is used for extracting the log information matched with the first request mark from the storage container of the log information when the first request mark is matched with the second request mark;
and the information processing module is used for storing the extracted log information matched with the first request mark in a corresponding cache.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for outputting the log information matched with the output process of the log information according to the time sequence,
acquiring corresponding log information from the cache, adjusting the log information acquired from the cache according to the time sequence, and forming and outputting the log information corresponding to the time sequence;
and the information processing module is used for acquiring corresponding log information from the cache, adjusting the corresponding log information acquired from the cache according to the log information level parameter corresponding to the log information and the time sequence, and forming and outputting the log information corresponding to the time sequence.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for outputting the log information in a request grouping way when the output mode of the log information matched with the output process of the log information is output in a request grouping way,
and respectively acquiring corresponding log information from the cache based on different first request marks, adjusting the corresponding log information acquired from the cache according to log information level parameters corresponding to the log information, and forming and outputting the log information respectively matched with the different first request marks.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for sending the structure of the storage container of the log information, the first request mark and the log information matched with the first request mark to a block chain network so as to ensure that the log information is transmitted to the block chain network
And the nodes of the block chain network fill the structure of the storage container of the log information, the first request mark and the log information matched with the first request mark into a new block, and when the new block is identified in common, the new block is added to the tail of the block chain.
An embodiment of the present invention further provides an electronic device, where the electronic device includes:
a memory for storing executable instructions;
and the processor is used for realizing the preorder log information processing method when the executable instruction stored in the memory is operated.
The embodiment of the invention also provides a computer-readable storage medium, which stores executable instructions, and the executable instructions are executed by a processor to realize the preorder log information processing method.
Determining the structure of a storage container of the corresponding log information according to the using environment of the log information; storing the log information generated in the use environment based on a structure of a storage container of the log information; receiving a log information calling instruction, and analyzing the log information calling instruction to obtain a corresponding first request mark set, wherein the first request mark set comprises at least one first request mark; according to the first request mark, obtaining log information matched with the first request mark from the log information generated in the using environment; determining a log information output mode matched with the output process of the log information; according to the log information output mode matched with the log information output process, the log information respectively matched with different first request marks is output according to the request grouping mode, so that the output of the log information is more flexible, the relevance between the output log information is stronger, and the log information processing efficiency in the use environment with a large quantity of concurrent processing requests is higher.
Drawings
FIG. 1 is a schematic diagram of a usage environment of a log information processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a log information processing apparatus according to an embodiment of the present invention;
fig. 3 is an optional flowchart of a log information processing method according to an embodiment of the present invention;
fig. 4 is an optional flowchart of a log information processing method according to an embodiment of the present invention;
FIG. 5 is a block diagram of a log information processing apparatus 100 according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a block chain in the block chain network 200 according to an embodiment of the present invention;
fig. 7 is a functional architecture diagram of a blockchain network 200 according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an environment for processing log information according to an embodiment of the present invention;
fig. 9 is an alternative flowchart of a log information processing method according to an embodiment of the present invention;
fig. 10 is an optional flowchart illustrating a log information processing method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
Before further detailed description of the embodiments of the present invention, terms and expressions referred to in the embodiments of the present invention are described, and the terms and expressions referred to in the embodiments of the present invention are applicable to the following explanations.
1) Transactions (transactions), equivalent to the computer term "Transaction," include operations that need to be committed to a blockchain network for execution and do not refer solely to transactions in the context of commerce, which embodiments of the present invention follow in view of the convention colloquially used in blockchain technology.
For example, a deployment (deployment) transaction is used to install a specified smart contract to a node in a blockchain network and is ready to be invoked; the Invoke (Invoke) transaction is used to append records of the transaction in the blockchain by invoking smart contracts and to perform operations on the state database of the blockchain, including update operations (including adding, deleting, and modifying key-value pairs in the state database) and query operations (i.e., querying key-value pairs in the state database).
2) A Block chain (Blockchain) is a storage structure for encrypted, chained transactions formed from blocks (blocks).
For example, the header of each block may include hash values of all transactions in the block, and also include hash values of all transactions in the previous block, so as to achieve tamper resistance and forgery resistance of transactions in the block based on the hash values; newly generated transactions, after being filled into the tiles and passing through the consensus of nodes in the blockchain network, are appended to the end of the blockchain to form a chain growth.
3) A Blockchain Network (Blockchain Network) incorporates new blocks into a set of nodes of a Blockchain in a consensus manner.
4) Ledger (legger) is a general term for blockchains (also called Ledger data) and state databases synchronized with blockchains.
Wherein, the blockchain records the transaction in the form of a file in a file system; the state database records the transactions in the blockchain in the form of different types of Key (Key) Value pairs for supporting quick query of the transactions in the blockchain.
5) Intelligent Contracts (Smart Contracts), also known as chain codes (chaincodes) or application codes, are programs deployed in nodes of a blockchain network, and the nodes execute the intelligent Contracts called in received transactions to perform operations of updating or querying key-value data of the account database.
6) Consensus (Consensus), a process in a blockchain network, is used to agree on transactions in a block among a plurality of nodes involved, the agreed block is to be appended to the end of the blockchain, and mechanisms for achieving Consensus include Proof of workload (PoW, proof of Work), proof of rights and interests (PoS, proof of Stake), proof of grant of shares (DPoS, cleared Proof of offer-stamp), proof of Elapsed Time (PoET, proof of Elapsed Time), and so on.
7) In response to the condition or state on which the performed operation depends, one or more of the performed operations may be in real-time or may have a set delay when the dependent condition or state is satisfied; there is no restriction on the order of execution of the operations performed unless otherwise specified.
8) Terminals, including but not limited to: the system comprises a common terminal and a special terminal, wherein the common terminal is in long connection and/or short connection with a sending channel, and the special terminal is in long connection with the sending channel.
9) A client, a bearer in a terminal implementing a specific function, e.g. a mobile client (APP), is a bearer of a specific function in a mobile terminal, e.g. a function required by various users.
10 Log4j java language is widely used as a log information output solution.
11 HashSet-a stored data structure in which objects in the HashSet do not repeat.
12 List-an abstract class of collections (arrays).
Fig. 1 is a schematic view of a usage scenario of a log information processing method according to an embodiment of the present invention, and referring to fig. 1, a terminal (including a terminal 10-1 and a terminal 10-2) is provided with a client capable of executing software with different functions, such as a client or a plug-in for playing a video, a user can obtain a target video through a corresponding client and display the target video, and trigger a corresponding log information processing process to record log information generated by a system in a usage environment during a playing process of the video; the terminal is connected to the server 200 through a network 300, and the network 300 may be a wide area network or a local area network, or a combination of the two, and uses a wireless link to implement data transmission.
As an example, the server 200 is used to lay the log information processing apparatus to implement the log information processing method provided by the present invention to determine the structure of the storage container of the corresponding log information by using the environment of use of the log information; storing the log information generated in the use environment based on a structure of a storage container of the log information; receiving a log information calling instruction, and analyzing the log information calling instruction to obtain a corresponding first request mark set, wherein the first request mark set comprises at least one first request mark; according to the first request mark, obtaining log information matched with the first request mark from the log information generated in the using environment; determining a log information output mode matched with the output process of the log information; and outputting the log information respectively matched with different first request marks according to a request grouping mode according to a log information output mode matched with the output process of the log information.
Taking a client with a video playing function in the preamble as an example, in the running process of the client, defects and the like existing in the running process of the client can be located in a manner of viewing log information. For example, for a video having a video playback success, a user's video selection has a playback success, etc. In order to achieve the purpose, a developer can select any one or more of the existing log information realization class libraries, and then the application developed by the developer depends on the log information realization class library, so that the log information output in the application main service logic processing process can be realized. Or, because the developer is clear about the specific business processing logic inside the application developed by the developer, in order to realize more flexible log information output, the developer can also utilize some log information interface libraries and corresponding use documents thereof, and the like, to realize specific log information printing logic by means of writing codes, and other different types of operations. In short, when a developer develops an application, a specific log information output function is implemented for the application, and during the period, an existing standardized log information implementation class library may be used, or a log information interface class library may be used to implement a log information output logic more suitable for the specific application in an encoding manner.
Certainly, the determining, by the log information processing apparatus, the log information processing result and outputting the corresponding log information in an output mode matched with the log information call instruction specifically includes:
determining the structure of a storage container of corresponding log information according to the using environment of the log information; storing the log information generated in the use environment based on a structure of a storage container of the log information; receiving a log information calling instruction, and analyzing the log information calling instruction to obtain a corresponding first request mark set, wherein the first request mark set comprises at least one first request mark; according to the first request mark, obtaining log information matched with the first request mark from the log information generated in the using environment; determining a log information output mode matched with the output process of the log information; and outputting the log information respectively matched with different first request marks according to a request grouping mode according to a log information output mode matched with the output process of the log information.
To explain the structure of the log information processing apparatus according to the embodiment of the present invention in detail, the log information processing apparatus may be implemented in various forms, such as a dedicated terminal with a processing function of the log information processing apparatus, or a server provided with a processing function of the log information processing apparatus, for example, the server 200 in the foregoing fig. 1. Fig. 2 is a schematic diagram of a composition structure of a log information processing apparatus according to an embodiment of the present invention, and it is understood that fig. 2 only shows an exemplary structure of the log information processing apparatus, and not a whole structure, and a part of the structure or the whole structure shown in fig. 2 may be implemented as needed.
The log information processing device provided by the embodiment of the invention comprises: at least one processor 201, memory 202, user interface 203, and at least one network interface 204. The various components in the log information processing apparatus are coupled together by a bus system 205. It will be appreciated that the bus system 205 is used to enable communications among the components of the connection. The bus system 205 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 205 in fig. 2.
The user interface 203 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 202 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The memory 202 in embodiments of the present invention is capable of storing data to support operation of the terminal (e.g., 10-1). Examples of such data include: any computer program, such as an operating system and application programs, for operating on a terminal (e.g., 10-1). The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program may include various application programs.
In some embodiments, the log information processing apparatus provided in the embodiments of the present invention may be implemented by a combination of hardware and software, and as an example, the log information processing apparatus provided in the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the log information processing method provided in the embodiments of the present invention. For example, a processor in the form of a hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, programmable Logic Devices (PLDs), complex Programmable Logic Devices (CPLDs), field-Programmable Gate arrays (FPGAs), or other electronic components.
As an example of the log information processing apparatus provided by the embodiment of the present invention implemented by combining software and hardware, the log information processing apparatus provided by the embodiment of the present invention may be directly embodied as a combination of software modules executed by the processor 201, where the software modules may be located in a storage medium, the storage medium is located in the memory 202, and the processor 201 reads executable instructions included in the software modules in the memory 202, and completes the log information processing method provided by the embodiment of the present invention in combination with necessary hardware (for example, including the processor 201 and other components connected to the bus 205).
By way of example, the Processor 201 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
As an example of the log information processing apparatus provided by the embodiment of the present invention implemented by hardware, the apparatus provided by the embodiment of the present invention may be implemented by directly using the processor 201 in the form of a hardware decoding processor, for example, by one or more Application Specific Integrated Circuits (ASICs), DSPs, programmable Logic Devices (PLDs), complex Programmable Logic Devices (CPLDs), field Programmable Gate Arrays (FPGAs), or other electronic components, to implement the log information processing method provided by the embodiment of the present invention.
The memory 202 in the embodiment of the present invention is used to store various types of data to support the operation of the log information processing apparatus. Examples of such data include: any executable instructions for operating on the log information processing apparatus, such as executable instructions, a program that implements the slave log information processing method of the embodiment of the present invention may be contained in the executable instructions.
In other embodiments, the log information processing apparatus provided in the embodiments of the present invention may be implemented by software, and fig. 2 shows the log information processing apparatus stored in the memory 202, which may be software in the form of a program, a plug-in, and the like, and includes a series of modules, and as an example of the program stored in the memory 202, the log information processing apparatus may include the following software module information transmission module 2081 and information processing module 2082. When the software modules in the log information processing apparatus are read into the RAM by the processor 201 and executed, the log information processing method provided by the embodiment of the invention is implemented, wherein the functions of each software module in the log information processing apparatus include:
the information transmission module 2081 is used for determining the structure of the storage container of the corresponding log information according to the using environment of the log information;
an information processing module 2082, configured to store log information generated in the usage environment based on a structure of a storage container of the log information;
the information processing module 2082 is configured to receive a log information call instruction, and parse the log information call instruction to obtain a corresponding first request flag set, where the first request flag set includes at least one first request flag;
the information processing module 2082 is configured to obtain, according to the first request flag, log information that matches the first request flag from the log information generated in the usage environment;
the information processing module 2082 is configured to determine a log information output mode matched with the log information output process;
the information processing module 2082 is configured to output, according to a log information output mode matched with the log information output process, log information respectively matched with different first request flags according to a request grouping mode.
Referring to fig. 3, fig. 3 is an optional flowchart of the log information processing method provided by the embodiment of the present invention, and it can be understood that the steps shown in fig. 3 may be executed by various electronic devices operating the log information processing apparatus, such as a server or a server cluster with the log information processing apparatus, where a dedicated terminal with the log information processing apparatus may be packaged in the server shown in fig. 1 to execute corresponding software modules in the log information processing apparatus shown in the foregoing fig. 2. The following is a description of the steps shown in fig. 3.
Step 301: the log information processing device determines the structure of a storage container of the corresponding log information according to the usage environment of the log information.
The log information is a record file or a file set for recording system operation events, and plays an important role in processing historical data, tracing diagnosis problems, understanding system activities and the like.
In some embodiments of the present invention, determining the structure of the storage container of the corresponding log information according to the usage environment of the log information may be implemented by:
and determining the structure of a storage container of the log information according to the using environment of the corresponding log information, wherein the structure is used for storing the log information level parameter, the log information content and the time parameter of the log information in sequence. The log information content can realize collection and storage of all log information in the system, wherein the data structure of each piece of log information can be represented as: log (Log information level: int, time: timestamp, content: string), the structure of the Log information cache is designed as HashSet < key, value >, wherein HashSet < String, list < Log > >, the key of HashSet is a requestId request mark, and the Log information data Log array corresponding to the value request mark.
Step 302: the log information processing device stores the log information generated in the usage environment based on a structure of a storage container of the log information.
Continuing to describe the log information processing method provided by the embodiment of the present invention with reference to the log information processing apparatus shown in fig. 2, referring to fig. 4, fig. 4 is an optional flowchart of the log information processing method provided by the embodiment of the present invention, and it can be understood that the steps shown in fig. 4 can be executed by various electronic devices operating the log information processing apparatus, for example, a server or a server cluster with the log information processing apparatus may be used, wherein a dedicated terminal with the log information processing apparatus may be packaged in the server shown in fig. 1 to execute corresponding software modules in the log information processing apparatus shown in the previous fig. 2. The following is a description of the steps shown in fig. 4.
Step 401: the log information processing device determines a log information level parameter, a log information content and a time parameter corresponding to the log information according to the log information generated in the using environment.
Step 402: determining a second request flag corresponding to the log information, wherein the second request flag is used for characterizing a log array corresponding to the log information.
Step 403: and grouping the storage containers of different log information based on the second request mark corresponding to each storage container of the log information.
Step 404: and sorting different log information included by the same second request mark according to the time parameter.
According to the technical scheme shown in the embodiment, the log information is grouped according to the request marks and then sequenced according to the time sequence, so that the efficiency of traversing and outputting the log information can be improved, the traversal time is reduced, the corresponding log information is efficiently output, and the use experience of a user is improved.
Step 303: the log information processing apparatus acquires the first request flag combination included in the log information call instruction.
The client (different processes) can generate a Unique request mark as a first request mark carried by the log information calling instruction in a universal Unique Identifier (universal Unique Identifier) mode.
Step 304: the log information processing device acquires log information matching the first request flag from the log information generated in the usage environment, based on the first request flag.
Further, the first request flag set includes at least one first request flag, and in conjunction with the embodiment shown in fig. 2 in the foregoing description, when the client runs a video playing process and a social software process, the video playing process and the social software process may generate a Unique request flag corresponding to each process in a manner of a universal Unique Identifier (universal Unique Identifier), respectively, and obtain log information matching with different first request flags from log information generated in a use environment through the different generated first request flags.
In some embodiments of the present invention, obtaining log information matching the first request flag from log information generated in the usage environment according to the request flag may be implemented by:
traversing the log information generated in the use environment, and when the first request mark is matched with the second request mark, extracting the log information matched with the first request mark from a storage container of the log information; and storing the extracted log information matched with the first request mark in a corresponding cache.
Step 305: the log information processing device determines a log information output mode matching with an output process of the log information.
For different application processes or different user requirements, the output mode of the log information can be flexibly adjusted, for example: when logging information generated by different processes in the use environment, the log information generated in the use environment can be output according to a time sequence, and when an error occurs in a process, the log information matched with the corresponding first request mark can be output according to a request grouping mode, so that the process with the error can be detected through the corresponding log information.
Step 306: the log information processing device outputs log information respectively matched with different first request marks according to a request grouping mode according to a log information output mode matched with the output process of the log information.
In some embodiments of the present invention, the corresponding log information is output according to a log information output mode matched with the output process of the log information, and the following mode can also be implemented:
when the output mode of the log information matched with the output process of the log information is output according to the time sequence,
and acquiring corresponding log information from the cache, adjusting the log information acquired from the cache according to the time sequence, and forming and outputting the log information corresponding to the time sequence. Wherein, taking Log4j (Log information of java) as an example, ERROR indicates that the continuous operation of the system is not affected although an ERROR event occurs, WARN indicates that a potential ERROR situation occurs, INFO indicates that a message emphasizes the operation process of the application program on a coarse-grained level, and DEBUG indicates that a fine-grained information event is very helpful for debugging the application program. Specifically, if the level of the currently created log information is INFO and the level of the log information is DEBUG stored in the cache, the log information of the INFO level needs to be printed, and the corresponding log information acquired from the cache is adjusted according to the time sequence, so that the output log information can be matched with the time sequence of the system.
In some embodiments of the present invention, outputting corresponding log information according to a log information output mode matched with an output process of the log information in a time sequence may be implemented by:
and acquiring corresponding log information from the cache, adjusting the log information acquired from the cache according to the log information level parameter corresponding to the log information and the time sequence, and forming and outputting the log information corresponding to the time sequence.
In some embodiments of the present invention, the output of the log information respectively matching with different first request flags according to the output mode matching with the output process corresponding to the log information and in a request grouping mode may be implemented by:
and when the output mode of the log information matched with the output process of the log information is output according to request groups, respectively acquiring corresponding log information from the cache based on different first request marks, adjusting the acquisition of the corresponding log information from the cache according to the log information level parameters corresponding to the log information, and forming and outputting the log information respectively matched with the different first request marks.
The user can set corresponding log information output levels according to different use environments, and when the log information output content meets error levels and false levels, log information of debug levels, info levels and warming levels is automatically collected, so that the corresponding log information is quickly positioned, the fault repairing efficiency is improved, and the positioning efficiency of process problems is also improved.
In some embodiments of the present invention, the log information processing method further includes:
and sending the structure of the storage container of the log information, the first request mark and the log information matched with the first request mark to a block chain network, so that the node of the block chain network fills the structure of the storage container of the log information, the first request mark and the log information matched with the first request mark into a new block, and when the new block is identified in common, the new block is added to the tail of a block chain.
In some embodiments of the present invention, the log information processing method further includes:
receiving data synchronization requests of other nodes in the blockchain network;
responding to the data synchronization request, and verifying the authority of the other nodes;
and when the authority of the other nodes passes the verification, controlling the current node and the other nodes to carry out data synchronization so as to realize that the other nodes acquire the structure of the storage container of the log information of the target user, the first request mark and the log information matched with the first request mark.
Referring to fig. 5, fig. 5 is a schematic diagram of an architecture of the log information processing apparatus 100 according to an embodiment of the present invention, which includes a blockchain network 200 (exemplarily showing a consensus node 210-1 to a consensus node 210-3), an authentication center 300, a service entity 400, and a service entity 500, which are separately described below.
The type of blockchain network 200 is flexible and may be, for example, any of a public chain, a private chain, or a federation chain. Taking a public link as an example, electronic devices such as user terminals and servers of any service entity can access the blockchain network 200 without authorization; taking a federation chain as an example, an electronic device (e.g., a terminal/server) under the jurisdiction of a service entity after obtaining authorization may access the blockchain network 200, and at this time, become a client node in the blockchain network 200.
In some embodiments, the client node may act as a mere watcher of the blockchain network 200, i.e., provide functionality to support the business entity to initiate transactions (e.g., for uplink storage of data or querying of data on the chain), and may be implemented by default or selectively (e.g., depending on the specific business requirements of the business entity) with respect to the functions of the consensus node 210 of the blockchain network 200, such as a ranking function, a consensus service, and an accounting function, etc. Therefore, the data and the service processing logic of the service subject can be migrated into the block chain network 200 to the maximum extent, and the credibility and traceability of the data and service processing process are realized through the block chain network 200.
Consensus nodes in blockchain network 200 receive transactions submitted from client nodes (e.g., client node 410 attributed to business entity 400, and client node 510 attributed to system 500 of electronic devices, shown in fig. 1) of different business entities (e.g., business entity 400 and business entity 500, shown in fig. 1), perform the transactions to update or query the ledger, and various intermediate or final results of performing the transactions may be returned for display in the client nodes of the business entities.
For example, the client node 410/510 may subscribe to events of interest in the blockchain network 200, such as transactions occurring in a particular organization/channel in the blockchain network 200, and the corresponding transaction notifications are pushed by the consensus node 210 to the client node 410/510, thereby triggering the corresponding business logic in the client node 410/510.
An exemplary application of the blockchain network is described below, taking an example in which a plurality of service entities access the blockchain network to implement management of log information processing results and corresponding text information.
Referring to fig. 5, a plurality of business entities involved in the management link, for example, the business entity 400 may be an artificial intelligence-based log information processing apparatus, and the business entity 500 may be a display system with a log information processing function, and registers from the certificate authority 300 to obtain respective digital certificates, where the digital certificates include a public key of the business entity and a digital signature signed by the certificate authority 300 for the public key and identity information of the business entity, and are used to be attached to a transaction together with the digital signature of the business entity for the transaction, and are sent to the blockchain network, so that the blockchain network takes out the digital certificate and the signature from the transaction, verifies the authenticity of the message (i.e. whether the message is not tampered) and the identity information of the business entity sending the message, and verifies according to the identity, for example, whether the blockchain network has the right to initiate the transaction. Clients running on electronic devices (e.g., terminals or servers) hosted by the business entity may request access from the blockchain network 200 to become client nodes.
The client node 410 of the service agent 400 is configured to determine a structure of a storage container of the corresponding log information according to a usage environment of the log information; storing the log information generated in the use environment based on a structure of a storage container of the log information; receiving a log information calling instruction, and analyzing the log information calling instruction to obtain a corresponding first request mark set, wherein the first request mark set comprises at least one first request mark; according to the first request mark, obtaining log information matched with the first request mark from the log information generated in the using environment; and outputting corresponding log information according to an output mode matched with an output process corresponding to the log information, and sending the structure of the storage container of the log information of the target user, a first request mark and the log information matched with the first request mark to the block chain network 200.
In which the structure of the storage container of the log information of the target user, the first request flag, and the log information matching with the first request flag are sent to the blockchain network 200, service logic may be set in the client node 410 in advance, and when corresponding text information is formed, the client node 410 automatically sends the structure of the storage container of the log information of the target user, the first request flag, and the log information matching with the first request flag to the blockchain network 200, or a service person of the service agent 400 logs in the client node 410, manually packages the structure of the storage container of the log information of the target user, the first request flag, and the log information matching with the first request flag, and sends them to the blockchain network 200. When sending, the client node 410 generates a transaction corresponding to the update operation according to the structure of the storage container of the log information of the target user, the first request flag, and the log information matched with the first request flag, specifies an intelligent contract that needs to be called to implement the update operation, and parameters transferred to the intelligent contract in the transaction, and also carries a digital certificate of the client node 410, a signed digital signature (for example, obtained by encrypting a digest of the transaction using a private key in the digital certificate of the client node 410), and broadcasts the transaction to the consensus node 210 in the blockchain network 200.
When the transaction is received in the consensus node 210 in the blockchain network 200, the digital certificate and the digital signature carried by the transaction are verified, after the verification is successful, whether the service agent 400 has the transaction right is determined according to the identity of the service agent 400 carried in the transaction, and the transaction fails due to any verification judgment of the digital signature and the right verification. After successful verification, node 210 signs its own digital signature (e.g., by encrypting the digest of the transaction using the private key of node 210-1) and continues to broadcast in blockchain network 200.
After the transaction successfully verified is received by the consensus node 210 in the blockchain network 200, the transaction is filled into a new block and broadcast. When a new block is broadcasted by the consensus node 210 in the block chain network 200, performing a consensus process on the new block, if the consensus is successful, adding the new block to the tail of the block chain stored in the new block, updating the state database according to a transaction result, and executing a transaction in the new block: adding, in a status database, a key-value pair including a structure of a storage container that updates the log information of the target user, a first request flag, and log information that matches the first request flag, for a transaction that submits the update of the structure of the storage container that updates the log information of the target user, the first request flag, and the log information that matches the first request flag.
The service person of the service agent 500 logs in the client node 510, inputs a log information processing result or a text information query request, the client node 510 generates a transaction corresponding to the update operation/query operation according to the log information processing result or the text information query request, specifies an intelligent contract that needs to be called to implement the update operation/query operation and parameters transferred to the intelligent contract in the transaction, and the transaction further carries a digital certificate of the client node 510 and a signed digital signature (for example, a digest of the transaction is encrypted by using a private key in the digital certificate of the client node 510), and broadcasts the transaction to the consensus node 210 in the blockchain network 200.
After receiving the transaction in the consensus node 210 in the blockchain network 200, verifying the transaction, filling the block and making the consensus consistent, adding the filled new block to the tail of the blockchain stored in the new block, updating the state database according to the transaction result, and executing the transaction in the new block: for the submitted transaction of updating the structure of a storage container of the log information of the target user, a first request mark and the log information matched with the first request mark, updating a key value pair corresponding to the log information processing result in a state database according to the manual identification result; and for the submitted transaction for inquiring a certain log information processing result, inquiring a key value pair corresponding to the log information processing result from the state database, and returning the transaction result.
It should be noted that fig. 5 exemplarily shows a process of directly linking the structure of the storage container of the log information of the target user, the first request flag, and the log information matching with the first request flag, but in other embodiments, for a case that the data size of the log information processing result is large, the client node 410 may pair and link the hash of the log information processing result and the hash of the corresponding text information, and store the original log information processing result and the corresponding text information in a distributed file system or a database. After obtaining the log information processing result and the corresponding text information from the distributed file system or the database, the client node 510 may perform verification in combination with the corresponding hash in the blockchain network 200, thereby reducing the workload of uplink operation.
As an example of a block chain, referring to fig. 6, fig. 6 is a schematic structural diagram of a block chain in a block chain network 200 according to an embodiment of the present invention, where a header of each block may include hash values of all transactions in the block and also include hash values of all transactions in a previous block, a record of a newly generated transaction is filled in the block and is added to a tail of the block chain after being identified by nodes in the block chain network, so as to form a chain growth, and a chain structure based on hash values between blocks ensures tamper resistance and forgery prevention of transactions in the block.
An exemplary functional architecture of the blockchain network provided by the embodiment of the present invention is described below, referring to fig. 7, fig. 7 is a schematic functional architecture diagram of a blockchain network 200 provided by the embodiment of the present invention, which includes an application layer 201, a consensus layer 202, a network layer 203, a data layer 204, and a resource layer 205, which are described below respectively.
The resource layer 205 encapsulates the computing, storage, and communication resources that implement each node 210 in the blockchain network 200.
The data layer 204 encapsulates various data structures that implement the ledger, including blockchains implemented as files in a file system, keyed state databases, and presence certificates (e.g., hash trees of transactions in blocks).
The network layer 203 encapsulates the functions of a Point-to-Point (P2P) network protocol, a data propagation mechanism and a data verification mechanism, an access authentication mechanism, and a service agent identity management.
The P2P network protocol implements communication between nodes 210 in the blockchain network 200, the data propagation mechanism ensures propagation of transactions in the blockchain network 200, and the data verification mechanism is used for implementing reliability of data transmission between nodes 210 based on an encryption method (e.g., digital certificate, digital signature, public/private key pair); the access authentication mechanism is used for authenticating the identity of the service subject added into the block chain network 200 according to an actual service scene, and endowing the service subject with the authority of accessing the block chain network 200 when the authentication is passed; the business entity identity management is used to store the identity of the business entities that are allowed to access the blockchain network 200, as well as the permissions (e.g., the types of transactions that can be initiated).
The consensus layer 202 encapsulates the functions of the mechanism for the nodes 210 in the blockchain network 200 to agree on a block (i.e., a consensus mechanism), transaction management, and ledger management. The consensus mechanism comprises consensus algorithms such as POS, POW and DP OS, and the pluggable consensus algorithm is supported.
The transaction management is configured to verify a digital signature carried in the transaction received by the node 210, verify identity information of the service entity, and determine whether the node has an authority to perform the transaction (read related information from the identity management of the service entity) according to the identity information; for the service agents authorized to access the blockchain network 200, the service agents all have digital certificates issued by the certificate authority, and the service agents sign the submitted transactions by using private keys in the digital certificates of the service agents, so that the legal identities of the service agents are declared.
The ledger administration is used to maintain blockchains and state databases. For the block which obtains the consensus, adding the block to the tail part of the block chain; executing the transaction in the acquired consensus block, updating the key-value pairs in the state database when the transaction comprises an update operation, querying the key-value pairs in the state database when the transaction comprises a query operation and returning a query result to the client node of the business entity. Supporting query operations for multiple dimensions of a state database, comprising: querying the block based on the block vector number (e.g., hash value of the transaction); inquiring the block according to the block hash value; inquiring a block according to the transaction vector number; inquiring the transaction according to the transaction vector number; inquiring account data of the business main body according to the account (vector number) of the business main body; and inquiring the block chain in the channel according to the channel name.
The application layer 201 encapsulates various services that the blockchain network can implement, including tracing, crediting, and verifying transactions.
The log information processing method provided by the present invention is described below by taking the log information processing of the video playing process in the wechat applet as an example, wherein fig. 8 is a schematic diagram of a use environment of the log information processing method according to the embodiment of the present invention; referring to fig. 8, the terminal (including the terminal 80-1 and the terminal 80-2) is provided with a corresponding client capable of executing different functions, wherein a video playing process of the wechat applet runs in the terminal 80-2, log information is stored in the server 200, the terminal 80-1 obtains different log information from the corresponding server 200 through the network 300 to browse, the terminal is connected to the server 200 through the network 300, the network 300 may be a wide area network or a local area network, or a combination of the two, and data transmission is realized by using a wireless link. In the process of program operation, in order to facilitate troubleshooting when problems occur, log information can be output frequently in the process of program operation in a duplication site, and a large amount of log information output often causes negative problems, such as influence on program operation efficiency, consumption of system and hardware resources and the like, so that log information output at different levels can be performed according to different importance in a common scene.
In the conventional art, the output log information level may be set, for example: debug, info, wanning, error, fatal, after setting the output level of the log information, the content of the output log information will not change dynamically; then, according to the configuration, the time when the log information occurs is output in time sequence, the name of the category, the name of the method, the code line number, the level of the log information, the detailed information of the log information and the like, but under the condition that the request processing is more, namely the concurrent processing is larger, the log information is output in time sequence, the log information is output according to the time sequence when the log information is not continuous for the processing of the same request, but a plurality of request processing log information are output according to the time sequence, nearly irrelevant log information is arranged before and after each line of log information of the whole log information file, and for a log information collecting tool without assistance, when the abnormity is required to be checked, the log information cannot be analyzed, so that the development efficiency and the fault repairing efficiency are influenced.
To solve the above-mentioned drawback, referring to fig. 9 and fig. 10, fig. 9 is an optional flowchart of a log information processing method provided in an embodiment of the present invention, and fig. 10 is an optional flowchart of a log information processing method provided in an embodiment of the present invention, where a target user is an operating user of a current terminal, and the method specifically includes the following steps:
step 901: and setting corresponding log information level parameters according to the using environment of the log information.
Wherein the level parameter of the required log information is different for different processes or different use environments. Taking log4j log information component as an example, the log4j log information component supports an output method void debug (String msg, object.. Attributes), void info (String msg, object.. Attributes) void aware (String msg, object.. Attributes), void error (String msg, object.. Attributes), void false (String msg, object.. Attributes), and the like, which set the output log information levels of debug, info, warming, error, false, and the corresponding log information levels.
The log information levels have the following relationship (sequentially decreasing), debug > info > warming > error > faral, if the log information output level is set to be error, only the log information of the error and the faral levels can be output, if the log information output level is set to be info, the log information of the info, warming, error and faral levels can be output, and the high-level log information is filtered.
Through step 901, all log information in the system can be collected and stored, where the data structure of each piece of log information can be represented as: log (Log information level: int, time: timestamp, content: string), the structure of the Log information cache is designed as HashSet < key, value >, wherein HashSet < String, list < Log > >, the key of HashSet is a requestId request mark, and the Log information data Log array corresponding to the value request mark.
Step 902: and receiving a log information calling instruction, and acquiring corresponding log information according to the corresponding request mark.
The whole stored log information structure refers to table 1, the log information in each request mark is sorted in time sequence, and the log information group corresponding to the request mark can be quickly located through the corresponding request mark.
Figure GDA0004082932700000221
TABLE 1
In some embodiments of the present invention, a client (different process) may call a request flag that needs to be generated, such as a requestId, and generate the requestId by using uuid or other manners, where a specific manner of the present invention is not limited to this, and is used to mark a request, and the request flag needs to carry a corresponding requestId parameter when calling a log information output function, that is, a relationship between a certain log information and a requestId (record which requestId a certain log information belongs to), and at the same time, a level, a time, and the like of the log information. And meanwhile, saving the requestId into the Set object of the corresponding log information instance. Furthermore, the log information can be grouped according to the request mark and then sequenced in time sequence, so that the efficiency of traversing and outputting the log information is improved.
Step 903: the log information is output by time or grouped by request according to the corresponding setting information.
The output log information is processed by starting an independent thread, and the application main thread is not influenced.
In some embodiments of the present invention, if the log information is outputted chronologically, the log information of the buffer is outputted chronologically and then at the configured log information level. Specifically, each requestId (key) in the log information cache can be traversed, log information array data corresponding to the key is taken out, whether log information of an error or a false level appears in the log information array is traversed, and if yes, no processing is carried out; if not, according to the current log information level set by the user, deleting the log information of which the log information level is greater than the current set user level. And combining the log information corresponding to all keys, and sequencing the log information according to the time sequence to form the log information to be output.
In some embodiments of the present invention, if the log information is output according to the request packet, the request requestId stored by the Set object is traversed when the log information is output, then the log information corresponding to the requestId is found from the buffer, and the final log information is output according to the output log information level, but if the log information of an error level or a fast level appears in a certain request, the log information is output to the file as the high-level debug, info, and warming log information (which is checked back in time) before the log information, specifically, each requestId (key) in the log information cache may be traversed to extract the log information array data corresponding to the key, and the log information array may be traversed to determine whether the log information of the error level or the fast level appears, or not to perform any processing if so. If the error or the false log information does not appear, deleting the log information with the log information level higher than the log information level set by the current user, and then writing the log information into a log information file to form the log information to be output.
With reference to fig. 10, fig. 10 is an optional flowchart of the log information processing method according to the embodiment of the present invention, and assuming that the set log information output level is INFO, the method specifically includes the following steps:
step 1001: the client sends a calling instruction carrying the requestId to the server;
step 1002: and outputting debug log information.
Step 1003: and outputting the INFO log information.
Step 1004: and outputting error log information.
Step 1005: and outputting the false log information.
Step 1006: and the log instance process outputs corresponding log information.
Wherein outputting corresponding log information in chronological order includes:
[ 2019-10-15;
[ 2019-10-15;
[ 2019-10-15;
[ 2019-10-15;
[ 2019-10-15;
assuming that the set log information output level is INFO, the effect of outputting by request packet (note that since ERROR occurs, the log information DEBUG log information having a higher level than that of ERROR log information is outputted as well)
[ 2019-10-15;
[ 2019-10-15;
[ 2019-10-15;
[ 2019-10-15;
[ 2019-10-15.
Step 904: the data in the corresponding stored data structure is emptied.
The beneficial technical effects are as follows:
by the log information processing method provided by the invention, the output of the log information is more flexible, the log information can be output in groups according to requests, when the log information is abnormal or needs to be retrieved, a certain section of continuous log information is the log information needing to be checked, meanwhile, because the log information output is not output according to a fixed log information level, when error and fault occur, the log information of debug, info and warning can be automatically collected, the problem can be quickly positioned, the fault repairing efficiency or the problem positioning efficiency is improved, and the use experience of a user is effectively improved.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (9)

1. A method for processing log information, the method comprising:
determining the structure of a storage container of corresponding log information according to the using environment of the log information;
storing the log information generated in the use environment based on a structure of a storage container of the log information;
receiving a log information calling instruction, and analyzing the log information calling instruction to obtain a corresponding first request mark set, wherein the first request mark set comprises at least one first request mark;
according to the first request mark, obtaining log information matched with the first request mark from the log information generated in the using environment;
determining a log information output mode matched with the output process of the log information;
according to a log information output mode matched with the log information output process, outputting the log information respectively matched with different first request marks according to a request grouping mode;
and sending the structure of the storage container of the log information, the first request mark and the log information matched with the first request mark to a block chain network, so that the node of the block chain network fills the structure of the storage container of the log information, the first request mark and the log information matched with the first request mark into a new block, and when the new block is identified in common, the new block is added to the tail of a block chain.
2. The method of claim 1, wherein determining the structure of the storage container of the corresponding log information according to the usage environment of the log information comprises:
and determining the structure of a storage container of the log information according to the using environment of the log information, wherein the structure sequentially comprises the log information level parameter, the log information content and the time parameter of the log information.
3. The method of claim 2, wherein storing all log information generated in the usage environment based on the structure of the storage container of the log information comprises:
determining a log information level parameter, a log information content and a time parameter corresponding to the log information according to the log information generated in the using environment;
determining a second request flag corresponding to the log information, wherein the second request flag is used for characterizing a log array corresponding to the log information;
grouping storage containers of different log information based on a second request mark corresponding to each storage container of the log information;
and sequencing the different log information included by the same second request mark according to the time parameter.
4. The method of claim 1, wherein obtaining log information matching the first request flag from the log information generated in the usage environment according to the request flag comprises:
traversing log information generated in the usage environment,
when the first request mark is matched with a second request mark, extracting the log information matched with the first request mark from a storage container of the log information, wherein the second request mark is used for representing a log array corresponding to the log information;
and storing the extracted log information matched with the first request mark in a corresponding cache.
5. The method according to claim 4, wherein outputting the log information respectively matching with different first request flags in a request grouping manner according to a log information output manner matching with an output process of the log information comprises:
when the output mode of the log information matched with the output process of the log information is output according to the request grouping,
and respectively acquiring corresponding log information from the cache based on different first request marks, adjusting the corresponding log information acquired from the cache according to log information level parameters corresponding to the log information, and forming and outputting the log information respectively matched with the different first request marks.
6. The method of claim 4, further comprising:
when the output mode of the log information matched with the output process of the log information is output according to the time sequence,
obtaining corresponding log information from the cache, and adjusting the log information obtained from the cache according to the time sequence to form and output log information corresponding to the time sequence, or,
and acquiring corresponding log information from the cache, adjusting the log information acquired from the cache according to the log information level parameter corresponding to the log information and the time sequence, and forming and outputting the log information corresponding to the time sequence.
7. A log information processing apparatus, characterized in that the apparatus comprises:
the information transmission module is used for determining the structure of a storage container of the corresponding log information according to the using environment of the log information;
an information processing module for storing the log information generated in the use environment based on a structure of a storage container of the log information;
the information processing module is used for receiving a log information calling instruction and analyzing the log information calling instruction to obtain a corresponding first request mark set, wherein the first request mark set comprises at least one first request mark;
the information processing module is used for acquiring log information matched with the first request mark from the log information generated in the using environment according to the first request mark;
the information processing module is used for determining a log information output mode matched with the output process of the log information;
the information processing module is used for outputting the log information respectively matched with different first request marks according to a request grouping mode according to a log information output mode matched with the output process of the log information;
the information processing module is configured to send the structure of the storage container of the log information, the first request flag, and the log information matched with the first request flag to a block chain network, so that a node of the block chain network fills the structure of the storage container of the log information, the first request flag, and the log information matched with the first request flag into a new block, and when the new block is identified in common and consistent, adds the new block to the tail of the block chain.
8. An electronic device, characterized in that the electronic device comprises:
a memory for storing executable instructions;
a processor for implementing the log information processing method of any one of claims 1 to 6 when executing the executable instructions stored in the memory.
9. A computer-readable storage medium storing executable instructions, wherein the executable instructions, when executed by a processor, implement the log information processing method of any one of claims 1 to 6.
CN202010148717.6A 2020-03-05 2020-03-05 Log information processing method and device, electronic equipment and storage medium Active CN111367867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010148717.6A CN111367867B (en) 2020-03-05 2020-03-05 Log information processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010148717.6A CN111367867B (en) 2020-03-05 2020-03-05 Log information processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111367867A CN111367867A (en) 2020-07-03
CN111367867B true CN111367867B (en) 2023-03-21

Family

ID=71210285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010148717.6A Active CN111367867B (en) 2020-03-05 2020-03-05 Log information processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111367867B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465765A (en) * 2008-12-31 2009-06-24 东信和平智能卡股份有限公司 Log system and use method thereof
CN103179162A (en) * 2011-12-23 2013-06-26 阿里巴巴集团控股有限公司 Method and system for outputting log
CN103577443A (en) * 2012-07-30 2014-02-12 中国银联股份有限公司 Log processing system
CN104252405A (en) * 2013-06-26 2014-12-31 腾讯科技(深圳)有限公司 Log information output method and device
CN106294176A (en) * 2016-08-19 2017-01-04 暴风集团股份有限公司 The method and system of application failure location in Mac OS system
CN106708711A (en) * 2015-11-17 2017-05-24 阿里巴巴集团控股有限公司 Log information output control method and device
CN108459939A (en) * 2018-01-08 2018-08-28 平安科技(深圳)有限公司 A kind of log collecting method, device, terminal device and storage medium
CN109271359A (en) * 2018-11-20 2019-01-25 北京千丁互联科技有限公司 Log information processing method, device, electronic equipment and readable storage medium storing program for executing
CN109376131A (en) * 2018-11-02 2019-02-22 郑州云海信息技术有限公司 A kind of log distributed deployment store method, apparatus and system
CN109542741A (en) * 2018-10-11 2019-03-29 平安科技(深圳)有限公司 The automatic packet storage approach of log, device, computer equipment and storage medium
CN109656778A (en) * 2018-11-28 2019-04-19 金蝶软件(中国)有限公司 Data capture method, device, computer equipment and storage medium
CN109902074A (en) * 2019-04-17 2019-06-18 江苏全链通信息科技有限公司 Log storing method and system based on data center
CN109977089A (en) * 2019-03-13 2019-07-05 深圳壹账通智能科技有限公司 Blog management method, device, computer equipment and computer readable storage medium
CN110245489A (en) * 2019-05-20 2019-09-17 阿里巴巴集团控股有限公司 Receipt storage method, node and system based on plaintext log
CN110262967A (en) * 2019-06-05 2019-09-20 微梦创科网络科技(中国)有限公司 A kind of log-output method and device applied to automatic test
CN110362536A (en) * 2019-07-15 2019-10-22 北京工业大学 Log cipher text retrieval method based on alarm association
CN110674105A (en) * 2019-08-30 2020-01-10 中国人民财产保险股份有限公司 Data backup method, system and server

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465765A (en) * 2008-12-31 2009-06-24 东信和平智能卡股份有限公司 Log system and use method thereof
CN103179162A (en) * 2011-12-23 2013-06-26 阿里巴巴集团控股有限公司 Method and system for outputting log
CN103577443A (en) * 2012-07-30 2014-02-12 中国银联股份有限公司 Log processing system
CN104252405A (en) * 2013-06-26 2014-12-31 腾讯科技(深圳)有限公司 Log information output method and device
CN106708711A (en) * 2015-11-17 2017-05-24 阿里巴巴集团控股有限公司 Log information output control method and device
CN106294176A (en) * 2016-08-19 2017-01-04 暴风集团股份有限公司 The method and system of application failure location in Mac OS system
CN108459939A (en) * 2018-01-08 2018-08-28 平安科技(深圳)有限公司 A kind of log collecting method, device, terminal device and storage medium
CN109542741A (en) * 2018-10-11 2019-03-29 平安科技(深圳)有限公司 The automatic packet storage approach of log, device, computer equipment and storage medium
CN109376131A (en) * 2018-11-02 2019-02-22 郑州云海信息技术有限公司 A kind of log distributed deployment store method, apparatus and system
CN109271359A (en) * 2018-11-20 2019-01-25 北京千丁互联科技有限公司 Log information processing method, device, electronic equipment and readable storage medium storing program for executing
CN109656778A (en) * 2018-11-28 2019-04-19 金蝶软件(中国)有限公司 Data capture method, device, computer equipment and storage medium
CN109977089A (en) * 2019-03-13 2019-07-05 深圳壹账通智能科技有限公司 Blog management method, device, computer equipment and computer readable storage medium
CN109902074A (en) * 2019-04-17 2019-06-18 江苏全链通信息科技有限公司 Log storing method and system based on data center
CN110245489A (en) * 2019-05-20 2019-09-17 阿里巴巴集团控股有限公司 Receipt storage method, node and system based on plaintext log
CN110262967A (en) * 2019-06-05 2019-09-20 微梦创科网络科技(中国)有限公司 A kind of log-output method and device applied to automatic test
CN110362536A (en) * 2019-07-15 2019-10-22 北京工业大学 Log cipher text retrieval method based on alarm association
CN110674105A (en) * 2019-08-30 2020-01-10 中国人民财产保险股份有限公司 Data backup method, system and server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
劳友昌 等.基于WLANAC日志安全应用管理.2014,第34卷(第34期),68-73. *
邵奇峰 等.企业级区块链技术综述.2019,第30卷(第30期),2571-2592. *

Also Published As

Publication number Publication date
CN111367867A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN110727712B (en) Data processing method and device based on block chain network, electronic equipment and storage medium
US11206451B2 (en) Information interception processing method, terminal, and computer storage medium
CN106874461B (en) A kind of workflow engine supports multi-data source configuration security access system and method
US10764070B2 (en) High precision timestamps in blockchain
CN113779444B (en) Interface development method, zero code engine and zero code data interface development system
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN111414381B (en) Data processing method and device, electronic equipment and storage medium
CN112506747B (en) Business process monitoring method and device, electronic equipment and storage medium
CN111092745A (en) Log processing method and device based on block chain, computer equipment and storage medium
CN111597543A (en) Wide-area process access authority authentication method and system based on block chain intelligent contract
CN111177246A (en) Service data processing method and device
CN111694743A (en) Service system detection method and device
CN111698198B (en) Secret generation and share distribution
CN115694699A (en) Time delay parameter acquisition method and device, electronic equipment and storage medium
WO2022057525A1 (en) Method and device for data retrieval, electronic device, and storage medium
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN112925589B (en) Calling method and device of expansion interface
CN112132554A (en) Government affair information processing method and device, electronic equipment and storage medium
CN111367867B (en) Log information processing method and device, electronic equipment and storage medium
CN110858211B (en) Data storage method, device and system and storage medium
US11782823B2 (en) Automatically capturing weather data during engineering tests
CN111078569B (en) Method and device for testing optical character recognition application and storage medium
CN113497762A (en) Data message transmission method and device
CN111178536B (en) Data information processing method and device, electronic equipment and storage medium
CN110674139B (en) Information processing method, system, resource management system and storage medium

Legal Events

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