CN111581172B - Query method, system, server and storage medium of operation log - Google Patents

Query method, system, server and storage medium of operation log Download PDF

Info

Publication number
CN111581172B
CN111581172B CN202010386837.XA CN202010386837A CN111581172B CN 111581172 B CN111581172 B CN 111581172B CN 202010386837 A CN202010386837 A CN 202010386837A CN 111581172 B CN111581172 B CN 111581172B
Authority
CN
China
Prior art keywords
server
log
preset
sequence number
user end
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
CN202010386837.XA
Other languages
Chinese (zh)
Other versions
CN111581172A (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.)
Shenzhen Card Number Technology Co ltd
Original Assignee
Shenzhen Card Number 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 Shenzhen Card Number Technology Co ltd filed Critical Shenzhen Card Number Technology Co ltd
Priority to CN202010386837.XA priority Critical patent/CN111581172B/en
Publication of CN111581172A publication Critical patent/CN111581172A/en
Application granted granted Critical
Publication of CN111581172B publication Critical patent/CN111581172B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS

Landscapes

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

Abstract

The application discloses a query method, a query system, a server and a storage medium of an operation log, wherein the method comprises the following steps: receiving an inquiry log instruction and a user end sequence number sent by a user end; acquiring an operation log of a preset database of at least one first server in a server according to an inquiry log instruction, a user end sequence number and a preset mapping relation, wherein the server comprises at least two first servers, and the preset mapping relation is a relation between a first sequence number of a proxy server and a first server address; and sending the running log to the user side so that the user side displays the running log. According to the application, the proxy server is used as an intermediary for transmission of the running log between the user side and the server side, and the server side adopts a distributed architecture, so that the technical problems of high deployment cost, complex operation and incapability of checking the newly generated running log in real time in the prior art are solved, and the technical effects of reducing the deployment cost, simplifying the operation and checking the new running log in real time are realized.

Description

Query method, system, server and storage medium of operation log
Technical Field
The embodiment of the application relates to a log query technology, in particular to a query method, a query system, a server and a storage medium for running logs.
Background
In a distributed environment, a machine actually running a certain algorithm task runs on different machines along with a load strategy, running can generate a running log, and the content can be particularly high. The background server responding to the web viewing request and the machine actually running the task may not be the same, so how to quickly find the log file and effectively transmit the log file is a difficult problem, and when the background system has a newly added server, the newly added server needs to be configured in a corresponding environment, so that the technical problems of high deployment cost, complex operation and incapability of viewing the newly generated running log in real time are caused.
Disclosure of Invention
The application provides a query method, a query system, a query server and a query storage medium for running logs, which are used for reducing deployment cost, simplifying operation and checking new running logs in real time.
In a first aspect, an embodiment of the present application provides a method for querying a running log, including:
receiving an inquiry log instruction and a user end sequence number sent by a user end;
acquiring an operation log of a preset database of at least one first server in a server according to an inquiry log instruction, a user end sequence number and a preset mapping relation, wherein the server comprises at least two first servers, and the preset mapping relation is a relation between a first sequence number of a proxy server and a first server address;
and sending the running log to the user side so that the user side displays the running log.
Optionally, before receiving the query log instruction and the user sequence number sent by the user side, the method includes:
acquiring first address information of a first server;
adding the first address information to a preset configuration file of the proxy server according to the preset monitoring system to generate a first configuration file;
analyzing the first configuration file according to a preset analysis rule to generate a preset mapping relation between the first serial numbers of the first server and the proxy server;
acquiring an operation log of a user;
and sending the operation log to the first server according to the preset mapping relation so as to store the operation log in a preset database.
Optionally, before obtaining the first address information of the first server, the method includes:
associating the server with a preset network file system;
a mapping directory based on a preset network file system is generated to store the running log in the mapping directory.
Optionally, after receiving the query log instruction and the user sequence number sent by the user side, the method includes:
judging whether a second server is newly added to the server side or not at preset time intervals through a preset monitoring system;
if the preset monitoring system monitors that the server side is newly added with a second server, acquiring second address information of the second server;
adding the second address information to a preset configuration file of the proxy server to generate a second configuration file;
analyzing the second configuration file according to a preset analysis rule to generate a mapping relation of a second serial number of the second server and the proxy server;
associating the second server with a preset network file system to generate a mapping directory of the second server based on the preset network file system;
the running log is stored in a mapping directory.
Optionally, the sending the running log to the user side, so that after the user side displays the running log, the method includes:
judging whether the user side receives the operation log or not;
if the user receives the running log, receiving a log reading stop instruction sent by the user and sending the log reading stop instruction to the server.
Optionally, the server reads the running log through a preset Java buffer transmission mode.
In a second aspect, an embodiment of the present application further provides a query system for a running log, including:
the instruction receiving module is used for receiving an inquiry log instruction and a user end sequence number sent by the user end;
the log confirmation module is used for acquiring an operation log of a preset database of at least one first server in the server according to the query log instruction, the user end serial number and a preset mapping relation, wherein the server comprises at least two first servers, and the preset mapping relation is a relation between the first serial number of the proxy server and the first server address;
and the log query module is used for sending the running log to the user side so as to enable the user side to display the running log.
Optionally, the method further comprises:
the address acquisition module is used for acquiring first address information of the first server;
the information adding module is used for adding the first address information to a preset configuration file of the proxy server according to the preset monitoring system so as to generate a first configuration file;
the file analysis module is used for analyzing the first configuration file according to a preset analysis rule so as to generate a preset mapping relation between the first serial numbers of the first server and the proxy server;
the log acquisition module is used for acquiring the operation log of the user side;
and the log storage module is used for sending the running log to the first server according to the preset mapping relation so as to store the running log in a preset database.
In a third aspect, an embodiment of the present application further provides a server, including:
one or more processors;
storage means for storing one or more programs,
the program or programs, when executed by the processor or processors, cause the processor or processors to implement the method of storing a log of operations of any of the above embodiments.
In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for storing a running log according to any of the above embodiments.
According to the application, the proxy server is used as an intermediary for transmission of the running log between the user side and the server side, and the server side adopts a distributed architecture, so that the technical problems that in the prior art, a background system needs to be newly added with a server and needs to be newly configured with an environment, the deployment cost is high, the operation is complicated, and the newly generated running log cannot be checked in real time are solved, and the technical effects of reducing the deployment cost, simplifying the operation, ensuring the accuracy and the safety of transmission and checking the new running log in real time are realized.
Drawings
FIG. 1 is a flowchart of a method for querying a running log according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for querying a running log according to a second embodiment of the present application;
FIG. 3 is a flowchart of a method for querying a running log according to an alternative embodiment of the present application;
FIG. 4 is a schematic diagram of a query system for providing an additional running log according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of a server according to a fourth embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts steps as a sequential process, many of the steps may be implemented in parallel, concurrently, or with other steps. Furthermore, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Furthermore, the terms "first," "second," and the like, may be used herein to describe various directions, acts, steps, or elements, etc., but these directions, acts, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, a first sequence number may be referred to as a second sequence number, and similarly, a second sequence number may be referred to as a first sequence number, without departing from the scope of the present application. The first sequence number and the second information acquisition module sequence number are both sequence numbers, but they are not the same sequence number. The terms "first," "second," and the like, are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Example 1
Fig. 1 is a flowchart of a method for querying an operation log according to an embodiment of the present application, where the method may be applicable to a case of quickly and accurately searching an operation log file, and may be executed by a proxy server, as shown in fig. 1, and the method for querying an operation log according to the embodiment specifically includes the following steps:
step S110, receiving a query log instruction and a user end sequence number sent by a user end;
specifically, in this embodiment, the user side refers to a terminal that needs to query the running log. The query log instruction refers to an instruction sent to the server by the user side to allow the user side to perform a running log query. When the server (in this embodiment, may be a proxy server, for example, an nginnx server) receives the query log instruction, the query log instruction may be verified by a preset verification rule, and after verification is successful, the server may allow the user side to access or call the running log. In this embodiment, the user end serial number may be the terminal serial number corresponding to the user end, or may be the task serial number corresponding to the query log instruction sent by the user end, and is used to identify which query log instruction sent by which user end is sent by the terminal serial number or the task serial number, or identify which query log task sent by the same user end.
Step S120, obtaining an operation log of a preset database of at least one first server in a server according to an inquiry log instruction, a user end sequence number and a preset mapping relation, wherein the server comprises at least two first servers, and the preset mapping relation is a relation between a first sequence number of a proxy server and a first server address;
specifically, the preset mapping relationship may refer to a configuration file (such as a reverse proxy list, where a reverse proxy refers to a configuration file that uses a proxy server to accept a connection request on the internet, and then forwards the request to a server on an internal network, and returns a result obtained from the server to a client that requests a connection on the internet, where the proxy server appears as a reverse proxy server to the outside), where the configuration file may establish a connection between a port serial number of the proxy server (i.e., a first serial number of the proxy server) and address information (such as IP address information or URL information) of each background server (i.e., a first server of the server) in the server that may be used to transmit an operation log. After receiving the query log instruction and the user end serial number, the proxy server invokes the running log corresponding to the query log instruction in the first server of the server end according to the query log instruction, the user end serial number and a mapping relation pre-established in the database.
Step S130, the operation log is sent to the user side, so that the user side displays the operation log.
Specifically, after the proxy server obtains the running log, the running log can be fed back to the user side according to the query log instruction and the serial number of the user side, so that the user side can conveniently check the running log.
The first embodiment of the application has the beneficial effects that the proxy server is used as an intermediary for the transmission of the running log between the user side and the server side, and the server side adopts a distributed architecture, so that the technical effects that a background system in the prior art needs to be newly added with a server and needs to be newly configured with an environment, thereby causing the technical problems of high deployment cost, complex operation and incapability of checking the newly generated running log in real time, and realizing the reduction of deployment cost, the simplification of operation, the guarantee of the accuracy and the safety of the transmission and the real-time checking of the new running log are realized.
Example two
The second embodiment of the application is further optimized based on the first embodiment. Fig. 2 is a flowchart of a method for querying a running log according to a second embodiment of the present application. As shown in fig. 2, the query method of the running log of the embodiment includes:
step S210, associating the server with a preset network file system, and generating a mapping directory based on the preset network file system so as to store the operation log in the mapping directory;
specifically, the preset network file system refers to a network file system for mapping to a folder and storing running logs uniformly, in this embodiment, the preset network file system may be based on an NFS network file system established on a server, and when the server is associated with the NFS network file system, the NFS network file system generates a mapping directory for storing the running logs, so that the running logs generated by a user may be stored under the same NFS mapping directory through the NFS network file system.
Step S220, obtaining first address information of a first server, and adding the first address information to a preset configuration file of a proxy server according to a preset monitoring system to generate a first configuration file;
step S230, analyzing the first configuration file according to a preset analysis rule to generate a preset mapping relation between the first serial numbers of the first server and the proxy server;
specifically, the preset monitoring system in this embodiment refers to a monitoring system for monitoring the number of servers at a server or monitoring the configuration file change in a proxy server. After the mapping directory is established, the proxy server obtains the first address information of each first server of the server, and then adds the first address information to the configuration parameters of the corresponding server address in the preset configuration file according to the preset monitoring system in the proxy server, so as to generate the first configuration file. After the first configuration file is generated, the proxy server parses the first configuration file (e.g. configures dynamic domain name resolution) according to a preset parsing rule, so as to generate a preset mapping relationship between the port serial numbers of the first server and the proxy server, where the preset mapping relationship may be represented by a reverse proxy list of the proxy server in this embodiment.
Step S240, acquiring an operation log of a user side, and sending the operation log to a first server according to a preset mapping relation so as to store the operation log in a preset database;
step S250, receiving a query log instruction and a user end sequence number sent by a user end;
specifically, in this embodiment, the user side refers to a terminal that needs to query the running log. The query log instruction refers to an instruction sent to the server by the user side to allow the user side to perform a running log query. When the server (in this embodiment, may be a proxy server, for example, an nginnx server) receives the query log instruction, the query log instruction may be verified by a preset verification rule, and after verification is successful, the server may allow the user side to access or call the running log. In this embodiment, the user end serial number may be the terminal serial number corresponding to the user end, or may be the task serial number corresponding to the query log instruction sent by the user end, and is used to identify which query log instruction sent by which user end is sent by the terminal serial number or the task serial number, or identify which query log task sent by the same user end. In this embodiment, the naming manner of the running Log may be a form of adding a suffix ". Log" to the sequence number of the user, so that the proxy server can conveniently find the corresponding running Log according to the sequence number of the user.
Step S260, obtaining an operation log of a preset database of at least one first server in a server according to an inquiry log instruction, a user end sequence number and a preset mapping relation, wherein the server end comprises at least two first servers, and the preset mapping relation is a relation between a first sequence number of a proxy server and a first server address;
specifically, the preset mapping relationship may refer to a configuration file (such as a reverse proxy list, where a reverse proxy refers to a configuration file that uses a proxy server to accept a connection request on the internet, and then forwards the request to a server on an internal network, and returns a result obtained from the server to a client that requests a connection on the internet, where the proxy server appears as a reverse proxy server to the outside), where the configuration file may establish a connection between a port serial number of the proxy server (i.e., a first serial number of the proxy server) and address information (such as IP address information or URL information) of each background server (i.e., a first server of the server) in the server that may be used to transmit an operation log. After receiving the query log instruction and the user end serial number, the proxy server invokes the running log corresponding to the query log instruction in the first server of the server end according to the query log instruction, the user end serial number and a mapping relation pre-established in the database. For example, the first serial number of the proxy server is 80, the server has 5 first servers capable of being used for inquiring the running log, and when the proxy server receives the inquiry log instruction and the user serial number sent by the user side C, the proxy server can access the storage directory (i.e. the mapping directory) of the running log according to the inquiry log instruction and the user serial number of the user side C, so as to find the corresponding running log.
Step S270, the operation log is sent to the user side so that the user side displays the operation log;
specifically, after the proxy server obtains the running log, the sub-threads (the sub-threads are used for preventing errors from affecting the service function of the whole server when the running log is read) can be started, and the running log is continuously sent to the user side in a batch through the Websocker channel in a Java NIO buffer stream mode, so that the running log can be displayed on the user side.
Step S280, judging whether the user side receives the running log, if so, receiving a log reading stop instruction sent by the user side and sending the log reading stop instruction to the server side.
Specifically, after the proxy server sends the running log to the client, it is also necessary to determine whether the client has actually received the running log. When the client does receive the running log, the client sends a log reading stop instruction (i.e. an instruction for requesting to stop log reading) to the server through the proxy server, so that the log reading task is stopped to continue to execute.
Fig. 3 is a flowchart of a method for querying a running log according to an alternative embodiment of the present application. As shown in fig. 3, in the present embodiment, step S250 may be followed by the steps of:
step S310, judging whether a second server is newly added to the server side or not at preset time intervals through a preset monitoring system;
step S320, if the preset monitoring system monitors that a second server is newly added to the server side, second address information of the second server is obtained;
specifically, the proxy server may monitor whether the server has an added server (i.e. the second server) through a preset monitoring system at preset time intervals (e.g. 10 seconds, 1 minute, 10 minutes, etc., where the interval duration may be adjusted according to the service requirement, and this is not further limited). The method for judging whether the newly added server exists may be to see whether the configuration file of the proxy server changes or monitor whether the proxy list of the proxy server changes, or to send notification information of the newly added server through the server. When the preset monitoring system monitors that the server side does have a newly added server (a second server), the proxy server acquires address information (namely second address information, wherein the address information can be an IP address or a URL address) of the newly added second server.
Step S330, adding the second address information to a preset configuration file of the proxy server to generate a second configuration file;
step S340, analyzing the second configuration file according to a preset analysis rule to generate a mapping relation of a second serial number of the second server and the proxy server;
specifically, after the proxy server acquires the second address information, the proxy server adds the second address information to the configuration parameters of the corresponding server address in the preset configuration file, so as to generate a second configuration file, or adds the second address information to the configuration parameters of the corresponding server address in the first configuration file, namely, the address information of the first server and the address information of the second server are configured in the same configuration file, so as to generate the second configuration file. After the second configuration file is generated, the proxy server parses the second configuration file (e.g. configures dynamic domain name resolution) according to a preset parsing rule, so as to generate a preset mapping relationship between the port serial numbers of the second server and the proxy server, where the preset mapping relationship may be represented by a reverse proxy list of the proxy server in this embodiment.
Step S350, associating the second server with the preset network file system to generate a mapping catalog of the second server based on the preset network file system;
step S360, storing the operation log in the mapping catalog.
Specifically, the preset network file system may be based on an NFS network file system established on the server, and when a second server is newly added on the server, the second server needs to be associated with the NFS network file system, and at this time, the NFS network file system generates a mapping directory for storing the running log, so that the running log generated by the user side may be stored in the same NFS mapping directory through the NFS network file system (the mapping directories of the first server and the second server may be the same).
In this embodiment, the server may read the running log by presetting a Java buffer transmission mode.
The second embodiment of the application has the beneficial effects that the proxy server is used as an intermediary for operation log transmission between the user side and the server side, the server side adopts a distributed architecture, and a preset monitoring system is used for judging whether a newly added server exists, so that the technical effects that a background system needs the newly added server and needs to reconfigure the environment for the newly added server in the prior art are solved, the deployment cost is high, the operation is complicated, the newly generated operation log cannot be checked in real time, the deployment cost is reduced, the operation is simplified, the accuracy and the safety of transmission are ensured, and the new operation log can be checked in real time are realized.
Example III
Fig. 4 is a schematic structural diagram of a query system for running logs according to a third embodiment of the present application. As shown in fig. 4, the query system 300 of the running log of the present embodiment includes:
the instruction receiving module 301 is configured to receive a query log instruction and a user sequence number sent by a user;
the log confirmation module 302 is configured to obtain an operation log of a preset database of at least one first server in the server according to a query log instruction, a user end serial number, and a preset mapping relationship, where the server end includes at least two first servers, and the preset mapping relationship is a relationship between a first serial number of a proxy server and a first server address;
and the log query module 303 is configured to send the running log to the user side, so that the user side displays the running log.
In this embodiment, the query system 300 of the running log further includes:
an address obtaining module 304, configured to obtain first address information of a first server;
an information adding module 305, configured to add the first address information to a preset configuration file of the proxy server according to the preset monitoring system to generate a first configuration file;
the file parsing module 306 is configured to parse the first configuration file according to a preset parsing rule, so as to generate a preset mapping relationship between the first serial numbers of the first server and the proxy server;
a log obtaining module 307, configured to obtain an operation log of the user side;
the log storage module 308 is configured to send the running log to the first server according to a preset mapping relationship to store the running log in a preset database.
In this embodiment, the query system 300 of the running log further includes:
the association module 309 is configured to associate the server with the preset network file system, and generate a mapping directory based on the preset network file system, so as to store the running log in the mapping directory.
In this embodiment, the query system 300 of the running log further includes:
a service adding module 310, configured to determine, by using a preset monitoring system, whether the server adds a second server at a preset time interval; if the preset monitoring system monitors that the server side is newly added with a second server, acquiring second address information of the second server; adding the second address information to a preset configuration file of the proxy server to generate a second configuration file; analyzing the second configuration file according to a preset analysis rule to generate a mapping relation of a second serial number of the second server and the proxy server; associating the second server with a preset network file system to generate a mapping directory of the second server based on the preset network file system; the running log is stored in a mapping directory.
In this embodiment, the query system 300 of the running log further includes:
the receiving confirmation module 311 is configured to determine whether the user side receives the running log; if the user receives the running log, receiving a log reading stop instruction sent by the user and sending the log reading stop instruction to the server.
In this embodiment, the server reads the running log through a preset Java buffer transmission mode.
The query system of the running log provided by the embodiment of the application can execute the query method of the running log provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 is a schematic structural diagram of a server according to a fourth embodiment of the present application, as shown in fig. 5, the server includes a processor 410, a memory 420, an input device 430 and an output device 440; the number of processors 410 in the server may be one or more, one processor 410 being taken as an example in fig. 5; the processor 410, memory 420, input device 430, and output device 440 in the server may be connected by a bus or other means, for example in fig. 5.
The memory 410 is used as a computer readable storage medium, and may be used to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to a query system of a running log in an embodiment of the present application (e.g., an instruction receiving module, a log confirmation module, a log query module, an address acquisition module, an information adding module, a file parsing module, a log acquisition module, a log storage module, an association module, a service adding module, and a receipt confirmation module in a query system of a running log). The processor 410 executes various functional applications and data processing of the server by running software programs, instructions and modules stored in the memory 420, that is, implements the above-described method for querying the running log, that is:
receiving an inquiry log instruction and a user end sequence number sent by a user end;
acquiring an operation log of a preset database of at least one first server in a server according to an inquiry log instruction, a user end sequence number and a preset mapping relation, wherein the server comprises at least two first servers, and the preset mapping relation is a relation between a first sequence number of a proxy server and a first server address;
and sending the running log to the user side so that the user side displays the running log.
Memory 420 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 420 may further include memory remotely located with respect to processor 410, which may be connected to a server via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the server. The output 440 may include a display device such as a display screen.
Example five
A fifth embodiment of the present application also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for querying a running log, the method comprising:
receiving an inquiry log instruction and a user end sequence number sent by a user end;
acquiring an operation log of a preset database of at least one first server in a server according to an inquiry log instruction, a user end sequence number and a preset mapping relation, wherein the server comprises at least two first servers, and the preset mapping relation is a relation between a first sequence number of a proxy server and a first server address;
and sending the running log to the user side so that the user side displays the running log.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present application is not limited to the above method operations, and may also perform the related operations in the method for querying the running log provided in any embodiment of the present application.
From the above description of embodiments, it will be clear to a person skilled in the art that the present application may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method of the embodiments of the present application.
It should be noted that, in the above embodiment of the query system for a running log, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding function can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.

Claims (6)

1. A method for querying a travel log, comprising:
receiving an inquiry log instruction and a user end sequence number sent by a user end, wherein the user end sequence number is a terminal sequence number corresponding to the user end or a task sequence number corresponding to the inquiry log instruction sent by the user end, and the inquiry log instruction is used for identifying a client end sending the inquiry log instruction or identifying an inquiry log task sent under the same user end through the terminal sequence number or the task sequence number;
acquiring an operation log of a preset database of at least one first server in a server according to the query log instruction, the user end serial number and a preset mapping relation, wherein the server comprises at least two first servers, and the preset mapping relation is a relation between a first serial number of a proxy server and a first server address;
the running log is sent to the user side, so that the user side displays the running log;
the step of receiving the inquiry log instruction and the user end sequence number sent by the user end comprises the following steps:
acquiring first address information of the first server;
adding the first address information to a preset configuration file of the proxy server according to a preset monitoring system to generate a first configuration file;
analyzing the first configuration file according to a preset analysis rule to generate the preset mapping relation between the first serial numbers of the first server and the proxy server;
acquiring an operation log of the user side;
sending the operation log to the first server according to the preset mapping relation so as to store the operation log in the preset database;
the step of receiving the inquiry log instruction and the user end sequence number sent by the user end comprises the following steps:
judging whether a second server is newly added to the server side or not at preset time intervals through the preset monitoring system;
if the preset monitoring system monitors that the server newly adds the second server, acquiring second address information of the second server;
adding the second address information to a preset configuration file of the proxy server to generate a second configuration file;
analyzing the second configuration file according to a preset analysis rule to generate a mapping relation of the second serial numbers of the second server and the proxy server;
associating the second server with the preset network file system to generate a mapping directory of the second server based on the preset network file system;
storing the operation log in the mapping catalog;
the step of obtaining the first address information of the first server includes:
associating the server with a preset network file system;
and generating a mapping directory based on the preset network file system so as to store the running log in the mapping directory.
2. The method for querying a running log according to claim 1, wherein the sending the running log to the client, so that the client displays the running log, includes:
judging whether the user side receives the operation log or not;
and if the user side receives the running log, receiving a log reading stop instruction sent by the user side and sending the log reading stop instruction to the server side.
3. The method for querying a running log according to claim 1, wherein the server reads the running log by a preset Java buffer transmission mode.
4. A system for querying a travel log, comprising:
the instruction receiving module is used for receiving an inquiry log instruction and a user end sequence number sent by a user end, wherein the user end sequence number is a terminal sequence number corresponding to the user end or a task sequence number corresponding to the inquiry log instruction sent by the user end, and is used for identifying a client end sending the inquiry log instruction or identifying an inquiry log task sent under the same user end through the terminal sequence number or the task sequence number;
the log confirmation module is used for acquiring an operation log of a preset database of at least one first server in a server according to the query log instruction, the user end sequence number and a preset mapping relation, wherein the server comprises at least two first servers, and the preset mapping relation is a relation between the first sequence number of a proxy server and the first server address;
the log query module is used for sending the running log to the user side so that the user side can display the running log;
the address acquisition module is used for acquiring first address information of the first server;
the information adding module is used for adding the first address information to a preset configuration file of the proxy server according to a preset monitoring system so as to generate a first configuration file;
the file analysis module is used for analyzing the first configuration file according to a preset analysis rule so as to generate the preset mapping relation between the first serial numbers of the first server and the proxy server;
the log acquisition module is used for acquiring the operation log of the user side;
the log storage module is used for sending the running log to the first server according to the preset mapping relation so as to store the running log in the preset database;
the service newly-added module is used for judging whether the server side is newly added with a second server or not at a preset time interval through the preset monitoring system; if the preset monitoring system monitors that the server newly adds the second server, acquiring second address information of the second server; adding the second address information to a preset configuration file of the proxy server to generate a second configuration file; analyzing the second configuration file according to a preset analysis rule to generate a mapping relation of the second serial numbers of the second server and the proxy server; associating the second server with the preset network file system to generate a mapping directory of the second server based on the preset network file system; storing the operation log in the mapping catalog;
the association module is used for associating the server side with a preset network file system; and generating a mapping directory based on the preset network file system so as to store the running log in the mapping directory.
5. A server, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of querying a log of operations of any of claims 1-3.
6. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of querying a log according to any of claims 1-3.
CN202010386837.XA 2020-05-09 2020-05-09 Query method, system, server and storage medium of operation log Active CN111581172B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010386837.XA CN111581172B (en) 2020-05-09 2020-05-09 Query method, system, server and storage medium of operation log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010386837.XA CN111581172B (en) 2020-05-09 2020-05-09 Query method, system, server and storage medium of operation log

Publications (2)

Publication Number Publication Date
CN111581172A CN111581172A (en) 2020-08-25
CN111581172B true CN111581172B (en) 2023-11-07

Family

ID=72126377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010386837.XA Active CN111581172B (en) 2020-05-09 2020-05-09 Query method, system, server and storage medium of operation log

Country Status (1)

Country Link
CN (1) CN111581172B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003048973A1 (en) * 2001-12-06 2003-06-12 C-Live, Inc. Access log analyzer and access log analyzing method
CN105824958A (en) * 2016-03-31 2016-08-03 广州华多网络科技有限公司 Method, device and system for inquiring log
CN108427705A (en) * 2018-01-17 2018-08-21 平安科技(深圳)有限公司 Electronic device, distributed system journal querying method and storage medium
CN110955688A (en) * 2019-12-23 2020-04-03 北京奇艺世纪科技有限公司 Proxy server, data query method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9154557B2 (en) * 2006-10-12 2015-10-06 Cisco Technology, Inc. Automatic proxy registration and discovery in a multi-proxy communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003048973A1 (en) * 2001-12-06 2003-06-12 C-Live, Inc. Access log analyzer and access log analyzing method
CN105824958A (en) * 2016-03-31 2016-08-03 广州华多网络科技有限公司 Method, device and system for inquiring log
CN108427705A (en) * 2018-01-17 2018-08-21 平安科技(深圳)有限公司 Electronic device, distributed system journal querying method and storage medium
CN110955688A (en) * 2019-12-23 2020-04-03 北京奇艺世纪科技有限公司 Proxy server, data query method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111581172A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
US10284446B2 (en) Optimizing content management
US9088460B2 (en) Managing resource consolidation configurations
CN111092877B (en) Data processing method and device, electronic equipment and storage medium
CN109787951B (en) Network data access method and device and electronic equipment
CN107181779B (en) Method, device and system for processing access request
CN109739711B (en) Interface test method, device, equipment and storage medium
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
CN109446445B (en) Resource acquisition method and device
CN110311855B (en) User message processing method and device, electronic equipment and storage medium
CN113342503B (en) Real-time progress feedback method, device, equipment and storage medium
JP2018533092A (en) Network request and response processing method, terminal, server, and storage medium
CN114448857A (en) Method, device, storage medium and system for processing Mock service
CN112866062B (en) Distributed pressure test system, method, device, equipment and storage medium
CN111581172B (en) Query method, system, server and storage medium of operation log
US20230239369A1 (en) Resource acquisition method, webvpn proxy server, system, and server
CN108390770B (en) Information generation method and device and server
CN113596105B (en) Content acquisition method, edge node and computer readable storage medium
CN111049795B (en) Method and device for detecting sensitive data unencrypted vulnerability of distributed Web application
CN111107080B (en) Error information pushing method, device and equipment and readable storage medium
CN112131263B (en) Software package acquisition method, system, device, electronic equipment and storage medium
CN114116448A (en) Pressure testing method and device of application program, storage medium and computer equipment
CN112714092B (en) Registration login method, device and computer readable storage medium
CN109688204B (en) File downloading method, node and terminal based on NDN (named data networking)
CN109600452B (en) Server cluster, message pushing method and related server
CN107835225B (en) Method, device and equipment for acquiring data information

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