A log processing method and related equipment

By setting up a message queue between the gateway device and the log processing device, the phased recording and analysis of operation requests and request feedback is achieved, and the problem that the log content has been processed inaccurately before analysis is solved, which improves the accuracy and efficiency of log analysis.

CN119766639APending Publication Date: 2025-04-04ZHEJIANG AEROSPACE HENGJIA DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411925221.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, the log content has been processed in compliance before analysis, resulting in inaccurate log analysis results.

Method used

By setting up a message queue between the gateway device and the log processing device, phased recording and analysis of operation requests and request feedback is achieved, avoiding analysis before compliance processing.

Benefits of technology

Ensure complete log content is obtained before compliance processing, improve log analysis accuracy, and improve efficiency through phased processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766639A_ABST
    Figure CN119766639A_ABST
Patent Text Reader

Abstract

The present application relates to the field of log technology, and in particular to a log processing method and related equipment. The method is applied to a gateway device, and the gateway device is used to forward the operation request for the target service issued by the user on the client to the target server, so that the target server processes the operation request; the method includes: in the process of forwarding the operation request to the target server, the operation request is sent to the log processing device, and the log processing device is ordered to analyze the operation request; in the process of returning the request result in the request feedback to the client, the request feedback including the key processing information and the request result is sent to the log processing device, and the log processing device is ordered to analyze the request feedback. The present application can solve the technical problem that the existing log analysis process has inaccurate log analysis results because the log has been processed for compliance before the analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of log technology, and in particular to a log processing method and related equipment. Background Art

[0002] In the prior art, the BS (Browser / Server) architecture supports users to operate the target service provided by the server through the browser interface on the client (network device). In actual application, when the operation is completed, the target service will generate a log content accordingly to record the operation.

[0003] In actual operations, the target service usually needs to perform compliance processing on the log content to desensitize, encrypt or discard sensitive information in the log content. Only after compliance processing will the log content be recorded in the log file, so that the log processing service can monitor, read, process and forward the log file for storage.

[0004] In summary, since the log content has been processed for compliance before the log processing service analyzes the log file, in many cases it is impossible to obtain the complete log content during the analysis process, which further leads to inaccurate log analysis results. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a log processing method and related equipment to solve the technical problem in the log analysis process in the prior art that the log content has been processed for compliance before analysis, resulting in inaccurate log analysis results.

[0006] In a first aspect, the present application provides a log processing method, which is applied to a gateway device, wherein the gateway device is configured to forward an operation request for a target service issued by a user on a client to a target server, so that the target server processes the operation request; the method comprising:

[0007] In the process of forwarding the operation request to the target server, the operation request is sent to a log processing device, and the log processing device is instructed to analyze the operation request;

[0008] In the process of returning the request result in the request feedback to the client, sending the request feedback including the key processing information and the request result to the log processing device, so that the log processing device analyzes the request feedback;

[0009] The request feedback is sent by the target server, and the key processing information indicates the processing logic of the target server when processing the operation request.

[0010] In a second aspect, the present application provides a log processing method, which is applied to a log processing device, wherein the log processing device is connected to a gateway device, and the gateway device is used to forward an operation request for a target service issued by a user on a client to a target server, so that the target server processes the operation request; the method includes:

[0011] In response to receiving the operation request forwarded by the gateway device, analyzing the operation request to obtain a first analysis result;

[0012] In response to receiving the request feedback forwarded by the gateway device, analyzing the requested feedback to obtain a second analysis result;

[0013] Among them, the request feedback is sent by the target server to the gateway device, and the request feedback includes processing key information and request results. The processing key information indicates the processing logic of the target server when processing the operation request, and the request result is the request result obtained after processing the operation request.

[0014] In a third aspect, the present application provides a log processing method, which is applied to a target server, wherein the target server is connected to a gateway device, and the gateway device is also connected to a log processing device; the method comprises:

[0015] In response to receiving an operation request for a target service sent by a user on a client and forwarded by the gateway device, processing the operation request to obtain request feedback;

[0016] The request feedback includes: key processing information and a request result, wherein the key processing information indicates the processing logic when processing the operation request, and the request result is the request result obtained after processing the operation request;

[0017] The request feedback is sent to the gateway device, so that the gateway device forwards the request result in the request feedback to the client and sends the request feedback to the log processing device.

[0018] In a fourth aspect, the present application provides an electronic device, which includes a processor and a memory, wherein the memory is used to store an application program, and the processor runs or executes a software program stored in the memory so that the electronic device implements the above-mentioned log processing method.

[0019] In a fifth aspect, the present application provides a computer-readable storage medium, which is used to store program codes executed by a processor, and the program codes are used to implement the above-mentioned log processing method.

[0020] In a sixth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device implements the log processing method as described above.

[0021] Beneficial effects:

[0022] The present application provides a log processing method, which is applied to a gateway device, wherein the gateway device is used to forward an operation request for a target service issued by a user on a client to a target server, so that the target server processes the operation request; the method includes: in the process of forwarding the operation request to the target server, sending the operation request to a log processing device, and causing the log processing device to analyze the operation request; in the process of returning the request result in the request feedback to the client, sending the request feedback including processing key information and the request result to the log processing device, and causing the log processing device to analyze the request feedback; wherein the request feedback is sent by the target server, and the processing key information indicates the processing logic of the target server when processing the operation request.

[0023] In summary, the log analysis method provided in this application can analyze the key information that needs to be recorded in the log, such as operation requests and request feedback, before the log content is processed for compliance. Therefore, the complete log content can be obtained during the analysis process, ensuring that the log content can be fully stored in the database, greatly improving the accuracy of log analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. The following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A flow chart of a log processing method provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of the structure of the log processing system provided in an embodiment of the present application;

[0027] Figure 3 A flowchart of another log processing method provided in an embodiment of the present application;

[0028] Figure 4 A flowchart of another log processing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In the existing technology, the BS (Browser / Server) architecture supports users to perform target operations on the target service provided by the server through the browser interface on the client (network device); in actual operation, the user can issue an operation request for the target operation on the target service through the client, and the operation request is first sent to the gateway device. The gateway device selects the target server from multiple servers for selection according to the preset selection logic (such as the load balancing algorithm); the gateway device forwards the operation request to the target server, and instructs the target server to process the operation request to obtain the request result; the gateway device is also used to send the request result to the client, so that the user knows the operation result of the target operation.

[0030] In actual applications, when the above-mentioned process for the target operation is completed, the target service will generate a corresponding log. Before the log is generated, the target service usually needs to perform compliance processing on the log content to desensitize, encrypt or discard sensitive information in the log content. After the compliance processing, the log content is recorded in a log file, and the log analysis service configured in the target server subsequently analyzes and processes the log file.

[0031] In summary, since the log content in the log file has been processed for compliance before the log processing service analyzes it, in many cases the complete log content cannot be obtained during the analysis process, which further leads to inaccurate log analysis results.

[0032] In order to solve the above technical problems, an embodiment of the present application provides a technical solution for log processing. This technical solution expands the functions of the gateway device and multiple servers in the BS architecture, so that the gateway device and the server can not only perform their respective "main jobs" but also their respective "part-time jobs".

[0033] In the prior art, the process of processing an operation request and the process of analyzing the log corresponding to the operation request are two completely independent processes; wherein, in the process of processing an operation request, the operation request is sent by the client to the gateway device, which is then forwarded to the target server by the gateway device, and the processing key information and request result are obtained after the target server processes the operation request. The target server sends the request result to the gateway device, and the gateway device then sends the request result to the client; in the process of analyzing the log corresponding to the operation request, if the target service in the target server integrates the operation request, processing key information and request result corresponding to the target operation into a log, the log processing service in the target server subsequently analyzes the log.

[0034] In an embodiment of the present application, the processing process for the operation request and the analysis process for the log corresponding to the operation request are carried out simultaneously, and the implementation method includes: ① Instructing the target server to undertake the "main job" of "sending the request result to the gateway device" and also undertake the "part-time job" of "sending the key processing information to the gateway device"; ② Instructing the gateway device to undertake the "main job" of "forwarding the operation request sent by the client to the target server" and "forwarding the request result sent by the target server to the target server" and also undertake the "part-time job" of "forwarding the operation request sent by the client to the log processing device" and "sending the request result and key processing information sent by the target server to the log processing device" to obtain a "log" that has not been subject to compliance check.

[0035] In summary, since the embodiment of the present application can record the operation request, request result and processing key information as log content in stages in the log file before the target service, that is, send the above information to the log processing device in stages, so that the log processing device completes the analysis of the key information in the "backup log" before the log file is generated, the complete log content can be obtained during the analysis process, so the accuracy of the log analysis can be greatly improved.

[0036] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] First, the present application provides a log processing method, which is applied to a gateway device in a log processing system. The gateway device is used to forward an operation request for a target service issued by a user on a client to a target server, so that the target server processes the operation request; Figure 1 and Figure 2 As shown, Figure 1 A flow chart of a log processing method provided in an embodiment of the present application is provided. Figure 2 This is a structural diagram of the log processing system provided in an embodiment of the present application. The method includes: S110 to S120, as detailed below:

[0038] S110: In the process of forwarding the operation request to the target server, the operation request is sent to the log processing device, and the log processing device is instructed to analyze the operation request.

[0039] Specifically, if Figure 2As shown, the log processing system includes: a gateway device 200, a target server 300, a message queue 400, a log processing device 500, a database 600 and a log library 700; wherein the gateway device 200 is connected to the client 100, the target server 300, the message queue 400 and the database 600 respectively, the message queue 400 is also connected to the log processing device 500, and the log processing device 500 is also connected to the log library 700. In the embodiment of the present application, as Figure 2 As shown in ③, ④, ⑤ and ⑥, when a user issues an operation request for a target service on the client 100, the operation request is sent to the gateway device 200. The gateway device 200 selects a target server 300 from multiple candidate servers according to the operation request. After determining the target server 300, the gateway device 200 sends the operation request to the target server 300. The gateway device 200 also sends the operation request to the message queue 400, and the message queue 400 then sends the operation request to the log processing device 500; as shown in FIG. Figure 2 ⑨, ⑩, and As shown, after the target server 300 processes the operation request and obtains a request feedback including the request result and processing key information, the gateway device 200 only sends the request result in the request feedback to the client 100, and the gateway device 200 also sends the request result and processing key information to the message queue 400, and the message queue 400 then sends the request feedback including the request result and processing key information to the log processing device 500.

[0040] It should be emphasized that the process of the gateway device 200 forwarding the operation request to the target server 300 and the process of the gateway device 200 sending the operation request to the log processing device 500 can be performed synchronously or asynchronously. Figure 2 ④ and ⑤ in the above can be performed synchronously or asynchronously. Figure 2 ⑩ and It can be performed synchronously or asynchronously, and this application does not make any specific limitation on this.

[0041] In actual operation, in addition to the function of determining the target server 300 among multiple servers, the gateway device 200 may also have an authentication function, such as determining whether the user corresponding to the operation request has the authority to send the operation request based on a preset access control policy; wherein, if the gateway device 200 determines that the user has the authority to send the operation request, the gateway device 200 selects the target server 300 for the operation request, and then sends both the operation request and the authentication information as key information of the log to the log processing device 500 via the message queue 400; if the gateway device 200 determines that the user does not have the authority to send the operation request, the gateway device 200 will not select the target server 300 for the operation request, but the gateway device 200 will send both the operation request and the authentication information as key information of the log to the log processing device 500 via the message queue 400.

[0042] It should be emphasized that if the gateway device 200 determines that the user has the authority to send the operation request, after the log processing device 500 analyzes the received operation request and authentication information, the request feedback corresponding to the operation request also needs to be sent to the log processing device 500 via the message queue 400. After the log processing device 500 analyzes the request feedback, the "log analysis process" corresponding to the operation request is completed.

[0043] If the gateway device 200 determines that the user does not have the authority to send the operation request, the key information of the log corresponding to the operation request is complete. After the log processing device 500 analyzes the operation request and authentication information, the "log analysis process" corresponding to the operation request ends.

[0044] In one implementation, the gateway device 200 and the log processing device 500 are also connected to the message queue 400; the operation request includes: an interface identifier for indicating an interface, the interface being the interface used when the client 100 sends the operation request to the gateway device 200; the gateway device 200 stores a target configuration table, the target configuration table is retrieved from the database 600, and the target configuration table indicates the correspondence between the interface identifier and the topic identifier of the topic in the message queue; S110 includes: steps (1) to (2), the details of which are as follows:

[0045] Step (1): According to the interface identifier in the operation request, determine the subject identifier corresponding to the interface identifier in the target configuration table.

[0046] Specifically, in actual applications, the number of clients 100 and target servers 300 connected to the gateway device 200 is very large, so the number of key information (such as operation requests, request feedback, etc.) that needs to be recorded in the log sent to the log processing device 500 is larger. Therefore, in order to improve the efficiency of the log processing device 500 in analyzing key information, the embodiment of the present application sets a message queue 400 between the gateway device 200 and the log processing device 500, and realizes the alleviation of data flow through the message queue 400 and the classification of data flow through different topics in the message queue 400.

[0047] In an embodiment of the present application, a target configuration table is set for the correspondence between the interface identifier for indicating the interface, the topic identifier for indicating the topic in the message queue 400, and the log processing script. There is a one-to-one correspondence between multiple interface identifiers, multiple topic identifiers, and multiple log processing scripts, so that the operation request, processing key information, and request result corresponding to each interface identifier are all processed by a corresponding log processing script. In actual application, the gateway device 200 can determine the topic identifier of the topic corresponding to the operation request based on the correspondence between the interface identifier in the operation request and the interface identifier and topic identifier recorded in the target configuration table.

[0048] In the embodiment of the present application, the target configuration table is pre-set in the database 600, such as Figure 2 As shown in ②, ⑤ and ⑩, whenever the target configuration table of the correspondence between the interface identifier, the topic identifier and the log processing script in the database 600 is updated, the gateway device 200 actively obtains the target configuration table. Subsequently, when the gateway device 200 receives an operation request and a request feedback including a request result and processing key information, the gateway device 200 determines the topic identifier of the topic in the message queue 400 in the target configuration table according to the interface identifier in the operation request and the request feedback, and subsequently sends the operation request and the request feedback to the corresponding topic in the message queue 400.

[0049] In actual operation, the operation request may also include at least: service name, service code, service first startup time, service restart time, service version number and service interface information; the interface identifier may include at least: interface name, interface address, interface code, interface version, interface request parameter information and interface return parameter information; in actual application, the operation request and interface identifier may also include more information, and this application does not make specific limitations on this.

[0050] In actual operation, the data format of the interface identifier and the subject identifier can be determined according to actual needs, and this application does not make any specific restrictions on this.

[0051] Step (2): According to the topic identifier, the operation request is sent to the corresponding topic in the message queue.

[0052] Specifically, after the gateway device 200 determines the topic identifier corresponding to the operation request, it sends the operation request to the corresponding topic; subsequently, the operation request is sent from the topic to the log processing device 500.

[0053] S120: In the process of forwarding the request result in the request feedback to the client, the request feedback including the key processing information and the request result is sent to the log processing device, so that the log processing device analyzes the request feedback.

[0054] The request feedback is sent by the target server, and the key processing information indicates the processing logic of the target server when processing the operation request.

[0055] Specifically, if Figure 2 ⑨, ⑩ and As shown, after the target server 300 processes the operation request and provides feedback, it obtains the request feedback. The target server 300 returns the request feedback to the gateway device 200, which then sends the request result in the request feedback to the client 100 and also sends the request feedback including the request result and key processing information to the message queue 400. When the client 100 receives the request result, it displays the request result, and the user can know the request result of their operation request.

[0056] Second, the present application also provides a log processing method, which is applied to a log processing device 500 in a log processing system. The log processing device 500 is connected to a gateway device 200. The gateway device 200 is used to forward an operation request for a target service issued by a user on a client 100 to a target server 300, so that the target server 300 processes the operation request; Figure 3 As shown, Figure 3 A flow chart of another log processing method provided in an embodiment of the present application, the method includes: S210 to S220, the details of which are as follows:

[0057] S210: In response to receiving the operation request forwarded by the gateway device, analyzing the operation request to obtain a first analysis result.

[0058] Specifically, if Figure 2 As shown in ⑥, after the log processing device 500 receives the operation request, it analyzes the key information required to be recorded in the log of the operation request to obtain a first analysis result.

[0059] In actual operation, the method of analyzing the operation request can be determined according to actual needs, and this application does not make any specific limitations on this.

[0060] In one implementation, the log processing device 500 is further connected to the database 600; the operation request includes: a subject identifier for indicating an interface, the interface being the interface used when the client sends the operation request to the gateway device; the log processing device 500 stores a target configuration table, the target configuration table being retrieved from the database 600, and the target configuration table indicating the correspondence between the interface identifier and the log processing script; S210 includes: steps (3) to (4), the details of which are as follows:

[0061] Step (3): According to the interface identifier in the operation request, determine the log processing script corresponding to the interface identifier in the target configuration table.

[0062] Specifically, in actual applications, logs from different interfaces require different analysis logic. In an embodiment of the present application, different log processing scripts are configured for logs from different interfaces and different log processing scripts are pre-stored in the database; in actual applications, the correspondence between the interface identifier and the log processing script also needs to be pre-stored in the database.

[0063] In actual operation, every time the log processing device 500 receives an operation request, the log processing device 500 calls the corresponding log processing script in the target configuration table according to the interface identifier in the operation request.

[0064] Specifically, in the embodiment of the present application, the log processing script can analyze and process both the operation request and the request feedback including the request feedback and the request key information, so it will not be described in detail here. Processing Key Information Step (4): Run the log processing script to analyze the operation request to obtain a first analysis result.

[0065] Specifically, the log processing device 500 may analyze the operation request by running the log processing script to obtain the first analysis result.

[0066] S220: In response to receiving the request feedback forwarded by the gateway device, analyzing the requested feedback to obtain a second analysis result;

[0067] Among them, the request feedback is sent by the target server to the gateway device, and the request feedback includes processing key information and request results. The processing key information indicates the processing logic of the target server when processing the operation request, and the request result is the request result obtained after processing the operation request.

[0068] Specifically, after receiving the operation request, the log processing device 500 analyzes the request feedback to obtain a second analysis result.

[0069] In one implementation, both the operation request and the request feedback include: a link ID; after S220, the method further includes: steps (5) to (6), the details of which are as follows:

[0070] Step (5): Based on the link ID, the operation request and request feedback corresponding to the same link ID are integrated in a log format to obtain a log.

[0071] Step (6): Based on the link ID, the first analysis result and the second analysis result corresponding to the same link ID are integrated into a log analysis result corresponding to the log.

[0072] Specifically, in actual operation, Figure 2 in As shown, after analyzing the operation request and request feedback in turn, the log processing device 500 can integrate the operation request and request feedback according to the log format to obtain a "log" in log form, and can also integrate the first analysis result and the second analysis result to obtain a log analysis result corresponding to the "log". The above "log" and "log analysis result" can both be stored in the log library 700 for subsequent queries.

[0073] In actual operation, the target configuration table also includes a log storage script and a log display script corresponding to the interface identifier. Similar to using the log processing script in the target configuration table, the log processing device 500 can also call the above-mentioned log storage script from the target configuration table according to real-time needs; wherein, the log storage script is used to store different logs or log analysis results in the log library 700.

[0074] In actual operation, a log display device can be configured in the log processing system, which can be used by users to query logs and log analysis results; when the user issues an operation request (a request to query logs or log analysis results) on the log display device, the log display device retrieves the log display script corresponding to the interface identifier from the target configuration table based on the interface identifier included in the operation request and runs the log display script to visually display different logs or log analysis results in the log library 700.

[0075] Third, the present application also provides a log processing method, which is applied to a target server 300 in a log processing system, wherein the target server 300 is connected to a gateway device 200, and the gateway device 200 is also connected to a log processing device 500; Figure 4 As shown, Figure 4A flow chart of another log processing method provided in an embodiment of the present application is provided. The method includes: S310 to S320, and the details are as follows:

[0076] S310: In response to receiving an operation request for a target service sent by a user on a client and forwarded by a gateway device, processing the operation request to obtain request feedback;

[0077] The request feedback includes: key processing information and request result. The key processing information indicates the processing logic when processing the operation request, and the request result is the request result obtained after processing the operation request.

[0078] S320: Return the request feedback to the gateway device, so that the gateway device returns the request result in the request feedback to the client and sends the request feedback to the log processing device.

[0079] In one implementation, the operation request and the request feedback include: an interface identifier for indicating an interface, where the interface is the interface used when the client sends the operation request to the gateway device; the target server is connected to the database; before S310, the method further includes: steps (7) to (8), the details of which are as follows:

[0080] Step (7): in response to the code update of the target service, scanning the current code of the target service to determine whether the current code meets the preset conditions;

[0081] The preset condition indicates that when the target service runs with the current code, the target configuration table in the database is updated.

[0082] Specifically, the target service configured in the target server 300 will be updated. When the target service is updated, the log processing script in the target configuration table needs to be updated according to the updated content of the target service to avoid the log processing device 500 being unable to obtain the corresponding log processing script to analyze the operation request, including processing key information and request results.

[0083] In actual operation, in order to ensure that the correspondence between the log processing script and the log processing script in the target configuration table can be updated accordingly as the target service is updated, it is necessary to write the relevant content into the code of the target service, that is, write it into the current code of the target service.

[0084] In actual operation, in order to ensure that the relevant content has been written into the code of the target service, it is necessary to use a code scanning tool to scan the updated current code of the target service to ensure that the target configuration table in the database is updated when the target service runs with the current code.

[0085] Step (8): Run the current code to update the target configuration table in the database;

[0086] The target configuration table indicates the correspondence between the interface identifier and the log processing script. The log processing script is retrieved from the target configuration table and executed by the log processing device to implement analysis and feedback of the operation request.

[0087] Specifically, after the target service runs the current code, the target configuration table in the database 600 can be updated; Figure 2 As shown in ② and ⑧, the gateway device 200 and the log processing device 500 can both obtain the updated target configuration table from the database 600, which is used to respectively obtain the correspondence between the updated interface identifier and the subject identifier and the correspondence between the updated interface identifier and the log processing script.

[0088] In summary, the log analysis method provided in the embodiment of the present application can analyze the key information required to be recorded in the log, such as operation requests and request feedback, before the log is processed for compliance. Therefore, the complete log content is obtained during the analysis process, ensuring that the log is fully stored, and greatly improving the accuracy of the log analysis; in addition, the log analysis method provided in the embodiment of the present application also has the advantage of "differentiability", which differentiates various functions for processing logs into various log processing scripts. When the log processing script is needed, the log processing script is called in the target configuration table. When the log processing script is run, the corresponding processing function can be implemented, greatly improving the efficiency and accuracy of processing the log. Fourth, the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor. When the processor executes the computer program, the steps S110 to S120, the steps S210 to S220, or the steps S310 to S320 provided in the above embodiment are implemented.

[0089] Fifth, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, steps S110 to S120, steps S210 to S220, or steps S310 to S320 of the above-mentioned embodiment are executed.

[0090] Sixth, the computer program product provided in the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. For specific implementation, please refer to steps S110 to S120, steps S210 to S220 or steps S310 to S320 of the method embodiment, which will not be repeated here.

[0091] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0092] In addition, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple 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.

[0093] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0094] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a node device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0095] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.

[0096] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A log processing method, characterized in that: Applied to a gateway device, the gateway device is used to forward an operation request for a target service issued by a user on a client to a target server, so that the target server processes the operation request; the method comprises: In the process of forwarding the operation request to the target server, the operation request is sent to a log processing device, so that the log processing device analyzes the operation request; In the process of returning the request result in the request feedback to the client, the request feedback including the processing key information and the request result is sent to the log processing device, so that the log processing device analyzes the request feedback; The request feedback is sent by the target server, and the key processing information indicates the processing logic of the target server when processing the operation request.

2. The method according to claim 1, characterized in that: The gateway device and the log processing device are also connected to a message queue; the operation request includes: an interface identifier for indicating an interface, the interface is the interface used by the client to send the operation request to the gateway device; a target configuration table is stored in the gateway device, the target configuration table is retrieved from a database, and the target configuration table indicates the correspondence between the interface identifier and the subject identifier of the subject in the message queue; sending the operation request to the log processing device includes: According to the interface identifier in the operation request, determining the subject identifier corresponding to the interface identifier in the target configuration table; According to the topic identifier, the operation request is sent to the corresponding topic in the message queue.

3. A log processing method, characterized in that: Applied to a log processing device, the log processing device is connected to a gateway device, the gateway device is used to forward an operation request for a target service issued by a user on a client to a target server, so that the target server processes the operation request; the method comprises: In response to receiving the operation request forwarded by the gateway device, analyzing the operation request to obtain a first analysis result; In response to receiving the request feedback forwarded by the gateway device, analyzing the requested feedback to obtain a second analysis result; Among them, the request feedback is sent by the target server to the gateway device, and the request feedback includes processing key information and request results. The processing key information indicates the processing logic of the target server when processing the operation request, and the request result is the request result obtained after processing the operation request.

4. The method according to claim 3, characterized in that The log processing device is also connected to a database; the operation request includes: an interface identifier for indicating an interface, the interface is the interface used by the client to send the operation request to the gateway device; the log processing device stores a target configuration table, the target configuration table is retrieved from the database, and the target configuration table indicates the correspondence between the interface identifier and the log processing script; the first analysis result obtained by analyzing the operation request includes: According to the interface identifier in the operation request, determining the log processing script corresponding to the interface identifier in the target configuration table; The log processing script is run to analyze the operation request to obtain the first analysis result.

5. The method according to claim 3, characterized in that: The operation request and the request feedback both include: a link ID; after the second analysis result is obtained by analyzing the requested feedback, the method further includes: According to the link ID, the operation request and the request feedback corresponding to the same link ID are integrated in a log format to obtain the log; According to the link ID, the first analysis result and the second analysis result corresponding to the same link ID are integrated to obtain a log analysis result corresponding to the log.

6. A log processing method, characterized in that: Applied to a target server, the target server is connected to a gateway device, and the gateway device is also connected to a log processing device; the method includes: In response to receiving an operation request for a target service sent by a user on a client and forwarded by the gateway device, processing the operation request to obtain request feedback; The request feedback includes: key processing information and request result, wherein the key processing information indicates the processing logic when processing the operation request, and the request result is the request result obtained after processing the operation request; The request feedback is returned to the gateway device, so that the gateway device returns the request result in the request feedback to the client and sends the request feedback to the log processing device.

7. The method according to claim 6, characterized in that The operation request and the request feedback include: an interface identifier for indicating an interface, the interface being the interface used by the client to send the operation request to the gateway device; the target server is connected to a database; before the operation request is processed to obtain the request feedback, the method further includes: In response to the code update of the target service, scanning the current code of the target service to determine whether the current code meets a preset condition; Wherein, the preset condition indicates that when the target service is run with the current code, the target configuration table in the database is updated; Running the current code to update the target configuration table in the database; The target configuration table indicates the corresponding relationship between the interface identifier and the log processing script, and the log processing script is retrieved and executed by the log processing device from the target configuration table to implement analysis and feedback of the operation request.

8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store an application, and the processor runs or executes a software program stored in the memory so that the electronic device implements the log processing method according to any one of claims 1 to 2, any one of claims 3 to 5, or any one of claims 6 to 7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a program code executed by a processor, wherein the program code is used to implement the log processing method according to any one of claims 1 to 2, any one of claims 3 to 5, or any one of claims 6 to 7.

10. A computer program product, characterized in that The computer program product includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device implements the log processing method according to any one of claims 1 to 2, any one of claims 3 to 5, or any one of claims 6 to 7.