[go: up one dir, main page]

CN112416876B - Log monitoring method and device for universal interface - Google Patents

Log monitoring method and device for universal interface Download PDF

Info

Publication number
CN112416876B
CN112416876B CN202011457202.0A CN202011457202A CN112416876B CN 112416876 B CN112416876 B CN 112416876B CN 202011457202 A CN202011457202 A CN 202011457202A CN 112416876 B CN112416876 B CN 112416876B
Authority
CN
China
Prior art keywords
log
monitoring
log data
preset
target
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
CN202011457202.0A
Other languages
Chinese (zh)
Other versions
CN112416876A (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.)
State Grid Information and Telecommunication Group Co Ltd
Beijing China Power Information Technology Co Ltd
Original Assignee
State Grid Information and Telecommunication Group Co Ltd
Beijing China Power Information Technology 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 State Grid Information and Telecommunication Group Co Ltd, Beijing China Power Information Technology Co Ltd filed Critical State Grid Information and Telecommunication Group Co Ltd
Priority to CN202011457202.0A priority Critical patent/CN112416876B/en
Publication of CN112416876A publication Critical patent/CN112416876A/en
Application granted granted Critical
Publication of CN112416876B publication Critical patent/CN112416876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • G06Q10/063114Status monitoring or status determination for a person or group
    • 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)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种通用接口的日志监控方法及装置,预先定制预设日志表模板,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述方法包括:在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;将所述日志数据基于所述预设日志表模板转化为目标预设日志表;基于所述目标预设日志表对所述目标系统进行监控日志监控。上述过程,无论何种监控请求,都会将对应的日志数据转换为目标预设日志表,具有复用性,不需要单独设置日志表。

The present invention discloses a log monitoring method and device of a universal interface, wherein a preset log table template is pre-customized, and the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service. The method includes: upon receiving a log monitoring request for a target system, obtaining log data of the target system in a preset database, wherein the log data includes: basic information, technical information, step information and return parameters/messages of the target system, and the log data is obtained by monitoring the target system through a log monitoring platform; converting the log data into a target preset log table based on the preset log table template; and monitoring the target system based on the target preset log table. In the above process, regardless of the type of monitoring request, the corresponding log data will be converted into a target preset log table, which is reusable and does not require a separate log table to be set.

Description

一种通用接口的日志监控方法及装置A log monitoring method and device for a universal interface

技术领域Technical Field

本发明涉及企业资源计划技术领域,尤其涉及一种通用接口的日志监控方法及装置。The present invention relates to the technical field of enterprise resource planning, and in particular to a log monitoring method and device of a universal interface.

背景技术Background Art

目前SAP ERP针对外部调用的接口日志大多是系统级的日志,例如连接信息、中断信息等一些纯技术信息,需要专业的基础环境人员才能看懂Currently, most of the interface logs for external calls in SAP ERP are system-level logs, such as connection information, interruption information, and other purely technical information, which require professional basic environment personnel to understand.

在SAP ERP项目实施中,大多数的日志记录都是针对某一特定的接口分别创建一个接口日志表且再单独开发一个程序进行日志展示或者进行接口重发。但是,针对不同的接口服务单独创建不同的日志表会造成日志表过多且难以维护与定位分析,并且定制开发不同的日志查询功能与日志表且很难复用。In the implementation of SAP ERP projects, most log records are created for a specific interface, and a separate program is developed for log display or interface retransmission. However, creating different log tables for different interface services will result in too many log tables and make them difficult to maintain and locate. In addition, different log query functions and log tables are customized and difficult to reuse.

发明内容Summary of the invention

有鉴于此,本发明提供了一种通用接口的日志监控方法及装置,用于解决在SAPERP项目实施中,大多数的日志记录都是针对某一特定的接口分别创建一个接口日志表且再单独开发一个程序进行日志展示或者进行接口重发。但是,针对不同的接口服务单独创建不同的日志表会造成日志表过多且难以维护与定位分析,并且定制开发不同的日志查询功能与日志表且很难复用的问题,具体方案如下:In view of this, the present invention provides a log monitoring method and device for a universal interface, which is used to solve the problem that in the implementation of SAPERP projects, most log records are created for a specific interface. An interface log table is created and a program is developed separately for log display or interface retransmission. However, creating different log tables for different interface services will result in too many log tables and make it difficult to maintain and locate the analysis, and different log query functions and log tables are customized and developed and difficult to reuse. The specific solution is as follows:

一种通用接口的日志监控方法,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述方法包括:A log monitoring method for a universal interface, pre-customizing a preset log table template, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service, the method includes:

在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;Upon receiving a log monitoring request for a target system, obtaining log data of the target system from a preset database, wherein the log data includes: basic information, technical information, step information, and return parameters/messages of the target system, and the log data is obtained by monitoring the target system through a log monitoring platform;

将所述日志数据基于所述预设日志表模板转化为目标预设日志表;Converting the log data into a target preset log table based on the preset log table template;

基于所述目标预设日志表对所述目标系统进行监控日志监控。The target system is monitored by monitoring logs based on the target preset log table.

上述的方法,可选的,在预设数据库中获取所述目标系统的日志数据,包括:The above method, optionally, obtains the log data of the target system in a preset database, including:

解析所述日志监控请求,获取所述日志监控请求中的监控标识;Parsing the log monitoring request to obtain a monitoring identifier in the log monitoring request;

在所述预设数据库中查找与所述监控标识相同的日志数据;Searching the preset database for log data identical to the monitoring identifier;

将与所述监控标识相同的日志数据作为所述目标系统的日志数据。The log data identical to the monitoring identifier is used as the log data of the target system.

上述的方法,可选的,将所述日志数据基于所述预设日志表模板转化为目标预设日志表,包括:The above method, optionally, converting the log data into a target preset log table based on the preset log table template includes:

将所述日志数据依据所述输入参数、所述返回参数/消息和所述至少一个调用原子服务进行划分得到各个划分后日志数据;Dividing the log data according to the input parameter, the return parameter/message and the at least one called atomic service to obtain each divided log data;

将所述各个划分后日志数据依据其所属类型添加到所述预设日志表模板中,得到目标预设日志表。The divided log data are added to the preset log table template according to their types to obtain a target preset log table.

上述的方法,可选的,基于所述目标预设日志表对所述目标系统进行监控日志监控,包括:The above method, optionally, performs monitoring log monitoring on the target system based on the target preset log table, including:

获取所述日志监控请求中的查询条件;Obtaining the query condition in the log monitoring request;

基于所述查询条件在所述目标预设日志表中查找与所述查询条件匹配的关键词;Searching the target preset log table for a keyword matching the query condition based on the query condition;

获取与所述关键词对应的目标日志数据,展示所述目标日志数据。Obtain target log data corresponding to the keyword, and display the target log data.

上述的方法,可选的,还包括:The above method may optionally further include:

在接收到对当前日志数据的冲销指令时,对所述当前日志数据进行冲销。When an instruction to cancel the current log data is received, the current log data is cancelled.

一种通用接口的日志监控装置,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述装置包括:A log monitoring device with a universal interface, pre-customizing a preset log table template, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service, the device includes:

获取模块,用于在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;An acquisition module, configured to acquire log data of the target system from a preset database upon receiving a log monitoring request for the target system, wherein the log data includes basic information, technical information, step information and return parameters/messages of the target system, and the log data is obtained by monitoring the target system through a log monitoring platform;

转换模块,用于将所述日志数据基于所述预设日志表模板转化为目标预设日志表;A conversion module, used for converting the log data into a target preset log table based on the preset log table template;

监控模块,用于基于所述目标预设日志表对所述目标系统进行监控日志监控。A monitoring module is used to monitor the target system's monitoring logs based on the target preset log table.

上述的装置,可选的,所述获取模块包括:In the above device, optionally, the acquisition module includes:

标识获取单元,用于解析所述日志监控请求,获取所述日志监控请求中的监控标识;An identification acquisition unit, used to parse the log monitoring request and obtain a monitoring identification in the log monitoring request;

第一查找单元,用于在所述预设数据库中查找与所述监控标识相同的日志数据;A first search unit, configured to search the preset database for log data identical to the monitoring identifier;

确定单元,用于将与所述监控标识相同的日志数据作为所述目标系统的日志数据。The determination unit is used to use the log data identical to the monitoring identifier as the log data of the target system.

上述的装置,可选的,所述转换模块包括:In the above device, optionally, the conversion module includes:

划分单元,用于将所述日志数据依据所述输入参数、所述返回参数/消息和所述至少一个调用原子服务进行划分得到各个划分后日志数据;A partitioning unit, configured to partition the log data according to the input parameter, the return parameter/message and the at least one called atomic service to obtain respective partitioned log data;

添加单元,用于将所述各个划分后日志数据依据其所属类型添加到所述预设日志表模板中,得到目标预设日志表。The adding unit is used to add the divided log data to the preset log table template according to its type to obtain a target preset log table.

上述的装置,可选的,所述监控模块包括:In the above device, optionally, the monitoring module includes:

条件获取单元,用于获取所述日志监控请求中的查询条件;A condition acquisition unit, used to acquire the query condition in the log monitoring request;

第一查找单元,用于基于所述查询条件在所述目标预设日志表中查找与所述查询条件匹配的关键词;A first searching unit, configured to search the target preset log table for a keyword matching the query condition based on the query condition;

获取和展示单元,用于获取与所述关键词对应的目标日志数据,展示所述目标日志数据。The acquisition and display unit is used to acquire target log data corresponding to the keyword and display the target log data.

上述的装置,可选的,还包括:The above device may optionally further include:

冲销模块,用于在接收到对当前日志数据的冲销指令时,对所述当前日志数据进行冲销。The cancellation module is used to cancel the current log data when receiving an instruction to cancel the current log data.

与现有技术相比,本发明包括以下优点:Compared with the prior art, the present invention has the following advantages:

本发明公开了一种通用接口的日志监控方法及装置,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述方法包括:在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;将所述日志数据基于所述预设日志表模板转化为目标预设日志表;基于所述目标预设日志表对所述目标系统进行监控日志监控。上述过程,无论何种监控请求,都会将对应的日志数据转换为目标预设日志表,具有复用性,不需要单独设置日志表。The present invention discloses a log monitoring method and device of a universal interface, wherein a preset log table template is customized in advance, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service, and the method includes: upon receiving a log monitoring request for a target system, obtaining log data of the target system in a preset database, wherein the log data includes: basic information, technical information, step information and return parameters/messages of the target system, and the log data is obtained by monitoring the target system through a log monitoring platform; converting the log data into a target preset log table based on the preset log table template; and monitoring the target system based on the target preset log table. In the above process, regardless of the type of monitoring request, the corresponding log data will be converted into a target preset log table, which is reusable and does not require a separate log table to be set.

当然,实施本发明的任一产品并不一定需要同时达到以上所述的所有优点。Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1为本申请实施例公开的一种通用接口的日志监控方法流程图;FIG1 is a flow chart of a log monitoring method for a universal interface disclosed in an embodiment of the present application;

图2为本申请实施例公开的一种服务接口结构框图;FIG2 is a structural block diagram of a service interface disclosed in an embodiment of the present application;

图3为本申请实施例公开的一种通用接口的日志监控装置结构框图。FIG3 is a structural block diagram of a log monitoring device of a universal interface disclosed in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

本发明公开了一种通用接口的日志监控方法及装置,应用于对SAP ERP系统的监控过程中,针对复杂业务需求,可能涉及到的内部业务系统有很多,这些系统不可避免的需要与ERP系统进行频繁交互。接口服务运行的结果及过程监控显得极为重要,尤其对于开发人员与运维人员日常查错,统计业务交易量起到事半功倍的效果,其中,SAP ERP:SAP公司推出的ERP软件产品,包括SAP R/3、SAP ECC、SAP S/4HANA等。接口服务:对外提供的接口服务,可以是SAP标准BAPI也可以是客户自定义的ZBAPI,按照一定的原则封装的接口服务。The present invention discloses a log monitoring method and device of a universal interface, which is applied to the monitoring process of the SAP ERP system. For complex business needs, there may be many internal business systems involved, and these systems inevitably need to interact frequently with the ERP system. The results and process monitoring of the interface service operation are extremely important, especially for developers and operation and maintenance personnel to check errors on a daily basis and to count business transaction volumes, which has a multiplier effect. Among them, SAP ERP: ERP software products launched by SAP, including SAP R/3, SAP ECC, SAP S/4HANA, etc. Interface service: The interface service provided to the outside world can be SAP standard BAPI or customer-defined ZBAPI, which is an interface service encapsulated according to certain principles.

在企业级的业务运维和运营场景中,日志正扮演着越来越重要的角色,一套完整的日志监控系统其功能是否丰富,日志展现是否详细,往往取决于接口服务在执行过程中日志记录是否完善齐全。日志监控提供对业务日志数据实时分析,监控图表可视化展示和报警服务。目前在大多数的SAP实施项目中没有专门针对后台服务接口进行统一的日志监控与管理平台,即使有也过于简单与分散且没有与业务数据很好的结合起来,具体表现为以下几个方面:In enterprise-level business maintenance and operation scenarios, logs are playing an increasingly important role. Whether a complete log monitoring system is rich in functions and whether the log display is detailed often depends on whether the log records are complete during the execution of the interface service. Log monitoring provides real-time analysis of business log data, visualization of monitoring charts and alarm services. At present, in most SAP implementation projects, there is no unified log monitoring and management platform specifically for the backend service interface. Even if there is, it is too simple and scattered and not well integrated with business data, which is specifically manifested in the following aspects:

(1)针对不同的接口服务单独创建不同的日志表会造成日志表过多且难以维护与定位分析(1) Creating different log tables for different interface services will result in too many log tables and make maintenance and location analysis difficult.

(2)定制开发不同的日志查询功能与特定表且很难复用(2) Custom development of different log query functions and specific tables that are difficult to reuse

(3)使用范围更多的是偏向于后台运维人员,因此日志中内容偏重于技术信息而忽略业务数据信息(3) The scope of use is more inclined towards back-end operation and maintenance personnel, so the content of the log focuses on technical information and ignores business data information

(4)事务码维护过多运维人员与业务人员难以记忆,影响工作效率(4) Too many transaction codes to maintain and maintenance personnel and business personnel find it difficult to remember, affecting work efficiency

(5)针对复杂的集成接口,无法准确追踪调用链内部步骤执行情况(5) For complex integrated interfaces, it is impossible to accurately track the execution of steps within the call chain

(6)没有很好的考虑接口事务完整性且无法进行异常处理(冲销与偿)(6) The integrity of the interface transaction is not well considered and exception handling (reversal and compensation) is not possible.

针对上述问题,本发明实施例中提供了一种通用接口的日志监控方法用于解决上述问题,其中,所述通用接口需要开发人员在封装接口时,需要按照统一的接口开发规范与流程封装符合标装的接口服务,其中,所述通用接口的集成服务框架在完整的意义上,核心系统软件层次结构可以分为四层,包括渠道层、流程层、集成层、核心服务层。其中,组合服务相应于集成层,也即产品层的最外层,是与渠道层进行在线联机交易的唯一的接口。In view of the above problems, a log monitoring method of a universal interface is provided in an embodiment of the present invention to solve the above problems, wherein the universal interface requires developers to encapsulate the interface service in accordance with the unified interface development specification and process when encapsulating the interface, wherein the integrated service framework of the universal interface is in a complete sense, and the core system software hierarchy can be divided into four layers, including the channel layer, the process layer, the integration layer, and the core service layer. Among them, the composite service corresponds to the integration layer, that is, the outermost layer of the product layer, and is the only interface for online transactions with the channel layer.

进一步的,基于集成服务接口封装输入输出参数规范保证所有的集成服务接口中均带有统一的CONTROL_DATA(公共控制信息)与RETURN(返回消息)。Furthermore, based on the integrated service interface encapsulation input and output parameter specifications, it is ensured that all integrated service interfaces have unified CONTROL_DATA (public control information) and RETURN (return message).

集成服务内部代码层次结构必须保证所有集成服务均采用SAP ABAP OO面向对象编程技术实现,其内部代码层次结构如下:The internal code hierarchy of the integration service must ensure that all integration services are implemented using SAP ABAP OO object-oriented programming technology. The internal code hierarchy is as follows:

首先,一个集成服务在其物理形态上,就是一个SAP Remote Function Module(RFM)。其次,一个集成服务的实现,也是分层的。First, an integration service is a SAP Remote Function Module (RFM) in its physical form. Second, the implementation of an integration service is also layered.

(1)代理实现层(Proxy Implementation Layer)(1) Proxy Implementation Layer

所述代理实现层实现一些通用的功能,比如流水号判断及处理,消息转译等等。The proxy implementation layer implements some common functions, such as serial number judgment and processing, message translation, etc.

(2)服务实现层(Service Implementation Layer)(2) Service Implementation Layer

所述服务实现层组织服务适配器,实现功能。另外,事务控制是在这一层实现的。The service implementation layer organizes service adapters to implement functions. In addition, transaction control is implemented in this layer.

(3)基础层(Foundation Layer)(3) Foundation Layer

集成服务框架提供了许多公用的程序来实现这些功能。这些公用程序本身组合一个层,叫“基础层”。The integration service framework provides many common programs to implement these functions. These common programs themselves form a layer called the "base layer".

所述集成服务框架提供了一整套配套的公共程序,以简化及规范化集成服务的行为,包括:流水号管理句柄、消息句柄、异常类和异常消息转译句柄。The integration service framework provides a complete set of supporting public programs to simplify and standardize the behavior of the integration service, including: serial number management handle, message handle, exception class and exception message translation handle.

在开发过程中这些公共程序都是可直接调用的,对所述公共程序进行举例,如表1所示。During the development process, these public programs can be directly called. Examples of the public programs are shown in Table 1.

表1Table 1

本发明实施例中,适配器类的服务方法实现,以方法“EXECUTE”为例进行说明,方法‘EXECUTE’的接口参数:初始状态下接口中只有CONTROL_DATA和RETURN,对照集成服务ZCS_DEMO_ADDR_CHG的接口将其余部分补充完整。例如本例中集成服务有4个内表接口,可以对应用于定义适配器类的内表传输接口。方法‘EXECUTE’的实现:在正向服务实现方法‘EXECUTE’中调用原子BAPI,实现业务功能。In the embodiment of the present invention, the service method implementation of the adapter class is described by taking the method "EXECUTE" as an example. The interface parameters of the method 'EXECUTE' are: in the initial state, there are only CONTROL_DATA and RETURN in the interface. Compare the interface of the integrated service ZCS_DEMO_ADDR_CHG to complete the rest. For example, in this example, the integrated service has 4 internal table interfaces, which can correspond to the internal table transmission interface used to define the adapter class. Implementation of the method 'EXECUTE': Call the atomic BAPI in the forward service implementation method 'EXECUTE' to implement the business function.

根据需要实现自代理实现类‘ZCL_DEMO_IN_PI_ADDR_CHG’中的相关方法,所述相关方法如表2所示,Implement the relevant methods in the self-agent implementation class 'ZCL_DEMO_IN_PI_ADDR_CHG' as needed. The relevant methods are shown in Table 2.

表2Table 2

本发明实施例中,根据需要实现类‘ZCL_DEMO_IN_SI_ADDR_CHG’中的‘EXECUTE’方法,在此方法中实现具体的业务实现。初始状态下,此方法中实现为空,在此方法中中直接调用适配器类的‘EXECUTE’方法,如果一个集成服务涉及到多个步骤的调用,也可以在服务实现类中进行顺次调用In the embodiment of the present invention, the 'EXECUTE' method in the class 'ZCL_DEMO_IN_SI_ADDR_CHG' is implemented as needed, and specific business implementation is implemented in this method. In the initial state, the implementation in this method is empty, and the 'EXECUTE' method of the adapter class is directly called in this method. If an integrated service involves calling multiple steps, it can also be called sequentially in the service implementation class

每个步骤适配器类,调用前可记录每个步骤的入参。调用结束后调用句柄类ZCL_FND_TRANSACTION_CONTROL->RECORD_WORK()方法,记录该步骤的调用堆栈。此堆栈用于在后续步骤执行出现问题的情况下调用ROLLBACK_WORK()方法时候使用。同时调用ZCL_FND_TRANSACTION_CONTROL->COMMIT_WORK()方法,提交保存数据。Each step adapter class can record the input parameters of each step before calling. After the call, call the handle class ZCL_FND_TRANSACTION_CONTROL->RECORD_WORK() method to record the call stack of the step. This stack is used when calling the ROLLBACK_WORK() method when problems occur in the execution of subsequent steps. At the same time, call the ZCL_FND_TRANSACTION_CONTROL->COMMIT_WORK() method to commit and save data.

基于上述的通用接口,本发明实施例中提供了一种通用接口的日志监控方法,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述监控方法的执行流程如图1所示,包括步骤:Based on the above-mentioned universal interface, an embodiment of the present invention provides a log monitoring method of a universal interface, pre-customizing a preset log table template, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service. The execution flow of the monitoring method is shown in FIG1, including the steps of:

S101、在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;S101. Upon receiving a log monitoring request for a target system, obtaining log data of the target system from a preset database, wherein the log data includes basic information, technical information, step information, and return parameters/messages of the target system, and the log data is obtained by monitoring the target system through a log monitoring platform;

本发明实施例中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,其中,所述基本信息包括:流水、日期、时间、服务名称、操作用户、执行结果等,所述技术信息包括:接口技术名称、调用方系统、接口外部输入及返回参数、业务发起单位、用户及所属机构等,所述步骤信息包括:执行步骤原子服务名、输入及返回参数、执行结果等信息,所述返回参数/消息包括:报错或者成功消息等。所述日志数据由日志监控平台对所述目标系统进行监控得到,所述日志监控平台用户监控所述目标系统,其中,所述目标系统可以为具体的应用、也可以为多个应用组成的系统,本发明实施例中,对所述目标系统不进行具体限定。在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,获取的过程如下:解析所述日志监控请求,获取所述日志监控请求中的监控标识;其中,所述监控标识用于区分不同系统的日志数据,本发明实施例中,对所述监控标识的具体存在形式不进行限定,在所述预设数据库中查找与所述监控标识相同的日志数据;将与所述监控标识相同的日志数据作为所述目标系统的日志数据。其中,所述预设数据库中包括的数据库表名如表3所示。In the embodiment of the present invention, the log data includes: basic information, technical information, step information and return parameters/messages of the target system, wherein the basic information includes: flow, date, time, service name, operating user, execution result, etc., the technical information includes: interface technology name, caller system, interface external input and return parameters, business initiator, user and affiliated organization, etc., the step information includes: execution step atomic service name, input and return parameters, execution result and other information, the return parameter/message includes: error or success message, etc. The log data is obtained by monitoring the target system by the log monitoring platform, and the log monitoring platform user monitors the target system, wherein the target system can be a specific application or a system composed of multiple applications. In the embodiment of the present invention, the target system is not specifically limited. In the case of receiving a log monitoring request for a target system, the log data of the target system is obtained in a preset database, and the acquisition process is as follows: parsing the log monitoring request, obtaining the monitoring identifier in the log monitoring request; wherein the monitoring identifier is used to distinguish log data of different systems, and in the embodiment of the present invention, the specific existence form of the monitoring identifier is not limited, searching the preset database for log data identical to the monitoring identifier; and using the log data identical to the monitoring identifier as the log data of the target system. wherein the database table names included in the preset database are shown in Table 3.

表3Table 3

S102、将所述日志数据基于所述预设日志表模板转化为目标预设日志表;S102, converting the log data into a target preset log table based on the preset log table template;

本发明实施例中,由于不同的系统日志数据的存在形式会有区别,为例实现对不同系统监控过程的复用,本发明实施例中预先建立日志表模板,所述日志表模板可以满足不同系统的日志监控,将将所述日志数据基于所述预设日志表模板转化为目标预设日志表的过程如下:将所述日志数据依据所述输入参数、所述返回参数/消息和所述至少一个调用原子服务进行划分得到各个划分后日志数据;将所述各个划分后日志数据依据其所属类型添加到所述预设日志表模板中,得到目标预设日志表。In an embodiment of the present invention, since the existence forms of different system log data may be different, in order to realize the reuse of different system monitoring processes, a log table template is pre-established in an embodiment of the present invention. The log table template can meet the log monitoring of different systems. The process of converting the log data into a target preset log table based on the preset log table template is as follows: the log data is divided according to the input parameters, the return parameters/messages and the at least one calling atomic service to obtain each divided log data; each divided log data is added to the preset log table template according to its type to obtain the target preset log table.

S103、基于所述目标预设日志表对所述目标系统进行监控日志监控。S103: Perform monitoring log monitoring on the target system based on the target preset log table.

本发明实施例中,基于所述目标预设日志表对所述目标系统进行监控日志监控,获取所述日志监控请求中的查询条件,其中,所述查询条件包括:日期、时间、操作用户、状态、服务名称、状态等,基于所述查询条件在所述目标预设日志表中查找与所述查询条件匹配的关键词;获取与所述关键词对应的目标日志数据,展示所述目标日志数据。In an embodiment of the present invention, the target system is monitored for logs based on the target preset log table, and query conditions in the log monitoring request are obtained, wherein the query conditions include: date, time, operating user, status, service name, status, etc. Keywords matching the query conditions are searched in the target preset log table based on the query conditions; target log data corresponding to the keywords are obtained, and the target log data are displayed.

本发明公开了一种通用接口的日志监控方法,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述方法包括:在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;将所述日志数据基于所述预设日志表模板转化为目标预设日志表;基于所述目标预设日志表对所述目标系统进行监控日志监控。上述过程,无论何种监控请求,都会将对应的日志数据转换为目标预设日志表,具有复用性,不需要单独设置日志表。The present invention discloses a log monitoring method of a universal interface, pre-customizing a preset log table template, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service, and the method includes: in the case of receiving a log monitoring request for a target system, obtaining the log data of the target system in a preset database, wherein the log data includes: basic information, technical information, step information and return parameters/messages of the target system, and the log data is obtained by monitoring the target system by a log monitoring platform; converting the log data into a target preset log table based on the preset log table template; and monitoring the target system based on the target preset log table. In the above process, regardless of the type of monitoring request, the corresponding log data will be converted into a target preset log table, which is reusable and does not require a separate log table to be set.

本发明实施例中,以所述通用接口为服务接口为例,对上述过程进行举例,服务接口结构框图如图2所示,日志监控平台实时监控系统的基本信息、技术信息、步骤信息和参数/消息、进行数据抽取后存储至数据库,首先在数据库层面上设计了一套通用的日志存储表且哪些日志类型需要记录存储是可配置的。接口在被调用运行过程中根据配置将所属相关日志信息统一储存至对应库表完成各类型日志的数据的统一管理。考虑到未来随着业务量增多,针对每种类型的日志表按照月份设计12个备份表,为后续备份数据做准备监控平台运行时,实时从各种不同类型的日志表中提取数据进行过滤、加工、分析与统计后进行可视化展示。集成服务监控平台功能事务码:ZCSMON,用户根据操作权限,可在门户网站或者SAP后台运行此功能。输入查询条件,可按日期、时间、操作用户、状态、服务名称、状态等搜索条件单一或组合查询接口执行记录,点击“开始查询”按钮,系统实时从业务流水信息表、接口步骤信息表、MESSAGE等相关表中加载基本信息、步骤信息和返回信息数据,利用SAPALV列表功能进行展示并将相关日志信息进行存储,监控平台集成异常处理按钮,当用户选择一条成功流水进行冲销(冲销即冲正,SAP提供的相当于‘后悔’功能,例如发的银行转账,冲正后金额原路返回汇款人账户)时,系统根据正向流水号查找出此接口传入传出参数,根据事先配置的冲销服务进行动态冲销。同理,对服务进行后继补偿业务时,根据日志中记录的历史参数数据重新对接口进行模拟执行。In the embodiment of the present invention, the general interface is taken as a service interface as an example to illustrate the above process. The service interface structure diagram is shown in Figure 2. The log monitoring platform monitors the basic information, technical information, step information and parameters/messages of the system in real time, and stores the data in the database after data extraction. First, a set of general log storage tables are designed at the database level, and which log types need to be recorded and stored is configurable. During the called operation process, the interface stores the relevant log information in the corresponding library table according to the configuration to complete the unified management of data of various types of logs. Considering that with the increase in business volume in the future, 12 backup tables are designed for each type of log table according to the month to prepare for subsequent backup data. When the monitoring platform is running, data is extracted from various types of log tables in real time for filtering, processing, analysis and statistics, and then visualized. Integrated service monitoring platform function transaction code: ZCSMON, users can run this function on the portal website or SAP background according to their operating permissions. Enter the query conditions, and you can query the interface execution records by date, time, operation user, status, service name, status and other search conditions alone or in combination. Click the "Start Query" button, and the system will load basic information, step information and return information data from the business flow information table, interface step information table, MESSAGE and other related tables in real time, and use the SAPALV list function to display and store related log information. The monitoring platform integrates an exception handling button. When the user selects a successful flow to offset (offsetting is correction, which is equivalent to the "regret" function provided by SAP, such as a bank transfer, the amount is returned to the remitter's account after correction), the system finds the input and output parameters of this interface according to the forward flow number, and performs dynamic offset according to the pre-configured offset service. Similarly, when performing subsequent compensation business for the service, the interface is re-simulated and executed according to the historical parameter data recorded in the log.

本套接口监控日志方法与其它传统日志管理平台其主要改进点在于:The main improvements of this interface monitoring log method over other traditional log management platforms are:

监控平台功能的丰富、完善与接口封装规范紧密相联,便于企业遵循统一的服务接口开发管理,约束开发准则。在接口封装时遵循统一规范基础上开发出一套通用的接口运行监控平台,可实现以下主要功能:The enrichment and improvement of the monitoring platform functions are closely linked to the interface encapsulation specifications, which facilitates enterprises to follow the unified service interface development management and constrain development guidelines. A universal interface operation monitoring platform is developed based on the unified specifications during interface encapsulation, which can achieve the following main functions:

支持按日期、时间、操作用户、状态、服务名称等搜索条件查询接口执行记录;Support querying interface execution records by date, time, operation user, status, service name and other search conditions;

组织结构信息展示:业务发起单位、用户及所属单位;Display of organizational structure information: business initiator, user and affiliated unit;

技术信息展示:包括:服务名称、调用系统、接口传入参数、接口传出信息,支持将信息导出功能(XML);Technical information display: including: service name, calling system, interface input parameters, interface output information, and supports information export function (XML);

接口内部执行步骤信息展示:针对复杂的集成接口服务,其内部有可能集成多个ERP系统或者非ERP系统原子服务,可支持按照调用顺序记录每个步骤输入、输出信息及执行结果。Display of execution step information within the interface: For complex integrated interface services, which may integrate multiple ERP systems or non-ERP system atomic services, it can support recording the input and output information and execution results of each step in the order of calling.

监控平台记录支持自动刷新;Monitoring platform records support automatic refresh;

报错消息展示:消息日志-LOG;Error message display: message log-LOG;

消息转译:因ERP内部一些标准BAPI报出的消息业务含义不是很明确,支持将原始消息映射成自定义转换后的消息;Message translation: Because the business meaning of some standard BAPI messages in ERP is not very clear, it supports mapping the original messages into custom converted messages;

其遵循规范化封装下的集成服务接口具有有以下优点:The integrated service interface under standardized encapsulation has the following advantages:

统一的外部调用方式;Unified external calling method;

统一的流水状态控制,以及流水日志的记录;Unified flow status control and flow log recording;

统一的事务控制、消息处理、异常处理;Unified transaction control, message processing, and exception handling;

统一的冲正机制;Unified reversal mechanism;

监控平台其功能不仅仅体现在‘监控’,可做业务人员业务统计以及运维人员日常排错,异常处理的主要工具。The function of the monitoring platform is not only reflected in "monitoring", it can also be used as a main tool for business personnel to conduct business statistics and operation and maintenance personnel to conduct daily troubleshooting and exception handling.

基于上述的一种通用接口的日志监控方法,本发明实施例中,提供了一种通用接口日志监控装置,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述监控装置的结构框图如图3所示,包括:Based on the above-mentioned log monitoring method of a universal interface, an embodiment of the present invention provides a universal interface log monitoring device, pre-customizing a preset log table template, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service. The structural block diagram of the monitoring device is shown in FIG3, including:

获取模块201、转换模块202和监控模块203。Acquisition module 201 , conversion module 202 and monitoring module 203 .

其中,in,

所述获取模块201,用于在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;The acquisition module 201 is used to acquire the log data of the target system from a preset database when receiving a log monitoring request for the target system, wherein the log data includes: basic information, technical information, step information and return parameters/messages of the target system, and the log data is obtained by monitoring the target system by the log monitoring platform;

所述转换模块202,用于将所述日志数据基于所述预设日志表模板转化为目标预设日志表;The conversion module 202 is used to convert the log data into a target preset log table based on the preset log table template;

所述监控模块203,用于基于所述目标预设日志表对所述目标系统进行监控日志监控。The monitoring module 203 is used to monitor the target system's monitoring logs based on the target preset log table.

本发明公开了一种通用接口的日志监控装置,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述方法包括:在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;将所述日志数据基于所述预设日志表模板转化为目标预设日志表;基于所述目标预设日志表对所述目标系统进行监控日志监控。上述过程,无论何种监控请求,都会将对应的日志数据转换为目标预设日志表,具有复用性,不需要单独设置日志表。The present invention discloses a log monitoring device with a universal interface, which pre-customizes a preset log table template, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service, and the method includes: upon receiving a log monitoring request for a target system, obtaining log data of the target system in a preset database, wherein the log data includes: basic information, technical information, step information and return parameters/messages of the target system, and the log data is obtained by monitoring the target system through a log monitoring platform; converting the log data into a target preset log table based on the preset log table template; and monitoring the target system based on the target preset log table. In the above process, regardless of the type of monitoring request, the corresponding log data will be converted into a target preset log table, which is reusable and does not require a separate log table to be set.

本发明实施例中,所述获取模块201包括:In the embodiment of the present invention, the acquisition module 201 includes:

标识获取单元204、第一查找单元205和确定单元206。An identification obtaining unit 204 , a first searching unit 205 and a determining unit 206 .

其中,in,

所述标识获取单元204,用于解析所述日志监控请求,获取所述日志监控请求中的监控标识;The identification acquisition unit 204 is used to parse the log monitoring request and obtain the monitoring identification in the log monitoring request;

所述第一查找单元205,用于在所述预设数据库中查找与所述监控标识相同的日志数据;The first search unit 205 is used to search the preset database for log data identical to the monitoring identifier;

所述确定单元206,用于将与所述监控标识相同的日志数据作为所述目标系统的日志数据。The determining unit 206 is configured to use the log data identical to the monitoring identifier as the log data of the target system.

本发明实施例中,所述转换模块202包括:In the embodiment of the present invention, the conversion module 202 includes:

划分单元207和添加单元208。A dividing unit 207 and an adding unit 208 .

其中,in,

所述划分单元207,用于将所述日志数据依据所述输入参数、所述返回参数/消息和所述至少一个调用原子服务进行划分得到各个划分后日志数据;The division unit 207 is used to divide the log data according to the input parameter, the return parameter/message and the at least one called atomic service to obtain each divided log data;

所述添加单元208,用于将所述各个划分后日志数据依据其所属类型添加到所述预设日志表模板中,得到目标预设日志表。The adding unit 208 is used to add each of the divided log data to the preset log table template according to its type to obtain a target preset log table.

本发明实施例中,所述监控模块203包括:In the embodiment of the present invention, the monitoring module 203 includes:

条件获取单元209、第一查找单元210和获取和展示单元211。A condition acquisition unit 209 , a first search unit 210 and an acquisition and display unit 211 .

其中,in,

所述条件获取单元209,用于获取所述日志监控请求中的查询条件;The condition acquisition unit 209 is used to acquire the query condition in the log monitoring request;

所述第一查找单元210,用于基于所述查询条件在所述目标预设日志表中查找与所述查询条件匹配的关键词;The first search unit 210 is used to search the target preset log table for keywords matching the query condition based on the query condition;

所述获取和展示单元211,用于获取与所述关键词对应的目标日志数据,展示所述目标日志数据。The acquisition and display unit 211 is used to acquire target log data corresponding to the keyword and display the target log data.

本发明实施例中,所述监控装置还包括:冲销模块212。In the embodiment of the present invention, the monitoring device further includes: a cancellation module 212 .

其中,in,

所述冲销模块212,用于在接收到对当前日志数据的冲销指令时,对所述当前日志数据进行冲销。The cancellation module 212 is used to cancel the current log data when receiving an instruction to cancel the current log data.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本发明时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and/or hardware.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM/RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.

以上对本发明所提供的一种通用接口的日志监控方法及装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The above is a detailed introduction to the log monitoring method and device of a universal interface provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims (8)

1.一种通用接口的日志监控方法,其特征在于,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述方法基于所述通用接口实现,所述方法包括:1. A log monitoring method for a universal interface, characterized in that a preset log table template is pre-customized, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service, and the method is implemented based on the universal interface, and the method includes: 在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;所述目标系统的日志数据包括不同类型的日志数据;所述步骤信息包括:执行步骤原子服务名、输入及返回参数、执行结果;In the case of receiving a log monitoring request for a target system, obtaining log data of the target system in a preset database, wherein the log data includes: basic information, technical information, step information and return parameters/messages of the target system, and the log data is obtained by monitoring the target system by a log monitoring platform; the log data of the target system includes different types of log data; the step information includes: execution step atomic service name, input and return parameters, and execution result; 将所述日志数据基于所述预设日志表模板转化为目标预设日志表;所述预设日志表模板满足不同系统的日志监控,将所述日志数据基于所述预设日志表模板转化为目标预设日志表,包括:将所述日志数据依据所述输入参数、所述返回参数/消息和所述至少一个调用原子服务进行划分得到各个划分后日志数据;将所述各个划分后日志数据依据其所属类型添加到所述预设日志表模板中,得到目标预设日志表;The log data is converted into a target preset log table based on the preset log table template; the preset log table template satisfies log monitoring of different systems, and the log data is converted into a target preset log table based on the preset log table template, including: dividing the log data according to the input parameter, the return parameter/message and the at least one atomic service call to obtain each divided log data; adding each divided log data to the preset log table template according to its type to obtain the target preset log table; 基于所述目标预设日志表对所述目标系统进行监控日志监控。The target system is monitored by monitoring logs based on the target preset log table. 2.根据权利要求1所述的方法,其特征在于,在预设数据库中获取所述目标系统的日志数据,包括:2. The method according to claim 1, characterized in that obtaining the log data of the target system in a preset database comprises: 解析所述日志监控请求,获取所述日志监控请求中的监控标识;Parsing the log monitoring request to obtain a monitoring identifier in the log monitoring request; 在所述预设数据库中查找与所述监控标识相同的日志数据;Searching the preset database for log data identical to the monitoring identifier; 将与所述监控标识相同的日志数据作为所述目标系统的日志数据。The log data identical to the monitoring identifier is used as the log data of the target system. 3.根据权利要求1所述的方法,其特征在于,基于所述目标预设日志表对所述目标系统进行监控日志监控,包括:3. The method according to claim 1, characterized in that the monitoring log of the target system is monitored based on the target preset log table, comprising: 获取所述日志监控请求中的查询条件;Obtaining the query condition in the log monitoring request; 基于所述查询条件在所述目标预设日志表中查找与所述查询条件匹配的关键词;Searching the target preset log table for a keyword matching the query condition based on the query condition; 获取与所述关键词对应的目标日志数据,展示所述目标日志数据。Obtain target log data corresponding to the keyword, and display the target log data. 4.根据权利要求1所述的方法,其特征在于,还包括:4. The method according to claim 1, further comprising: 在接收到对当前日志数据的冲销指令时,对所述当前日志数据进行冲销。When an instruction to cancel the current log data is received, the current log data is cancelled. 5.一种通用接口的日志监控装置,其特征在于,预先定制预设日志表模板,其中,所述预设日志表模板包括:输入参数、返回参数/消息和至少一个调用原子服务,所述装置基于所述通用接口实现,所述装置包括:5. A log monitoring device of a universal interface, characterized in that a preset log table template is pre-customized, wherein the preset log table template includes: input parameters, return parameters/messages and at least one calling atomic service, and the device is implemented based on the universal interface, and the device includes: 获取模块,用于在接收到对目标系统的日志监控请求的情况下,在预设数据库中获取所述目标系统的日志数据,其中,所述日志数据包括:所述目标系统的基本信息、技术信息、步骤信息和返回参数/消息,所述日志数据由日志监控平台对所述目标系统进行监控得到;所述目标系统的日志数据包括不同类型的日志数据;所述步骤信息包括:执行步骤原子服务名、输入及返回参数、执行结果;The acquisition module is used to acquire the log data of the target system in a preset database when receiving a log monitoring request for the target system, wherein the log data includes: basic information, technical information, step information and return parameters/messages of the target system, and the log data is obtained by monitoring the target system by the log monitoring platform; the log data of the target system includes different types of log data; the step information includes: execution step atomic service name, input and return parameters, and execution result; 转换模块,用于将所述日志数据基于所述预设日志表模板转化为目标预设日志表;所述预设日志表模板满足不同系统的日志监控,所述转换模块包括:划分单元,用于将所述日志数据依据所述输入参数、所述返回参数/消息和所述至少一个调用原子服务进行划分得到各个划分后日志数据;添加单元,用于将所述各个划分后日志数据依据其所属类型添加到所述预设日志表模板中,得到目标预设日志表;监控模块,用于基于所述目标预设日志表对所述目标系统进行监控日志监控。A conversion module is used to convert the log data into a target preset log table based on the preset log table template; the preset log table template meets the log monitoring of different systems, and the conversion module includes: a division unit, used to divide the log data according to the input parameters, the return parameters/messages and the at least one called atomic service to obtain each divided log data; an adding unit, used to add each divided log data to the preset log table template according to its type to obtain a target preset log table; a monitoring module, used to monitor the target system based on the target preset log table. 6.根据权利要求5所述的装置,其特征在于,所述获取模块包括:6. The device according to claim 5, characterized in that the acquisition module comprises: 标识获取单元,用于解析所述日志监控请求,获取所述日志监控请求中的监控标识;An identification acquisition unit, used to parse the log monitoring request and obtain a monitoring identification in the log monitoring request; 第一查找单元,用于在所述预设数据库中查找与所述监控标识相同的日志数据;A first search unit, configured to search the preset database for log data identical to the monitoring identifier; 确定单元,用于将与所述监控标识相同的日志数据作为所述目标系统的日志数据。The determination unit is used to use the log data identical to the monitoring identifier as the log data of the target system. 7.根据权利要求5所述的装置,其特征在于,所述监控模块包括:7. The device according to claim 5, characterized in that the monitoring module comprises: 条件获取单元,用于获取所述日志监控请求中的查询条件;A condition acquisition unit, used to acquire the query condition in the log monitoring request; 第一查找单元,用于基于所述查询条件在所述目标预设日志表中查找与所述查询条件匹配的关键词;A first searching unit, configured to search the target preset log table for a keyword matching the query condition based on the query condition; 获取和展示单元,用于获取与所述关键词对应的目标日志数据,展示所述目标日志数据。The acquisition and display unit is used to acquire target log data corresponding to the keyword and display the target log data. 8.根据权利要求5所述的装置,其特征在于,还包括:8. The device according to claim 5, further comprising: 冲销模块,用于在接收到对当前日志数据的冲销指令时,对所述当前日志数据进行冲销。The cancellation module is used to cancel the current log data when receiving an instruction to cancel the current log data.
CN202011457202.0A 2020-12-10 2020-12-10 Log monitoring method and device for universal interface Active CN112416876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011457202.0A CN112416876B (en) 2020-12-10 2020-12-10 Log monitoring method and device for universal interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011457202.0A CN112416876B (en) 2020-12-10 2020-12-10 Log monitoring method and device for universal interface

Publications (2)

Publication Number Publication Date
CN112416876A CN112416876A (en) 2021-02-26
CN112416876B true CN112416876B (en) 2024-10-29

Family

ID=74775970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011457202.0A Active CN112416876B (en) 2020-12-10 2020-12-10 Log monitoring method and device for universal interface

Country Status (1)

Country Link
CN (1) CN112416876B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115269534A (en) * 2022-07-21 2022-11-01 中国平安人寿保险股份有限公司 Method, equipment and storage medium for automatically collecting logs

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739730A (en) * 2019-01-14 2019-05-10 平安科技(深圳)有限公司 Monitoring method, device, equipment and the readable storage medium storing program for executing of multisystem daily record data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844137B (en) * 2016-12-08 2020-05-19 腾讯科技(深圳)有限公司 Server monitoring method and device
CN109408337B (en) * 2018-10-31 2021-12-28 京东方科技集团股份有限公司 Interface operation and maintenance method and device
CN109783459A (en) * 2019-01-04 2019-05-21 平安科技(深圳)有限公司 The method, apparatus and computer readable storage medium of data are extracted from log

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739730A (en) * 2019-01-14 2019-05-10 平安科技(深圳)有限公司 Monitoring method, device, equipment and the readable storage medium storing program for executing of multisystem daily record data

Also Published As

Publication number Publication date
CN112416876A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
US8065315B2 (en) Solution search for software support
US12321363B2 (en) Systems and methods for unifying formats and adaptively automating processing of business records data
US7526490B2 (en) Method of and system for providing positional based object to XML mapping
JP4571636B2 (en) Service management of service-oriented business framework
CN112488652B (en) Work order auditing method, system, terminal and storage medium
US8868483B2 (en) Database load engine
US20100058113A1 (en) Multi-layer context parsing and incident model construction for software support
US8725760B2 (en) Semantic terminology importer
US20060282400A1 (en) Apparatus, system, and method for encapsulating logical units of work using business objects
CN116483903A (en) A full-link data kinship relationship identification method for multi-source heterogeneous data sources
CN112416876B (en) Log monitoring method and device for universal interface
US7865461B1 (en) System and method for cleansing enterprise data
EP1368751A2 (en) Database integrity in an internet e-commerce environment
US8406401B2 (en) Interactive voice response system to business application interface
CN117827876A (en) Index management system and index query method
US8825630B2 (en) Method and system for generic enterprise search adapter queries
CN111177126A (en) Information processing method, device and equipment
US20230195792A1 (en) Database management methods and associated apparatus
WO2005072114A2 (en) Enterprise interoperability using shared data services
CN116662428A (en) Integration method, device, equipment and medium of multichannel incoming line session information data
CN108304211A (en) A kind of service map construction method and device
EP4224335A1 (en) Database management methods and associated apparatus
KR102668339B1 (en) Method for managing interface, interface governance system, and a storage medium storing a computer-executable program to manage the interface
KR102669661B1 (en) Method for managing interface, interface governance system, and a storage medium storing a computer-executable program to manage the interface
TW201516719A (en) File version association control system and method

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