WO2021189954A1 - 日志数据处理方法、装置、计算机设备和存储介质 - Google Patents

日志数据处理方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021189954A1
WO2021189954A1 PCT/CN2020/135251 CN2020135251W WO2021189954A1 WO 2021189954 A1 WO2021189954 A1 WO 2021189954A1 CN 2020135251 W CN2020135251 W CN 2020135251W WO 2021189954 A1 WO2021189954 A1 WO 2021189954A1
Authority
WO
WIPO (PCT)
Prior art keywords
log
format
log data
target
query
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.)
Ceased
Application number
PCT/CN2020/135251
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2021189954A1 publication Critical patent/WO2021189954A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • This application relates to the field of digital medical technology, and in particular to a log data processing method, device, computer equipment and storage medium.
  • This application provides a log data processing method, the method includes:
  • the formatted log data is encapsulated, and the encapsulated log data is stored in the target database system.
  • This application also provides a log data processing device, which includes:
  • Log data acquisition module for acquiring log data to be processed
  • the log format determination module is configured to determine the target log format corresponding to the log provider according to the function type corresponding to the log provider of the log data to be processed;
  • a formatting processing module configured to format the log data to be processed according to the target log format, to obtain formatted log data
  • the encapsulation processing module is configured to encapsulate the formatted log data based on a preset encapsulation processing strategy, and store the encapsulated log data in the target database system.
  • the application also provides a computer device, which includes a memory and a processor;
  • the memory is used to store a computer program
  • the processor is configured to execute the computer program and implement the log data processing method as follows when the computer program is executed:
  • the formatted log data is encapsulated, and the encapsulated log data is stored in the target database system.
  • the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the log data processing method as follows:
  • the formatted log data is encapsulated, and the encapsulated log data is stored in the target database system.
  • FIG. 1 is a schematic flowchart of a log data processing method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a log processing process provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of the sub-steps of determining the target log format provided by an embodiment of the present application
  • FIG. 5 is a schematic flowchart of sub-steps of a log data processing method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of sub-steps of obtaining log query results provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an interface operation for triggering a query button in a log query page provided by an embodiment of the present application
  • FIG. 8 is a schematic flowchart of the sub-steps of generating log analysis information provided by an embodiment of the present application.
  • FIG. 9 is a schematic block diagram of a log data processing device provided by an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of the structure of a computer device provided by an embodiment of the present application.
  • the embodiments of the present application provide a log data processing method, device, computer equipment, and storage medium.
  • the log data processing method can be applied to a log processing system in a server or a terminal to determine the target log format according to the function type corresponding to the log provider, format the log data according to the target log format, and then encapsulate and store it.
  • the log data in the corresponding unified standardized format can be obtained more conveniently from the target database system and the log data can be analyzed and processed, which improves the usability and readability of the log data.
  • the server can be an independent server or a server cluster.
  • the terminal can be an electronic device such as a smart phone, a tablet computer, a notebook computer, and a desktop computer.
  • the log data processing method includes steps S10 to S40.
  • Step S10 Obtain log data to be processed.
  • FIG. 2 is a schematic flowchart of a log processing process provided by an embodiment of the present application, where cluster represents a cluster, and instance represents an instance. It should be noted that the instance refers to an application service or a proxy server.
  • log data generated by different log providers can be collected to obtain log data to be processed; then the log data to be processed is formatted and packaged, and then stored in the ES system.
  • acquiring the log data to be processed may include: determining the middleware in the log provider, installing a log collector on the middleware; and acquiring the log data to be processed according to the log collector.
  • the log provider may include different subsystems, application services in the cluster, and may also include a proxy server.
  • the application service is set in the application server;
  • the proxy server may include, but is not limited to, proxy servers such as Nginx and openresty.
  • log data may be collected through middleware corresponding to the log provider.
  • the middleware of the log provider can be set according to the system architecture and the function type of the service; different log providers can use the same kind of middleware or different middleware.
  • the log processing system can collect log data generated by the log provider through middleware.
  • the middleware may include, but is not limited to, middleware such as Weblogic, tomcat, springboot, and apache. It should be noted that middleware is an independent system software or service program, which lies between the operating system and application software.
  • log collectors may include, but are not limited to, Logstash, Filebeat, Fluentd, Logtail, and so on.
  • the log collector by installing a log collector on the middleware of the log provider, the log collector can quickly and conveniently collect log data generated by the log provider.
  • Step S20 Determine the target log format corresponding to the log provider according to the function type corresponding to the log provider of the log data to be processed.
  • the function types include proxy service functions and application service functions.
  • the function type provided by the proxy server is the proxy service function
  • the function type provided by the application server is the application service function.
  • the proxy service functions provided by the proxy server may include load balancing, traffic shunting, forwarding, and so on.
  • the server type corresponding to the log provider may be determined, and the function type corresponding to the log provider may be determined according to the server type. If the server type corresponding to the log provider is a proxy server, it can be determined that the function type corresponding to the log provider is a proxy service function; if the server type corresponding to the log provider is an application server, it can be determined that the function type corresponding to the log provider is Application service function.
  • the configuration file corresponding to the function type can be obtained from the blockchain according to the function type corresponding to the log provider, and the log format in the configuration file is used as the target log format.
  • the configuration file includes a preset log format.
  • determining the target log format corresponding to the log provider according to the function type corresponding to the log provider of the log data to be processed may include: when the function type is a proxy service function, obtaining a preset from the blockchain The first type of configuration file, and the preset log standard format included in the first type of configuration file is used as the target log format.
  • the log standard format in the first type of configuration file can be defined as: log_format main $fmt_localtime $request_time $remote_user $body_bytes_sent $remote_addr $server_addr:$server_port $status $request_method $uri $request_uried-$http_$user $upstream_connect_time $upstream_header_time $upstream_response_time.
  • the time format is yyyy-MM-dd HH:mm:ss can be realized by the following code:
  • ngx.var.fmt_localtime ngx.localtime(); ⁇ .
  • the log standard format can be configured in advance, and the first type of configuration file can be generated according to the configured log standard format.
  • determining the target log format corresponding to the log provider according to the function type corresponding to the log provider of the log data to be processed may include: when the function type is an application service function, obtaining the pre-recorded data from the blockchain Set the second type of configuration file, and determine the target log format according to the second configuration file.
  • the second type of configuration file includes multiple preset log custom formats.
  • the first custom format, the second custom format, and the third custom format, etc.; different log day definition formats are used to format the log data transmitted by different middleware.
  • the following steps S201 to S203 may be specifically included.
  • Step S201 Determine multiple preset middleware.
  • the preset middleware may include middleware such as Weblogic, tomcat, springboot, and apache.
  • the preset middleware can be determined according to the middleware in the log provider. For example, use middleware commonly used by multiple log providers as the preset middleware.
  • Step S202 Based on a preset matching strategy, match the corresponding log custom format for each of the middleware.
  • the preset matching strategy may include: Weblogic middleware matching with the first custom format; Tomcat and springboot middleware matching with the second custom format; Apache middleware matching with the third custom format.
  • the first custom format is: date time time-taken x-c_username bytes c-ip s-ip sc-status cs-method cs-uri-stem cs-uri x-c_sessionid x-c_x_forwarded_for.
  • the second custom format is: % ⁇ yyyy-MM-dd HH:mm:ss ⁇ t%T% ⁇ username ⁇ s%b%a%A%s%m%U%U%q%S% ⁇ X- Forwarded-For ⁇ i% ⁇ Cookie ⁇ i"% ⁇ User-Agent ⁇ i"% ⁇ Host ⁇ i"% ⁇ Referer ⁇ i% ⁇ Content-Length ⁇ i% ⁇ Origin ⁇ i.
  • the third custom format is: % ⁇ %Y-%m-%d%t%H:%M:%S ⁇ t%T%u%b%a%A%s%m%U%U%q% ⁇ sessionID ⁇ C% ⁇ X-Forwarded-For ⁇ i% ⁇ Cookie ⁇ i ⁇ "% ⁇ User-Agent ⁇ i ⁇ " ⁇ "% ⁇ Host ⁇ i ⁇ "% ⁇ Referer ⁇ i% ⁇ Content-Length ⁇ i % ⁇ Origin ⁇ i.
  • the log data transmitted by different middleware can be formatted in the log custom format by matching the log custom format to the different middleware. Then, the log data in a unified format is obtained.
  • Step S203 Associate each of the middleware with the corresponding log custom format and store it in the second type of configuration file.
  • the above-mentioned middleware and the log custom format corresponding to the middleware are associated and stored in the second type of configuration file.
  • the Weblogic middleware is associated with the first custom format and stored in a subfile of the second type of configuration file.
  • the apache middleware is associated with the third custom format and stored in another sub-file in the second-type configuration file.
  • the subfile in the second configuration file may be named after the name of the stored middleware.
  • the second configuration file may be queried according to the name of the middleware, and the log custom format in the subfile obtained by the query may be used as the target log format.
  • the first type of configuration file and the second type of configuration file may also be stored in a node of a blockchain.
  • the first type of configuration file and the second type of configuration file can be obtained from the blockchain.
  • the following steps S204 and S205 may be included.
  • Step S204 Determine the middleware in the log provider.
  • the middleware in the log provider may be determined when the log data to be processed is acquired according to the log collector. For example, determine that the middleware in the log provider is Weblogic middleware; or determine that the middleware in the log provider is apache middleware.
  • Step S205 Query the log custom format associated with the middleware from the second type of configuration file, and use the log custom format as the target log format.
  • the middleware corresponding to the log provider is Weblogic middleware, and the Weblogic middleware corresponds to the first custom format in the second type of configuration file, it can be determined that the first custom format corresponds to the log provider Target log format.
  • the middleware corresponding to the log provider is apache middleware
  • the apache middleware corresponds to the third custom format in the second type of configuration file
  • the target log format corresponding to the log provider can be determined from the configuration file of the first type or the configuration file of the second type, and the different format types of the log provider can be determined.
  • the log data is formatted, and the format of the log data is standardized.
  • Step S30 Perform formatting processing on the log data to be processed according to the target log format to obtain formatted log data.
  • the log data to be processed is formatted according to the log standard format to obtain formatted log data.
  • the log data to be processed is formatted according to the custom log format to obtain formatted log data.
  • the log data to be processed is formatted according to the first custom format.
  • the log data to be processed is formatted according to the third custom format.
  • log data in a standardized format can be obtained.
  • Step S40 encapsulate the formatted log data based on the preset encapsulation processing strategy, and store the encapsulated log data in the target database system.
  • the preset encapsulation processing strategy refers to the form of generating key-value pairs from formatted log data and adding dimension information tags.
  • FIG. 4 is a schematic flow of the sub-steps of encapsulating the formatted log data based on the preset encapsulation processing strategy in step S40, and storing the encapsulated log data in the target database system
  • the figure specifically includes the following steps S401 to S403.
  • Step S401 Extract field names and field values corresponding to the formatted log data, and generate a key-value pair set corresponding to the formatted log data.
  • the field name and field value corresponding to the log data can be extracted through the field extractor.
  • the field extractor may include Grok function or json parsing function.
  • the field name and field value in the log data can be extracted through Grok function or json parsing function, and a set of key-value pairs can be generated according to the field name and field value. It is understandable that each piece of log data generates a set of key-value pairs.
  • the extracted field names can include but are not limited to source (log source host name), acc_api (requested functional interface name), acc_bytes (request return data size), acc_clientip (initiating request ip address), acc_date (initiating Request date), acc_method (request method), acc_serverip (provide the requested ip: port), acc_status (request return status code), acc_time (request time), acc_time_cost (request time) and acc_um (initiate request user name) and many more.
  • the key-value pair set corresponding to the formatted log data is generated according to the field name and the field value corresponding to the log data.
  • the field name of the log data is used as the key in the key-value pair, and the field name of the log data is used as the value in the key-value pair.
  • one of the generated key-value pairs set can be expressed as: ⁇ source: SZC-L50; acc_api: /gcc/js/tree2.js; acc_bytes: 1626; acc_clientip: 10.159.229.25; acc_date: 2020-07- 25; acc_method: POST; acc_serverip: 30.181.225.18; acc_status: 200; acc_time: 12:10:50; acc_time_cost: 0.003; acc_um: HUYUANMEI500 ⁇ .
  • Step S402 Add a preset dimension information label to the key-value pair set to obtain the key-value pair set carrying the dimension information label.
  • the dimension information label may include three fields of appname, cluster, and instance.
  • the appname field represents the name of the subsystem
  • the cluster field represents the cluster name
  • the instance field represents the instance name.
  • a preset dimension information label can be added to the key-value pair set.
  • adding dimension information tags to the aforementioned key-value pair set where the dimension information may include the subsystem name ICSS-GCCIB-INSUR, the cluster name icss-gccib-insurPRDCluster20901, and the instance name icss-gccib_nrWEB48953.
  • a set of key-value pairs carrying dimension information tags can be expressed as: ⁇ source: SZC-L50; acc_api: /gcc/js/tree2.js; acc_bytes: 1626; acc_clientip: 10.159.229.25; acc_date: 2020-07 -25; acc_method: POST; acc_serverip: 30.181.225.18; acc_status: 200; acc_time: 12:10:50; acc_time_cost: 0.003; acc_um: HUYUANMEI500; appname: ICSS-GCCIB-INSUR; cluster: icss-gccib-insurPRDCluster20901; instance : Icss-gccib_nrWEB48953 ⁇ .
  • Step S403 Store the key-value pair set carrying the dimension information label in the target database system.
  • the target database system may include an ES (Elastic Search) system.
  • ES Elastic Search
  • the ES system is a distributed and scalable real-time search and analysis engine. It is a search engine based on the full-text search engine Apache Lucene. Among them, the ES system supports real-time file storage and real-time file search, and can store data in JSON format.
  • a set of key-value pairs carrying dimension information tags can be stored in the ES system, so that related log data can be directly queried from the ES system for analysis and processing.
  • the key-value pair set corresponding to the formatted log data is generated, and the preset dimension information label is added to the key-value pair set; in the subsequent log query,
  • the target key-value pair can be determined according to the dimensional information, so that it is more convenient to obtain the corresponding unified and standardized target key-value pair from the target database system and analyze and process the target key-value pair; and there is no need to format the key-value pair , Improve the usability and readability of log data in the medical platform.
  • step S40 after storing the encapsulated log data in the target database system in step S40, the following steps S50 to S70 may be further included.
  • Step S50 Receive a log query operation, and obtain corresponding dimensional information and query time period on a preset log query page according to the log query operation.
  • the log query operation may include dimension selection operation and time selection operation.
  • the dimension selection operation refers to the operation of selecting dimensions such as subsystems, clusters, and instances in the dimension selection box on the log query page.
  • the time selection operation refers to the operation of selecting the time in the start time box and the end time box on the log query page.
  • obtaining the corresponding dimension information and query time period on the preset log query page according to the log query operation may include: receiving the dimension selection operation of the user on the log query page, and determining the dimension information according to the dimension selection operation; Get the user's time selection operation in the log query page, and determine the query time period according to the time selection operation.
  • the dimension information includes the subsystem ICSS-GCCIB- INSUR, cluster icss-gccib-insurPRDCluster20901 and instance icss-gccib_nrWEB48953.
  • the corresponding log query operation can be determined according to the start time T1 and the end time T2
  • the query time period is T2-T1.
  • Step S60 Query the log query result corresponding to the log query operation in the target database system according to the dimensional information and the query time period.
  • FIG. 6 a schematic flowchart of the sub-steps of querying the log query result corresponding to the log query operation in the target database system according to the dimension information and the query time period in step S60, which may specifically include the following steps S601 to S603 .
  • Step S601 When a trigger operation based on the query button in the log query page is detected, generate a data query request according to the dimension information and the query time period, wherein the data query request includes dimension information and query time part.
  • FIG. 7 is a schematic diagram of an interface operation for triggering a query button in a log query page provided by an embodiment of the present application.
  • a data query request when querying log data, a data query request needs to be sent to the target database system.
  • a data query request may be generated according to the dimensional information and the query time period, and the generated data query request includes the dimensional information and the query time period.
  • the dimension information is used to determine the dimension level and dimension name of the log data; the query time period is used to determine the time range of the log data.
  • Step S602 Send the data query request to the target database system, so that the target database system uses the key carrying the dimensional information tag according to the dimensional information and query time period in the data query request.
  • the target key-value pair set is determined in the value pair set, and the target key-value pair set is returned.
  • the data query request can be sent to the target database system through the query interface connected to the target database system.
  • the target database system may determine the target key-value pair set from the key-value pair set carrying the dimension information tag according to the dimension information in the data query request and the query time period.
  • the target database system can search and carry the dimension information tag as ⁇ appname :ICSS-GCCIB-INSUR; cluster: icss-gccib-insurPRDCluster20901; instance: icss-gccib_nrWEB48953 ⁇ key-value pair collection; then filter the searched key-value pair collection according to the query time period in the data query request, and filter The obtained key-value pair is used as the target key-value pair.
  • the target database system may also perform a preliminary screening of the key-value pairs carrying dimension information tags according to the query time period in the data query request, and then perform preliminary screening of the key-value pairs obtained from the preliminary screening according to the dimension information in the data query request. Search, the key-value pair obtained from the search is used as the target key-value pair.
  • the target database system can return the target key-value pair set through the query interface.
  • Step S603 Receive the target key-value pair set returned by the target database system, and use the target key-value pair set as the log query result.
  • the target key-value pair set is used as the log query result, so that the log query result can be subsequently loaded to the log query page.
  • the above log query results may also be stored in a node of a blockchain.
  • the target database system can quickly determine the target key-value pair set in the key-value pair set carrying the dimension information label according to the dimension information and the query time period, and achieve a rapid search
  • the required log data can be obtained by querying the massive log data, which improves the usability and readability of the log data in the medical platform, thereby improving the convenience and efficiency of log query.
  • Step S70 Generate log analysis information according to the log query result, and display the log analysis information on the log query page.
  • the log query result can be loaded to the log query page.
  • loading may include operations such as generating log analysis information according to the log query result and rendering it to the log query page.
  • the background can analyze and process the log query results according to the current functional analysis options in the log query page to obtain log analysis information; and then render the log analysis information to the log query page.
  • the log analysis information may include, but is not limited to, performance analysis information, anomaly analysis information, trend analysis information, instance analysis information, user behavior analysis information, and so on.
  • FIG. 8 is a schematic flowchart of the sub-steps of generating log analysis information according to the log query result in step S70, which may specifically include the following steps S701 to S703.
  • Step S701 Determine the current function analysis option in the log query page.
  • the log query page includes multiple function analysis options.
  • the function analysis options may include, but are not limited to, performance analysis options, abnormal analysis options, trend analysis options, instance analysis options, and user behavior analysis options.
  • the current function analysis option in the log query page can be determined according to the user's selection operation of the function analysis option.
  • the current function analysis option on the log query page is the performance analysis option by default.
  • the current function analysis option in the log query page can be determined according to the user's operation.
  • the switched function analysis option is an abnormal analysis option.
  • the log query result can be analyzed and processed according to the analysis strategy corresponding to the current function analysis option, so that the log analysis information corresponding to the log query result can be obtained.
  • Step S702 Determine the target analysis strategy corresponding to the current function analysis option based on the preset correspondence between the function analysis option and the analysis strategy.
  • different functional analysis options correspond to different analysis strategies.
  • the analysis strategy is used to analyze and process log query results.
  • different analysis strategies can be implemented by calling different program codes.
  • the program code can be written in advance according to the function type corresponding to the function analysis option.
  • the analysis strategy can implement cluster analysis, factor analysis, correlation analysis, correspondence analysis, regression analysis, and variance analysis on log query results.
  • the correspondence between the functional analysis options and the analysis strategy may be preset, and the correspondence information between the functional analysis options and the analysis strategy may be stored in the local database.
  • the correspondence information between the above functional analysis options and the analysis strategy can also be stored in a blockchain node middle.
  • the analysis strategy may include analysis strategy A, analysis strategy B, analysis strategy C, and so on.
  • the analysis strategy A As a target analysis strategy.
  • Step S703 Analyze and process the log query result according to the target analysis strategy to obtain the log analysis information.
  • the log query results can be analyzed and processed according to analysis strategy A to obtain performance analysis information.
  • the log analysis information can be rendered to the log query page to display the log analysis information on the log query page.
  • the log analysis information displayed on the log query page can be displayed in the form of a histogram, scatter chart, fishbone chart, histogram, radar chart, trend chart, and table.
  • rendering refers to the process of analyzing various resources or data through a browser rendering engine to output a visualized image or webpage.
  • the browser rendering engine includes modules such as HTML parser, CSS parser, layout, and JavaScript engine.
  • log analysis information By analyzing and processing the log query results according to the target analysis strategy, log analysis information can be obtained; then the log analysis information can be rendered to the log query page, which can quickly display the log analysis information of each system, cluster or instance, making it more intuitive The log analysis is carried out to further improve the usability and readability of the log data.
  • the log collector can quickly and conveniently collect the log data generated by the log provider; by matching the logs with different middleware
  • the custom format allows the log data transmitted by different middleware to be formatted through the custom format of the log to obtain the log data in a unified format; according to the function type corresponding to the log provider of the log data to be processed, the log data can be selected from the first category
  • the configuration file or the second type of configuration file determines the target log format corresponding to the log provider, and then can format the log data of the log provider in different formats, and standardize the format of the log data; after extracting and formatting
  • the field name and field value corresponding to the log data of the log data are generated, the key-value pair set corresponding to the formatted log data is generated, and the preset dimensional information label is added to the key-value pair set, which can be determined according to the dimensional information in the subsequent log query Target key-value pairs, to achieve more convenient acquisition of the
  • FIG. 9 is a schematic block diagram of a log data processing device 100 according to an embodiment of the present application, and the log data processing device is configured to execute the aforementioned log data processing method.
  • the log data processing device can be configured in a server or a terminal.
  • the log data processing device 100 includes: a log data acquisition module 101, a log format determination module 102, a format processing module 103, and an encapsulation processing module 104.
  • the log data acquisition module 101 is used to acquire log data to be processed.
  • the log format determination module 102 is configured to determine the target log format corresponding to the log provider according to the function type corresponding to the log provider of the log data to be processed.
  • the formatting processing module 103 is configured to format the log data to be processed according to the target log format to obtain formatted log data.
  • the encapsulation processing module 104 is configured to perform encapsulation processing on the formatted log data based on a preset encapsulation processing strategy, and store the encapsulated log data in a target database system.
  • the above-mentioned apparatus may be implemented in the form of a computer program, and the computer program may run on the computer device as shown in FIG. 10.
  • FIG. 10 is a schematic block diagram of the structure of a computer device provided by an embodiment of the present application.
  • the computer equipment can be a server or a terminal.
  • the computer device includes a processor and a memory connected through a system bus, where the memory may include a non-volatile storage medium and an internal memory.
  • the processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
  • the internal memory provides an environment for the operation of the computer program in the non-volatile storage medium.
  • the processor can execute any log data processing method.
  • the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), and application specific integrated circuits (Application Specific Integrated Circuits). Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • the processor is used to run a computer program stored in a memory to implement the following steps:
  • log data to be processed Obtain log data to be processed; determine the target log format corresponding to the log provider according to the function type corresponding to the log provider of the log data to be processed; format the log data to be processed according to the target log format After formatting, the formatted log data is obtained; based on a preset encapsulation processing strategy, the formatted log data is encapsulated, and the encapsulated log data is stored in the target database system.
  • the processor is used to achieve:
  • the function type includes a proxy service function and an application service function; the processor determines the target corresponding to the log provider according to the function type corresponding to the log provider of the log data to be processed.
  • the log format it is used to achieve:
  • the function type is a proxy service function
  • obtain a preset first-type configuration file from the blockchain and use the preset log standard format included in the first-type configuration file as the target log format
  • obtain a preset second-type configuration file from the blockchain and determine the target log format according to the second configuration file, wherein the second-type configuration file Including multiple preset log custom formats.
  • the processor before the processor implements the determination of the target log format according to the second configuration file, the processor is further configured to implement:
  • the processor when the processor implements the determination of the target log format according to the second configuration file, the processor is configured to implement:
  • the processor when the processor implements a preset encapsulation processing strategy, encapsulates the formatted log data, and stores the encapsulated log data in the target database system, Used to achieve:
  • the processor after the processor realizes storing the encapsulated log data in the target database system, it is further used to realize:
  • Receive a log query operation obtain corresponding dimensional information and query time period on a preset log query page according to the log query operation; query the target database system in the target database system according to the dimensional information and the query time period Log query results corresponding to the log query operation; generate log analysis information according to the log query results, and display the log analysis information on the log query page.
  • the processor is configured to query the log query result corresponding to the log query operation in the target database system according to the dimensional information and the query time period, for achieving:
  • a data query request is generated according to the dimensional information and the query time period, where the data query request includes the dimensional information and the query time period;
  • the data query request is sent to the target database system, so that the target database system is in the key-value pair set carrying the dimensional information tag according to the dimensional information and query time period in the data query request Determine a target key-value pair set, and return the target key-value pair set; receive the target key-value pair set returned by the target database system, and use the target key-value pair set as the log query result.
  • the embodiments of the present application also provide a computer-readable storage medium, and the computer-readable storage medium may be volatile or non-volatile.
  • the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement any one of the log data processing methods provided in the embodiments of the present application.
  • the computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, for example, the hard disk or memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), or a secure digital card equipped on the computer device. , SD Card, Flash Card, etc.
  • the computer-readable storage medium may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required by at least one function, etc.; the storage data area may store Data created by the use of nodes, etc.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

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

Abstract

一种日志数据处理方法、装置、计算机设备和存储介质,该方法包括:获取待处理日志数据(S10);根据待处理日志数据的日志提供方对应的功能类型,确定日志提供方对应的目标日志格式(S20);根据目标日志格式,对待处理日志数据进行格式化处理,得到格式化后的日志数据(S30);基于预设的封装处理策略,对格式化后的日志数据进行封装处理,并将封装处理后的日志数据存储至目标数据库系统(S40)。

Description

日志数据处理方法、装置、计算机设备和存储介质
本申请要求于2020年10月12日提交中国专利局、申请号为2020110863224,发明名称为“日志数据处理方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数字医疗技术领域,尤其涉及一种日志数据处理方法、装置、计算机设备和存储介质。
背景技术
现有的医疗平台应用系统一般都是基于同一种中间件进行日志数据的格式标准化,导致不同功能模块之间或不同的开发团队编写的代码打印出来的日志数据的格式往往不一致。发明人意识到,由于日志数据的格式不统一的,大大降低了医疗平台中日志数据的可用性和可读性,给后续对日志数据进行分析处理带来较大的难度。
因此如何在医疗平台中提高日志数据的可用性和可读性,实现更加便捷地分析日志数据成为亟需解决的问题。
技术解决方案
本申请提供了一种日志数据处理方法,所述方法包括:
获取待处理日志数据;
根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;
根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;
基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
本申请还提供了一种日志数据处理装置,所述装置包括:
日志数据获取模块,用于获取待处理日志数据;
日志格式确定模块,用于根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;
格式化处理模块,用于根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;
封装处理模块,用于基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
本申请还提供了一种计算机设备,所述计算机设备包括存储器和处理器;
所述存储器,用于存储计算机程序;
所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下述的日志数据处理方法:
获取待处理日志数据;
根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;
根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;
基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理 后的所述日志数据存储至目标数据库系统。
本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下述的日志数据处理方法:
获取待处理日志数据;
根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;
根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;
基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请的实施例提供的一种日志数据处理方法的示意性流程图;
图2是本申请实施例提供的一种日志处理过程的流程示意图;
图3是本申请的实施例提供的确定目标日志格式的子步骤的示意性流程图;
图4是本申请的实施例提供的对格式化后的日志数据进行封装处理的子步骤的示意性流程图;
图5是本申请的实施例提供的日志数据处理方法的的子步骤的示意性流程图;
图6是本申请的实施例提供的获取日志查询结果的子步骤的示意性流程图;
图7是本申请实施例提供的一种在日志查询页面中触发查询按钮的界面操作示意图;
图8是本申请实施例提供的生成日志分析信息的子步骤的示意性流程图;
图9是本申请实施例提供的一种日志数据处理装置的示意性框图;
图10是本申请实施例提供的一种计算机设备的结构示意性框图。
本发明的实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
本申请的实施例提供了一种日志数据处理方法、装置、计算机设备和存储介质。其中,该日志数据处理方法可以应用于服务器或终端中的日志处理系统,实现根据日志提供方对应的功能类型确定目标日志格式,根据目标日志格式对日志数据进行格式化处理后进行封装储存,后续可以更加便捷地从目标数据库系统获取相应的统一规范格式的日志数据并对日志数据进行分析处理,提高了日志数据的可用性和可读性。
其中,服务器可以为独立的服务器,也可以为服务器集群。终端可以是智能手机、平板电脑、笔记本电脑和台式电脑等电子设备。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
如图1所示,日志数据处理方法包括步骤S10至步骤S40。
步骤S10、获取待处理日志数据。
需要说明的是,本申请实施例中提供的日志数据处理方法可以应用于日志处理系统中,实现日志处理系统获取跨平台、跨集群或者跨开发团队之间的日志数据。如图2所示,图2是本申请实施例提供的一种日志处理过程的流程示意图,其中,cluster表示集群,instance表示实例。需要说明的是,实例是指应用服务或代理服务器。在本申请实施例中,可以采集不同的日志提供方产生的日志数据,得到待处理日志数据;然后对待处理日志数据进行格式化处理和封装处理后,存储在ES系统中。
在一些实施例中,获取待处理日志数据,可以包括:确定日志提供方中的中间件,对中间件安装日志采集器;根据日志采集器获取待处理日志数据。
示例性的,日志提供方可以包括不同的子系统、集群中的应用服务,还可以包括代理服务器。其中,应用服务设置在应用服务器中;代理服务器可以包括但不限于Nginx、openresty等代理服务器。
在本申请实施例中,可以通过日志提供方对应的中间件采集日志数据。日志提供方的中间件可以根据系统架构和服务的功能类型进行设定;不同的日志提供方可以使用同一种中间件,也可以使用不同的中间件。日志处理系统可以通过中间件采集日志提供方产生的日志数据。
示例性的,中间件可以包括但不限于Weblogic、tomcat、springboot以及apache等中间件。需要说明的是,中间件是一种独立的系统软件或服务程序,介于操作系统和应用软件之间。
示例性的,日志采集器可以包括但不限于Logstash、Filebeat、Fluentd以及Logtail等等。在本申请实施例中,通过在日志提供方的中间件上安装日志采集器,可以通过日志采集器快速、便捷地采集日志提供方产生的日志数据。
步骤S20、根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式。
示例性的,功能类型包括代理服务功能和应用服务功能。代理服务器提供的功能类型为代理服务功能,应用服务器提供的功能类型为应用服务功能。其中,代理服务器提供的代理服务功能可以包括负载均衡、流量分流以及转发等等。
示例性的,可以确定日志提供方对应的服务器类型,根据服务器类型确定日志提供方对应的功能类型。若日志提供方对应的服务器类型为代理服务器,则可以确定日志提供方对应的功能类型为代理服务功能;若日志提供方对应的服务器类型为应用服务器,则可以确定日志提供方对应的功能类型为应用服务功能。
在本申请实施例中,可以根据日志提供方对应的功能类型,从区块链中获取功能类型对应的配置文件,并将配置文件中的日志格式作为目标日志格式。其中,配置文件包括预先设定的日志格式。
在一些实施例中,根据待处理日志数据的日志提供方对应的功能类型,确定日志提供方对应的目标日志格式,可以包括:当功能类型为代理服务功能时,从区块链中获取预设的第一类配置文件,并将第一类配置文件中包括的预设的日志标准格式作为目标日志格式。
示例性的,第一类配置文件中的日志标准格式可以定义为:log_format main $fmt_localtime $request_time $remote_user $body_bytes_sent $remote_addr  $server_addr:$server_port $status $request_method $uri $request_uri-$http_x_forwarded_for $http_referer $http_user_agent $upstream_connect_time $upstream_header_time $upstream_response_time。其中,时间格式为yyyy-MM-dd HH:mm:ss可以通过以下代码实现:
map $fmt_localtime{
default”;}
log_by_lua_block{
ngx.var.fmt_localtime=ngx.localtime();}。
需要说明的是,在本申请实施例中,可以预先配置好日志标准格式,并根据配置好的日志标准格式生成第一类配置文件。
在另一些实施例中,根据待处理日志数据的日志提供方对应的功能类型,确定日志提供方对应的目标日志格式,可以包括:当功能类型为应用服务功能时,从区块链中获取预设的第二类配置文件,根据第二配置文件确定目标日志格式。
其中,第二类配置文件包括多个预设的日志自定义格式。例如,第一自定义格式、第二自定义格式以及第三自定义格式等等;不同的日志日定义格式用于格式化不同的中间件传递的日志数据。
请参阅图3,在一些实施例中,在根据第二配置文件确定目标日志格式之前,具体可以包括以下步骤S201至步骤S203。
步骤S201、确定预设的多个中间件。
示例性的,预设的中间件可以包括Weblogic、tomcat、springboot以及apache等中间件。预设的中间件可以根据日志提供方中的中间件进行确定。例如,将多个日志提供方常用的中间件作为预设的中间件。
步骤S202、基于预设的匹配策略,对每个所述中间件匹配对应的日志自定义格式。
具体地,预设匹配策略可以包括:Weblogic中间件与第一自定义格式匹配;tomcat和springboot中间件与第二自定义格式匹配;apache中间件与第三自定义格式匹配。
其中,第一自定义格式为:date time time-taken x-c_username bytes c-ip s-ip sc-status cs-method cs-uri-stem cs-uri x-c_sessionid x-c_x_forwarded_for。第二自定义格式为:%{yyyy-MM-dd HH:mm:ss}t %T %{username}s %b %a %A %s %m %U %U%q %S %{X-Forwarded-For}i %{Cookie}i "%{User-Agent}i" "%{Host}i" %{Referer}i %{Content-Length}i %{Origin}i。第三自定义格式为:%{%Y-%m-%d%t%H:%M:%S}t %T %u %b %a %A %s %m %U %U%q %{sessionID}C %{X-Forwarded-For}i %{Cookie}i \"%{User-Agent}i\"\"%{Host}i\" %{Referer}i %{Content-Length}i %{Origin}i。
可以理解的是,由于不同的中间件传递过来的日志数据的格式不一样,因此通过对不同的中间件匹配日志自定义格式,使得不同中间件传递的日志数据通过日志自定义格式进行格式化处理后,得到格式统一的日志数据。
步骤S203、将每个所述中间件与对应的日志自定义格式进行关联并存储至所述第二类配置文件中。
具体地,将上述中间件与中间件对应的日志自定义格式进行关联并存储至第二类配置文件中。
示例性的,将Weblogic中间件与第一自定义格式进行关联并存储第二类配置文件的子文件中。
示例性的,将apache中间件与第三自定义格式进行关联并存储第二类配置文件中的另一子文件中。
其中,第二配置文件中的子文件可以以存储的中间件的名称进行命名。
具体地,在根据第二配置文件确定目标日志格式,可以根据中间件的名称在第二配置文件中查询,将查询得到的子文件中的日志自定义格式作为目标日志格式。
需要强调的是,为进一步保证上述第一类配置文件和第二类配置文件的私密和安全性,上述第一类配置文件和第二类配置文件还可以存储于一区块链的节点中。在确定日志提供方对应的目标日志格式时,可以从区块链中获取第一类配置文件和第二类配置文件。
请参阅图3,在一些实施例中,在根据第二配置文件确定目标日志格式时,可以包括以下步骤S204和步骤S205。
步骤S204、确定所述日志提供方中的中间件。
示例性的,可以在根据日志采集器获取待处理日志数据时,确定日志提供方中的中间件。例如,确定日志提供方中的中间件为Weblogic中间件;或者确定日志提供方中的中间件为apache中间件。
步骤S205、从所述第二类配置文件中查询所述中间件关联的日志自定义格式,并将所述日志自定义格式作为所述目标日志格式。
示例性的,若日志提供方对应的中间件为Weblogic中间件,且在第二类配置文件中Weblogic中间件与第一自定义格式对应,则可以确定第一自定义格式为日志提供方对应的目标日志格式。
示例性的,若日志提供方对应的中间件为apache中间件,且在第二类配置文件中apache中间件与第三自定义格式对应,则可以确定第三自定义格式为日志提供方对应的目标日志格式。
通过根据待处理日志数据的日志提供方对应的功能类型,可以从第一类配置文件或第二类配置文件中确定日志提供方对应的目标日志格式,进而可以对日志提供方的不同格式类型的日志数据进行格式化处理,将日志数据的格式进行规范。
步骤S30、根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据。
在一些实施方式中,当目标日志格式为日志标准格式时,根据日志标准格式对待处理日志数据进行格式化处理,得到格式化后的日志数据。
在另一些实施方式中,当目标日志格式为日志自定义格式时,根据日志自定义格式对待处理日志数据进行格式化处理,得到格式化后的日志数据。
示例性的,若日志提供方对应的目标日志格式为第一自定义格式,则根据第一自定义格式对待处理日志数据进行格式化处理。
示例性的,若日志提供方对应的目标日志格式为第三自定义格式,则根据第三自定义格式对待处理日志数据进行格式化处理。
通过根据目标日志格式,对待处理日志数据进行格式化处理,可以得到格式规范的日志数据。
步骤S40、基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
需要说明的是,在本申请实施例中,预设的封装处理策略是指将格式化后的日志数据生成键值对的形式并添加维度信息标签。
请参阅图4,图4是步骤S40中基于预设的封装处理策略,对格式化后的日志数据进行封装处理,并将封装处理后的日志数据存储至目标数据库系统的子步骤的示意性流程图,具体包括以下步骤S401至步骤S403。
步骤S401、提取格式化后的所述日志数据对应的字段名与字段值,生成格式化后的所述日志数据对应的键值对集合。
示例性的,可以通过字段提取器提取日志数据对应的字段名与字段值。其中,字段提 取器可以包括Grok函数或者json解析函数,可以通过Grok函数或者json解析函数实现提取日志数据中的字段名与字段值,并根据字段名与字段值生成键值对集合。可以理解的是,每一条日志数据生成一个键值对集合。
示例性的,提取的字段名可以包括但不限于source(日志来源主机名称)、acc_api(请求的功能接口名称)、acc_bytes(请求返回数据大小)、acc_clientip(发起请求的ip地址)、acc_date(发起请求的日期)、acc_method(请求方法)、acc_serverip(提供请求的ip:端口)、acc_status(请求返回状态码)、acc_time(请求的时间)、acc_time_cost(请求耗时)以及acc_um(发起请求用户名)等等。
具体地,分别根据日志数据对应的字段名与字段值,生成格式化后的日志数据对应的键值对集合。需要说明的是,键值对包括键和值,以(key=value)或者(key:value)字符串的形式表示。在本申请实施例中,日志数据的字段名作为键值对中的键,日志数据的字段名作为键值对中的值。
示例性的,生成的其中一个键值对集合可以表示为:{source:SZC-L50;acc_api:/gcc/js/tree2.js;acc_bytes:1626;acc_clientip:10.159.229.25;acc_date:2020-07-25;acc_method:POST;acc_serverip:30.181.225.18;acc_status:200;acc_time:12:10:50;acc_time_cost:0.003;acc_um:HUYUANMEI500}。
步骤S402、对所述键值对集合添加预设的维度信息标签,得到携带所述维度信息标签的所述键值对集合。
示例性的,维度信息标签可以包括appname、cluster和instance三个字段。其中,appname字段表示子系统名称;cluster字段表示集群名称;instance字段表示实例名称。
具体地,可以对键值对集合添加预设的维度信息标签。例如,对上述的键值对集合添加维度信息标签,其中,维度信息可以包括子系统名称ICSS-GCCIB-INSUR、集群名称icss-gccib-insurPRDCluster20901以及实例名称icss-gccib_nrWEB48953。
例性的,携带维度信息标签的键值对集合可以表示为:{source:SZC-L50;acc_api:/gcc/js/tree2.js;acc_bytes:1626;acc_clientip:10.159.229.25;acc_date:2020-07-25;acc_method:POST;acc_serverip:30.181.225.18;acc_status:200;acc_time:12:10:50;acc_time_cost:0.003;acc_um:HUYUANMEI500;appname:ICSS-GCCIB-INSUR;cluster:icss-gccib-insurPRDCluster20901;instance:icss-gccib_nrWEB48953}。
步骤S403、将携带所述维度信息标签的所述键值对集合存储至所述目标数据库系统中。
在本申请实施例中,目标数据库系统可以包括ES(Elastic Search)系统。需要说明的是,ES系统是一种分布式可扩展的实时搜索和分析引擎,是建立在全文搜索引擎Apache Lucene基础上的搜索引擎。其中,ES系统支持实时文件存储和实时文件搜索,可以使用JSON格式存储数据。
具体地,可以将携带维度信息标签的键值对集合存储至ES系统,以便后续可以直接从ES系统中查询相关的日志数据并进行分析处理。
通过提取格式化后的日志数据对应的字段名与字段值,生成格式化后的日志数据对应的键值对集合,并对键值对集合添加预设的维度信息标签;后续在日志查询时,可以根据维度信息确定目标键值对,实现更加便捷地从目标数据库系统获取相应的统一规范格式的目标键值对并对目标键值对进行分析处理;且不需要对键值对进行格式化处理,提高了医疗平台中日志数据的可用性和可读性。
请参阅图5,在本申请实施例中,步骤S40中将封装处理后的日志数据存储至目标数据库系统之后,还可以包括以下步骤S50至步骤S70。
步骤S50、接收日志查询操作,根据所述日志查询操作在预设的日志查询页面获取对应的维度信息和查询时间段。
需要说明的是,当用户需要查询日志数据时,可以在日志处理系统的日志查询页面中进行日志查询操作。其中,日志查询操作可以包括维度选中操作和时间选择操作。
具体地,维度选中操作是指在日志查询页面的维度选择框中选择子系统、集群以及实例等维度的操作。时间选择操作是指在日志查询页面的起始时间框和结束时间框中选择时间的操作。
在一些实施例中,根据日志查询操作在预设的日志查询页面获取对应的维度信息和查询时间段,可以包括:接收用户在日志查询页面中的维度选中操作,根据维度选中操作确定维度信息;获取用户在日志查询页面中的时间选择操作,根据时间选择操作确定查询时间段。
示例性的,若接收到用户在日志查询页面中选中子系统ICSS-GCCIB-INSUR下的集群icss-gccib-insurPRDCluster20901中的实例icss-gccib_nrWEB48953的操作,则可以确定维度信息包括子系统ICSS-GCCIB-INSUR、集群icss-gccib-insurPRDCluster20901和实例icss-gccib_nrWEB48953。
示例性的,当获取用户在日志查询页面中的起始时间框输入的起始时间T1和在结束时间框输入的结束时间T2时,可以根据起始时间T1和结束时间T2确定日志查询操作对应的查询时间段为T2-T1。
步骤S60、根据所述维度信息与所述查询时间段在所述目标数据库系统中查询到所述日志查询操作对应的日志查询结果。
请参阅图6,图6步骤S60中根据维度信息与查询时间段在目标数据库系统中查询到日志查询操作对应的日志查询结果的子步骤的示意性流程图,具体可以包括以下步骤S601至步骤S603。
步骤S601、当检测到基于所述日志查询页面中的查询按钮的触发操作时,根据所述维度信息与所述查询时间段生成数据查询请求,其中,所述数据查询请求包括维度信息与查询时间段。
需要说明的是,在本申请实施例中,用户在日志查询页面中选中维度,以及输入起始时间与结束时间后,还需要对日志查询页面中的查询按钮进行触发操作,才能得到日志查询结果。请参阅图7,图7是本申请实施例提供的一种在日志查询页面中触发查询按钮的的界面操作示意图。
具体地,在查询日志数据的时候,需要向目标数据库系统发送数据查询请求。示例性的,可以根据维度信息与查询时间段生成数据查询请求,生成的数据查询请求包括维度信息与查询时间段。
其中,维度信息用于确定日志数据的维度级别和维度名称;查询时间段用于确定日志数据的时间范围。
步骤S602、将所述数据查询请求发送至所述目标数据库系统中,以使所述目标数据库系统根据所述数据查询请求中的维度信息与查询时间段在携带所述维度信息标签的所述键值对集合中确定目标键值对集合,并返回所述目标键值对集合。
具体地,可以通过与目标数据库系统连接的查询接口,将数据查询请求发送至目标数据库系统中。
具体地,目标数据库系统在收到数据查询请求后,可以根据述数据查询请求中的维度信息与查询时间段在携带维度信息标签的键值对集合中确定目标键值对集合。
示例性的,若数据查询请求中的维度信息为:子系统名称ICSS-GCCIB-INSUR、集群名称icss-gccib-insurPRDCluster20901以及实例名称icss-gccib_nrWEB48953,则目标数据库系统可以搜索携带维度信息标签为{appname:ICSS-GCCIB-INSUR;cluster:icss-gccib-insurPRDCluster20901;instance:icss-gccib_nrWEB48953}的键值对集合;然后根据数据查询请求中的查询时间段对搜索得到的键值对集合进行筛选,将筛选得到的键值 对作为目标键值对。
示例性的,目标数据库系统还可以先根据数据查询请求中的查询时间段对携带维度信息标签的键值对进行初步筛选,然后根据数据查询请求中的维度信息对初步筛选得到的键值对进行搜索,将搜索得到的键值对作为目标键值对。
在确定目标键值对集合后,目标数据库系统可以通过查询接口返回目标键值对集合。
步骤S603、接收所述目标数据库系统返回的所述目标键值对集合,将所述目标键值对集合作为所述日志查询结果。
具体地,在接收到目标数据库系统返回的目标键值对集合,将目标键值对集合作为日志查询结果,以便后续将日志查询结果加载至日志查询页面。
需要强调的是,为进一步保证上述日志查询结果的私密和安全性,上述日志查询结果还可以存储于一区块链的节点中。
通过根据维度信息与查询时间段生成数据查询请求,可以使得目标数据库系统快速地根据维度信息与查询时间段在携带维度信息标签的键值对集合中确定目标键值对集合,实现了快速地从海量日志数据中查询获取到所需的日志数据,提高了医疗平台中日志数据的可用性和可读性,进而提高了日志查询的便捷性和效率。
步骤S70、根据所述日志查询结果生成日志分析信息,并将所述日志分析信息显示在所述日志查询页面上。
需要说明的是,在本申请实施例中,可以将日志查询结果加载至日志查询页面。其中,加载可以包括根据日志查询结果生成日志分析信息,并渲染至日志查询页面等操作。例如,后台可以根据日志查询页面中当前的功能分析选项,对日志查询结果进行分析处理,得到日志分析信息;然后将日志分析信息渲染至日志查询页面中。
示例性的,日志分析信息可以包括但不限于性能分析信息、异常分析信息、趋势分析信息、实例分析信息以及用户行为分析信息等等。
请参阅图8,图8是步骤S70中根据日志查询结果生成日志分析信息的子步骤的示意性流程图,具体可以包括以下步骤S701至步骤S703。
步骤S701、确定所述日志查询页面中当前的功能分析选项。
具体地,日志查询页面包括多个功能分析选项。示例性的,功能分析选项可以包括但不限于性能分析选项、异常分析选项、趋势分析选项、实例分析选项以及用户行为分析选项。
具体地,日志查询页面中当前的功能分析选项可以根据用户对功能分析选项的选中操作进行确定。示例性的,日志查询页面中当前的功能分析选项默认是性能分析选项。当用户在日志查询页面切换功能分析选项时,可以根据用户的操作确定日志查询页面中当前的功能分析选项,例如,切换后的功能分析选项为异常分析选项。
通过确定日志查询页面中当前的功能分析选项,可以在获取日志查询结果后,根据当前的功能分析选项对应的分析策略对日志查询结果进行分析处理,从而可以得到日志查询结果对应的日志分析信息。
步骤S702、基于功能分析选项与分析策略之间预设的对应关系,确定所述当前的功能分析选项对应的目标分析策略。
具体地,不同的功能分析选项对应有不同的分析策略。需要说明的是,分析策略用于对日志查询结果进行分析处理。其中,不同的分析策略可以调用不同的程序代码进行实现。程序代码可以事先根据功能分析选项对应的功能类型进行编写。其中,分析策略可以实现对日志查询结果进行聚类分析、因子分析、相关分析、对应分析、回归分析以及方差分析等等。
示例性的,可以预先设定功能分析选项与分析策略之间的对应关系,并将功能分析选项与分析策略之间的对应关系信息存储在本地数据库中。
需要强调的是,为进一步保证上述功能分析选项与分析策略之间的对应关系信息的私密和安全性,上述功能分析选项与分析策略之间的对应关系信息还可以存储于一区块链的节点中。
示例性的,分析策略可以包括分析策略A、分析策略B以及分析策略C等等。
示例性的,若当前的功能分析选项为性能分析选项,且基于功能分析选项与分析策略之间预设的对应关系,确定性能分析选项对应的分析策略为分析策略A,则可以将分析策略A作为目标分析策略。
步骤S703、根据所述目标分析策略对所述日志查询结果进行分析处理,得到所述日志分析信息。
例如,若日志查询页面中当前的功能分析选项为性能分析信息,且目标分析策略为分析策略A,则可以根据分析策略A对日志查询结果进行性能分析处理,得到性能分析信息。
具体地,在得到日志分析信息,可以将日志分析信息渲染至日志查询页面中,以在日志查询页面中显示日志分析信息。
示例性的,在日志查询页面中显示的日志分析信息可以通过直方图、散点图、鱼骨图、柱状图、雷达图、趋势图以及表格等方式展示。
需要说明的是,渲染是指各种资源或数据通过浏览器渲染引擎的解析,输出可视化的图像或网页的过程。其中,浏览器渲染引擎包括HTML解析器、CSS解析器、布局以及JavaScript引擎等模块。
通过根据目标分析策略对日志查询结果进行分析处理,可以得到日志分析信息;进而可以将日志分析信息渲染至日志查询页面中,可以快速地展示各系统、集群或实例的日志分析信息,实现更加直观地进行日志分析,进一步提高了日志数据的可用性和可读性。
上述实施例提供的日志数据处理方法,通过在日志提供方的中间件上安装日志采集器,可以通过日志采集器快速、便捷地采集日志提供方产生的日志数据;通过对不同的中间件匹配日志自定义格式,使得不同中间件传递的日志数据通过日志自定义格式进行格式化处理后,得到格式统一的日志数据;通过根据待处理日志数据的日志提供方对应的功能类型,可以从第一类配置文件或第二类配置文件中确定日志提供方对应的目标日志格式,进而可以对日志提供方的不同格式类型的日志数据进行格式化处理,将日志数据的格式进行规范;通过提取格式化后的日志数据对应的字段名与字段值,生成格式化后的日志数据对应的键值对集合,并对键值对集合添加预设的维度信息标签,后续在日志查询时,可以根据维度信息确定目标键值对,实现更加便捷地从目标数据库系统获取相应的统一规范格式的目标键值对并对目标键值对进行分析处理,且不需要对键值对进行格式化处理,提高了日志数据的可用性和可读性;通过根据维度信息与查询时间段生成数据查询请求,可以使得目标数据库系统快速地根据维度信息与查询时间段在携带维度信息标签的键值对集合中确定目标键值对集合,实现了快速地从海量日志数据中查询获取到所需的日志数据,提高了日志数据的可用性和可读性,进而提高了日志查询的便捷性和效率;通过根据目标分析策略对日志查询结果进行分析处理,可以得到日志分析信息;进而可以将日志分析信息渲染至日志查询页面中,可以快速地展示各系统、集群或实例的日志分析信息,实现更加直观地进行日志分析,进一步提高了日志数据的可用性和可读性。
请参阅图9,图9是本申请的实施例还提供一种日志数据处理装置100的示意性框图,该日志数据处理装置用于执行前述的日志数据处理方法。其中,该日志数据处理装置可以配置于服务器或终端中。
如图9所示,该日志数据处理装置100,包括:日志数据获取模块101、日志格式确定模块102、格式化处理模块103和封装处理模块104。
日志数据获取模块101,用于获取待处理日志数据。
日志格式确定模块102,用于根据所述待处理日志数据的日志提供方对应的功能类型, 确定所述日志提供方对应的目标日志格式。
格式化处理模块103,用于根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据。
封装处理模块104,用于基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和各模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
上述的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图10所示的计算机设备上运行。
请参阅图10,图10是本申请实施例提供的一种计算机设备的结构示意性框图。该计算机设备可以是服务器或终端。
请参阅图10,该计算机设备包括通过系统总线连接的处理器和存储器,其中,存储器可以包括非易失性存储介质和内存储器。
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行任意一种日志数据处理方法。
应当理解的是,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
其中,在一个实施例中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:
获取待处理日志数据;根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
在一个实施例中,所述处理器在实现获取待处理日志数据时,用于实现:
确定所述日志提供方中的中间件,对所述中间件安装日志采集器;根据所述日志采集器获取所述待处理日志数据。
在一个实施例中,所述功能类型包括代理服务功能和应用服务功能;所述处理器在实现根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式时,用于实现:
当所述功能类型为代理服务功能时,从区块链中获取预设的第一类配置文件,并将所述第一类配置文件中包括的预设的日志标准格式作为所述目标日志格式;当所述功能类型为应用服务功能时,从区块链中获取预设的第二类配置文件,根据所述第二配置文件确定所述目标日志格式,其中,所述第二类配置文件包括多个预设的日志自定义格式。
在一个实施例中,所述处理器在实现根据所述第二配置文件确定所述目标日志格式之前,还用于实现:
确定预设的多个中间件;基于预设的匹配策略,对每个所述中间件匹配对应的日志自定义格式;将每个所述中间件与对应的日志自定义格式进行关联并存储至所述第二类配置文件中。
在一个实施例中,所述处理器在实现根据所述第二配置文件确定所述目标日志格式 时,用于实现:
确定所述日志提供方中的中间件;从所述第二类配置文件中查询所述中间件关联的日志自定义格式,并将所述日志自定义格式作为所述目标日志格式。
在一个实施例中,所述处理器在实现基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统时,用于实现:
提取格式化后的所述日志数据对应的字段名与字段值,生成格式化后的所述日志数据对应的键值对集合;对所述键值对集合添加预设的维度信息标签,得到携带所述维度信息标签的所述键值对集合;将携带所述维度信息标签的所述键值对集合存储至所述目标数据库系统中。
在一个实施例中,所述处理器在实现将封装处理后的所述日志数据存储至目标数据库系统之后,还用于实现:
接收日志查询操作,根据所述日志查询操作在预设的日志查询页面获取对应的维度信息和查询时间段;根据所述维度信息与所述查询时间段在所述目标数据库系统中查询到所述日志查询操作对应的日志查询结果;根据所述日志查询结果生成日志分析信息,并将所述日志分析信息显示在所述日志查询页面上。
在一个实施例中,所述处理器在实现根据所述维度信息与所述查询时间段在所述目标数据库系统中查询到所述日志查询操作对应的日志查询结果,用于实现:
当检测到基于所述日志查询页面中的查询按钮的触发操作时,根据所述维度信息与所述查询时间段生成数据查询请求,其中,所述数据查询请求包括维度信息与查询时间段;将所述数据查询请求发送至所述目标数据库系统中,以使所述目标数据库系统根据所述数据查询请求中的维度信息与查询时间段在携带所述维度信息标签的所述键值对集合中确定目标键值对集合,并返回所述目标键值对集合;接收所述目标数据库系统返回的所述目标键值对集合,将所述目标键值对集合作为所述日志查询结果。
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质可以是易失性的,也可以是非易失性的。所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现本申请实施例提供的任一项日志数据处理方法。
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字卡(Secure Digital Card,SD Card),闪存卡(Flash Card)等。
进一步地,所述计算机可读存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种日志数据处理方法,其中,包括:
    获取待处理日志数据;
    根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;
    根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;
    基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
  2. 根据权利要求1所述的日志数据处理方法,其中,所述获取待处理日志数据,包括:
    确定所述日志提供方中的中间件,对所述中间件安装日志采集器;
    根据所述日志采集器获取所述待处理日志数据。
  3. 根据权利要求1所述的日志数据处理方法,其中,所述功能类型包括代理服务功能和应用服务功能;所述根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式,包括:
    当所述功能类型为代理服务功能时,从区块链中获取预设的第一类配置文件,并将所述第一类配置文件中包括的预设的日志标准格式作为所述目标日志格式;
    当所述功能类型为应用服务功能时,从区块链中获取预设的第二类配置文件,根据所述第二配置文件确定所述目标日志格式,其中,所述第二类配置文件包括多个预设的日志自定义格式。
  4. 根据权利要求3所述的日志数据处理方法,其中,所述根据所述第二配置文件确定所述目标日志格式之前,还包括:
    确定预设的多个中间件;
    基于预设的匹配策略,对每个所述中间件匹配对应的日志自定义格式;
    将每个所述中间件与对应的日志自定义格式进行关联并存储至所述第二类配置文件中;
    所述根据所述第二配置文件确定所述目标日志格式,包括:
    确定所述日志提供方中的中间件;
    从所述第二类配置文件中查询所述中间件关联的日志自定义格式,并将所述日志自定义格式作为所述目标日志格式。
  5. 根据权利要求1所述的日志数据处理方法,其中,所述基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统,包括:
    提取格式化后的所述日志数据对应的字段名与字段值,生成格式化后的所述日志数据对应的键值对集合;
    对所述键值对集合添加预设的维度信息标签,得到携带所述维度信息标签的所述键值对集合;
    将携带所述维度信息标签的所述键值对集合存储至所述目标数据库系统中。
  6. 根据权利要求5所述的日志数据处理方法,其中,所述将封装处理后的所述日志数据存储至目标数据库系统之后,还包括:
    接收日志查询操作,根据所述日志查询操作在预设的日志查询页面获取对应的维度信息和查询时间段;
    根据所述维度信息与所述查询时间段在所述目标数据库系统中查询到所述日志查询 操作对应的日志查询结果;
    根据所述日志查询结果生成日志分析信息,并将所述日志分析信息显示在所述日志查询页面上。
  7. 根据权利要求6所述的日志数据处理方法,其中,所述根据所述维度信息与所述查询时间段在所述目标数据库系统中查询到所述日志查询操作对应的日志查询结果,包括:
    当检测到基于所述日志查询页面中的查询按钮的触发操作时,根据所述维度信息与所述查询时间段生成数据查询请求,其中,所述数据查询请求包括维度信息与查询时间段;
    将所述数据查询请求发送至所述目标数据库系统中,以使所述目标数据库系统根据所述数据查询请求中的维度信息与查询时间段在携带所述维度信息标签的所述键值对集合中确定目标键值对集合,并返回所述目标键值对集合;
    接收所述目标数据库系统返回的所述目标键值对集合,将所述目标键值对集合作为所述日志查询结果。
  8. 一种日志数据处理装置,其中,包括:
    日志数据获取模块,用于获取待处理日志数据;
    日志格式确定模块,用于根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;
    格式化处理模块,用于根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;
    封装处理模块,用于基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
  9. 一种计算机设备,其中,所述计算机设备包括存储器和处理器;
    所述存储器,用于存储计算机程序;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下所述的日志数据处理方法:
    获取待处理日志数据;
    根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;
    根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;
    基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
  10. 根据权利要求9所述的计算机设备,其中,所述获取待处理日志数据,包括:
    确定所述日志提供方中的中间件,对所述中间件安装日志采集器;
    根据所述日志采集器获取所述待处理日志数据。
  11. 根据权利要求9所述的计算机设备,其中,所述功能类型包括代理服务功能和应用服务功能;所述根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式,包括:
    当所述功能类型为代理服务功能时,从区块链中获取预设的第一类配置文件,并将所述第一类配置文件中包括的预设的日志标准格式作为所述目标日志格式;
    当所述功能类型为应用服务功能时,从区块链中获取预设的第二类配置文件,根据所述第二配置文件确定所述目标日志格式,其中,所述第二类配置文件包括多个预设的日志自定义格式。
  12. 根据权利要求11所述的计算机设备,其中,所述根据所述第二配置文件确定所述目标日志格式之前,还包括:
    确定预设的多个中间件;
    基于预设的匹配策略,对每个所述中间件匹配对应的日志自定义格式;
    将每个所述中间件与对应的日志自定义格式进行关联并存储至所述第二类配置文件中;
    所述根据所述第二配置文件确定所述目标日志格式,包括:
    确定所述日志提供方中的中间件;
    从所述第二类配置文件中查询所述中间件关联的日志自定义格式,并将所述日志自定义格式作为所述目标日志格式。
  13. 根据权利要求9所述的计算机设备,其中,所述基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统,包括:
    提取格式化后的所述日志数据对应的字段名与字段值,生成格式化后的所述日志数据对应的键值对集合;
    对所述键值对集合添加预设的维度信息标签,得到携带所述维度信息标签的所述键值对集合;
    将携带所述维度信息标签的所述键值对集合存储至所述目标数据库系统中。
  14. 根据权利要求13所述的计算机设备,其中,所述将封装处理后的所述日志数据存储至目标数据库系统之后,还包括:
    接收日志查询操作,根据所述日志查询操作在预设的日志查询页面获取对应的维度信息和查询时间段;
    根据所述维度信息与所述查询时间段在所述目标数据库系统中查询到所述日志查询操作对应的日志查询结果;
    根据所述日志查询结果生成日志分析信息,并将所述日志分析信息显示在所述日志查询页面上。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下所述的日志数据处理方法:获取待处理日志数据;
    根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式;
    根据所述目标日志格式,对所述待处理日志数据进行格式化处理,得到格式化后的日志数据;
    基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述获取待处理日志数据,包括:
    确定所述日志提供方中的中间件,对所述中间件安装日志采集器;
    根据所述日志采集器获取所述待处理日志数据。
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述功能类型包括代理服务功能和应用服务功能;所述根据所述待处理日志数据的日志提供方对应的功能类型,确定所述日志提供方对应的目标日志格式,包括:
    当所述功能类型为代理服务功能时,从区块链中获取预设的第一类配置文件,并将所述第一类配置文件中包括的预设的日志标准格式作为所述目标日志格式;
    当所述功能类型为应用服务功能时,从区块链中获取预设的第二类配置文件,根据所述第二配置文件确定所述目标日志格式,其中,所述第二类配置文件包括多个预设的日志自定义格式。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述根据所述第二配置文件 确定所述目标日志格式之前,还包括:
    确定预设的多个中间件;
    基于预设的匹配策略,对每个所述中间件匹配对应的日志自定义格式;
    将每个所述中间件与对应的日志自定义格式进行关联并存储至所述第二类配置文件中;
    所述根据所述第二配置文件确定所述目标日志格式,包括:
    确定所述日志提供方中的中间件;
    从所述第二类配置文件中查询所述中间件关联的日志自定义格式,并将所述日志自定义格式作为所述目标日志格式。
  19. 根据权利要求15所述的计算机可读存储介质,其中,所述基于预设的封装处理策略,对格式化后的所述日志数据进行封装处理,并将封装处理后的所述日志数据存储至目标数据库系统,包括:
    提取格式化后的所述日志数据对应的字段名与字段值,生成格式化后的所述日志数据对应的键值对集合;
    对所述键值对集合添加预设的维度信息标签,得到携带所述维度信息标签的所述键值对集合;
    将携带所述维度信息标签的所述键值对集合存储至所述目标数据库系统中。
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述将封装处理后的所述日志数据存储至目标数据库系统之后,还包括:
    接收日志查询操作,根据所述日志查询操作在预设的日志查询页面获取对应的维度信息和查询时间段;
    根据所述维度信息与所述查询时间段在所述目标数据库系统中查询到所述日志查询操作对应的日志查询结果;
    根据所述日志查询结果生成日志分析信息,并将所述日志分析信息显示在所述日志查询页面上。
PCT/CN2020/135251 2020-10-12 2020-12-10 日志数据处理方法、装置、计算机设备和存储介质 Ceased WO2021189954A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011086322.4 2020-10-12
CN202011086322.4A CN112148674B (zh) 2020-10-12 2020-10-12 日志数据处理方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2021189954A1 true WO2021189954A1 (zh) 2021-09-30

Family

ID=73953003

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135251 Ceased WO2021189954A1 (zh) 2020-10-12 2020-12-10 日志数据处理方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN112148674B (zh)
WO (1) WO2021189954A1 (zh)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415953A (zh) * 2022-01-04 2022-04-29 武汉烽火技术服务有限公司 一种对数据源进行数据采集的方法和装置
CN114780341A (zh) * 2022-04-21 2022-07-22 中国工商银行股份有限公司 日志处理方法和日志处理装置
CN114844771A (zh) * 2022-05-05 2022-08-02 亚信科技(中国)有限公司 微服务系统的监测方法、装置、存储介质、程序产品
CN114896222A (zh) * 2022-06-07 2022-08-12 中国工商银行股份有限公司 日志数据处理方法、装置、计算机设备、系统
CN114996306A (zh) * 2022-08-04 2022-09-02 北京首信科技股份有限公司 一种基于多维度的数据管理方法及系统
CN115550458A (zh) * 2022-09-20 2022-12-30 中国银行股份有限公司 一种日志处理方法和相关装置
CN115934646A (zh) * 2022-12-21 2023-04-07 中国建设银行股份有限公司 一种日志查询方法、装置、设备及存储介质
CN116049246A (zh) * 2023-01-17 2023-05-02 网易(杭州)网络有限公司 资源数据查询方法、装置、电子设备及存储介质
CN116074388A (zh) * 2023-03-28 2023-05-05 武汉卓鹰世纪科技有限公司 一种基于日志队列的流量转发方法及系统
CN116185677A (zh) * 2022-12-08 2023-05-30 福建升腾资讯有限公司 一种自动故障定位方法、系统及介质
CN116185964A (zh) * 2023-03-14 2023-05-30 中国工商银行股份有限公司 日志处理方法、装置、电子设备和存储介质
CN116204856A (zh) * 2022-12-31 2023-06-02 深圳昂楷科技有限公司 一种数据库信息溯源方法、装置及电子设备
CN116383155A (zh) * 2023-06-05 2023-07-04 成都融见软件科技有限公司 一种基于eda验证仿真器的日志查询系统
CN117149802A (zh) * 2023-06-29 2023-12-01 南京维拓科技股份有限公司 工业云应用使用情况统计分析方法
CN117271595A (zh) * 2023-10-26 2023-12-22 康键信息技术(深圳)有限公司 数据处理方法、插件、设备及存储介质
CN117492771A (zh) * 2023-11-21 2024-02-02 厦门四信通信科技有限公司 Linux系统日志分布式设计和部署方法、装置、设备及介质
CN118227189A (zh) * 2024-05-21 2024-06-21 阿里云计算有限公司 数据处理方法及异常提示方法
CN118410005A (zh) * 2024-04-24 2024-07-30 北京卫达信息技术有限公司 一种日志审计方法、设备、介质和产品
CN118689857A (zh) * 2024-08-23 2024-09-24 中国人民解放军海军大连舰艇学院 一种包含大量已知重复字段的格式化数据采集方法及装置
CN118981269A (zh) * 2024-10-18 2024-11-19 恒实建设管理股份有限公司 旁站信息数字化生成方法及系统
CN119621695A (zh) * 2025-02-11 2025-03-14 首都信息科技发展有限公司 基于三元管理系统的日志处理方法及装置
CN119648407A (zh) * 2024-08-26 2025-03-18 中国平安财产保险股份有限公司 信息安全画像构建方法、装置、计算机设备及存储介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114116422B (zh) * 2021-11-19 2024-05-24 苏州浪潮智能科技有限公司 一种硬盘日志分析方法、硬盘日志分析装置及存储介质
CN114356257B (zh) * 2022-03-04 2024-12-06 平安商业保理有限公司 日志打印方法、装置、计算机设备、存储介质和程序产品
CN114598556B (zh) * 2022-05-10 2022-07-15 苏州市卫生计生统计信息中心 It基础设施配置完整性保护方法及保护系统
CN115129673A (zh) * 2022-07-15 2022-09-30 中国农业银行股份有限公司 一种日志处理方法、装置、电子设备及存储介质
CN115525621A (zh) * 2022-08-11 2022-12-27 苏州浪潮智能科技有限公司 日志处理方法、系统、电子设备及存储介质
CN115455961B (zh) * 2022-09-21 2026-03-10 中国第一汽车股份有限公司 一种文本处理方法、装置、设备及介质
CN115408344B (zh) * 2022-09-29 2023-12-08 建信金融科技有限责任公司 日志格式化方法、装置、电子设备及存储介质
CN115809241A (zh) * 2022-11-18 2023-03-17 中国平安财产保险股份有限公司 数据存储方法、装置、计算机设备及存储介质
CN116483794B (zh) * 2023-04-24 2025-12-05 苏州元脑智能科技有限公司 日志获取方法、装置、计算机设备及存储介质
CN117113090B (zh) * 2023-10-23 2024-01-19 一网互通(北京)科技有限公司 数据源标签标注方法、装置及电子设备
CN117637089A (zh) * 2023-12-06 2024-03-01 广东康合慢病防治研究中心有限公司 一种医用慢性病病例存储监测管理装置及系统
CN118964916B (zh) * 2024-10-12 2025-01-24 北京国药新创科技发展有限公司 一种日志数据的实时存储方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190005111A1 (en) * 2017-06-29 2019-01-03 Accenture Global Solutions Limited Relational log entry instituting system
CN109324996A (zh) * 2018-10-12 2019-02-12 平安科技(深圳)有限公司 日志文件处理方法、装置、计算机设备及存储介质
CN109325009A (zh) * 2018-09-19 2019-02-12 亚信科技(成都)有限公司 日志解析的方法及装置
CN109800223A (zh) * 2018-12-12 2019-05-24 平安科技(深圳)有限公司 日志处理方法、装置、电子设备及存储介质
CN109918349A (zh) * 2019-02-25 2019-06-21 网易(杭州)网络有限公司 日志处理方法、装置、存储介质和电子装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100857883B1 (ko) * 2006-09-28 2008-09-10 (주)이우테크놀로지 로그파일 저장기능을 갖는 치과용 유닛체어 및 로그파일제공방법
CN104978383B (zh) * 2015-02-12 2018-01-09 腾讯科技(深圳)有限公司 一种数据互通的方法,及数据互通设备
CN105183622B (zh) * 2015-08-25 2017-12-26 青岛海信移动通信技术股份有限公司 基于安卓系统的日志处理方法及装置
CN108038207A (zh) * 2017-12-15 2018-05-15 暴风集团股份有限公司 一种日志数据处理系统、方法和服务器
WO2019217323A1 (en) * 2018-05-06 2019-11-14 Strong Force TX Portfolio 2018, LLC Methods and systems for improving machines and systems that automate execution of distributed ledger and other transactions in spot and forward markets for energy, compute, storage and other resources
JP6687798B1 (ja) * 2019-10-01 2020-04-28 データテック株式会社 データ管理システムおよびデータ管理方法
CN111369237B (zh) * 2020-02-28 2023-07-14 腾讯科技(深圳)有限公司 一种数据处理方法、装置及计算机存储介质
CN111522922B (zh) * 2020-03-26 2023-08-22 浙江口碑网络技术有限公司 日志信息查询方法、装置、存储介质及计算机设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190005111A1 (en) * 2017-06-29 2019-01-03 Accenture Global Solutions Limited Relational log entry instituting system
CN109325009A (zh) * 2018-09-19 2019-02-12 亚信科技(成都)有限公司 日志解析的方法及装置
CN109324996A (zh) * 2018-10-12 2019-02-12 平安科技(深圳)有限公司 日志文件处理方法、装置、计算机设备及存储介质
CN109800223A (zh) * 2018-12-12 2019-05-24 平安科技(深圳)有限公司 日志处理方法、装置、电子设备及存储介质
CN109918349A (zh) * 2019-02-25 2019-06-21 网易(杭州)网络有限公司 日志处理方法、装置、存储介质和电子装置

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415953A (zh) * 2022-01-04 2022-04-29 武汉烽火技术服务有限公司 一种对数据源进行数据采集的方法和装置
CN114415953B (zh) * 2022-01-04 2024-01-30 武汉烽火技术服务有限公司 一种对数据源进行数据采集的方法和装置
CN114780341A (zh) * 2022-04-21 2022-07-22 中国工商银行股份有限公司 日志处理方法和日志处理装置
CN114844771A (zh) * 2022-05-05 2022-08-02 亚信科技(中国)有限公司 微服务系统的监测方法、装置、存储介质、程序产品
CN114844771B (zh) * 2022-05-05 2024-03-08 亚信科技(中国)有限公司 微服务系统的监测方法、装置、存储介质、程序产品
CN114896222A (zh) * 2022-06-07 2022-08-12 中国工商银行股份有限公司 日志数据处理方法、装置、计算机设备、系统
CN114996306A (zh) * 2022-08-04 2022-09-02 北京首信科技股份有限公司 一种基于多维度的数据管理方法及系统
CN115550458A (zh) * 2022-09-20 2022-12-30 中国银行股份有限公司 一种日志处理方法和相关装置
CN116185677A (zh) * 2022-12-08 2023-05-30 福建升腾资讯有限公司 一种自动故障定位方法、系统及介质
CN115934646A (zh) * 2022-12-21 2023-04-07 中国建设银行股份有限公司 一种日志查询方法、装置、设备及存储介质
CN116204856A (zh) * 2022-12-31 2023-06-02 深圳昂楷科技有限公司 一种数据库信息溯源方法、装置及电子设备
CN116049246A (zh) * 2023-01-17 2023-05-02 网易(杭州)网络有限公司 资源数据查询方法、装置、电子设备及存储介质
CN116185964A (zh) * 2023-03-14 2023-05-30 中国工商银行股份有限公司 日志处理方法、装置、电子设备和存储介质
CN116074388A (zh) * 2023-03-28 2023-05-05 武汉卓鹰世纪科技有限公司 一种基于日志队列的流量转发方法及系统
CN116383155A (zh) * 2023-06-05 2023-07-04 成都融见软件科技有限公司 一种基于eda验证仿真器的日志查询系统
CN116383155B (zh) * 2023-06-05 2023-08-11 成都融见软件科技有限公司 一种基于eda验证仿真器的日志查询系统
CN117149802A (zh) * 2023-06-29 2023-12-01 南京维拓科技股份有限公司 工业云应用使用情况统计分析方法
CN117271595A (zh) * 2023-10-26 2023-12-22 康键信息技术(深圳)有限公司 数据处理方法、插件、设备及存储介质
CN117492771A (zh) * 2023-11-21 2024-02-02 厦门四信通信科技有限公司 Linux系统日志分布式设计和部署方法、装置、设备及介质
CN118410005A (zh) * 2024-04-24 2024-07-30 北京卫达信息技术有限公司 一种日志审计方法、设备、介质和产品
CN118227189A (zh) * 2024-05-21 2024-06-21 阿里云计算有限公司 数据处理方法及异常提示方法
CN118689857A (zh) * 2024-08-23 2024-09-24 中国人民解放军海军大连舰艇学院 一种包含大量已知重复字段的格式化数据采集方法及装置
CN118689857B (zh) * 2024-08-23 2024-11-26 中国人民解放军海军大连舰艇学院 一种包含大量已知重复字段的格式化数据采集方法及装置
CN119648407A (zh) * 2024-08-26 2025-03-18 中国平安财产保险股份有限公司 信息安全画像构建方法、装置、计算机设备及存储介质
CN118981269A (zh) * 2024-10-18 2024-11-19 恒实建设管理股份有限公司 旁站信息数字化生成方法及系统
CN119621695A (zh) * 2025-02-11 2025-03-14 首都信息科技发展有限公司 基于三元管理系统的日志处理方法及装置

Also Published As

Publication number Publication date
CN112148674B (zh) 2023-12-19
CN112148674A (zh) 2020-12-29

Similar Documents

Publication Publication Date Title
WO2021189954A1 (zh) 日志数据处理方法、装置、计算机设备和存储介质
CN111522922B (zh) 日志信息查询方法、装置、存储介质及计算机设备
CN110162544B (zh) 异构数据源数据获取方法及装置
CN111901192B (zh) 一种页面访问数据的统计方法及装置
CN110069297B (zh) 基于Spring MVC的异常处理方法、装置、计算机设备和存储介质
US11755531B1 (en) System and method for storage of data utilizing a persistent queue
CN112162965B (zh) 一种日志数据处理的方法、装置、计算机设备及存储介质
CN111414407A (zh) 数据库的数据查询方法、装置、计算机设备及存储介质
WO2021189953A1 (zh) 日志数据处理方法、装置、计算机设备和存储介质
CN113010542B (zh) 业务数据处理方法、装置、计算机设备及存储介质
CN110062043A (zh) 服务治理方法、服务治理装置、存储介质及电子设备
CN112417016B (zh) 一种数据交换方法、系统、设备及存储介质
US11182576B1 (en) Techniques for using tag placement to determine 3D object orientation
CN107404417A (zh) 一种监控数据的处理方法、处理装置及处理系统
CN113094236B (zh) 一种系统数据采集方法、装置、计算机设备及存储介质
CN111447170A (zh) 数据处理方法及其系统、计算机系统及计算机可读介质
CN111782652A (zh) 数据调用方法、装置、计算机设备和存储介质
CN110059278A (zh) Web页面配置方法、服务器及计算机可读存储介质
CN115357761A (zh) 链路追踪方法、装置、电子设备及存储介质
CN114153703A (zh) 微服务的异常定位方法、装置、电子设备和程序产品
CN114861054A (zh) 信息采集方法、装置、电子设备及存储介质
US11895237B1 (en) Scaled authentication of endpoint devices
CN117331804A (zh) 一种前端页面监控方法、装置、计算机设备及存储介质
CN112187509A (zh) 多架构云平台执行日志管理方法、系统、终端及存储介质
CN115033240A (zh) 报错信息的处理方法、装置、计算机设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20927192

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20927192

Country of ref document: EP

Kind code of ref document: A1