[go: up one dir, main page]

CN107944009A - A kind of system and method for record web application operating daily records - Google Patents

A kind of system and method for record web application operating daily records Download PDF

Info

Publication number
CN107944009A
CN107944009A CN201711296440.6A CN201711296440A CN107944009A CN 107944009 A CN107944009 A CN 107944009A CN 201711296440 A CN201711296440 A CN 201711296440A CN 107944009 A CN107944009 A CN 107944009A
Authority
CN
China
Prior art keywords
url
request
information
web application
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711296440.6A
Other languages
Chinese (zh)
Inventor
黄启庆
任晓齐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201711296440.6A priority Critical patent/CN107944009A/en
Publication of CN107944009A publication Critical patent/CN107944009A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开一种记录web应用操作日志的方法,涉及软件领域,采用URL预先注册入数据表;通过前置过滤器拦截用户请求,根据请求URL查找URL注册表及附属信息;从会话上下文中取得用户信息;取得本次请求的参数信息;将URL信息、会话信息、请求参数信息记录操作日志;本发明较传统直接在业务方法中记录操作日志,对业务代码没有侵入性,解决了后期变更需要修改业务代码的问题,极大降低了维护成本。本发明还提出一种记录web应用操作日志的系统。

The invention discloses a method for recording web application operation logs, which relates to the field of software and uses URLs to pre-register into a data table; intercepts user requests through a pre-filter, and searches URL registry and auxiliary information according to the request URL; obtains from session context User information; obtain the parameter information of this request; record the URL information, session information, and request parameter information in the operation log; compared with the traditional method, the present invention directly records the operation log in the business method, which is not intrusive to the business code, and solves the need for later changes The problem of modifying business code greatly reduces maintenance costs. The invention also proposes a system for recording web application operation logs.

Description

一种记录web应用操作日志的系统和方法A system and method for recording web application operation logs

技术领域technical field

本发明涉及软件领域,具体的说是一种记录web应用操作日志的系统和方法。The invention relates to the field of software, in particular to a system and method for recording web application operation logs.

背景技术Background technique

现在web应用程序已经和人们的生活息息相关,小到用户日常博客,空间.大到大型社交网站如facebook,人人等,更复杂的如电子商务中的C2C,B2B等网站,都给人们带来了很大的方便。Now web applications are closely related to people's lives, ranging from users' daily blogs and spaces to large social networking sites such as facebook, Renren, etc., and more complex sites such as C2C and B2B in e-commerce, all of which have brought people Great convenience.

web应用:常见的计数器、留言版、聊天室和论坛BBS等,都是Web应用程序,不过这些应用相对比较简单,而Web应用程序的真正核心主要是对数据库进行处理,管理信息系统(Management Information System,MIS)就是这种架构最典型的应用。MIS可以应用于局域网,也可以应用于广域网。目前基于Internet的MIS系统以其成本低廉、维护简便、覆盖范围广、功能易实现等诸多特性,得到越来越多的应用。Web applications: Common counters, message boards, chat rooms, and forum BBS are all Web applications, but these applications are relatively simple, and the real core of Web applications is mainly to process databases, management information systems (Management Information systems) System, MIS) is the most typical application of this architecture. MIS can be applied to local area network or wide area network. At present, the MIS system based on the Internet is used more and more because of its low cost, easy maintenance, wide coverage and easy realization of functions.

每个软件系统基本都会记录用户的操作日志,用于审计、分析用户的行为,做到用户行为可追溯,防抵赖。传统上,web应用程序记录操作日志,多采用直接在业务代码中记录的方式。这种直接在业务代码中记录的方式虽然简单、直观,但是后期需要变更的话,需要修改业务代码,维护成本高。Every software system will basically record the user's operation log, which is used to audit and analyze the user's behavior, so that the user's behavior can be traced and denial-proof. Traditionally, web applications record operation logs, mostly directly in the business code. Although this method of directly recording in the business code is simple and intuitive, if it needs to be changed later, the business code needs to be modified, and the maintenance cost is high.

发明内容Contents of the invention

本发明针对目前技术发展的需求和不足之处,提供一种记录web应用操作日志的系和方法。The present invention provides a system and method for recording web application operation logs aiming at the needs and shortcomings of the current technical development.

本发明所述一种记录web应用操作日志的方法,解决上述技术问题采用的技术方案如下:所述记录web应用操作日志的方法,其实现实施过程包括:A method for recording web application operation logs according to the present invention, the technical solution adopted to solve the above technical problems is as follows: the method for recording web application operation logs, its implementation process includes:

步骤一,客户端请求到达前置过滤器;Step 1, the client request reaches the pre-filter;

步骤二,前置过滤器与数据库通信,向数据库存取数据;Step 2, the pre-filter communicates with the database and retrieves data from the database;

客户端请求经前置过滤器,1)根据请求URL查找URL注册表及附属信息;2)从会话上下文中取得用户信息;3)取得本次请求的参数信息;4)将URL信息、会话信息、请求参数信息记录操作日志;The client request passes through the pre-filter, 1) search the URL registry and auxiliary information according to the request URL; 2) obtain the user information from the session context; 3) obtain the parameter information of this request; 4) pass the URL information, session information , request parameter information record operation log;

步骤三,通过前置过滤器,客户端请求达到业务处理模块;同时,业务处理模块与数据库通信,向数据库存取数据。Step 3, through the pre-filter, the client request reaches the business processing module; at the same time, the business processing module communicates with the database and retrieves data from the database.

具体的,所述记录web应用操作日志的方法,还包括建立URL注册表的步骤,并存储于数据库中;Specifically, the method for recording web application operation logs also includes the step of establishing a URL registry and storing it in a database;

所述URL注册表记录的字段信息包括:url名称、功能描述、url地址、请求方法。The field information recorded in the URL registry includes: url name, function description, url address, and request method.

具体的,所述记录web应用操作日志的方法,还包括将系统中所有的URL注册到URL注册表中的步骤。Specifically, the method for recording web application operation logs further includes the step of registering all URLs in the system in the URL registry.

具体的,所述记录web应用操作日志的方法,还包括建立操作记录表的步骤,并存储于数据库中;Specifically, the method for recording web application operation logs also includes the step of establishing an operation record table and storing it in a database;

所述操作记录表记录的字段信息包括:URL的功能描述、操作时间、发起请求的客户端IP、注册URL、请求URL、请求方法、请求body体内容、查询字符串。The field information recorded in the operation record table includes: URL function description, operation time, client IP that initiated the request, registration URL, request URL, request method, request body content, and query string.

具体的,所述步骤二,1)根据请求URL查找到URL注册表及附属信息;Concretely, described step 2, 1) according to request URL, find URL registration form and subsidiary information;

拦截到请求URL后,去数据库中查询数据,匹配URL注册表中的URL,若匹配成功,则取得该URL的属性信息;若匹配失败,则认为请求的无效URL,抛异常,返回;After intercepting the request URL, query the data in the database, match the URL in the URL registry, if the match is successful, obtain the attribute information of the URL; if the match fails, consider the requested URL to be invalid, throw an exception, and return;

2)从会话上下文中取得用户信息;2) Obtain user information from the session context;

从会话上下文中取得用户信息,包括用户id、用户名称;Obtain user information from the session context, including user id and user name;

3)取得本次请求的参数信息;这些参数信息包括取得请求URL、请求method、查询字符串、请求body信息。3) Obtain the parameter information of this request; these parameter information include obtaining request URL, request method, query string, and request body information.

本发明还提出一种记录web应用操作日志的系统,其系统包括:The present invention also proposes a system for recording web application operation logs, the system comprising:

客户端浏览器,通过客户单浏览器提出客户端请求;The client browser makes a client request through the client browser;

前置过滤器,负责接收客户端请求,进而根据请求URL查找到注册的URL及附属信息;从会话上下文中取得用户信息;取得本次请求的参数信息;将URL信息、会话信息、请求参数信息记录操作日志;The pre-filter is responsible for receiving client requests, and then finds the registered URL and auxiliary information according to the request URL; obtains user information from the session context; obtains the parameter information of this request; combines URL information, session information, and request parameter information record operation log;

数据库,与前置过滤器、业务处理模块交互通信,供两者存取数据;The database interacts with the pre-filter and the business processing module to access data;

业务处理模块,通过前置过滤器后,请求到达业务处理模块。The business processing module, after passing through the pre-filter, the request reaches the business processing module.

具体的,所述记录web应用操作日志的系统,还包括URL注册表,URL注册表存储于数据库中;Specifically, the system for recording web application operation logs also includes a URL registry, and the URL registry is stored in a database;

所述URL注册表记录的字段信息包括:url名称、功能描述、url地址、请求方法。The field information recorded in the URL registry includes: url name, function description, url address, and request method.

具体的,所述记录web应用操作日志的系统,将系统中所有的URL注册到URL注册表中。Specifically, the system for recording web application operation logs registers all URLs in the system in the URL registry.

具体的,所述记录web应用操作日志的系统,还包括操作记录表,操作记录表存储于数据库中;Specifically, the system for recording web application operation logs further includes an operation record table, and the operation record table is stored in a database;

所述操作记录表记录的字段信息包括:URL的功能描述、操作时间、发起请求的客户端IP、注册URL、请求URL、请求方法、请求body体内容、查询字符串。The field information recorded in the operation record table includes: URL function description, operation time, client IP that initiated the request, registration URL, request URL, request method, request body content, and query string.

具体的,所述前置过滤器,1)根据请求URL查找到URL注册表及附属信息;Concretely, the pre-filter, 1) finds the URL registration form and auxiliary information according to the request URL;

拦截到请求URL后,去数据库中查询数据,匹配URL注册表中的URL,若匹配成功,则取得该URL的属性信息;若匹配失败,则认为请求的无效URL,抛异常,返回;After intercepting the request URL, query the data in the database, match the URL in the URL registry, if the match is successful, obtain the attribute information of the URL; if the match fails, consider the requested URL to be invalid, throw an exception, and return;

2)从会话上下文中取得用户信息;2) Obtain user information from the session context;

从会话上下文中取得用户信息,包括用户id、用户名称;Obtain user information from the session context, including user id and user name;

3)取得本次请求的参数信息;这些参数信息包括取得请求URL、请求method、查询字符串、请求body信息。3) Obtain the parameter information of this request; these parameter information include obtaining request URL, request method, query string, and request body information.

本发明所述一种记录web应用操作日志的系统和方法,与现有技术相比具有的有益效果是:本发明采用URL预先注册入数据表,通过前置过滤器拦截用户请求,匹配到请求对应的URL,并从会话上下文中取出当前用户信息,进而记录操作日志;较传统直接在业务方法中记录操作日志,对业务代码没有侵入性,解决了后期变更需要修改业务代码的问题,极大降低了维护成本。A system and method for recording web application operation logs according to the present invention, compared with the prior art, has the following beneficial effects: the present invention uses the URL to pre-register into the data table, intercepts user requests through a pre-filter, and matches the request The corresponding URL, and extract the current user information from the session context, and then record the operation log; compared with the traditional method, directly record the operation log in the business method, which is not intrusive to the business code, and solves the problem that the business code needs to be modified in the later change, greatly Reduced maintenance costs.

附图说明Description of drawings

为了更清楚的说明本发明实施例或现有技术中的技术内容,下面对本发明实施例或现有技术中所需要的附图做简单介绍。显而易见的,下面所描述附图仅仅是本发明的一部分实施例,对于本领域技术人员来说,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图,但均在本发明的保护范围之内。In order to more clearly illustrate the technical content in the embodiment of the present invention or the prior art, the following briefly introduces the drawings required in the embodiment of the present invention or the prior art. Obviously, the drawings described below are only part of the embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without creative work, but they are all described in this within the scope of protection of the invention.

附图1为记录web应用操作日志的系统的示意图;Accompanying drawing 1 is the schematic diagram of the system of recording web application operation log;

附图2为记录web应用操作日志的方法的示意图。Accompanying drawing 2 is a schematic diagram of a method for recording web application operation logs.

具体实施方式Detailed ways

为使本发明的技术方案、解决的技术问题和技术效果更加清楚明白,以下结合具体实施例,对本发明的技术方案进行清查、完整的描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下获得的所有实施例,都在本发明的保护范围之内。In order to make the technical solution of the present invention, the technical problem solved and the technical effect clearer, the technical solution of the present invention is checked and fully described below in conjunction with specific embodiments. Obviously, the described embodiments are only a part of the present invention Examples, not all examples. Based on the embodiments of the present invention, all embodiments obtained by those skilled in the art without making creative efforts are within the protection scope of the present invention.

实施例1:Example 1:

本实施例提出一种记录web应用操作日志的方法,其实现实施过程包括:This embodiment proposes a method for recording web application operation logs, and its implementation process includes:

步骤一,客户端请求到达前置过滤器;Step 1, the client request reaches the pre-filter;

步骤二,前置过滤器与数据库通信,能够向数据库存取数据;Step 2, the pre-filter communicates with the database and can access data from the database;

客户端请求经前置过滤器,完成:The client request passes through the pre-filter to complete:

1)根据请求URL查找URL注册表及附属信息;2)从会话上下文中取得用户信息;3)取得本次请求的参数信息;4)将URL信息、会话信息、请求参数信息记录操作日志;1) Find the URL registration form and auxiliary information according to the request URL; 2) Obtain user information from the session context; 3) Obtain the parameter information of this request; 4) Record the URL information, session information, and request parameter information in the operation log;

步骤三,通过前置过滤器,客户端请求达到业务处理模块;同时,业务处理模块与数据库通信,能够向数据库存取数据。Step 3, through the pre-filter, the client request reaches the business processing module; at the same time, the business processing module communicates with the database and can access data from the database.

本实施例记录web应用操作日志的方法,客户端请求首先到达前置过滤器,在前置过滤器中主要完成四项操作:一是根据请求URL查找到注册的URL及附属信息,二是从会话上下文中取得用户信息,三是取得本次请求的参数信息,四是将URL信息、会话信息、请求参数信息记录操作日志。本实施例不侵入业务代码,可插拔,以前置过滤器的形式统一记录操作日志。In the method for recording web application operation logs in this embodiment, the client request first arrives at the pre-filter, and four operations are mainly completed in the pre-filter: one is to find the registered URL and auxiliary information according to the request URL; The user information is obtained in the session context, the third is to obtain the parameter information of this request, and the fourth is to record the URL information, session information, and request parameter information into the operation log. This embodiment does not invade business codes, is pluggable, and uniformly records operation logs in the form of a pre-filter.

本实施例还提出了一种记录web应用操作日志的系统,技术方案与实施例1记录web应用操作日志的方法可以相互参考,如附图1所示,其系统包括:This embodiment also proposes a system for recording web application operation logs. The technical solution and the method for recording web application operation logs in Embodiment 1 can be referred to each other. As shown in Figure 1, the system includes:

客户端浏览器,通过客户单浏览器提出客户端请求;The client browser makes a client request through the client browser;

前置过滤器,负责接收客户端请求,进而根据请求URL查找到注册的URL及附属信息;从会话上下文中取得用户信息;取得本次请求的参数信息;将URL信息、会话信息、请求参数信息记录操作日志;The pre-filter is responsible for receiving client requests, and then finds the registered URL and auxiliary information according to the request URL; obtains user information from the session context; obtains the parameter information of this request; combines URL information, session information, and request parameter information record operation log;

数据库,与前置过滤器、业务处理模块交互通信,供两者存取数据;The database interacts with the pre-filter and the business processing module to access data;

业务处理模块,通过前置过滤器后,请求到达业务处理模块。The business processing module, after passing through the pre-filter, the request reaches the business processing module.

实施例2:Example 2:

本实施例提出的一种记录web应用操作日志的方法,是本发明的另一个具体实施方式,在实施例1记录web应用操作日志的方法的基础上,首先建立URL注册表和操作记录表,并存储于数据库中。A method for recording web application operation logs proposed in this embodiment is another specific embodiment of the present invention. On the basis of the method for recording web application operation logs in Embodiment 1, first establish a URL registration form and an operation record table, and stored in the database.

本实施例记录web应用操作日志的方法,还包括将系统中所有的URL注册到URL注册表中的步骤。The method for recording web application operation logs in this embodiment further includes the step of registering all URLs in the system into the URL registry.

具体的,建立所述URL注册表,如下表所示,URL注册表记录的字段信息包括:id(主键唯一标识,32位uuid)、name(url名称)、function_desc(功能描述)、url_address(url地址)、method(请求方法,包括GET、POST、PUT、DELETE等)。Specifically, establish the URL registry, as shown in the following table, the field information of the URL registry record includes: id (primary key unique identifier, 32-bit uuid), name (url name), function_desc (function description), url_address (url Address), method (request method, including GET, POST, PUT, DELETE, etc.).

序号serial number 字段信息field information 说明illustrate 11 idid 主键唯一标识,32位uuidThe unique identifier of the primary key, 32-bit uuid 22 namename url名称url name 33 function_descfunction_desc 功能描述Functional description 44 url_addressurl_address url地址url address 55 methodmethod 请求方法,包括GET、POST、PUT、DELETE等Request method, including GET, POST, PUT, DELETE, etc.

具体的,建立所述操作记录表,如下表所示,操作记录表记录的字段信息包括:id(主键唯一标识,32位uuid)、function_desc(功能描述,来源于URL的功能描述)、user(操作人)、ctime(操作时间)、remote_ip(发起请求的客户端IP)、regist_url(注册URL)、request_url(请求URL)、request_method(请求方法,包括GET、POST、PUT、DELETE等)、request_body(请求body体内容,但是不记录multipart/form-data类型的body内容)、query_string(查询字符串)。Specifically, the operation record table is established, as shown in the following table, the field information recorded in the operation record table includes: id (the unique identifier of the primary key, 32-bit uuid), function_desc (function description, derived from the function description of the URL), user ( operator), ctime (operation time), remote_ip (client IP that initiated the request), regist_url (registration URL), request_url (request URL), request_method (request method, including GET, POST, PUT, DELETE, etc.), request_body ( Request body content, but do not record multipart/form-data type body content), query_string (query string).

如附图2所示,客户端请求首先到达前置过滤器,经前置过滤器,1)根据请求URL查找到URL注册表及附属信息;As shown in accompanying drawing 2, client request at first arrives pre-filter, through pre-filter, 1) find URL registry and subsidiary information according to request URL;

具体的,拦截到请求URL后,去数据库中查询数据,匹配URL注册表中的URL,若匹配成功,则取得该URL的属性信息,包括url地址,功能描述等;若匹配失败,则认为请求的无效URL,抛异常,返回。Specifically, after intercepting the request URL, go to the database to query the data, match the URL in the URL registry, if the match is successful, obtain the attribute information of the URL, including the url address, function description, etc.; if the match fails, consider the request If the URL is invalid, an exception is thrown and returned.

2)从会话上下文中取得用户信息;2) Obtain user information from the session context;

具体的,从会话上下文中取得用户信息,主要包括用户id、用户名称等。Specifically, user information is obtained from the session context, mainly including user id, user name and so on.

3)取得本次请求的参数信息;3) Obtain the parameter information of this request;

具体的,主要取得请求URL、请求method、查询字符串、请求body等信息。Specifically, information such as the request URL, request method, query string, and request body is mainly obtained.

4)将URL信息、会话信息、请求参数信息记录操作日志,将操作日志存储于数据库。4) Record the URL information, session information, and request parameter information in the operation log, and store the operation log in the database.

最后,通过前置过滤器后,请求到达真正的业务处理模块。Finally, after passing through the pre-filter, the request reaches the real business processing module.

本实施例记录web应用操作日志的方法,采用URL预先注册入数据表,通过前置过滤器拦截用户请求,匹配到请求对应的URL,并从会话上下文中取出当前用户信息,进而记录操作日志;该方式不侵入业务代码,可插拔,以前置过滤器的形式统一记录,并能记录请求URL、请求参数、请求body体等原始请求信息;不需要修改业务代码,极大降低了维护成本。The method for recording web application operation logs in this embodiment uses URLs to pre-register into the data table, intercepts user requests through a pre-filter, matches the URL corresponding to the request, and takes out the current user information from the session context, and then records the operation log; This method does not invade the business code, is pluggable, and is recorded in the form of a pre-filter, and can record original request information such as request URL, request parameters, and request body; it does not need to modify the business code, which greatly reduces maintenance costs.

本实施例还提出一种记录web应用操作日志的系统,其技术方案参考上述实施例2记录web应用操作日志的方法,还包括URL注册表和操作记录表,两者均包含于数据库。This embodiment also proposes a system for recording web application operation logs. For its technical solution, refer to the method for recording web application operation logs in the above-mentioned embodiment 2. It also includes a URL registry and an operation record table, both of which are included in the database.

具体的,URL注册表记录的字段信息包括:id(主键唯一标识,32位uuid)、name(url名称)、function_desc(功能描述)、url_address(url地址)、method(请求方法,包括GET、POST、PUT、DELETE等)。Specifically, the field information recorded in the URL registry includes: id (unique primary key identifier, 32-bit uuid), name (url name), function_desc (function description), url_address (url address), method (request method, including GET, POST , PUT, DELETE, etc.).

具体的,操作记录表记录的字段信息包括:id(主键唯一标识,32位uuid)、function_desc(功能描述,来源于URL的功能描述)、user(操作人)、ctime(操作时间)、remote_ip(发起请求的客户端IP)、regist_url(注册URL)、request_url(请求URL)、request_method(请求方法,包括GET、POST、PUT、DELETE等)、request_body(请求body体内容,但是不记录multipart/form-data类型的body内容)、query_string(查询字符串)。Specifically, the field information recorded in the operation record table includes: id (unique primary key identifier, 32-bit uuid), function_desc (function description, function description from URL), user (operator), ctime (operation time), remote_ip ( IP of the client that initiated the request), regist_url (registration URL), request_url (request URL), request_method (request method, including GET, POST, PUT, DELETE, etc.), request_body (request body content, but does not record multipart/form- body content of data type), query_string (query string).

所述前置过滤器,负责接收客户端请求,进而根据请求URL查找到注册的URL及附属信息;从会话上下文中取得用户信息;取得本次请求的参数信息;将URL信息、会话信息、请求参数信息记录操作日志;The pre-filter is responsible for receiving client requests, and then finds registered URLs and affiliated information according to the request URL; obtains user information from the session context; obtains the parameter information of this request; Parameter information record operation log;

具体的,前置过滤器接收客户端请求,1)根据请求URL查找到URL注册表及附属信息;Specifically, the pre-filter receives the client request, 1) finds the URL registration form and auxiliary information according to the request URL;

具体的,拦截到请求URL后,去数据库中查询数据,匹配URL注册表中的URL,若匹配成功,则取得该URL的属性信息,包括url地址,功能描述等;若匹配失败,则认为请求的无效URL,抛异常,返回。Specifically, after intercepting the request URL, go to the database to query the data, match the URL in the URL registry, if the match is successful, obtain the attribute information of the URL, including the url address, function description, etc.; if the match fails, consider the request If the URL is invalid, an exception is thrown and returned.

2)从会话上下文中取得用户信息;2) Obtain user information from the session context;

具体的,从会话上下文中取得用户信息,主要包括用户id、用户名称等。Specifically, user information is obtained from the session context, mainly including user id, user name and so on.

3)取得本次请求的参数信息;3) Obtain the parameter information of this request;

具体的,主要取得请求URL、请求method、查询字符串、请求body等信息。Specifically, information such as the request URL, request method, query string, and request body is mainly obtained.

4)将URL信息、会话信息、请求参数信息记录操作日志,将操作日志存储于数据库。4) Record the URL information, session information, and request parameter information in the operation log, and store the operation log in the database.

以上应用具体个例对本发明的原理及实施方式进行了详细阐述,这些实施例只是用于帮助理解本发明的核心技术内容,并不用于限制本发明的保护范围,本发明的技术方案不限制于上述具体实施方式内。基于本发明的上述具体实施例,本技术领域的技术人员在不脱离本发明原理的前提下,对本发明所作出的任何改进和修饰,皆应落入本发明的专利保护范围。The principles and implementation methods of the present invention have been described in detail with specific examples above. These examples are only used to help understand the core technical content of the present invention, and are not intended to limit the protection scope of the present invention. The technical solutions of the present invention are not limited to In the above-mentioned specific embodiment. Based on the above specific embodiments of the present invention, any improvements and modifications made by those skilled in the art without departing from the principles of the present invention shall fall within the scope of patent protection of the present invention.

Claims (10)

1.一种记录web应用操作日志的方法,其特征在于,其实现实施过程包括:1. A method for recording web application operation logs, characterized in that its implementation process includes: 步骤一,客户端请求到达前置过滤器;Step 1, the client request reaches the pre-filter; 步骤二,前置过滤器与数据库通信,向数据库存取数据;Step 2, the pre-filter communicates with the database and retrieves data from the database; 客户端请求经前置过滤器,1)根据请求URL查找URL注册表及附属信息;2)从会话上下文中取得用户信息;3)取得本次请求的参数信息;4)将URL信息、会话信息、请求参数信息记录操作日志;The client requests through the pre-filter, 1) finds the URL registry and auxiliary information according to the request URL; 2) obtains the user information from the session context; 3) obtains the parameter information of this request; 4) stores the URL information and session information , request parameter information record operation log; 步骤三,通过前置过滤器,客户端请求达到业务处理模块;同时,业务处理模块与数据库通信,向数据库存取数据。Step 3, through the pre-filter, the client request reaches the business processing module; at the same time, the business processing module communicates with the database and retrieves data from the database. 2.根据权利要求1所述一种记录web应用操作日志的方法,其特征在于,还包括建立URL注册表的步骤,并存储于数据库中;2. A method for recording a web application operation log according to claim 1, further comprising the step of establishing a URL registry and storing it in a database; 所述URL注册表记录的字段信息包括:url名称、功能描述、url地址、请求方法。The field information recorded in the URL registry includes: url name, function description, url address, and request method. 3.根据权利要求2述一种记录web应用操作日志的方法,其特征在于,还包括将系统中所有的URL注册到URL注册表中的步骤。3. A method for recording web application operation logs according to claim 2, further comprising the step of registering all URLs in the system into the URL registry. 4.根据权利要求3所述一种记录web应用操作日志的方法,其特征在于,还包括建立操作记录表的步骤,并存储于数据库中;4. A method for recording web application operation logs according to claim 3, further comprising the step of establishing an operation record table and storing it in a database; 所述操作记录表记录的字段信息包括:URL的功能描述、操作时间、发起请求的客户端IP、注册URL、请求URL、请求方法、请求body体内容、查询字符串。The field information recorded in the operation record table includes: URL function description, operation time, client IP that initiated the request, registration URL, request URL, request method, request body content, and query string. 5.根据权利要求4所述一种记录web应用操作日志的方法,其特征在于,所述步骤二,1)根据请求URL查找到URL注册表及附属信息;5. A method for recording web application operation logs according to claim 4, characterized in that in step 2, 1) find the URL registration form and auxiliary information according to the request URL; 拦截到请求URL后,去数据库中查询数据,匹配URL注册表中的URL,若匹配成功,则取得该URL的属性信息;若匹配失败,则认为请求的无效URL,抛异常,返回;After intercepting the request URL, query the data in the database, match the URL in the URL registry, if the match is successful, obtain the attribute information of the URL; if the match fails, consider the requested URL to be invalid, throw an exception, and return; 2)从会话上下文中取得用户信息;2) Obtain user information from the session context; 从会话上下文中取得用户信息,包括用户id、用户名称;Obtain user information from the session context, including user id and user name; 3)取得本次请求的参数信息;这些参数信息包括取得请求URL、请求method、查询字符串、请求body信息。3) Obtain the parameter information of this request; these parameter information include obtaining request URL, request method, query string, and request body information. 6.一种记录web应用操作日志的系统,其特征在于,包括:6. A system for recording web application operation logs, comprising: 客户端浏览器,通过客户单浏览器提出客户端请求;The client browser makes a client request through the client browser; 前置过滤器,负责接收客户端请求,进而根据请求URL查找到注册的URL及附属信息;从会话上下文中取得用户信息;取得本次请求的参数信息;将URL信息、会话信息、请求参数信息记录操作日志;The pre-filter is responsible for receiving client requests, and then finds the registered URL and auxiliary information according to the request URL; obtains user information from the session context; obtains the parameter information of this request; combines URL information, session information, and request parameter information record operation log; 数据库,与前置过滤器、业务处理模块交互通信,供两者存取数据;The database interacts with the pre-filter and the business processing module to access data; 业务处理模块,通过前置过滤器后,请求到达业务处理模块。The business processing module, after passing through the pre-filter, the request reaches the business processing module. 7.根据权利要求6所述一种记录web应用操作日志的系统,其特征在于,还包括URL注册表,URL注册表存储于数据库中;7. A kind of system of recording web application operation log according to claim 6, is characterized in that, also comprises URL registry, and URL registry is stored in the database; 所述URL注册表记录的字段信息包括:url名称、功能描述、url地址、请求方法。The field information recorded in the URL registry includes: url name, function description, url address, and request method. 8.根据权利要求7所述一种记录web应用操作日志的系统,其特征在于,将系统中所有的URL注册到URL注册表中。8. A system for recording web application operation logs according to claim 7, characterized in that all URLs in the system are registered in the URL registry. 9.根据权利要求8所述一种记录web应用操作日志的系统,其特征在于,还包括操作记录表,操作记录表存储于数据库中;9. A system for recording web application operation logs according to claim 8, further comprising an operation record table, which is stored in a database; 所述操作记录表记录的字段信息包括:URL的功能描述、操作时间、发起请求的客户端IP、注册URL、请求URL、请求方法、请求body体内容、查询字符串。The field information recorded in the operation record table includes: URL function description, operation time, client IP that initiated the request, registration URL, request URL, request method, request body content, and query string. 10.根据权利要求9所述一种记录web应用操作日志的系统,其特征在于,所述前置过滤器,1)根据请求URL查找到URL注册表及附属信息;10. A system for recording web application operation logs according to claim 9, characterized in that the pre-filter, 1) finds the URL registration form and auxiliary information according to the request URL; 拦截到请求URL后,去数据库中查询数据,匹配URL注册表中的URL,若匹配成功,则取得该URL的属性信息;若匹配失败,则认为请求的无效URL,抛异常,返回;After intercepting the request URL, query the data in the database, match the URL in the URL registry, if the match is successful, obtain the attribute information of the URL; if the match fails, consider the requested URL invalid, throw an exception, and return; 2)从会话上下文中取得用户信息;2) Obtain user information from the session context; 从会话上下文中取得用户信息,包括用户id、用户名称;Obtain user information from the session context, including user id and user name; 3)取得本次请求的参数信息;这些参数信息包括取得请求URL、请求method、查询字符串、请求body信息。3) Obtain the parameter information of this request; these parameter information include obtaining request URL, request method, query string, and request body information.
CN201711296440.6A 2017-12-08 2017-12-08 A kind of system and method for record web application operating daily records Pending CN107944009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711296440.6A CN107944009A (en) 2017-12-08 2017-12-08 A kind of system and method for record web application operating daily records

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711296440.6A CN107944009A (en) 2017-12-08 2017-12-08 A kind of system and method for record web application operating daily records

Publications (1)

Publication Number Publication Date
CN107944009A true CN107944009A (en) 2018-04-20

Family

ID=61946264

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711296440.6A Pending CN107944009A (en) 2017-12-08 2017-12-08 A kind of system and method for record web application operating daily records

Country Status (1)

Country Link
CN (1) CN107944009A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508318A (en) * 2018-11-15 2019-03-22 北京金山云网络技术有限公司 A kind of amount of storage statistical method, device, electronic equipment and readable storage medium storing program for executing
CN109522351A (en) * 2018-10-22 2019-03-26 中国银行股份有限公司 A kind of data processing method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045341A (en) * 2009-10-16 2011-05-04 株式会社东芝 Sever device and communication system
CN202737911U (en) * 2012-06-12 2013-02-13 中国人民解放军91655部队 Authority control system
CN103246715A (en) * 2013-04-26 2013-08-14 太原理工大学 Method for intercepting, filtering and controlling data
CN105791294A (en) * 2016-03-04 2016-07-20 河北腾翔软件科技有限公司 Method for realizing user data integrity and confidentiality without modifying web service system
US20170272551A1 (en) * 2012-09-29 2017-09-21 Oracle International Corporation Mechanism for determining whether to redirect a request originally destined for a server based on a uniform resource locator
CN107204982A (en) * 2017-06-13 2017-09-26 成都四方伟业软件股份有限公司 Interactive data system universal safety guard system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045341A (en) * 2009-10-16 2011-05-04 株式会社东芝 Sever device and communication system
CN202737911U (en) * 2012-06-12 2013-02-13 中国人民解放军91655部队 Authority control system
US20170272551A1 (en) * 2012-09-29 2017-09-21 Oracle International Corporation Mechanism for determining whether to redirect a request originally destined for a server based on a uniform resource locator
CN103246715A (en) * 2013-04-26 2013-08-14 太原理工大学 Method for intercepting, filtering and controlling data
CN105791294A (en) * 2016-03-04 2016-07-20 河北腾翔软件科技有限公司 Method for realizing user data integrity and confidentiality without modifying web service system
CN107204982A (en) * 2017-06-13 2017-09-26 成都四方伟业软件股份有限公司 Interactive data system universal safety guard system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522351A (en) * 2018-10-22 2019-03-26 中国银行股份有限公司 A kind of data processing method and system
CN109508318A (en) * 2018-11-15 2019-03-22 北京金山云网络技术有限公司 A kind of amount of storage statistical method, device, electronic equipment and readable storage medium storing program for executing
CN109508318B (en) * 2018-11-15 2021-01-22 北京金山云网络技术有限公司 A storage quantity statistics method, apparatus, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
CN104079538B (en) It is a kind of to support cross-platform interactive microblog aggregation method and system
CN105740440B (en) A kind of indexing means for accelerating block chain query
CN102394885B (en) Information classification protection automatic verification method based on data stream
TW201317799A (en) Network resource downloading information sharing control system and method
CN102752300B (en) Dynamic antitheft link system and dynamic antitheft link method
CN111930753B (en) Data retrieving method and device, electronic equipment and storage medium
CN111917896A (en) Credible domain name resolution method, system, electronic equipment and storage medium
CN107846483A (en) A kind of domain name analytic method, system and server
CN102710795A (en) Hot spot polymerization method and device
US20240205030A1 (en) Uniform resource identifier
CN108021604A (en) A kind of web crawlers method for crawling barrage in Dou Yu webcast websites main broadcaster room
CN107222587A (en) A kind of method for remotely accessing private network device
US20140040390A1 (en) Publish Information on Website
CN111064725A (en) Code zero intrusion interface verification method and device
US10990607B1 (en) Systems and methods for log aggregation
CN106534164A (en) Cyberspace user identity-based effective virtual identity description method in computer
CN113434481B (en) Method, device, equipment and storage medium for realizing data service
CN106528688B (en) Analysis evidence obtaining method aiming at Twitter
CN107944009A (en) A kind of system and method for record web application operating daily records
CN102867056A (en) Method and system for searching keyword
CN116186090A (en) A multi-tenant multi-database matching method, device, equipment and medium
CN114666157A (en) A system and method for sharing blockchain cross-chain threat intelligence
CN112565106B (en) Traffic service identification method, device, equipment and computer storage medium
US20190356669A1 (en) Access Control
CN106549914B (en) identification method and device for independent visitor

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
TA01 Transfer of patent application right

Effective date of registration: 20200520

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Applicant after: Tidal Cloud Information Technology Co.,Ltd.

Address before: 450000 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20180420

RJ01 Rejection of invention patent application after publication