CN116886396A - Recording method, system and device for user access log - Google Patents

Recording method, system and device for user access log Download PDF

Info

Publication number
CN116886396A
CN116886396A CN202310970458.9A CN202310970458A CN116886396A CN 116886396 A CN116886396 A CN 116886396A CN 202310970458 A CN202310970458 A CN 202310970458A CN 116886396 A CN116886396 A CN 116886396A
Authority
CN
China
Prior art keywords
operation request
client
request
response information
target server
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
CN202310970458.9A
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.)
Jianwei Digital Technology Chongqing Co ltd
Original Assignee
Jianwei Digital Technology Chongqing 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 Jianwei Digital Technology Chongqing Co ltd filed Critical Jianwei Digital Technology Chongqing Co ltd
Priority to CN202310970458.9A priority Critical patent/CN116886396A/en
Publication of CN116886396A publication Critical patent/CN116886396A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a recording method, a system and a device of a user access log, wherein the method comprises the steps of being applied to a micro service gateway, and the method comprises the following steps: after receiving an operation request sent by a client, storing the operation request, and verifying the request authority of the client for the operation request according to the operation request; when the client side has the request right aiming at the operation request, determining a target server side corresponding to the operation request; the operation request is sent to a corresponding target server, so that the target server determines response information corresponding to the operation request; after receiving the response information sent by the target server, storing the response information and sending the response information to the client. The application solves the technical problems that the operation performance of the server is affected by the storage of the server and the comprehensive record is difficult to ensure in the prior art, and achieves the technical effect of improving the recording efficiency.

Description

Recording method, system and device for user access log
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, a system, and an apparatus for recording a user access log.
Background
In modern software development, there is a tight interaction between the front-end interface and the back-end services. The front-end interface typically retrieves data, performs operations, or sends requests by invoking an interface of the back-end service. This interaction makes the association between the front-end interface and the back-end service very important.
In the prior art, a developer usually needs to write a log record code in each back-end service to track data interaction between a front-end interface and the back-end service, and adding the log record code in the back-end service may affect the operation performance of the back-end service, especially when multiple front-end services send requests to the same back-end service interface at the same time, the problem of record missing may be caused.
Disclosure of Invention
Therefore, an object of the present application is to provide a method, a system, and a device for recording a user access log, by setting a micro-service gateway between a client and a server, monitoring data sent between the client and the server by the micro-service gateway, and detecting authority of a request sent by the client in advance by the micro-service gateway, so that the request is sent to the server under the condition that the client is determined to have authority, thereby solving the technical problems that the operation performance of the server is affected by the storage of the server in the prior art, and the recording is difficult to ensure overall, and achieving the technical effect of improving the recording efficiency.
The application mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a method for recording a user access log, where the method is applied to a micro service gateway, and the method includes: after receiving an operation request sent by a client, storing the operation request, and verifying the request authority of the client for the operation request according to the operation request; when the client side has a request right aiming at the operation request, determining a target server side corresponding to the operation request; the operation request is sent to a corresponding target server, so that the target server determines response information corresponding to the operation request; after receiving the response information sent by the target server, storing the response information and sending the response information to the client.
Optionally, the client is determined to have the request authority for the operation request by: verifying the request authority of the user token according to the pre-configured user authority information and the user token in the operation request; and when the user token has the request right, determining that the client has the request right for the operation request.
Optionally, the determining the target server corresponding to the operation request includes: determining a routing rule corresponding to the operation request according to a pre-configured routing rule list; and determining a target server according to the routing rule.
Optionally, the operation request includes a page element identifier corresponding to the client, and the method further includes: and classifying and storing the operation request and the corresponding response information according to the page element identification.
Optionally, the method further comprises: constructing a page element tree of the client according to the hierarchical relation among the page elements of the client, wherein each node in the page element tree corresponds to one page element identifier; and for each node in the page element tree, classifying and storing the operation request and the corresponding response information according to the page element identifier corresponding to the node.
In a second aspect, an embodiment of the present application further provides a recording system of a user access log, where the system includes: the system comprises a client, a micro-service gateway and at least one server; the client is used for generating an operation request corresponding to the operation instruction executed by the user; the micro service gateway is used for storing the operation request after receiving the operation request sent by the client; verifying the request authority of the client for the operation request according to the operation request; when the client side has a request right aiming at the operation request, determining a target server side corresponding to the operation request; the operation request is sent to a corresponding target server; the target server is used for determining response information corresponding to the operation request; the micro service gateway is further configured to store the response information and send the response information to the client after receiving the response information sent by the target server.
Optionally, the client is configured to: determining a page element identifier and a user token corresponding to an operation instruction executed by a user; and generating an operation request according to the user token, the page element identifier and the operation instruction.
In a third aspect, an embodiment of the present application further provides a recording apparatus of a user access log, where the apparatus is applied to a micro service gateway, and the apparatus includes: the first storage module is used for storing the operation request after receiving the operation request sent by the client; the verification module is used for verifying the request authority of the client side for the operation request according to the operation request; the determining module is used for determining a target server corresponding to the operation request when the client has the request right for the operation request; the sending module is used for sending the operation request to a corresponding target server side so that the target server side can determine response information corresponding to the operation request; and the second storage module is used for storing the response information and sending the response information to the client after receiving the response information sent by the target server.
In a fourth aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine readable instructions being executable by the processor to perform the steps of the method of logging a user access log as described in the first aspect or any of the possible implementation manners of the first aspect.
In a fifth aspect, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to perform the steps of the method for recording a user access log according to the first aspect or any possible implementation manner of the first aspect.
The embodiment of the application provides a recording method, a system and a device of a user access log, wherein the method is applied to a micro service gateway and comprises the following steps: after receiving an operation request sent by a client, storing the operation request, and verifying the request authority of the client for the operation request according to the operation request; when the client side has the request right aiming at the operation request, determining a target server side corresponding to the operation request; the operation request is sent to a corresponding target server, so that the target server determines response information corresponding to the operation request; after receiving the response information sent by the target server, storing the response information and sending the response information to the client. The micro-service gateway is arranged between the client and the server, data transmitted between the client and the server are monitored through the micro-service gateway, and the authority of a request transmitted by the client is detected in advance through the micro-service gateway, so that the request is transmitted to the server under the condition that the client is determined to have the authority, the technical problems that the running performance of the server is affected due to the fact that the client is stored by the server in the prior art and the comprehensive recording is difficult to ensure are solved, and the technical effect of improving the recording efficiency is achieved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for recording a user access log according to an embodiment of the present application.
Fig. 2 is a flowchart of another method for recording a user access log according to an embodiment of the present application.
Fig. 3 is a functional block diagram of a recording apparatus for user access log according to an embodiment of the present application.
Fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be appreciated that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments are only some, but not all, embodiments of the application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art based on embodiments of the application without making any inventive effort, fall within the scope of the application.
In the prior art, a log record code is configured in a back-end service to store a received request and transmitted response information, so that the running speed of a back-end server is influenced, and the problem of incomplete log record is easily caused.
Based on this, the embodiment of the application provides a method, a system and a device for recording user access logs, which are characterized in that a micro-service gateway is arranged between a client and a server, data sent between the client and the server is monitored through the micro-service gateway, and the authority of a request sent by the client is detected in advance through the micro-service gateway, so that the request is sent to the server under the condition that the client is determined to have the authority, the technical problems that the operation performance of the server is affected by the storage of the server in the prior art, the comprehensive recording is difficult to ensure are solved, and the technical effect of improving the recording efficiency is achieved, and the method comprises the following specific steps:
referring to fig. 1, fig. 1 is a flowchart of a method for recording a user access log according to an embodiment of the present application. As shown in fig. 1, the recording method of the user access log provided by the embodiment of the present application is applied to a micro service gateway, or the recording method is applied to a proxy component of the micro service gateway, and includes the following steps:
s101: after receiving an operation request sent by a client, storing the operation request.
A client may be understood as a front-end service in the background. That is, the client is a Web or mobile terminal operated by the user, so that the user performs various operation instructions on the client.
The operation request is used for describing a request corresponding to an operation instruction executed by a user on the Web terminal or the mobile terminal. Further, the user executes the operation instruction on the client, the client generates an operation request corresponding to the operation instruction executed by the user, and the client transmits the operation request to the micro service gateway.
The micro service gateway stores the operation request when receiving the operation request, and records the receiving time of the operation request.
S102: and verifying the request authority of the client for the operation request according to the operation request.
Determining that the client has the request authority for the operation request by the following steps: verifying the request authority of the user token according to the pre-configured user authority information and the user token in the operation request; and when the user token has the request right, determining that the client has the request right for the operation request.
That is, the operation request includes a user Token corresponding to a user executing the operation instruction on the client. And further verifying the request authority of the user token through the pre-configured user authority information.
The preconfigured user authority information includes authority information of all users of the client for various operation requests.
That is, the micro service gateway stores the preconfigured user authority information, and then the micro service gateway verifies the request authority of the user token carried in the operation request through the preconfigured user authority information after receiving the operation request. If the user token is determined to have the request authority of the operation request in the preconfigured user authority information, determining that the client side has the request authority aiming at the operation request; and if the user token is determined to not have the request authority of the operation request in the preconfigured user authority information, determining that the client does not have the request authority of the operation request.
S103: and when the client side has the request right aiming at the operation request, determining a target server side corresponding to the operation request.
The determining the target server corresponding to the operation request includes: determining a routing rule corresponding to the operation request according to a pre-configured routing rule list; and determining a target server according to the routing rule.
The operation request includes: request line, request header, request data, empty line. The request line includes a request method (HTTP method, hyper Text Transfer Protocol hypertext transfer protocol), a uniform resource locator path (URL path, uniform Resource Locator path), and an HTTP protocol version. Wherein the URL path generally includes: protocol, domain name, port number, path, query string, anchor. The HTTP method is used to define the operation type of the interface resource, and common HTTP methods include GET, POST, PUT, DELETE.
That is, when it is determined that the client has the request right for the operation request, the routing rule matched with the operation request is queried in the routing rule list pre-configured in the micro-service gateway, and then the target server corresponding to the operation request can be determined through the routing rule.
The routing rule specifies a hostname, a port or other identifier of the backend service corresponding to the operation request, that is, the routing rule specifies a target server that can obtain a response corresponding to the operation request.
Further, by configuring the routing rule list, it is possible to explicitly specify to which backend server the operation request should be forwarded, and the micro-service gateway will typically distribute the request evenly to backend services through a load balancing algorithm to achieve load balancing. By configuring the hostname and port of the backend service corresponding to the operation request, the proxy component of the micro-service gateway can know to which particular server the operation request is forwarded.
That is, the micro service gateway is disposed between the client and at least one server, where the server refers to a back-end service in the background art, and each server is understood to be a server of the back-end service. Furthermore, the micro-service gateway can determine the target server corresponding to the operation request, and only the operation request needs to be sent to the target server.
S104: and sending the operation request to a corresponding target server side so that the target server side determines response information corresponding to the operation request.
Further, after determining the target server corresponding to the operation request, the micro-service gateway sends the request to the corresponding target server; and the target server determines response information corresponding to the operation request and sends the response information to the micro-service gateway.
S105: after receiving the response information sent by the target server, storing the response information and sending the response information to the client.
Further, the micro service gateway stores response information corresponding to the operation request transmitted by the target server and transmits the response information to the client, and stores the response information corresponding to the operation request. The micro service gateway may also store the time at which the response information was received.
That is, the micro service gateway can monitor all the transceiving information between the client and each server and store the transceiving information, and whether the request sent by the client has the operation authority or not is stored, so that all the requests sent by the client are ensured to be stored; and the micro-service gateway can also store response information corresponding to the operation request, so that a worker can conveniently check a user log, and the working state of each service end is clarified.
Wherein the operation request includes an identification of a page element corresponding to the client. That is, the user performs an operation instruction with respect to a page element on the client page, which refers to an element of each user-executable operation instruction on the client page, for example, a button, a link, or the like. The operation instruction to be performed may be clicking a button, clicking a link, modifying information, etc.
The micro service gateway may also store the operation request by: and classifying and storing the operation request and the corresponding response information according to the page element identification.
Each page element corresponds to one page element identifier, so that the page element identifier corresponding to an operation instruction executed by a user is added to an operation request, and further, the micro-service gateway stores the operation request and response information corresponding to the storage request according to each page element identifier in a classified mode, so that the statistics of popular page elements is facilitated, optimization of the popular page elements is facilitated, the page displayed after the page elements are clicked is optimized, and information such as marketing or propaganda is added to the page, so that the user who views the page elements is increased to achieve the effect of increasing propaganda and marketing.
The method further comprises the steps of: constructing a page element tree of the client according to the hierarchical relation among the page elements of the client, wherein each node in the page element tree corresponds to one page element identifier; and for each node in the page element tree, classifying and storing the operation request and the corresponding response information according to the page element identifier corresponding to the node.
That is, the hierarchical relationship of the individual page elements in the client is determined.
And taking the application icon as a main page element, clicking the application icon, displaying a menu page, wherein the menu page comprises a plurality of first page elements, clicking each first page element, expanding a page to comprise a plurality of second page element menus, and the like until a certain page element on the expanded page is clicked, and then, not expanding any new page, wherein the page element does not have subordinate page elements.
For example, referring to fig. 2, fig. 2 is a page element tree according to an embodiment of the present application. As shown in fig. 2, the hierarchical relationship of the page element tree includes: the nodes of the first layer correspond to main page elements, each node of the second layer corresponds to a first page element on the page which is unfolded after clicking the main page elements, and each node of the third layer corresponds to a second page element on the page which is unfolded after clicking each first page element.
That is, each node on the page element tree corresponds to a page element identifier, and for each node on the page element tree, the operation request and response information corresponding to the page element identifier of the node are stored in a database. Furthermore, each node corresponds to a database, so that the position of the popular page element in the page element tree can be clarified, the popular page element is dispersed, and the situation that the upper layer of the popular page element is the same page element is prevented, so that the residence time of a user at a client is prolonged.
Based on the same application conception, the embodiment of the application also provides a recording system of the user access log corresponding to the recording method of the user access log provided by the embodiment, and the system comprises: the system comprises a client, a micro service gateway and at least one server.
The client is used for generating an operation request corresponding to the operation instruction executed by the user; the micro service gateway is used for storing the operation request after receiving the operation request sent by the client; verifying the request authority of the client for the operation request according to the operation request; when the client side has a request right aiming at the operation request, determining a target server side corresponding to the operation request; the operation request is sent to a corresponding target server; the target server is used for determining response information corresponding to the operation request; the micro service gateway is further configured to store the response information and send the response information to the client after receiving the response information sent by the target server.
That is, the micro service gateway is disposed between the client and at least one server, and when the client has a request right for an operation request, the micro service gateway determines a target server corresponding to the operation request in the at least one server, and sends the operation request to the target server.
The client is configured to: determining a page element identifier and a user token corresponding to an operation instruction executed by a user; and generating an operation request according to the user token, the page element identifier and the operation instruction.
Further, the client stores the page element identification in one preset request header and the user token in another preset request header, that is, the page element identification and the user token are stored in two different request headers. Each request header has its own name and value for delivering specific information to the server, and multiple request headers may be used to deliver different types of information.
Therefore, the client can generate an operation request according to one preset request head for storing the page element identification, the other preset request head for storing the user token and the operation instruction executed by the user. Thus, after the client sends the operation request to the micro service gateway, the micro service gateway may determine the page element identification and the user token through the operation request.
Furthermore, the application can accurately store the source of the operation request through the user token carried in the request, and identify which page the operation instruction executed by the accurate storage user is generated from through the page element in the request. And as long as the operation request is sent to the micro-service gateway, the micro-service gateway can record the operation request even if the operation request does not have a user token or a user token error or the user token does not have the authority to execute the operation request, thereby ensuring the record integrity and being capable of carrying out the network attack. The method has the advantages that an operator does not need to write a user operation log record code on a server of a back-end service side, normal work of the back-end service is not affected, and as the micro-service gateway performs authentication in advance, operation executed by the service side is reduced, and the operation efficiency of the service side is improved.
Based on the same application conception, the embodiment of the present application further provides a recording device for user access log corresponding to the recording method for user access log provided in the foregoing embodiment, and since the principle of solving the problem by the device in the embodiment of the present application is similar to that of the recording method for user access log in the foregoing embodiment of the present application, implementation of the device may refer to implementation of the method, and repeated parts will not be repeated.
Fig. 3 is a functional block diagram of a recording apparatus for user access log according to an embodiment of the present application, as shown in fig. 3. The recording apparatus of a user access log is applied to a micro service gateway, and the recording apparatus 10 of a user access log includes:
a first storage module 101, configured to store an operation request sent by a client after receiving the operation request;
the verification module 102 is configured to verify, according to the operation request, a request authority of the client for the operation request;
a determining module 103, configured to determine, when the client has a request right for the operation request, a target server corresponding to the operation request;
a sending module 104, configured to send the operation request to a corresponding target server, so that the target server determines response information corresponding to the operation request;
and the second storage module 105 is configured to store the response information and send the response information to the client after receiving the response information sent by the target server.
Based on the same application concept, referring to fig. 4, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, where the electronic device 20 includes: a processor 201, a memory 202 and a bus 203, said memory 202 storing machine readable instructions executable by said processor 201, said processor 201 and said memory 202 communicating via said bus 203 when the electronic device 20 is running, said machine readable instructions being executed by said processor 201 to perform the steps of the method of logging a user access log as described in any of the above embodiments.
In particular, the machine readable instructions, when executed by the processor 201, may perform the following: after receiving an operation request sent by a client, storing the operation request, and verifying the request authority of the client for the operation request according to the operation request; when the client side has the request right aiming at the operation request, determining a target server side corresponding to the operation request; the operation request is sent to a corresponding target server, so that the target server determines response information corresponding to the operation request; after receiving the response information sent by the target server, storing the response information and sending the response information to the client.
Based on the same application concept, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the recording method of the user access log provided in the above embodiment are executed.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, when a computer program on the storage medium is run, the method for recording the user access log can be executed, and the technical effects of improving the recording efficiency are achieved by setting a micro-service gateway between the client and the server, monitoring data sent between the client and the server through the micro-service gateway, and detecting the authority of a request sent by the client in advance through the micro-service gateway, so that the request is sent to the server under the condition that the client is determined to have the authority, the technical problems that the running performance of the server is affected due to the fact that the server stores the data in the prior art, and the recording is difficult to ensure the whole recording are solved.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A method for recording a user access log, the method being applied to a micro service gateway, the method comprising:
after receiving an operation request sent by a client, storing the operation request,
verifying the request authority of the client for the operation request according to the operation request;
when the client side has a request right aiming at the operation request, determining a target server side corresponding to the operation request;
the operation request is sent to a corresponding target server, so that the target server determines response information corresponding to the operation request;
after receiving the response information sent by the target server, storing the response information and sending the response information to the client.
2. The method of claim 1, wherein the client is determined to have the request authority for the operation request by:
verifying the request authority of the user token according to the pre-configured user authority information and the user token in the operation request;
and when the user token has the request right, determining that the client has the request right for the operation request.
3. The method of claim 1, wherein the determining the target server corresponding to the operation request includes:
determining a routing rule corresponding to the operation request according to a pre-configured routing rule list;
and determining a target server according to the routing rule.
4. The method of claim 1, wherein the operation request includes a page element identification corresponding to on the client, the method further comprising:
and classifying and storing the operation request and the corresponding response information according to the page element identification.
5. The method according to claim 4, wherein the method further comprises:
constructing a page element tree of the client according to the hierarchical relation among the page elements of the client, wherein each node in the page element tree corresponds to one page element identifier;
and for each node in the page element tree, classifying and storing the operation request and the corresponding response information according to the page element identifier corresponding to the node.
6. A logging system for user access logs, the system comprising: the system comprises a client, a micro-service gateway and at least one server;
the client is used for generating an operation request corresponding to the operation instruction executed by the user;
the micro service gateway is used for storing the operation request after receiving the operation request sent by the client; verifying the request authority of the client for the operation request according to the operation request; when the client side has a request right aiming at the operation request, determining a target server side corresponding to the operation request; the operation request is sent to a corresponding target server;
the target server is used for determining response information corresponding to the operation request;
the micro service gateway is further configured to store the response information and send the response information to the client after receiving the response information sent by the target server.
7. The system of claim 6, wherein the client is configured to:
determining a page element identifier and a user token corresponding to an operation instruction executed by a user;
and generating an operation request according to the user token, the page element identifier and the operation instruction.
8. A recording apparatus for user access logs, the apparatus being applied to a micro service gateway, the apparatus comprising:
the first storage module is used for storing the operation request after receiving the operation request sent by the client;
the verification module is used for verifying the request authority of the client side for the operation request according to the operation request;
the determining module is used for determining a target server corresponding to the operation request when the client has the request right for the operation request;
the sending module is used for sending the operation request to a corresponding target server side so that the target server side can determine response information corresponding to the operation request;
and the second storage module is used for storing the response information and sending the response information to the client after receiving the response information sent by the target server.
9. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating via said bus when the electronic device is running, said machine readable instructions when executed by said processor performing the steps of the method of logging a user access log according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the method of recording a user access log according to any of claims 1 to 5.
CN202310970458.9A 2023-08-02 2023-08-02 Recording method, system and device for user access log Pending CN116886396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310970458.9A CN116886396A (en) 2023-08-02 2023-08-02 Recording method, system and device for user access log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310970458.9A CN116886396A (en) 2023-08-02 2023-08-02 Recording method, system and device for user access log

Publications (1)

Publication Number Publication Date
CN116886396A true CN116886396A (en) 2023-10-13

Family

ID=88254941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310970458.9A Pending CN116886396A (en) 2023-08-02 2023-08-02 Recording method, system and device for user access log

Country Status (1)

Country Link
CN (1) CN116886396A (en)

Similar Documents

Publication Publication Date Title
US10027564B2 (en) Unobtrusive methods and systems for collecting information transmitted over a network
US7792948B2 (en) Method and system for collecting, aggregating and viewing performance data on a site-wide basis
US7966398B2 (en) Synthetic transaction monitor with replay capability
US7461369B2 (en) Java application response time analyzer
JP5354776B2 (en) Distributed acquisition and aggregation of dynamic application usage information
KR101828506B1 (en) Visualization of jvm and cross-jvm call stacks
US7401141B2 (en) Method and system for monitoring performance of distributed applications
EP2244418B1 (en) Database security monitoring method, device and system
US7734637B2 (en) Method and system for automatic detection of monitoring data sources
KR20080070636A (en) Obtaining server usage information
JP2010128877A (en) Web system and method of collecting processing record
US20200327045A1 (en) Test System and Test Method
KR101443071B1 (en) Error Check System of Webpage
US20110302272A1 (en) Unobtrusive methods and systems for collecting information transmitted over a network
CN114666245A (en) IPv6 single stack support degree determining method of B/S system and related equipment
US20130246523A1 (en) Browser based recovery discovery
CN116886396A (en) Recording method, system and device for user access log
US9479396B2 (en) XML based generic UNIX discovery framework
CN109669846B (en) Management information query method, device and computer readable medium
JP7074187B2 (en) Monitoring equipment, monitoring methods and programs
CN112417328B (en) Webpage monitoring method and device
CN113672580A (en) BMC log collection method, device, equipment and readable storage medium
CN116527551A (en) Flow hijacking simulation test method, system, computer equipment and storage medium
CN113835942A (en) Server fault diagnosis method and device
CN117395236A (en) HTTP proxy service method and system

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