A log processing method, device, equipment and medium

By dynamically determining the log query conditions and processing requirements, providing general log query services, solving the problem of poor reusability of log query services in the existing technology, and improving the flexibility and efficiency of log query.

CN113468115BActive Publication Date: 2024-12-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110833789.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-23
Publication Date
2024-12-06
Estimated Expiration
2041-07-23

AI Technical Summary

Technical Problem

In the prior art, the log query process is difficult to reuse due to the different authentication requirements and processing logic of each service, and lacks flexibility, which in turn reduces the efficiency of log query.

Method used

By receiving log query requests, searching registration information based on the identification of the target log set, dynamically determine query conditions and processing requirements, querying and processing of candidate logs is realized, and a set of general log query services are provided to avoid duplicate development.

Benefits of technology

It improves the flexibility of access permissions and processing requirements in the log query process, meets the dynamic filtering and processing needs of different query requests, and improves the efficiency of log query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113468115B_ABST
    Figure CN113468115B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a log processing method, device, equipment and medium, wherein the method includes: receiving a log query request; searching for registration information of a target log set based on a log set identifier of a target log set; determining a target query condition according to the log query request and the access permission information of the target log set, and obtaining at least one candidate log from the target log set according to the target query condition; determining a registration processing requirement according to the log query request and the registration processing information of the target log set, and processing at least one candidate log according to the registration processing requirement to obtain a log query result. The embodiment of the present application can improve the flexibility of managing access permission information and registration processing information during the log query process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] A platform often contains multiple services (or service systems), and each service needs to use logs to record the relevant operations performed on the service; therefore, it is particularly important to query the logs to display the logs or for other services to query to generate alarm information.

[0003] The existing technology is to develop a set of query services for each service one by one based on the authentication requirements, query conditions and other information of each service; when a user needs to query the log of any service, the query service developed for that service can be used to implement log query. In this way, the query process of logs under each service is fixed, and query services under different services are difficult to reuse, which leads to the inflexibility of the log query process. How to improve the flexibility of the log query process has become a hot research topic. Summary of the invention

[0004] The embodiments of the present application provide a log processing method, apparatus, device and medium, which can improve the flexibility of managing access permission information and registration processing information during the log query process.

[0005] On the one hand, an embodiment of the present application provides a log processing method, the method comprising:

[0006] Receive a log query request, where the log query request includes a log set identifier of a target log set requested for query;

[0007] Searching for registration information of the target log set based on the log set identifier of the target log set, where the registration information of the target log set includes access permission information and registration processing information of the target log set;

[0008] Determine a target query condition according to the log query request and the access permission information of the target log set, and obtain at least one candidate log from the target log set according to the target query condition;

[0009] Determine the registration processing requirements according to the log query request and the registration processing information of the target log set, and process at least one candidate log according to the registration processing requirements to obtain the log query result

[0010] On the other hand, an embodiment of the present application provides a log processing device, the device comprising:

[0011] An acquisition unit, configured to receive a log query request, wherein the log query request includes a log set identifier of a target log set requested for query;

[0012] A processing unit, configured to search for registration information of a target log set based on a log set identifier of the target log set, wherein the registration information of the target log set includes access permission information and registration processing information of the target log set;

[0013] The processing unit is further used to determine a target query condition according to the log query request and the access permission information of the target log set, and obtain at least one candidate log from the target log set according to the target query condition;

[0014] The processing unit is further used to determine the registration processing requirement according to the log query request and the registration processing information of the target log set, and process at least one candidate log according to the registration processing requirement to obtain the log query result.

[0015] In one implementation, the log query request further includes a query processing requirement; the processing unit is further configured to:

[0016] Process the log query result according to the query processing requirement to obtain a log query response result;

[0017] The log query response result is returned to the querying party.

[0018] In one implementation, the access permission information includes at least one access permission, authorized user information corresponding to each access permission, and query condition information under each access permission; the log query request also includes the identity information of the querying party and the candidate query condition; the processing unit is used to determine the target query condition according to the log query request and the access permission information of the target log set, specifically for:

[0019] Determine the target access rights that the inquiring party has based on the inquiring party's identity information and the authorized user information corresponding to each access right;

[0020] Generate a registration query condition based on the query condition information under the target access permission;

[0021] The registered query conditions and the candidate query conditions are determined as target query conditions.

[0022] In one implementation, the query condition information under the target access right defines a query rule; when the processing unit is used to generate the registration query condition based on the query condition information under the target access right, it is specifically used to:

[0023] The query rule in the query condition information is determined as the registered query condition.

[0024] In one implementation, the query condition information under the target access right includes a first code segment, and the first code segment defines a query function; when the processing unit is used to generate the registration query condition based on the query condition information under the target access right, it is specifically used to:

[0025] Determine the log query request as input information of the query function;

[0026] The first code snippet is called to run the query function, the log query request is processed, and the registration query condition is obtained.

[0027] In one implementation, the query condition information under the target access right includes a condition management interface provided by a registrant of the target log set; when the processing unit is used to generate a registration query condition based on the query condition information under the target access right, it is specifically used to:

[0028] Call the condition management interface to send the log query request to the registrant of the target log set;

[0029] Receive the registration query conditions returned by the registrant through the condition management interface.

[0030] In one implementation, the registration processing information includes at least one registration processing authority, authorized user information corresponding to each registration processing authority, and processing information under each registration processing authority; the log query request also includes identity information of the querying party; the processing unit is used to determine the registration processing requirement according to the log query request and the registration processing information of the target log set, specifically for:

[0031] Determine the target registration processing authority possessed by the inquiring party based on the identity information of the inquiring party and the authorized user information corresponding to each registration processing authority;

[0032] A registration processing request is generated based on the processing information under the target registration processing authority.

[0033] In one implementation, the processing information under the target registration processing authority defines the registration processing rules; when the processing unit is used to generate the registration processing requirements based on the processing information under the target registration processing authority, it is specifically used to:

[0034] The registration processing rules defined by the processing information are determined as registration processing requirements.

[0035] In one implementation, the processing information under the target registration processing authority includes a second code segment, and the second code segment defines a registration processing function; when the processing unit is used to generate a registration processing requirement based on the processing information under the target registration processing authority, it is specifically used to:

[0036] Determine the log query request as input information of the registration processing function;

[0037] The second code snippet is called to run the registration processing function, process the log query request, and obtain the registration processing requirement.

[0038] In one implementation, the processing information under the target registration processing authority includes a registration processing interface provided by a registrant of the target log set; when the processing unit is used to generate a registration processing requirement based on the processing information under the target registration processing authority, it is specifically used to:

[0039] Call the registration processing interface to send the log query request to the registrant of the target log set;

[0040] Receive the registration processing request returned by the registrant.

[0041] In one implementation, the processing unit is further configured to:

[0042] Receiving a log editing request sent by a registrant of a target log set, where the log editing request is used to request editing of registration information of the target log set;

[0043] In response to the log editing request, an editing operation is performed on the registration information of the target log set to obtain updated registration information of the target log set;

[0044] The editing operation includes one or more of a adding operation, a modifying operation and a deleting operation.

[0045] In one implementation, the registration information of the target log set is stored in a log set storage space, and the log set storage space stores the registration information of multiple log sets; each log set is used to record a log generated in a service system; when the processing unit is used to receive a log query request, it is specifically used to:

[0046] Call the log query service interface to receive the log query request;

[0047] The log query service interface is compatible with multiple service systems, and is used to receive a query request for a log set corresponding to any service system.

[0048] On the other hand, an embodiment of the present application provides a log processing device, the log processing device comprising:

[0049] a processor adapted to execute a computer program;

[0050] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the log processing method described above is implemented.

[0051] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions, and the computer program is suitable for being loaded by a processor and executing the log processing method as described above.

[0052] On the other hand, an embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a log processing device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the log processing device performs the above-mentioned log processing method.

[0053] In an embodiment of the present application, it is possible to determine the target query condition based on the log query request sent by the querying party and the registration information of the target log set registered by the registrant, and use the log query request to query at least one candidate log; then determine the registration processing requirements based on the log query request and the registration processing information, and process at least one candidate log according to the registration processing requirements to obtain the log query result. In the above scheme, the target query condition for querying at least one candidate log is dynamically determined based on the log query request and the registration information of the target log set, and the registration processing requirements for processing at least one candidate log are also dynamically determined based on the log query request and the registration information of the target log set, which improves the flexibility of managing access rights and processing requirements during the log query process, can meet the needs of dynamically screening and processing candidate logs according to different query requests, and improves the efficiency of log query. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A schematic diagram of the architecture of a log processing system provided by an exemplary embodiment of the present application is shown;

[0056] Figure 2 A flow chart of a log processing method provided by an exemplary embodiment of the present application is shown;

[0057] Figure 3 A schematic diagram of a log query request provided by an exemplary embodiment of the present application is shown;

[0058] Figure 4 A schematic diagram showing registration information of a target log set provided by an exemplary embodiment of the present application is shown;

[0059] Figure 5A schematic diagram of a process for determining a target query condition based on a log query request and access permission information of a target log set provided by an exemplary embodiment of the present application is shown;

[0060] Figure 6 A schematic diagram of a process of querying at least one candidate log based on a target query condition provided by an exemplary embodiment of the present application is shown;

[0061] Figure 7 A schematic diagram of a process for determining a registration processing requirement according to a log query request and registration processing information of a target log set provided by an exemplary embodiment of the present application is shown;

[0062] Figure 8 A schematic diagram of a process for processing at least one candidate log according to a registration processing requirement to obtain a log query result is shown in an exemplary embodiment of the present application;

[0063] Fig. 9 A flow chart of a log processing method provided by an exemplary embodiment of the present application is shown;

[0064] Fig.10 A schematic diagram of a process for determining a target query condition and a target processing requirement provided by an exemplary embodiment of the present application is shown;

[0065] Fig.11 A schematic diagram of sorting and displaying logs provided by an exemplary embodiment of the present application is shown;

[0066] Fig.12 A schematic diagram of the structure of a log processing device provided by an exemplary embodiment of the present application is shown;

[0067] Fig.13 A structural schematic diagram of a log processing device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0069] The embodiments of the present application relate to logs (or log files), which are text objects composed of some unordered key-value pairs; for example, logs may include but are not limited to: JSON objects, any data row in any data table in a database (such as a relational database), data generated by recording related operations (such as access operations, deletion operations, browsing operations, etc.) generated during the operation of the platform (or operating system, application, network equipment, etc.), etc. Each key-value pair in the log is also called a tag, where the key is called the tag name and the value is called the tag value; the expression form of the tag value may include but is not limited to: text, number, object, array (such as an array including text, number or object). It is worth noting that the log does not necessarily display the tag name of each tag, that is, the tag names of multiple tags contained in the log may be the same, in which case the tag name can be displayed in only one location of the log file; for example, a log that records the related operations of any data table in a relational database, the tag name of each tag can be implicitly specified by the header of any data table.

[0070] The platforms mentioned above may include but are not limited to: application platforms, network platforms, machine learning platforms, etc.; among them, machine learning platforms are also called intelligent machine learning platforms (or intelligent titanium platforms), which are learning platforms that provide full-process training capabilities for machine learning (ML). Machine learning is a multi-disciplinary cross-discipline involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines; it specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and inductive learning.

[0071] The platform often contains different services (or service systems), each service can correspond to one or more log sets, and any log set contains logs related to the service; for example, when the target service (such as any service) is connected to 5 data sources, if the registrant wishes to expose 3 of the 5 data sources, 3 log sets can be created, that is, the target service corresponds to 3 log sets; the embodiment of the present application does not limit the number of log sets corresponding to the service, which is explained here. For example, the machine learning platform includes a training management service (or training service) for network models (such as neural network models), a management service for model reasoning (or reasoning service), a permission management service, a platform management service, and the like. Among them, the log set corresponding to the training service may include: a log that records error information during the network model training process. The log set corresponding to the reasoning service may include: a log that records interface call information during the network model reasoning process. The log set corresponding to the platform management service may include: a log that records user operations (such as creation, deletion, and change operations on projects).

[0072] At present, the query services developed by developers for each service can be used to query the logs under different services. For example: if the platform contains 3 services, then 3 independent query services need to be developed for the 3 services; when the querying party wants to query the logs under the target service (such as any service), the query service developed for the target service can be called to query. It is not difficult to find that since the query authority requirements (such as query conditions, authentication requirements, etc.) and processing logic (such as post-processing requirements, etc.) of each service for the log are different, and the implementation logic is quite different, the query services (or query modules) developed for each service are difficult to reuse, and the query logic provided by the query services developed for each service is fixed, which makes the flexibility of log query low and reduces the efficiency of log query. Based on this, an embodiment of the present application provides a log processing solution, which decouples log query from setting access rights and processing requirements for log query, thereby providing a set of general log query services for log queries under different services. The log query service supports querying logs under different services; and, the registrants of different services only need to specify or implement how to obtain the access rights and processing requirements for the logs, which can avoid the registrants of different services from repeatedly developing log query services simply because of different access rights and processing requirement logics; and, using a set of general log query services to query logs under different services can improve the efficiency of log queries.

[0073] The log query process of the log processing scheme provided by the embodiment of the present application may generally include: receiving a log query request sent by a querying party, the log query request including a log set identifier of a target log set requested for query, the target log set corresponding to a service system (or service); the registration information of the target log set can be found according to the log set identifier, the registration information is obtained by the registration party of the target log set; then the target query condition can be obtained according to the log query request and the registration information of the target log set, and at least one candidate log can be obtained by querying with the target query condition; then the registration processing requirement is determined based on the log query request and the registration processing information of the target log set, and the registration processing requirement is used to process at least one candidate log, and the log query result can be obtained. In the above scheme, the target query condition for querying the candidate log is dynamically determined based on the log query request and the registration information of the target log set, and the registration processing requirement for processing at least one candidate log is also dynamically determined based on the log query request and the registration information of the target log set, which improves the flexibility of managing access rights and processing requirements in the log query process, can meet the needs of dynamically screening and processing candidate logs according to different query requests, and improves the query efficiency of logs.

[0074] To better understand the log processing solution proposed in the embodiment of the present application, Figure 1 The log processing system shown in FIG. 1 provides a detailed description of the log query scenario; Figure 1 As shown, the log processing system may include a query terminal 101, a computer device 102 and a data source 103. The embodiment of the present application does not limit the name and quantity of each device included in the log processing system (such as the query terminal 101, the computer device 102 and the data source device 103). The various devices included in the log processing system can be directly or indirectly connected to each other through limited or wireless means. The embodiment of the present application does not limit the communication method between devices; for example: the communication method between devices may include but is not limited to: using HTTP requests, remote procedure calls (Remote Procedure Call), sockets (Socket) and shared content. The following is a brief introduction to each device included in the log processing system, including:

[0075] The query terminal 101 is a terminal device used by the querying party to query the log, and the terminal device may include but is not limited to: smart phones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, mobile Internet devices (Mobile Internet Devices, referred to as MID), smart TVs, car-mounted devices, head-mounted devices and other smart devices. Optionally, if the desired program log is an application log, an application with the function of querying the application log is deployed in the query terminal 101. When the application is opened and used, a log query request can be generated to request the query log.

[0076] Computer device 102 is a device for executing log query. Specifically, a log query service is deployed in the computer device, and log query can be implemented using the log query service. The computer device may include, but is not limited to: terminal devices such as personal computers, smart phones, tablet computers, laptop computers, desktop computers, edge computing devices, embedded devices, etc.; or service devices such as data processing servers, web servers, application servers, etc. The server may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services. The server here may also be a node server on the blockchain.

[0077] Data source 103 is a device for storing logs. Data source 103 may include but is not limited to: database management system (such as relational database management system, non-relational database management system), full-text search engine, text file, cloud storage, cloud database, data storage based on blockchain, etc. Among them, cloud storage is a new concept extended and developed from the concept of cloud computing. Distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types in the network (storage devices are also called storage nodes) through application software or application interfaces to work together and provide data storage and business access functions to the outside world. In short, a cloud database can be regarded as an electronic file cabinet - a place to store electronic files. Users can add, query, update, delete, and other operations on the data in the file. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application program.

[0078] The following is a brief introduction to the process of log query by taking the query terminal 101, the computer device 102 and the data source 103 jointly executing the log processing scheme as an example: First, the query party with log query requirements can send the log query request from the query device 101 to the computer device 102 through a network connection. Secondly, after the computer device 102 obtains the log query request, it can search for the registration information of the target log set from the log set storage space based on the log query request. The registration information is obtained by the registration party of the target log set, and the registration information includes access permission information and registration processing information; the computer device 102 determines the target query condition based on the access permission information of the target log set and the log query request, and sends the target query condition to the data source 103, so as to pull at least one candidate log matching the target log query condition from the data source 103. Secondly, the computer device 103 determines the registration processing requirement based on the registration processing information and the log query request, and then processes at least one candidate log according to the registration processing requirement to obtain the log query result. Of course, if the log query request contains the candidate processing requirement, the computer device can also process the log query result according to the candidate processing requirement to obtain the log query response result. Finally, the computer device 102 returns the log query result (or log query response result) to the query device 101. Of course, if the log query request is initiated locally by the computer device 102, the computer device 102 displays the log query result (or log query response result) on the display screen.

[0079] It should be noted that ① Figure 1 The log set storage space shown is located in the computer device 102, that is, the registration information of the log set (such as the target log set) is stored in the computer device 102; but it can be understood that the registration information of the log set can also be stored in other storage spaces independent of the computer device 102, such as the registration information of the log set is stored in a cloud database, a blockchain-based database, a database, etc. ② Figure 1The number of data sources 103 shown is 1, that is, the log sets under different services are all stored in the data source 103; but it is not difficult to understand that the number of data sources 103 can be multiple, and each data source 103 can be used to store log sets under one or more services. The embodiment of the present application does not limit the storage method of the log set. ③ The computer device 102 and the query device 101 can be the same device. In this implementation, the log query request received by the computer device 102 is initiated locally; the computer device 102 and the data source 103 can also be the same device. In this implementation, the computer device 102 can query at least one candidate log through local access. ④ The computer device 102 can also receive operation requests such as registration, modification, and deletion of log sets from local or network access to realize the registration and update of the registration information of the log set.

[0080] Based on the log processing scheme described above, the embodiment of the present application proposes a more detailed log processing method. The log processing method proposed in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0081] Figure 2 A flow chart of a log processing method provided by an exemplary embodiment of the present application is shown; the log processing method can be executed by the above-mentioned computer device, and the log processing method may include but is not limited to steps S201-S204:

[0082] S201: Receive a log query request.

[0083] As described above, the embodiment of the present application supports providing a set of general log query services to query logs under different services, so the implementation method of receiving the log query request may include: calling the log query service interface to receive the log query request. Among them, the log query service interface is provided by the log query service, and is an interface that is compatible with multiple service systems (or services) (such as HTTP interface, remote system call interface, message queue, shared memory, cloud function, etc.); in other words, the log query service interface of the log query service can be used to receive query requests for the log set corresponding to any service system included in the platform. Compared to developing a log query service for each service system, the embodiment of the present application supports providing a unified log query service interface to the front-end page, application, etc. with a log query function, thereby avoiding redundant interface adaptation work and reducing the workload of interface adaptation.

[0084] Among them, the log query request may include the log set identifier of the target log set requested for query, and the log set identifier of the target log set can be used to uniquely identify the target log set. The log set identifier may include but is not limited to: the name of the service (or service system) corresponding to the target log set, so that the target log set can be found according to the log set identifier. Of course, in addition to the log set identifier of the target log set, the log query request may also include: ① request meta information; such as the request meta information may include: application type information, authentication key, query party identity information (such as identity level information), authority information and IP address, etc. Among them, the application type information may refer to the type of application running environment that generates the log query request; for example, the target application (such as IM (Instant Messaging, instant messaging) application, content interaction application, etc.) has the function of log query, then the query party can open and use the target application to initiate a log query request, so according to the different running environments of the target application, the target application type information may include: web version of the target application, mobile version of the target application, etc. The reason for distinguishing the types of applications is that the same application has different query permissions when it belongs to different types; for example, the mobile version of the target application may support returning logs recorded for social dynamic information (such as Moments), but the web version of the target application may not support returning logs recorded for social dynamic information. This way of distinguishing the types of applications can improve the security of log queries, ensure that logs are not leaked, and improve the security of log storage.

[0085] ②Candidate query conditions; candidate query conditions are a filtering condition used to filter the logs in the target log set. For example, if the candidate query condition is: the last 30 minutes, it means that the querying party wants to query the logs within the 30-minute period before the time when the log query request is initiated. ③Query processing requirements, a processing requirement for processing the queried logs (i.e. the candidate logs mentioned above) or the information of the logs. For example, the query processing requirement is: the tag value of the tag name "Detailed XX" in the log retains a maximum of 20 characters, then after querying the log containing the tag name "Tag XX", the log needs to be processed so that the characters contained in the tag value corresponding to the tag name of the log are reduced to a maximum of 20 characters. ④Aggregation conditions, conditions for aggregating the queried logs; for example, calculating the average value of the tag value under a certain tag in the queried logs; for example: the queried logs all contain the tag "region", then aggregating the queried logs may refer to counting the number of logs with the tag value of "X region" in the tag "region"; and so on. A schematic diagram of the content contained in an exemplary log query request can be seen in Figure 3 .

[0086] S202: Search for registration information of the target log set based on the log set identifier of the target log set.

[0087] The registration information of the target log set includes the access permission information and registration processing information of the target log set; of course, the registration information of the target log set may also include the meta information of the target log set (such as the log set identifier of the target log set, etc.) and the access information of the data source (i.e., the storage space storing the logs of the target log set) (such as the data source address information, key, etc.). An exemplary schematic diagram of the registration information of a target log set can be found in Figure 4 ,like Figure 4 As shown, the registration information of the target log set includes access permission information 401 , registration processing information 402 , meta information 403 of the target log set, and access information 404 of the data source.

[0088] The registration information of the target log set can be stored in the log set storage space, which can be a local storage space of the computer device, or a storage space independent of the computer device for storing the registration information of the log set. The log set storage space stores the registration information of multiple log sets, and each log set is used to record the logs generated in a service system. In other words, the log set storage space stores the registration information of the log sets corresponding to all or part of the service systems under the platform, so that the registration information of the log set corresponding to any service system under the platform can be pulled from the log set storage space through a unified log query service interface.

[0089] S203: Determine a target query condition according to the log query request and the access permission information of the target log set, and obtain at least one candidate log from the target log set according to the target query condition.

[0090] The access right information of the target log set is information used to determine the filtering conditions (or query conditions) for filtering the target log set to obtain candidate logs. Among them, the access right information includes at least one access right, the authorized user information corresponding to each access right information, and the query condition information under each access right. An exemplary access right information may include: 1. If the log query request contains a valid authentication key issued by the target service (such as any service), all logs in the target log set can be queried; 2. The administrator of project X can view all logs with the tag name "tag name X1" and the tag value "tag value X2". Then it is determined that the access right information of the target log set includes 2 access rights: access right 1 is "1. If the log query request contains a valid authentication key issued by the target service (such as any service), all logs in the target log set can be queried", the authorized user information corresponding to access right 1 is "the query party with a valid authentication key issued by the target service (such as any service)", and the query condition information under access right 1 is "query all logs in the target log set". Access permission 2 is "2. Administrators of project X can view all logs with tag name "tag name X1" and tag value "tag value X2"". The authorized user information corresponding to access permission 2 is "Administrators of project X". The query condition information under access permission 2 is "View all logs with tag name "tag name X1" and tag value "tag value X2"".

[0091] The candidate query condition is a filtering condition set by the query party and is used to filter the logs in the target log set to query the candidate logs that the query party wants to query. Figure 5The implementation process of determining the target query condition according to the log query request and the access permission information of the target log set is briefly introduced as follows: ① Determine the target access permission possessed by the query party according to the identity information of the query party and the authorized user information corresponding to each access permission. Among them, based on step S201, it can be known that the target log query request contains the identity information of the query party, and the identity information may include but is not limited to: user nickname, user level information, authentication key, etc. Continuing to refer to the above example, assuming that the identity information in the log query request sent by the query party indicates that the query party is an administrator of project X, then based on the identity information of the query party and the two access permissions corresponding to the target log set, it can be known that the target access permission possessed by the query party is access permission 2. ② Generate a registration query condition based on the query condition information under the target access permission. The registration query condition is used to filter the logs in the target log set to obtain the filtering condition of at least one candidate log; according to the different contents contained in the query condition information, the method of generating the registration query condition based on the query condition information is also different. For example: if the query condition information includes the rules shown in the above example, the rules are directly determined as the registration query conditions; for another example: if the query condition information includes a code snippet, the result obtained by inputting the log query request into the code snippet can be used as the registration query condition. This method of defining the registration query condition by a code snippet can simplify the operation of defining complex registration query conditions; for another example: the query condition information can also include an interface, then the result obtained by calling the interface to respond to the log query request can be used as the registration query condition, so that the log query request is sent to the registrant of the target log set through the interface, and the registrant determines the registration query condition, which gives the registrant the right to customize and complicate the query condition to a certain extent. ③ Determine the registration query condition and the candidate query condition as the target query condition; wherein, based on step S201, it can be known that the target log query request contains the candidate query log. In other words, the target query condition for filtering the logs in the target log set can be the log query request sent by the query party and the registration information of the target log set registered by the registrant, which can dynamically control the screening and filtering of the logs according to the identity information of the query party to a certain extent.

[0092] In the above step ②, the process of generating the registration query condition is different according to the different contents contained in the query condition information; the following takes the query condition information including: rules (i.e., query rules), code snippets (i.e., first code snippets) and interfaces (i.e., condition management interfaces) as examples to introduce the specific implementation methods of generating the registration query condition based on the query condition information, wherein:

[0093] (1) The query condition information under the target access right defines the query rules. In this implementation, the implementation of generating the registration query condition based on the query condition information may include: determining the query rules in the query condition information as the registration query condition. In other words, if the query condition information includes a series of query rules defined by the registrant of the target log set, the query rules defined by the registrant may be determined as the registration query condition. For example, assuming that the access right information of the target log set includes access right 1 and access right 2, the authorized user information corresponding to access right 1 is "platform administrator", and the query condition information under access right 1 is "all logs in the target log set can be queried"; the authorized user information corresponding to access right 2 is "ordinary user", and the query condition information under access right 2 is "logs with a tag name of "xx" and a tag value of "XX" can be queried". If the identity information contained in the log query request is "ordinary user", then the identity information "ordinary user" of the query party is the same as the authorized user information "ordinary user" of access right 2, then it is determined that the log query request matches access right 2, that is, the query party can query the logs indicated by the query condition information under access right 2, that is, the registration query condition is "logs with a tag name of "xx" and a tag value of "XX" can be queried".

[0094] (2) If the query condition information under the target access right includes a first code snippet, then the first code snippet may define a query function for querying logs. In this implementation, the implementation method for generating registration query conditions based on the query condition information may include: determining the target query request as the input information of the query function; and calling the first code snippet to run the query function, processing the log query request, and obtaining the registration query condition. It is not difficult to understand that code snippets have the advantages of being easy to understand and simple to write logic. Therefore, the embodiments of the present application support the use of code snippets to define query functions, which can improve the flexibility of defining query functions.

[0095] (3) The query condition information under the target access right includes a condition management interface, specifically a condition management interface provided by the registrant of the target log set. In this implementation, the implementation method of generating the registration query condition based on the query condition information may include: calling the condition management interface to send the log query request to the registrant of the target log set; receiving the registration query condition returned by the registrant through the condition management interface. Receiving the registration query condition through the condition management interface provided by the registrant can meet the registrant's complex and customized permission control requirements for the registration query condition, and enrich the method of obtaining the registration query condition.

[0096] Based on the above operation, the registration query conditions for querying candidate logs can be obtained. Then, by using the registration query conditions and the candidate query conditions included in the log query request, a query operation can be performed in the target log set to obtain at least one candidate log. Figure 6 The process of querying at least one candidate log based on the target query condition is introduced; Figure 6 As shown, assuming that the log query request contains: the identity information of the query party "ordinary member of project X", the user name is "Zhang San", the meta information "does not contain a key", and the candidate query condition "the last 30 minutes"; the registration information of the target log set includes: access right 1 "the log query request contains an authentication key within the validity period, and can view all logs in the target log set", access right 2 "the administrator of project X can view logs with the tag name "project number" and the tag value "X", access right 3 "other members of project X can view logs with the tag name "project number" and the tag value "X" and the tag name "creator" and the tag value "the user name of the member""; then based on the log From the identity information of the querying party contained in the query request and the registration information of the target log set, it can be seen that the target access right possessed by the querying party is access right 3, and the obtained registration query conditions are: logs with tag name "project number", tag value "X", tag name "creator", and tag value "user name of the member"; further, the log query request contains the candidate query condition "last 30 minutes", then the target query conditions obtained based on the log query request and the registration information of the target log set include: logs with tag name "project number", tag value "X", tag name "creator", tag value "user name of the member", tag name "timestamp", and tag value "last 30 minutes".

[0097] S204: Determine a registration processing requirement according to the log query request and the registration processing information of the target log set, and process at least one candidate log according to the registration processing requirement to obtain a log query result.

[0098] The registration processing information is information used to determine the processing of the query results obtained based on the target query condition query. The registration processing information includes at least one registration processing authority, the authorized user information corresponding to each registration processing authority, and the processing information under each registration processing authority. An exemplary registration processing information may include: 1. When the log query request is for external network access, remove the key value (i.e., tag value) of the tag name "XX"; 2. When the log query request is for local area network access, do not perform any processing. Then it can be determined that the registration processing information includes two registration processing authorities, wherein the registration processing authority 1 is "1. When the log query request is for external network access, remove the key value (i.e., tag value) of the tag name "XX", and the authorized user information corresponding to the registration processing authority 1 includes: the log query request is for external network access, and the processing information under the registration processing authority 1 is: remove the key value of the tag name "XX". The registration processing authority 2 is "2. When the log query request is for local area network access, do not perform any processing", and the authorized user information corresponding to the registration processing authority 2 is: the log query request is for local area network access, and the processing information under the registration processing authority 2 is: do not perform any processing.

[0099] Combine the following Figure 7 A brief introduction is given to the implementation method of determining the registration processing requirements based on the log query request and the registration processing information of the target log set: First, determine the target registration processing authority possessed by the querying party based on the identity information of the querying party and the authorized user information corresponding to each registration processing authority; then generate the registration processing requirements based on the processing information under the target registration processing authority. Similar to the access permission information, the implementation method of determining the registration processing requirements is different depending on the content contained in the processing information under the target registration processing authority. The following takes the example that the processing information under the target registration processing authority includes: rules (i.e., registration processing rules), code snippets (i.e., the second code snippet), and interfaces (i.e., registration processing interfaces) to introduce the implementation method of generating registration processing requirements based on the processing information under the target registration processing authority, where:

[0100] (1) The processing information under the target registration processing authority defines the registration processing rules. In this implementation, the implementation method of generating the registration processing requirements based on the processing information under the target registration processing authority may include: determining the registration processing requirements based on the registration processing rules defined by the processing information. In other words, if the processing information under the target registration processing authority includes a series of registration processing rules defined by the registrant of the target log set, the registration processing rules defined by the registrant may be determined as the registration processing requirements.

[0101] (2) The processing information under the target registration processing authority includes a second code snippet, and the second code snippet defines a registration processing function; that is, the registration processing requirements are obtained by means of a code snippet. In this implementation, the implementation method of generating the registration processing requirements based on the processing information under the target registration processing authority may include: determining the log query request as the input information of the registration processing function, calling the second code snippet to run the registration processing function, processing the log query request, and obtaining the registration processing requirements. It should be noted that the input information of the registration processing function may include the target information of at least one candidate log in addition to the log query request, so that the registration processing function can determine the registration processing requirements based on the target information and the log query request of at least one candidate log as input information. Among them, the target information of at least one candidate log may include but is not limited to: the total number of candidate logs, the duration of querying the candidate logs, the number of candidate logs that failed to return, etc.; the target information of at least one candidate log is obtained in the process of querying at least one candidate log from the data source based on the target query condition.

[0102] (3) The processing information under the target registration processing authority includes the registration processing interface provided by the registrant of the target log set. In this implementation, the implementation method of generating the registration processing requirements based on the processing information under the target registration processing authority may include: calling the registration processing interface to send the log query request to the registrant of the target log set, and receiving the registration requirements returned by the registrant. It should be noted that in addition to calling the registration processing interface to send the log query request to the registrant of the target log set, the target information of at least one candidate log can also be sent to the registrant of the target log set as a call parameter, so that the registrant can determine the registration processing requirements based on the target information of at least one candidate log and the log query request. This method of obtaining the registration processing requirements provided by the registrant through the interface makes it unnecessary for the log query service used for log query to care about the specific implementation method and operation status of the interface, realizes the decoupling of log query and registration processing requirements setting, and improves the flexibility of setting registration processing requirements.

[0103] Based on the above operation, the registration processing requirement can be obtained. Then, by processing at least one candidate log using the registration processing requirement, a log query result can be obtained. The log query result includes at least one log after processing at least one candidate log. Figure 8 Here, an exemplary introduction is given to the process of processing at least one candidate log according to the registration processing requirements to obtain the log query result; Figure 8As shown, it is assumed that the log query request contains: the identity information of the query party "the query party accesses the computer device (or log query service) through the external network". The registration information of the target log set contains: registration processing authority 1 "no processing when accessing the local area network", registration processing authority 2 "when accessing the external network, remove the label with the label name "IP address" and hide sensitive information in the log". Based on the log query request and the registration information of the target log set, it can be known that: the identity information of the query party "the query party accesses the computer device (or log query service) through the external network" is the same as the authorized user information "external network access" corresponding to the registration processing authority 2, then it is determined that the target registration processing authority is registration processing authority 2, and the registration processing requirements include: removing the label with the label name "IP address" and hiding sensitive information in the log. Assume that the target log (such as any one of the at least one candidate log) obtained by filtering based on the target query condition includes: a tag named "Tag 1", a tag named "Tag 2", and a tag named "IP address"; then firstly, after removing the tag named "IP address" in the target log according to the above-obtained registration processing requirements, an updated target log can be obtained, and the updated target log includes: a tag named "Tag 1" and a tag named "Tag 2". Secondly, the sensitive information in the updated target log is hidden to obtain the log query result.

[0104] It is not difficult to understand that the sensitive information in the log can be dynamically changed. For example, the types and quantities of domestic sensitive words in the current time period (such as the time period of the current execution log query) and in the historical time period (such as the time period before the current time) may be different. In order to more accurately detect sensitive information in the log, the registration processing requirements obtained based on the registration processing information of the log query request and the target log set are supported by the embodiment of the present application as an interface (such as HTTP interface, remote system call interface, message queue, shared memory, cloud function, etc.). In this implementation, the processing process for any log may include: the log is used as a parameter to perform an interface call, and the interface return result is used as the processed result (or log query result). This method of hiding sensitive information from the log by calling a service that specifically handles sensitive information through an interface makes it unnecessary for the log query service or the registrant of the target log set to care about the implementation process of hiding sensitive information, and realizes the decoupling of "sensitive information hiding", "target log set maintenance" and "target log set query". Of course, in addition to removing sensitive information in logs, which may require interface type registration processing requirements, there are other situations that also require interface type registration processing requirements. The above is introduced using the removal of sensitive information in logs as an example, and does not limit the embodiments of the present application, and is explained here.

[0105] In an embodiment of the present application, it is possible to determine the target query condition based on the log query request sent by the querying party and the registration information of the target log set registered by the registrant, and use the log query request to query at least one candidate log; then determine the registration processing requirements based on the log query request and the registration processing information, and process at least one candidate log according to the registration processing requirements to obtain the log query result. In the above scheme, the target query condition for querying the candidate logs is dynamically determined based on the log query request and the registration information of the target log set, and the registration processing requirements for processing at least one candidate log are also dynamically determined based on the log query request and the registration information of the target log set, which improves the flexibility of managing access rights and processing requirements during the log query process, can meet the needs of dynamically screening and processing candidate logs according to different query requests, and improves the query efficiency of logs.

[0106] See also Fig. 9 , Fig. 9 A flow chart of a log processing method provided by an exemplary embodiment of the present application is shown; the log processing method can be executed by the above-mentioned computer device, and the log processing method may include but is not limited to steps S901-S910:

[0107] S901: Receive a registration request for a target log set.

[0108] S902: Generate registration information of the target log set in response to the registration request.

[0109] In steps S901-S902, the registration request is initiated by the registrant for the registration of the target log set, which is used to customize the registration information of the target log set, and can improve the flexibility of the management of the access right information and registration processing information of the target log set. When the registrant registers the registration information of the target log set, it mainly includes the registration of the access right information and registration processing information of the target log set. Take the registration of the registration processing information of the target log set by the registrant as an example for introduction: suppose the registrant hopes that only the administrator can access all logs of the target log set, and when accessing in the local area network, there is no processing operation. When accessing in the external network, first remove the label named "XXX" in the log, and all sensitive information in the log needs to be hidden. When registering the target log set, the registrant can set the registration processing information as follows: if the source of the log query request is a local area network, the registration processing information is empty (i.e., no processing is performed); otherwise, the registration processing information includes: registration processing information P1 and registration processing information P2, wherein registration processing information P1 is the registration processing rule: remove the tag named "XXX" in the log; registration processing information P2 is the registration processing interface (such as HTTP calling a given address). The registration processing interface is provided by the registrant, and its function is to hide sensitive information.

[0110] The embodiment of the present application supports the use of log Boolean functions to define the access permission information of the target log set, specifically the use of log Boolean functions to define the query condition information under each access permission; and the use of log processing functions to define the registration processing information of the target log set, specifically the use of log processing functions to define the processing information under each registration processing permission. For the convenience of subsequent explanations, the commonly used relationship expressions between logs and the labels contained in the logs are first given below, where: the embodiment of the present application represents a log with the character R, and records "the label value of the label whose label name is character K is equal to the character V" as "R[K]=V". Similarly, the embodiment of the present application supports the use of symbols ">, <, ≠, ≥, ≤" to represent that the label value is greater than, less than, not equal to, greater than or equal to, and less than or equal to a certain value, respectively. Similarly, in the embodiment of the present application, "the tag value of the tag whose tag name is character K satisfies condition C" is recorded as "R[K] satisfies condition C"; "R contains / does not contain the tag whose tag name is character K" is recorded as "R[K] exists / does not exist" is recorded as "R[K] exists / does not exist"; "the tag value of the tag whose tag name is character K conforms to a certain regular expression" is recorded as "R[K] conforms to a certain regular expression"; and so on. The following describes the concepts and terms related to log Boolean functions and log processing functions, among which:

[0111] (1) A log Boolean function may refer to a function whose input is a log R and whose output is a Boolean value (i.e., correct (true) / wrong (false)). For example, a function described as "the input is denoted as R, and the output R[K] satisfies condition C" is a log Boolean function. In this way, the log Boolean function can be used to filter logs to obtain candidate logs that meet the query conditions; that is, the log Boolean function is equivalent to the query conditions (such as the registration query conditions and candidate query conditions described above). The embodiments of the present application do not distinguish between log Boolean functions and query conditions, which is explained here. If the output value of any log Boolean function is affected by at most one label value in its input, then any log Boolean function can be called an atomic log Boolean function; for example: "the input is denoted as R, and the output is whether R[project number]>1" is an atomic log Boolean function (temporarily denoted as F a ), "The input is recorded as R, and the number of labels of output R is greater than 10" is also an atomic log Boolean function (temporarily recorded as F b ). An atomic log Boolean function can be a triple - a label name or attribute name (such as "project number", "number of labels"), a relationship (such as "greater than", "contains"), and a value (such as "2", "error", "null"). For example, the atomic log Boolean function "input is R, output R[ID] whether it exists" can be described by the triple (ID, exists, null).

[0112] Multiple atomic log Boolean functions use Boolean functions composed of operators as a log Boolean function; the operators may include but are not limited to: logical operators (or "∨", and "∧", ), "at least / at most" and other operators; for example, "F a ∨F b " is a log Boolean function. The data structure of the log Boolean function can be a tree structure (such as a tree), the leaf nodes are atomic log Boolean functions, and the non-leaf nodes are operators; for example: the log Boolean function is "F a ∨F b ", the root node in the tree is "or operator", and the two leaf nodes are (project number, >, 1) and (number of labels, >, 10). When a log R is given as the input of the log Boolean function, the tree defining the log Boolean function can be traversed in depth first, and each non-leaf node is judged according to the Boolean value of its child node, and the leaf node is judged according to the triple defining the atomic log Boolean function and the log R, and finally the result of the log Boolean function is output according to the Boolean value of the root node.

[0113] (2) A log processing function may refer to a function whose input is a log R and whose output is 0, 1, or multiple logs. For example, a function described as "the input is R, and if the length of R[detailed information] exceeds 20, then the first 20 characters of R[detailed information] are retained and output" is a log processing function. In this way, the log processing function can be used to process at least one candidate log found in the query; that is, the log processing function is equivalent to a post-processing requirement (such as the registration processing requirement described above). The embodiments of the present application do not distinguish between the log processing function and the registration processing requirement (or post-processing requirement), which is explained here.

[0114] It should be noted that the embodiments of the present application support the registrant to define the method of obtaining the log Boolean function or the log processing function by one or more of the following three methods, including but not limited to: ① By defining the rules for obtaining the log Boolean function or the log processing function; specifically: the registrant obtains the log Boolean function or the log processing function by customizing some rules. ② By defining a code snippet for obtaining the log Boolean function or the log processing function; specifically: the registrant defines a function (such as a query function) through a code snippet to obtain the log Boolean function or the log processing function; for example, the log query request is used as the input information of the query function, and the output result of the function can be used as the log Boolean function. ③ By defining an interface for obtaining the log Boolean function or the log processing function; specifically: the registrant provides an interface to obtain the log Boolean function or the log processing function; for example, the registrant provides a conditional management interface, and when the log query request is used as a call parameter, the result returned by the conditional management interface can be used as the log Boolean function.

[0115] Based on the three ways of defining and obtaining log Boolean functions or log processing functions described above, a more specific implementation method of obtaining log Boolean functions or log processing functions using three methods is given below, where:

[0116] (1) Obtaining the log Boolean function. The access permission information contained in the registration information can be used to filter the logs in the target log set to obtain the logs that meet the query conditions. When the log Boolean function is used to describe the above-mentioned process of filtering logs, the process of filtering the logs in the target log set to obtain the logs that meet the query conditions can be simply abstracted as follows: given a log query request Q, obtain the log Boolean function F. For each log in the target log set, if one or more logs make the log Boolean function F return true, then the one or more logs can be accessed, that is, the one or more logs are determined as candidate logs.

[0117] The access permission information of the target log set (or the query condition information under the access permission contained in the access permission information) can be defined by a log Boolean function: F = F1 ∨ F2 ∨ F3; wherein F1 is the atomic log Boolean function obtained by defining the query rule by the registrant, F2 is the atomic log Boolean function obtained by calling the code snippet provided by the registrant, and F3 is the atomic log Boolean function obtained by calling the condition management interface provided by the registrant. Of course, if the registrant does not define the atomic log Boolean function F1, the atomic log Boolean function F2 or the atomic log Boolean function F3, the default defined log Boolean function is an atomic log Boolean function that always returns false. The following is a brief introduction to how to obtain F1, F2 and F3:

[0118] How to obtain F1: The registrant defines a series of query rules - when the log query request for the target log set meets a certain target query condition, a log Boolean function is returned. For example, the log query request for the target log set may include: the user group of the user of the log query request, the IP address of the log query request, and other information. The registrant may specify two query rules: Query rule 1: If the user group of the log query request user is "platform administrator", a log Boolean function (denoted as F) is returned. A ), the log Boolean function F A Always returns true (that is, any log in the target log set makes the log Boolean function F A Returns true, which means "platform administrators can access all logs in the target log set"). Query rule 2: If the prefix of the IP address of the log query request is "192.168." and the user name of the log query request user is not empty (the user name is recorded as USER), then return a log Boolean function (recorded as F B), the log Boolean function is described as "the input is recorded as R, and the output is whether R[creator] is USER" (that is, "users in this IP segment can access logs whose creator is their own username"). If the log query request satisfies the above two query rules, the obtained log Boolean function (or atomic log Boolean function) is recorded as: F A 、F B , then the log Boolean function F1=F obtained by the query rule for this log query request A ∨F B Of course, the above example in which the registrant defines two query rules does not limit the embodiments of the present application. For example, the number of query rules may also be three, four, ..., and so on.

[0119] Method for obtaining F2: The registrant defines a query function through a code snippet (such as the first code snippet), the input of the query function is a log query request for the target log set, and the output of the query function is a log Boolean function. In a specific implementation, when the log query service (or computer device) receives a log query request for the target log set, the query function defined by the code snippet is called, the log query request is used as input information, and the output of the query function is used as the log Boolean function F2.

[0120] The method of obtaining F3 is: calling the conditional management interface provided by the registrant, taking the log query request as the calling parameter, and taking the log Boolean function returned by the call as F3. This acquisition method allows the target log set to have complex and customized access permission logic. For example, if the registrant wants to verify the authentication key issued by itself, this acquisition method can be used to obtain the log Boolean function. In a specific implementation, when the registrant of the target log set receives a log query request, the conditional management interface provided by the registrant can be called using the log query request to enable the registrant to verify the authentication key and return the log Boolean function F3 based on the authentication result.

[0121] In summary, the registrant of the target log set defines the access permission information of the target log set by defining the query rule for obtaining the log Boolean function, the first code snippet for obtaining the log Boolean function, and the conditional management interface for obtaining the log Boolean function.

[0122] (2) Obtaining the log processing function. The registration processing requirements of the target log set can be defined as a series of log processing functions P1, P2, P3, ..., P n etc., n is a positive integer, that is, at least one candidate log obtained by querying the log Boolean function is first processed by P1, and the processing result is then processed by P2, and so on, and P nThe processed result is used as the log query result. Of course, the registration processing requirement of the target log set can be empty, that is, at least one candidate log obtained by the query is not processed. Similar to the way of obtaining log Boolean functions, there are three ways to obtain log processing functions, including:

[0123] ① Obtain the log processing function through the registration processing rules defined by the registrant. This acquisition method is mainly applicable to some relatively simple log processing functions. In this case, the log processing function can be defined in the following way: the input is recorded as R. If R makes the log Boolean function F return true, then the operation O is performed on R to obtain the log query result. If the operation O fails, P(R) is returned as the log query result. That is, the log processing function can be defined by only giving the definitions of F, O, and P; among them, F can be obtained in the same way as F1, O is some operations on the log (for example, remove R[item number]); P is a fixed log processing function, for example, P is "input recorded as R, return empty" (remove the log), "input recorded as R, set R[item number] to the default value 1" (set the default value).

[0124] For example, suppose the registrant wishes to process the candidate logs with the following logic: when the source IP of the log query request is from the network segment "192.168.*.*", if the candidate log contains the tag "timestamp", the tag value of the tag name "timestamp" is converted to a string in RFC3339 format. If the conversion fails, the candidate log is removed; otherwise, no processing is performed. Then the acquisition method of F can be defined as the query rule method. If the source IP of the log query request is from the network segment 192.168.*.*, the log Boolean function F "given input R, returns whether R contains R[timestamp]; otherwise, returns a log Boolean function with an output of false" can be returned. O can be defined as "input is recorded as R, convert R[timestamp] to a string in RFC3339 format and output". The log processing function P can be defined as "input is recorded as R, return empty".

[0125] ② Obtain the log processing function through the code snippet (such as the second code snippet) provided by the registrant. The registrant defines a registration processing function through the code snippet. The input of the registration processing function is a log query request for the target log set and the target information of at least one candidate log, and the output of the registration processing function is a log processing function. In a specific implementation, when the log query service (or computer device) receives a log query request for the target log set, the registration processing function defined by the code snippet is called, the log query request is used as input information, and the output of the registration processing function is used as the log processing function.

[0126] ③ Obtain the log processing function through the registration processing interface provided by the registrant. Call the registration processing interface provided by the registrant, use the log query request and the target information of at least one candidate log as the call parameters, and use the result returned by the call as the log processing function. This acquisition method allows the target log set to have complex and customized processing logic, and can fully implement targeted processing logic for each log query request and each candidate log. The registrant can even use the registration processing interface to obtain some other information, such as whether each query for the target log set is successful, the time consumption of the log query, etc.

[0127] It is particularly noteworthy that the obtained log processing function can be an interface (such as HTTP interface, remote system call interface, message queue, shared memory, cloud function, etc.); in this implementation, the process of using the log processing function in the form of an interface to process any log may include: using the log R as a parameter to call the interface, and using the result returned by the interface as the result of processing the log R using the log processing function. Using the log processing function in the form of an interface to process the log allows the registrant to dynamically change the processing result (such as the log query result) according to its own state, meeting the registrant's needs for customized processing logic.

[0128] For example, suppose the registrant has two service systems, namely "domestic sensitive word replacement" and "overseas sensitive word replacement", the access methods of the two are dynamically specified and the sensitive words contained in the log are dynamically updated over time; if the registrant hopes that "when the log query request contains an authentication key, no post-processing is performed, otherwise the access interface of the sensitive word replacement service is returned as a log processing function according to the source of the log query request", then the registrant of the target log set defines the method of obtaining the log processing function as calling the registration processing interface, which returns a log processing function that does not perform any processing and a log processing function that calls the registration processing interface of the corresponding service, depending on whether the log query request contains a legitimate authentication key and the source of the log query request.

[0129] In summary, the registrant of the target log set defines the above series of log processing functions P1, P2, P3, ..., P n Etc., you can define the log processing logic.

[0130] In addition, the embodiment of the present application supports the registrant to edit the registration information of the registered target log set. In the specific implementation, a log editing request sent by the registrant of the target log set can be received, and the log editing request is used to request to edit the registration information of the target log set; in response to the log editing request, an editing operation is performed on the registration information of the target log set to obtain the updated registration information of the target log set; wherein the editing operation may include: a combination of one or more of a new operation (such as adding a log Boolean function or a log processing function in the registration information), a modification operation (such as modifying a log Boolean function or a log processing function in the registration information) and a deletion operation (such as deleting a log Boolean function or a log processing function in the registration information). Of course, for a computer device (or a log query service), the computer device can receive a log editing request from a local device, or can receive a registration editing request sent from other devices through a network. The embodiment of the present application does not limit the way in which the computer device obtains the registration editing request, which is explained here.

[0131] S903: Receive a log query request.

[0132] S904: Search for registration information of the target log set based on the log set identifier of the target log set.

[0133] S905: Determine a target query condition according to the target query request and the access permission information of the target log set.

[0134] S906: Obtain at least one candidate log from the target log set according to the target query condition.

[0135] S907: Determine the registration processing requirement according to the log query request and the registration processing information of the target log set.

[0136] S908: Process at least one candidate log according to the registration processing requirement to obtain a log query result.

[0137] It should be noted that the specific implementation of steps S903-S908 can be found in the aforementioned Figure 2 The relevant description of the specific implementation method shown in steps S201-S204 in the illustrated embodiment is not repeated here.

[0138] S909: Process the log query result based on the query processing requirement to obtain a log query response result.

[0139] S910. Return the log query response result to the querying party.

[0140] In steps S909-S910, the log query request mentioned in the embodiment of the present application may also include a query processing requirement, which is a requirement defined by the querying party for processing the log query results. In this implementation, the process of determining the target query condition and the target processing requirement (such as including the registration processing requirement and the query processing requirement) based on the log query request and the registration information of the target log set can be seen in Fig.10 , Fig.10 FIG. 1 shows a schematic diagram of determining a target query condition and a target processing requirement provided by an exemplary embodiment of the present application. Fig.10 As shown, based on the access right information contained in the log query request and the registration information of the target log set, the target query condition can be obtained, and the target query condition may include: one or two of the registration query condition and the candidate query condition, so that at least one candidate log and the target information of at least one candidate log (such as query time information, number of candidate logs, etc.) can be obtained based on the target query condition; similarly, based on the registration processing information contained in the log query request and the registration information of the target log set, the target processing requirement can be obtained, and the target processing requirement may include: one or two of the registration processing requirement and the query processing requirement; specifically, the registration processing requirement can be used to process the at least one candidate log queried to obtain the log query result, and then the query processing requirement can be used to process the log query result to obtain the log query response result; and the log query response result is returned to the querying party to realize the query of the logs in the target log set. Among them, the log query response result includes at least one log.

[0141] In addition, the embodiment of the present application also supports the aggregation processing of the log query response result, and outputs the aggregation result after the aggregation processing. Among them, the aggregation processing may include but is not limited to: counting the number of logs containing the target tag (such as any tag) in the log contained in the log query result (or log query response result), calculating the average value of the tag value of the tag named "XXXX" in the log contained in the log query response result, and counting the number of logs containing the tag named "XXX" in the log contained in the log query response result, ..., etc. In a specific implementation, an aggregation request sent by the query party can be received, and the aggregation request carries an aggregation condition; in response to the aggregation request, the aggregation condition is used to aggregate at least one log contained in the log query response result to obtain an aggregation result, and the aggregation result is returned to the query party. This method of directly requesting a computer device (or storage engine) to aggregate the log query response result by sending an aggregation request can reduce the computing overhead. Of course, the aggregation condition for the aggregation processing of the log query response request can also be carried in the log query request. The embodiment of the present application does not limit the method of obtaining the aggregation request, which is described here.

[0142] Also, see Figure 3 As shown in the schematic diagram of the registration information of the target log set, the registration information of the target log set also carries information such as paging conditions and sorting conditions. Then, the embodiment of the present application supports paging, sorting, or paging and sorting of multiple logs contained in the log query response result after obtaining the log query response result (or log query result); this enables the multiple logs output to the query party to be displayed in pages or sorted as required, thereby improving the readability of the logs. Taking the paging display of multiple logs (such as 200 logs) contained in the log query response result according to the paging conditions as an example, assuming that the paging condition is to display 50 logs per page, the 200 logs can be displayed on 5 pages respectively, which improves the readability of the logs and facilitates the query party to view and retrieve the logs. Take the sorting and display of multiple logs included in the log query response result according to the sorting condition as an example. Assuming that the sorting condition is to sort the logs in order of generation time from recent to recent, if the generation time of log 1 is 12:00 on May 8, the generation time of log 2 is 16:00 on May 8, and the generation time of log 3 is 00:00 on May 9, then the sorting order of log 1, log 2 and log 3 can be determined as: log 1->log 2->log 3. An exemplary schematic diagram of sorting and displaying multiple logs according to log generation time can be seen in Fig.11 ,like Fig.11 As shown, the tag names of the N logs are implicitly indicated by the header of the data table, N is a positive integer, and the N logs are sorted and displayed from recent to far according to the generation time. This way of sorting and displaying multiple logs is conducive to the query party to view and query the logs, and improves the query experience of the query party. It should be noted that the above introduces the display of multiple logs in two ways: paging and sorting. However, in actual application scenarios, multiple logs can also be displayed based on other display conditions. The embodiment of the present application does not limit the display method of multiple logs, which is explained here.

[0143] In summary, the embodiment of the present application decouples the setting of the log query from the registration information of the target log set, that is, decouples the log query from the setting of the access permission information and the registration processing information, and can realize a set of log query services for querying logs under different service systems, thereby avoiding the repeated development of log query services. In addition, this method of setting the access permission information and the registration processing information by the registrant can improve the flexibility of the access permission and the processing logic. Further, the method of obtaining the access permission information and the registration processing information can include code snippets and interfaces, which further improves the flexibility of the access permission and the processing logic, and meets the needs of the registrant to update the registration information at any time. In addition, the target query condition for querying the candidate log is dynamically determined based on the log query request and the registration information of the target log set, and the registration processing requirements for processing at least one candidate log are also dynamically determined based on the log query request and the registration information of the target log set, which can meet the needs of dynamically screening and processing candidate logs according to different query requests, thereby improving the flexibility of log query and improving the query efficiency of logs.

[0144] The method of the embodiment of the present application is described in detail above. In order to facilitate better implementation of the above scheme of the embodiment of the present application, the device of the embodiment of the present application is provided below accordingly.

[0145] Fig.12 A schematic diagram of the structure of a log processing device provided by an exemplary embodiment of the present application is shown; the log processing device can be used as a computer program (including program code) running in a computer device; the log processing device can be used to execute Figure 2 as well as Fig. 9 Some or all of the steps in the method embodiment shown. Fig.12 , the log processing device includes the following units:

[0146] The acquisition unit 1201 is used to receive a log query request, where the log query request includes a log set identifier of a target log set requested for query;

[0147] The processing unit 1202 is used to search for registration information of the target log set based on the log set identifier of the target log set, where the registration information of the target log set includes access permission information and registration processing information of the target log set;

[0148] The processing unit 1202 is further configured to determine a target query condition according to the log query request and the access permission information of the target log set, and obtain at least one candidate log from the target log set according to the target query condition;

[0149] The processing unit 1202 is further configured to determine a registration processing requirement according to the log query request and the registration processing information of the target log set, and process at least one candidate log according to the registration processing requirement to obtain a log query result.

[0150] In one implementation, the log query request further includes a query processing requirement; the processing unit 1202 is further configured to:

[0151] The log query result is processed according to the query processing requirement to obtain a log query response result; and the log query response result is returned to the querying party.

[0152] In one implementation, the access permission information includes at least one access permission, authorized user information corresponding to each access permission, and query condition information under each access permission; the log query request also includes the identity information of the querying party and the candidate query condition; the processing unit 1202 is used to determine the target query condition according to the log query request and the access permission information of the target log set, specifically for:

[0153] Determine the target access rights that the inquiring party has based on the inquiring party's identity information and the authorized user information corresponding to each access right;

[0154] Generate a registration query condition based on the query condition information under the target access permission;

[0155] The registered query conditions and the candidate query conditions are determined as target query conditions.

[0156] In one implementation, the query condition information under the target access right defines a query rule; when the processing unit 1202 is used to generate a registration query condition based on the query condition information under the target access right, it is specifically used to:

[0157] The query rule in the query condition information is determined as the registered query condition.

[0158] In one implementation, the query condition information under the target access right includes a first code snippet, and the first code snippet defines a query function; when the processing unit 1202 is used to generate a registration query condition based on the query condition information under the target access right, it is specifically used to:

[0159] Determine the log query request as input information of the query function;

[0160] The first code snippet is called to run the query function, the log query request is processed, and the registration query condition is obtained.

[0161] In one implementation, the query condition information under the target access right includes a condition management interface provided by the registrant of the target log set; when the processing unit 1202 is used to generate the registration query condition based on the query condition information under the target access right, it is specifically used to:

[0162] Call the condition management interface to send the log query request to the registrant of the target log set;

[0163] Receive the registration query conditions returned by the registrant through the condition management interface.

[0164] In one implementation, the registration processing information includes at least one registration processing authority, authorized user information corresponding to each registration processing authority, and processing information under each registration processing authority; the log query request also includes the identity information of the querying party; the processing unit 1202 is used to determine the registration processing requirement according to the log query request and the registration processing information of the target log set, specifically for:

[0165] Determine the target registration processing authority possessed by the inquiring party based on the identity information of the inquiring party and the authorized user information corresponding to each registration processing authority;

[0166] A registration processing request is generated based on the processing information under the target registration processing authority.

[0167] In one implementation, the processing information under the target registration processing authority defines the registration processing rules; when the processing unit 1202 is used to generate the registration processing requirements based on the processing information under the target registration processing authority, it is specifically used to:

[0168] The registration processing rules defined by the processing information are determined as registration processing requirements.

[0169] In one implementation, the processing information under the target registration processing authority includes a second code segment, and the second code segment defines a registration processing function; when the processing unit 1202 is used to generate the registration processing requirement based on the processing information under the target registration processing authority, it is specifically used to:

[0170] Determine the log query request as input information of the registration processing function;

[0171] The second code snippet is called to run the registration processing function, process the log query request, and obtain the registration processing requirement.

[0172] In one implementation, the processing information under the target registration processing authority includes a registration processing interface provided by the registrant of the target log set; when the processing unit 1202 is used to generate a registration processing requirement based on the processing information under the target registration processing authority, it is specifically used to:

[0173] Call the registration processing interface to send the log query request to the registrant of the target log set;

[0174] Receive the registration processing request returned by the registrant.

[0175] In one implementation, the processing unit 1202 is further configured to:

[0176] Receiving a log editing request sent by a registrant of a target log set, where the log editing request is used to request editing of registration information of the target log set;

[0177] In response to the log editing request, an editing operation is performed on the registration information of the target log set to obtain updated registration information of the target log set;

[0178] The editing operation includes one or more of a adding operation, a modifying operation and a deleting operation.

[0179] In one implementation, the registration information of the target log set is stored in the log set storage space, and the log set storage space stores the registration information of multiple log sets; each log set is used to record the logs generated in a service system; when the acquisition unit 1201 is used to receive the log query request, it is specifically used to:

[0180] Call the log query service interface to receive the log query request;

[0181] The log query service interface is compatible with multiple service systems, and is used to receive a query request for a log set corresponding to any service system.

[0182] According to one embodiment of the present application, Fig.12 The various units in the log processing device shown can be individually or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the log processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units. According to another embodiment of the present application, it can be executed by running on a general computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read-only storage medium (ROM). Figure 2 as well as Fig. 9A computer program (including program code) for each step involved in the corresponding method shown in FIG. Fig.12 The log processing device shown in and the log processing method of the embodiment of the present application are implemented. The computer program can be recorded on, for example, a computer readable recording medium, and loaded into the above-mentioned computing device through the computer readable recording medium and run therein.

[0183] In an embodiment of the present application, the processing unit 1202 can determine the target query condition based on the log query request sent by the querying party and the registration information of the target log set registered by the registrant, and use the log query request to query at least one candidate log; then determine the registration processing requirements based on the log query request and the registration processing information, and process at least one candidate log according to the registration processing requirements to obtain the log query result. In the above scheme, the target query condition for querying at least one candidate log is dynamically determined based on the log query request and the registration information of the target log set, and the registration processing requirements for processing at least one candidate log are also dynamically determined based on the log query request and the registration information of the target log set, which improves the flexibility of managing access rights and processing requirements during the log query process, can meet the needs of dynamically screening and processing candidate logs according to different query requests, and improve the query efficiency of logs.

[0184] Fig.13 FIG. 1 shows a schematic diagram of a log processing device provided by an exemplary embodiment of the present application. Fig.13 , the log processing device includes a processor 1201, a communication interface 1202 and a computer-readable storage medium 1203. Among them, the processor 1201, the communication interface 1202 and the computer-readable storage medium 1203 can be connected via a bus or other means. Among them, the communication interface 1302 is used to receive and send data. The computer-readable storage medium 1303 can be stored in the memory of the log processing device, and the computer-readable storage medium 1303 is used to store computer programs. The computer program includes program instructions, and the processor 1301 is used to execute the program instructions stored in the computer-readable storage medium 1303. The processor 1301 (or CPU (Central Processing Unit)) is the computing core and control core of the log processing device, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to realize the corresponding method flow or corresponding function.

[0185] The embodiment of the present application also provides a computer-readable storage medium (Memory), which is a memory device in a log processing device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the log processing device and the extended storage medium supported by the log processing device. The computer-readable storage medium provides a storage space that stores the processing system of the log processing device. In addition, one or more instructions suitable for being loaded and executed by the processor 1301 are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one computer-readable storage medium located away from the aforementioned processor.

[0186] In one embodiment, the log processing device may be the computer device mentioned in the above embodiment; the computer-readable storage medium stores one or more instructions; the processor 1301 loads and executes the one or more instructions stored in the computer-readable storage medium to implement the corresponding steps in the above log processing method embodiment; in a specific implementation, the one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and the following steps are executed:

[0187] Receive a log query request, where the log query request includes a log set identifier of a target log set requested for query;

[0188] Searching for registration information of the target log set based on the log set identifier of the target log set, where the registration information of the target log set includes access permission information and registration processing information of the target log set;

[0189] Determine a target query condition according to the log query request and the access permission information of the target log set, and obtain at least one candidate log from the target log set according to the target query condition;

[0190] According to the log query request and the registration processing information of the target log set, a registration processing requirement is determined, and at least one candidate log is processed according to the registration processing requirement to obtain a log query result.

[0191] In one implementation, the log query request further includes a query processing requirement; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and further perform the following steps:

[0192] Process the log query result according to the query processing requirement to obtain a log query response result;

[0193] The log query response result is returned to the querying party.

[0194] In one implementation, when the access permission information includes at least one access permission, authorized user information corresponding to each access permission, and query condition information under each access permission; the log query request also includes the identity information of the querying party and the candidate query condition; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are executed according to the log query request and the access permission information of the target log set. When determining the target query condition, it is specifically used to perform the following steps:

[0195] Determine the target access rights that the inquiring party has based on the inquiring party's identity information and the authorized user information corresponding to each access right;

[0196] Generate a registration query condition based on the query condition information under the target access permission;

[0197] The registered query conditions and the candidate query conditions are determined as target query conditions.

[0198] In one implementation, the query condition information under the target access right defines a query rule; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are used to perform the following steps when generating a registration query condition based on the query condition information under the target access right:

[0199] The query rule in the query condition information is determined as the registered query condition.

[0200] In one implementation, the query condition information under the target access right includes a first code segment, and the first code segment defines a query function; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are specifically used to perform the following steps when generating a registration query condition based on the query condition information under the target access right:

[0201] Determine the log query request as input information of the query function;

[0202] The first code snippet is called to run the query function, the log query request is processed, and the registration query condition is obtained.

[0203] In one implementation, the query condition information under the target access right includes a condition management interface provided by the registrant of the target log set; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are used to perform the following steps when generating a registration query condition based on the query condition information under the target access right:

[0204] Call the condition management interface to send the log query request to the registrant of the target log set;

[0205] Receive the registration query conditions returned by the registrant through the condition management interface.

[0206] In one implementation, the registration processing information includes at least one registration processing authority, authorized user information corresponding to each registration processing authority, and processing information under each registration processing authority; the log query request also includes identity information of the querying party; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are specifically used to perform the following steps when determining the registration processing requirements according to the log query request and the registration processing information of the target log set:

[0207] Determine the target registration processing authority possessed by the inquiring party based on the identity information of the inquiring party and the authorized user information corresponding to each registration processing authority;

[0208] A registration processing request is generated based on the processing information under the target registration processing authority.

[0209] In one implementation, the processing information under the target registration processing authority defines the registration processing rules; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are used to perform the following steps when the processor 1301 generates the registration processing requirements based on the processing information under the target registration processing authority:

[0210] The registration processing rules defined by the processing information are determined as registration processing requirements.

[0211] In one implementation, the processing information under the target registration processing authority includes a second code segment, and the second code segment defines a registration processing function; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are specifically used to perform the following steps when the processor 1301 generates the registration processing requirement based on the processing information under the target registration processing authority:

[0212] Determine the log query request as input information of the registration processing function;

[0213] The second code snippet is called to run the registration processing function, process the log query request, and obtain the registration processing requirement.

[0214] In one implementation, the processing information under the target registration processing authority includes a registration processing interface provided by the registrant of the target log set; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are specifically used to perform the following steps when generating a registration processing requirement based on the processing information under the target registration processing authority:

[0215] Call the registration processing interface to send the log query request to the registrant of the target log set;

[0216] Receive the registration processing request returned by the registrant.

[0217] In one implementation, one or more instructions in the computer-readable storage medium are loaded by the processor 1301 to further perform the following steps:

[0218] Receiving a log editing request sent by a registrant of a target log set, where the log editing request is used to request editing of registration information of the target log set;

[0219] In response to the log editing request, an editing operation is performed on the registration information of the target log set to obtain updated registration information of the target log set;

[0220] The editing operation includes one or more of a adding operation, a modifying operation and a deleting operation.

[0221] In one implementation, the registration information of the target log set is stored in the log set storage space, and the log set storage space stores the registration information of multiple log sets; each log set is used to record the logs generated in a service system; one or more instructions in the computer-readable storage medium are loaded by the processor 1301 and are specifically used to perform the following steps when executing the received log query request:

[0222] Call the log query service interface to receive the log query request;

[0223] The log query service interface is compatible with multiple service systems, and is used to receive a query request for a log set corresponding to any service system.

[0224] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the log processing device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the log processing device executes the log processing method.

[0225] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0226] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

[0227] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A log processing method, characterized in that: include: Receive a log query request, wherein the log query request includes a log set identifier of a target log set requested for query and a candidate query condition; The candidate query condition is a filtering condition used to filter the logs in the target log set; Based on the log set identifier of the target log set, searching for registration information of the target log set from the log set storage space, where the registration information of the target log set includes access permission information and registration processing information of the target log set; The registration information of the target log set stored in the log set storage space is customized by the registrant of the target log set, and the registration information of the log set stored in the log set storage space allows the corresponding registrant to re-edit; Determine a target query condition according to the candidate query condition in the log query request and the access permission information registered by the registrant of the target log set; The access permission information includes at least one access permission and query condition information under each access permission; Acquire at least one candidate log from the target log set according to the target query condition; A registration processing requirement is determined according to the log query request and the registration processing information of the target log set, and the at least one candidate log is processed according to the registration processing requirement to obtain a log query result.

2. The method according to claim 1, characterized in that The log query request also includes a query processing requirement; the method further includes: Processing the log query result according to the query processing requirement to obtain a log query response result; The log query response result is returned to the querying party.

3. The method according to claim 1, characterized in that The access permission information also includes the authorized user information corresponding to each access permission; the log query request also includes the identity information of the querying party and the candidate query conditions; The determining the target query condition according to the log query request and the access permission information of the target log set includes: Determine the target access rights that the querying party has according to the identity information of the querying party and the authorized user information corresponding to each access right; Generate a registration query condition based on the query condition information under the target access permission; The registered query condition and the candidate query condition are determined as the target query condition.

4. The method according to claim 3, characterized in that The query condition information under the target access right defines a query rule; the step of generating a registration query condition based on the query condition information under the target access right includes: The query rule in the query condition information is determined as the registration query condition.

5. The method according to claim 3, characterized in that The query condition information under the target access permission includes a first code snippet, and the first code snippet defines a query function; and the generating of the registration query condition based on the query condition information under the target access permission includes: Determine the log query request as input information of the query function; The first code snippet is called to run the query function, the log query request is processed, and the registration query condition is obtained.

6. The method according to claim 3, characterized in that The query condition information under the target access permission includes a condition management interface provided by the registrant of the target log set; The generating of the registration query condition based on the query condition information under the target access permission includes: Calling the condition management interface to send the log query request to the registrant of the target log set; The registration query condition returned by the registrant is received through the condition management interface.

7. The method according to claim 1, characterized in that The registration processing information includes at least one registration processing authority, the authorized user information corresponding to each registration processing authority, and the processing information under each registration processing authority; the log query request also includes the identity information of the querying party; The step of determining the registration processing requirement according to the log query request and the registration processing information of the target log set includes: Determine the target registration processing authority possessed by the querying party according to the identity information of the querying party and the authorized user information corresponding to each registration processing authority; The registration processing request is generated based on the processing information under the target registration processing authority.

8. The method according to claim 7, characterized in that The processing information under the target registration processing authority defines a registration processing rule; the generating the registration processing requirement based on the processing information under the target registration processing authority includes: A registration processing rule defined by the processing information is determined as the registration processing requirement.

9. The method according to claim 7, characterized in that The processing information under the target registration processing authority includes a second code segment, and the second code segment defines a registration processing function; and the generating the registration processing requirement based on the processing information under the target registration processing authority includes: Determine the log query request as input information of the registration processing function; The second code snippet is called to run the registration processing function, process the log query request, and obtain the registration processing requirement.

10. The method according to claim 7, characterized in that The processing information under the target registration processing authority includes the registration processing interface provided by the registrant of the target log set; The generating the registration processing requirement based on the processing information under the target registration processing authority includes: Calling the registration processing interface to send the log query request to the registrant of the target log set; Receive the registration processing request returned by the registrant.

11. The method according to claim 1, characterized in that The method further comprises: Receiving a log editing request sent by a registrant of the target log set, wherein the log editing request is used to request editing of registration information of the target log set; In response to the log editing request, an editing operation is performed on the registration information of the target log set to obtain updated registration information of the target log set; The editing operation includes one or more of a adding operation, a modifying operation and a deleting operation.

12. The method according to claim 1, characterized in that The registration information of the target log set is stored in a log set storage space, and the log set storage space stores registration information of multiple log sets; Each log set is used to record the logs generated in a service system; The receiving of the log query request comprises: Calling the log query service interface to receive the log query request; The log query service interface is adapted to a plurality of the service systems, and is used to receive a query request for a log set corresponding to any one of the service systems.

13. A log processing device, characterized in that: include: An acquisition unit, configured to receive a log query request, wherein the log query request includes a log set identifier of a target log set requested for query and a candidate query condition; The candidate query condition is a filtering condition used to filter the logs in the target log set; a processing unit, configured to search for registration information of the target log set from a log set storage space based on a log set identifier of the target log set, wherein the registration information of the target log set includes access permission information and registration processing information of the target log set; The registration information of the target log set stored in the log set storage space is customized by the registrant of the target log set, and the registration information of the log set stored in the log set storage space allows the corresponding registrant to re-edit; The processing unit is further configured to determine a target query condition according to the candidate query condition in the log query request and the access permission information registered by the registrant of the target log set; The access permission information includes at least one access permission and query condition information under each access permission; Acquire at least one candidate log from the target log set according to the target query condition; The processing unit is further configured to determine a registration processing requirement according to the log query request and the registration processing information of the target log set, and process the at least one candidate log according to the registration processing requirement to obtain a log query result.

14. A log processing device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the log processing method according to any one of claims 1 to 12 is implemented.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the log processing method according to any one of claims 1 to 12.

16. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a log processing device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the log processing method according to any one of claims 1 to 12.