Query request processing method and apparatus, electronic device, medium, and program product

By filtering and compressing the set of log data blocks in the log query request and filtering out data blocks with no results, the problems of low log query efficiency and resource waste are solved, achieving efficient querying and resource saving.

CN116303988BActive Publication Date: 2026-04-21JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
Filing Date
2023-02-20
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

When the log data volume is large, the query efficiency of existing technologies is low, and the creation of reverse indexes for optimization leads to a waste of storage space and computing resources.

Method used

By determining whether the log query request contains the query keyword, the corresponding set of compressed log data blocks is obtained. Then, based on the pre-stored compressed log data blocks with no results, the log data blocks that meet the keyword query conditions are selected as the query results, thus avoiding the creation of a large number of front indexes.

Benefits of technology

It improves log query efficiency, saves storage space and computing resources, and reduces query scan time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116303988B_ABST
    Figure CN116303988B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a query request processing method and device, electronic equipment, medium and program product. A specific implementation of the method includes: determining whether a received log query request contains a query keyword; in response to determining that the log query request contains the query keyword, obtaining a set of compressed log data blocks corresponding to a target query condition; in response to determining that there is a pre-stored no-result compressed log data block corresponding to the query keyword, filtering the set of compressed log data blocks according to the pre-stored no-result compressed log data block corresponding to the query keyword; selecting, from the filtered set of compressed log data blocks, each compressed log data block that satisfies a keyword query condition as a log query result according to the keyword query condition; and sending the obtained log query result to a terminal device corresponding to the log query request. The implementation is related to log query, improves log query efficiency, and saves storage space and computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to query request processing methods, apparatus, electronic devices, media, and program products. Background Technology

[0002] Log data records the operations performed on the client. Currently, the common methods for storing log data are: using a log aggregation system (e.g., Loki) as the storage and query component, or optimizing the original log text by creating a pre-existing index.

[0003] However, the inventors discovered that when storing log data in the above manner, the following technical problems often exist: when the amount of log data is large, the query efficiency is low; the method of optimizing by building reverse indexes requires the creation of a large number of front indexes, which leads to the final stored data continuously growing compared to the original content, resulting in a waste of storage space; and regardless of whether the log data will be searched in the future, a large amount of computing resources will be consumed during writing due to index operations, resulting in a waste of computing resources.

[0004] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0006] Some embodiments of this disclosure provide query request processing methods, apparatus, electronic devices, media, and program products to address one or more of the technical problems mentioned in the background section above.

[0007] In a first aspect, some embodiments of this disclosure provide a query request processing method, the method comprising: determining whether a received log query request contains a query keyword; in response to determining that the log query request contains a query keyword, obtaining a set of compressed log data blocks corresponding to the target query condition according to the target query condition corresponding to the log query request; in response to determining that there are pre-stored compressed log data blocks with no results corresponding to the query keyword, filtering the set of compressed log data blocks according to the pre-stored compressed log data blocks with no results corresponding to the query keyword; selecting each compressed log data block that satisfies the keyword query condition from the filtered set of compressed log data blocks as a log query result according to the keyword query condition corresponding to the query keyword; and sending the obtained log query result to a terminal device corresponding to the log query request.

[0008] Optionally, the method further includes: generating a set of compressed log data blocks with no results corresponding to the above query keywords based on the above log query results; and storing the above set of compressed log data blocks with no results.

[0009] Optionally, before sending the obtained log query result to the terminal device corresponding to the log query request, the method further includes: in response to determining that the log query request does not contain a query keyword, obtaining a set of compressed log data blocks corresponding to the query conditions as the log query result based on the query conditions corresponding to the log query request.

[0010] Optionally, obtaining the set of compressed log data blocks corresponding to the target query conditions based on the log query request includes: determining the target query conditions based on the log query request, wherein the log query request further includes at least one of the following: application conditions, log path conditions, log time conditions, and query quantity conditions; and the target query conditions include at least one of the following: application conditions, log path conditions, log time conditions, and query quantity conditions; and obtaining the set of compressed log data blocks corresponding to the target query conditions based on the determined target query conditions.

[0011] Optionally, generating a set of compressed log data blocks with no results corresponding to the query keywords based on the log query results includes: performing an intersection and inversion operation on the log query results and the obtained set of compressed log data blocks to obtain each compressed log data block as a set of compressed log data blocks with no results corresponding to the query keywords.

[0012] Optionally, storing the above-mentioned set of compressed log data blocks with no results includes adding the above-mentioned query keywords and the above-mentioned set of compressed log data blocks with no results to the cache.

[0013] Secondly, some embodiments of this disclosure provide a query request processing apparatus, comprising: a determining unit configured to determine whether a received log query request contains a query keyword; an acquiring unit configured to, in response to determining that the log query request contains a query keyword, acquire a set of compressed log data blocks corresponding to the target query conditions corresponding to the log query request; a filtering unit configured to, in response to determining that there are pre-stored compressed log data blocks with no results corresponding to the query keyword, filter the set of compressed log data blocks according to the pre-stored compressed log data blocks with no results corresponding to the query keyword; a selecting unit configured to, according to the keyword query conditions corresponding to the query keyword, select each compressed log data block satisfying the keyword query conditions from the filtered set of compressed log data blocks as a log query result; and a sending unit configured to send the obtained log query result to a terminal device corresponding to the log query request.

[0014] Optionally, the query request processing apparatus further includes a generation unit and a storage unit. The generation unit is configured to generate a set of resultless compressed log data blocks corresponding to the query keywords based on the log query results. The storage unit is configured to store the set of resultless compressed log data blocks.

[0015] Optionally, before the sending unit, the query request processing apparatus further includes: a compressed log data block set acquisition unit, configured to, in response to determining that the log query request does not contain a query keyword, acquire a compressed log data block set corresponding to the query conditions of the log query request as a log query result.

[0016] Optionally, the acquisition unit is further configured to: determine target query conditions based on the above log query request, wherein the above log query request further includes at least one of the following: application conditions, log path conditions, log time conditions, and query quantity conditions, and the above target query conditions include at least one of the following: the above application conditions, the above log path conditions, the above log time conditions, and the above query quantity conditions; and acquire a set of compressed log data blocks corresponding to the above target query conditions based on the determined target query conditions.

[0017] Optionally, the generation unit is further configured to: perform an intersection and inverse operation on the above log query results and the obtained set of compressed log data blocks to obtain each compressed log data block as a set of compressed log data blocks with no results corresponding to the above query keywords.

[0018] Optionally, the storage unit is further configured to add the aforementioned query keywords and the aforementioned set of compressed log data blocks with no results to the cache.

[0019] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0020] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0021] Fifthly, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0022] The above embodiments of this disclosure have the following beneficial effects: the query request processing method of some embodiments of this disclosure improves log query efficiency and saves storage space and computing resources. Specifically, the reasons for low log query efficiency and wasted storage space and computing resources are: when the log data volume is large, the query efficiency is low; the method of optimizing by building a reverse index requires building a large number of pre-indexes, resulting in the final stored data continuously increasing compared to the original content, causing a waste of storage space; and regardless of whether the log data will be searched in the future, a large amount of computing resources will be occupied during writing due to index operations, resulting in a waste of computing resources. Based on this, the query request processing method of some embodiments of this disclosure first determines whether the received log query request contains a query keyword. Then, in response to determining that the log query request contains a query keyword, a set of compressed log data blocks corresponding to the target query conditions corresponding to the log query request is obtained. Thus, when the log query request contains a query keyword, the set of compressed log data blocks can be pre-selected. Subsequently, in response to the determination that there are pre-stored compressed log data blocks with no results corresponding to the aforementioned query keywords, the set of compressed log data blocks is filtered based on these pre-stored blocks. Thus, the pre-filtered set of compressed log data blocks can be filtered using the pre-stored blocks with no results found based on the query keywords, thereby removing compressed log data blocks that are identical to the blocks with no results for the query keywords. Next, based on the keyword query conditions corresponding to the aforementioned query keywords, each compressed log data block satisfying the keyword query conditions is selected from the filtered set of compressed log data blocks as the log query result. Thus, each compressed log data block satisfying the keyword query conditions can be selected from the filtered set of compressed log data blocks as the log query result. Finally, the obtained log query result is sent to the terminal device corresponding to the aforementioned log query request. Thus, the retrieved log query result can be returned to the requesting end. Because the compressed log data block set is pre-filtered using stored compressed log data blocks with no results corresponding to the query keywords when selecting compressed log data blocks that meet the keyword query conditions, query scan time is reduced, improving query efficiency. Furthermore, since no reverse index is used for querying, there is no need to build a large number of front indexes, saving storage space and computing resources. Therefore, log query efficiency is improved, while storage space and computing resources are saved. Attached Figure Description

[0023] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0024] Figure 1 This is an architecture diagram of an exemplary system to which some embodiments of this disclosure can be applied;

[0025] Figure 2 This is a schematic diagram of an application scenario of a query request processing method according to some embodiments of the present disclosure;

[0026] Figure 3 This is a flowchart of some embodiments of the query request processing method according to this disclosure;

[0027] Figure 4 These are flowcharts of other embodiments of the query request processing method according to this disclosure;

[0028] Figure 5 This is a schematic diagram of the structure of some embodiments of the query request processing apparatus according to the present disclosure;

[0029] Figure 6 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0030] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0031] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0032] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0033] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0034] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0035] Before performing any of the operations involving the collection, storage, or use of user personal information (such as log data) disclosed in this disclosure, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, informing personal information subjects, and obtaining prior authorization and consent from personal information subjects.

[0036] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0037] Figure 1 An exemplary system architecture 100 is shown that can be applied to a query request processing method or query request processing apparatus according to some embodiments of the present disclosure.

[0038] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0039] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, item information display applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0040] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays that support information display, including but not limited to smartphones, tablets, e-book readers, laptops, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are imposed here.

[0041] Server 105 can be a server that provides various services, such as a backend server that supports the information displayed on terminal devices 101, 102, and 103. The backend server can analyze and process received query requests and other data, and feed back the processing results (such as log query results) to the terminal devices.

[0042] It should be noted that the query request processing method provided in the embodiments of this disclosure can be executed by server 105. Accordingly, the query request processing device can be set in server 105. No specific limitation is made here.

[0043] It should be noted that a server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.

[0044] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0045] Figure 2 This is a schematic diagram illustrating an application scenario of the query request processing method according to some embodiments of this disclosure.

[0046] exist Figure 2 In the application scenario, firstly, the computing device 201 can determine whether the received log query request 202 contains a query keyword. Then, in response to determining that the log query request 202 contains a query keyword, the computing device 201 can obtain a set 204 of compressed log data blocks corresponding to the target query condition 203 of the log query request 202. Next, in response to determining that there are pre-stored compressed log data blocks with no results corresponding to the query keyword, the computing device 201 can filter the set 204 of compressed log data blocks based on the pre-stored compressed log data blocks with no results corresponding to the query keyword 205. Secondly, the computing device 201 can select each compressed log data block satisfying the keyword query condition 206 from the filtered set 207 of compressed log data blocks as a log query result 208, based on the keyword query condition 206 corresponding to the query keyword. Finally, the computing device 201 can send the obtained log query result 208 to the terminal device 209 corresponding to the log query request 202.

[0047] It should be noted that the aforementioned computing device 201 can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed in the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.

[0048] It should be understood that Figure 2 The number of computing devices shown is merely illustrative. Any number of computing devices can be used depending on implementation needs.

[0049] Continue to refer to Figure 3 A flow 300 of some embodiments of a query request processing method according to the present disclosure is shown. The query request processing method includes the following steps:

[0050] Step 301: Determine whether the received log query request contains query keywords.

[0051] In some embodiments, the execution body of the query request processing method (e.g. Figure 1 The server shown can determine whether a received log query request contains a query keyword. The log query request can be a request sent by a user to query log data. The log query request can include, but is not limited to, at least one of the following: query keyword, log size. The log query request can be sent by a user through a terminal device via a wired or wireless connection. The query keyword can be a keyword used to query log data. The log size can be used to limit the size of the queried log data. It should be noted that the wireless connection method can include, but is not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra-wideband) connection, and other currently known or future wireless connection methods. In practice, the executing entity can determine whether the log query request contains a query keyword upon receiving it.

[0052] Step 302: In response to determining that the log query request contains query keywords, obtain the set of compressed log data blocks corresponding to the target query conditions according to the target query conditions corresponding to the log query request.

[0053] In some embodiments, the execution entity may, in response to determining that the log query request contains a query keyword, obtain a set of compressed log data blocks corresponding to the target query condition. The target query condition may be a query constraint that does not include a keyword query condition corresponding to the query keyword. For example, the target query condition may be a log size query condition. For example, the log size query condition may be that the size of the compressed log data block is less than or equal to a preset size. The setting of the preset size is not limited. For example, the preset size may be 1M. The compressed log data block may be a compressed log data block. A log data block may be log data itself compressed and stored in block form. Log data blocks may be stored in object storage or in a local file system. For example, a log data block may be a Chunk in Loki. In practice, the execution entity may obtain a set of compressed log data blocks that satisfy the target query condition from the stored compressed log data blocks.

[0054] In some optional implementations of certain embodiments, the execution entity can obtain a set of compressed log data blocks corresponding to the target query conditions based on the log query request through the following steps:

[0055] The first step is to determine the target query conditions based on the aforementioned log query request. The log query request may further include at least one of the following: application conditions, log path conditions, log time conditions, and query quantity conditions. Specifically, the application condition can be the application identifier corresponding to the compressed log data block used as the query application identifier. The application identifier can be used to represent an application. For example, the application identifier can be the application name. The query application identifier can be the application identifier used to query log data included in the aforementioned log query request. The log path condition can be the path corresponding to the compressed log data block used as the query log path. The query log path can be the retrieval path of the log data used to query log data included in the aforementioned log query request. The time query condition can be that the storage time corresponding to the compressed log data block is within the query log storage time period. The time query condition can also be that the record time corresponding to the compressed log data block is within the query log record time period. The query log storage time period can be the time period used to query log data based on storage time included in the aforementioned log query request. The query log record time period can be the time period used to query log data based on record time included in the aforementioned log query request. The query quantity condition can be the number of compressed log data blocks being queried. The query quantity can be the number of log data to be queried. The target query conditions mentioned above include at least one of the following: the application conditions, the log path conditions, the log time conditions, and the query quantity conditions. In practice, the executing entity may, in response to determining that the log query request includes the application identifier, log path, log time information, and query quantity information, combine the application conditions, log path conditions, log time conditions, and query quantity conditions into the target query conditions.

[0056] It is understandable that the sub-conditions included in the determined target query conditions can be determined based on all the conditions included in the log query request, excluding the keyword query conditions. Each sub-condition included in the determined target query conditions corresponds one-to-one with each of the conditions included in the log query request, excluding the keyword query conditions.

[0057] The second step is to obtain a set of compressed log data blocks corresponding to the determined target query conditions. This allows the other conditions besides those corresponding to the query keywords to be combined into the target query conditions.

[0058] Step 303: In response to determining that there are pre-stored compressed log data blocks with no results corresponding to the query keywords, the set of compressed log data blocks is filtered according to the pre-stored compressed log data blocks with no results corresponding to the query keywords.

[0059] In some embodiments, the execution entity may, in response to determining the existence of pre-stored compressed log data blocks with no results corresponding to the query keyword, filter the compressed log data block set based on the pre-stored compressed log data blocks with no results corresponding to the query keyword. The compressed log data blocks with no results corresponding to the query keyword may be compressed log data blocks that cannot be found using the query keyword. The number of compressed log data blocks with no results corresponding to the query keyword may be one or more, determined by the number of pre-stored compressed log data blocks with no results corresponding to the query keyword. In practice, the execution entity may determine the pre-stored compressed log data blocks with no results corresponding to the query keyword as a set of compressed log data blocks with no results. Then, compressed log data blocks that are identical to the individual compressed log data blocks with no results in the set of compressed log data blocks with no results can be deleted from the set of compressed log data blocks to filter the set of compressed log data blocks with no results.

[0060] Step 304: Based on the keyword query conditions corresponding to the query keywords, select each compressed log data block that meets the keyword query conditions from the filtered set of compressed log data blocks as the log query result.

[0061] In some embodiments, the executing entity can select compressed log data blocks that satisfy the keyword query conditions from the filtered set of compressed log data blocks as log query results, based on the keyword query conditions corresponding to the query keywords. The keyword query conditions can be conditions for querying log data using the query keywords. For example, the keyword query conditions can be that the keywords corresponding to the compressed log data blocks include the query keywords. In practice, the executing entity can select compressed log data blocks whose corresponding keywords include the query keywords from the filtered set of compressed log data blocks. Then, the selected compressed log data blocks can be determined as log query results.

[0062] Optionally, in response to determining that the log query request does not contain a query keyword, the executing entity may also obtain a set of compressed log data blocks corresponding to the query conditions of the log query request as the log query result. The query conditions can be the conditions that the log data to be queried in the log query request must meet. In practice, the executing entity can obtain a set of compressed log data blocks that satisfy the query conditions from the stored compressed log data blocks. Then, the obtained set of compressed log data blocks can be determined as the log query result. Therefore, when the log query request does not contain a query keyword, the log query result can be obtained directly according to the query conditions corresponding to the log query request.

[0063] Step 305: Send the obtained log query results to the terminal device that made the corresponding log query request.

[0064] In some embodiments, the executing entity may send the obtained log query results to the terminal device corresponding to the log query request. The terminal device may be the device that sent the log query request. In practice, the executing entity may send the log query results to the terminal device via a wired or wireless connection.

[0065] The above embodiments of this disclosure have the following beneficial effects: the query request processing method of some embodiments of this disclosure improves log query efficiency and saves storage space and computing resources. Specifically, the reasons for low log query efficiency and wasted storage space and computing resources are: when the log data volume is large, the query efficiency is low; the method of optimizing by building a reverse index requires building a large number of pre-indexes, resulting in the final stored data continuously increasing compared to the original content, causing a waste of storage space; and regardless of whether the log data will be searched in the future, a large amount of computing resources will be occupied during writing due to index operations, resulting in a waste of computing resources. Based on this, the query request processing method of some embodiments of this disclosure first determines whether the received log query request contains a query keyword. Then, in response to determining that the log query request contains a query keyword, a set of compressed log data blocks corresponding to the target query conditions corresponding to the log query request is obtained. Thus, when the log query request contains a query keyword, the set of compressed log data blocks can be pre-selected. Subsequently, in response to the determination that there are pre-stored compressed log data blocks with no results corresponding to the aforementioned query keywords, the set of compressed log data blocks is filtered based on these pre-stored blocks. Thus, the pre-filtered set of compressed log data blocks can be filtered using the pre-stored blocks with no results found based on the query keywords, thereby removing compressed log data blocks that are identical to the blocks with no results for the query keywords. Next, based on the keyword query conditions corresponding to the aforementioned query keywords, each compressed log data block satisfying the keyword query conditions is selected from the filtered set of compressed log data blocks as the log query result. Thus, each compressed log data block satisfying the keyword query conditions can be selected from the filtered set of compressed log data blocks as the log query result. Finally, the obtained log query result is sent to the terminal device corresponding to the aforementioned log query request. Thus, the retrieved log query result can be returned to the requesting end. Because the compressed log data block set is pre-filtered using stored compressed log data blocks with no results corresponding to the query keywords when selecting compressed log data blocks that meet the keyword query conditions, query scan time is reduced, improving query efficiency. Furthermore, since no reverse index is used for querying, there is no need to build a large number of front indexes, saving storage space and computing resources. Therefore, log query efficiency is improved, while storage space and computing resources are saved.

[0066] Further reference Figure 4 This illustrates a flow 400 of another embodiment of the query request processing method. The flow 400 of the query request processing method includes the following steps:

[0067] Step 401: Determine whether the received log query request contains query keywords.

[0068] Step 402: In response to determining that the log query request contains query keywords, obtain the set of compressed log data blocks corresponding to the target query conditions based on the target query conditions corresponding to the log query request.

[0069] Step 403: In response to determining that there are pre-stored compressed log data blocks with no results corresponding to the query keywords, the set of compressed log data blocks is filtered according to the pre-stored compressed log data blocks with no results corresponding to the query keywords.

[0070] Step 404: Based on the keyword query conditions corresponding to the query keywords, select each compressed log data block that meets the keyword query conditions from the filtered set of compressed log data blocks as the log query result.

[0071] Step 405: Send the obtained log query results to the terminal device that made the corresponding log query request.

[0072] In some embodiments, the specific implementation of steps 401-405 and the resulting technical effects can be found in [reference needed]. Figure 3 Steps 301-305 in the corresponding embodiments will not be repeated here.

[0073] Step 406: Based on the log query results, generate a set of compressed log data blocks with no results corresponding to the query keywords.

[0074] In some embodiments, the execution body of the query request processing method (e.g. Figure 1 The server shown can generate a set of compressed log data blocks with no results corresponding to the above query keywords based on the log query results. In practice, the execution entity can perform an intersection and inversion operation on the log query results and the filtered set of compressed log data blocks to obtain each compressed log data block as a set of compressed log data blocks with no results corresponding to the above query keywords.

[0075] In some optional implementations of certain embodiments, the executing entity can perform an intersection and inversion operation on the log query results and the obtained set of compressed log data blocks to obtain each compressed log data block as a set of compressed log data blocks with no results corresponding to the query keyword. Therefore, the resulting set of compressed log data blocks with no results can be used to pre-filter compressed log data blocks when querying log data based on the query keyword next time.

[0076] Step 407: Store the set of compressed log data blocks with no results.

[0077] In some embodiments, the execution entity may store the set of resultless compressed log data blocks. In practice, the execution entity may add each resultless compressed log data block in the set of resultless compressed log data blocks to a stored set of resultless compressed log data blocks corresponding to the query keyword, thereby updating the stored set of resultless compressed log data blocks corresponding to the query keyword.

[0078] In some optional implementations of certain embodiments, the execution entity may add the query keyword and the set of resultless compressed log data blocks to the cache. In practice, the execution entity may add each resultless compressed log data block from the set of resultless compressed log data blocks to the cached set of resultless compressed log data blocks corresponding to the query keyword, thereby updating the cached set of resultless compressed log data blocks corresponding to the query keyword. Thus, a caching method can be used to store each resultless compressed log data block corresponding to the query keyword.

[0079] from Figure 4 It can be seen from this that, with Figure 3 Compared to the description of some corresponding embodiments, Figure 4 The flow 400 of the query request processing method in some corresponding embodiments embodies the extended step of storing a set of compressed log data blocks with no results for the corresponding query keyword. Thus, the scheme described in these embodiments allows compressed log data blocks to be pre-filtered using the set of compressed log data blocks with no results for the corresponding query keyword the next time log data is queried based on that query keyword.

[0080] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a query request processing apparatus, which are similar to... Figure 3 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0081] like Figure 5As shown, a query request processing apparatus 500 in some embodiments includes: a determining unit 501, an acquiring unit 502, a filtering unit 503, a selecting unit 504, and a sending unit 505. The determining unit 501 is configured to determine whether a received log query request contains a query keyword; the acquiring unit 502 is configured to, in response to determining that the log query request contains a query keyword, acquire a set of compressed log data blocks corresponding to the target query conditions of the log query request; the filtering unit 503 is configured to, in response to determining that there are pre-stored compressed log data blocks with no results corresponding to the query keyword, filter the set of compressed log data blocks based on the pre-stored compressed log data blocks with no results corresponding to the query keyword; the selecting unit 504 is configured to, based on the keyword query conditions corresponding to the query keyword, select each compressed log data block satisfying the keyword query conditions from the filtered set of compressed log data blocks as a log query result; and the sending unit 505 is configured to send the obtained log query result to the terminal device corresponding to the log query request.

[0082] Optionally, the query request processing apparatus 500 may further include a generation unit and a storage unit (not shown in the figure). The generation unit is configured to generate a set of resultless compressed log data blocks corresponding to the query keywords based on the log query results. The storage unit is configured to store the set of resultless compressed log data blocks.

[0083] Optionally, before the sending unit 505, the query request processing device 500 may further include: a compressed log data block set acquisition unit (not shown in the figure), configured to, in response to determining that the log query request does not contain a query keyword, acquire a compressed log data block set corresponding to the query conditions of the log query request as a log query result.

[0084] Optionally, the acquisition unit 502 may be further configured to: determine target query conditions based on the above log query request, wherein the above log query request further includes at least one of the following: application conditions, log path conditions, log time conditions, and query quantity conditions, and the above target query conditions include at least one of the following: the above application conditions, the above log path conditions, the above log time conditions, and the above query quantity conditions; and acquire a set of compressed log data blocks corresponding to the above target query conditions based on the determined target query conditions.

[0085] Optionally, the generation unit can be further configured to: perform an intersection and inverse operation on the above log query results and the obtained set of compressed log data blocks to obtain each compressed log data block as a set of compressed log data blocks without results corresponding to the above query keywords.

[0086] Optionally, the storage unit can be further configured to add the above query keywords and the above set of compressed log data blocks with no results to the cache.

[0087] It is understandable that the units described in the device 500 are related to the reference. Figure 3 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 500 and the units contained therein, and will not be repeated here.

[0088] The following is for reference. Figure 6 It illustrates an electronic device 600 suitable for implementing some embodiments of the present disclosure (e.g., Figure 1 A schematic diagram of the structure of the server in the diagram. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0089] like Figure 6 As shown, electronic device 600 may include processing unit 601 (e.g., central processing unit, graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0090] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.

[0091] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined above in the methods of some embodiments of this disclosure.

[0092] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0093] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0094] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: determine whether a received log query request contains a query keyword; in response to determining that the log query request contains a query keyword, obtain a set of compressed log data blocks corresponding to the target query condition according to the target query condition corresponding to the log query request; in response to determining that there are pre-stored compressed log data blocks with no results corresponding to the query keyword, filter the set of compressed log data blocks according to the pre-stored compressed log data blocks with no results corresponding to the query keyword; select each compressed log data block satisfying the keyword query condition from the filtered set of compressed log data blocks as a log query result according to the keyword query condition corresponding to the query keyword; and send the obtained log query result to the terminal device corresponding to the log query request.

[0095] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0097] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a determining unit, an acquiring unit, a filtering unit, a selecting unit, and a sending unit. The names of these units do not necessarily limit the specific unit; for example, a determining unit may also be described as "a unit that determines whether a received log query request contains a query keyword."

[0098] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0099] Some embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any of the query request processing methods described above.

[0100] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A method for processing a log query request, comprising: determining whether a received log query request contains a query keyword; in response to determining that the log query request contains a query keyword, obtaining a set of compressed log data blocks corresponding to a target query condition of the log query request; in response to determining that there is a pre-stored no-result compressed log data block corresponding to the query keyword, filtering the set of compressed log data blocks according to the pre-stored no-result compressed log data block corresponding to the query keyword; selecting, as a log query result, each compressed log data block satisfying a keyword query condition corresponding to the query keyword from the filtered set of compressed log data blocks; in response to determining that the log query request does not contain a query keyword, obtaining a set of compressed log data blocks corresponding to a query condition of the log query request as a log query result; sending the obtained log query result to a terminal device corresponding to the log query request.

2. The method of claim 1, wherein, The method further comprises: generating a set of no-result compressed log data blocks corresponding to the query keyword according to the log query result; and storing the set of no-result compressed log data blocks.

3. The method of claim 1, wherein, The obtaining a set of compressed log data blocks corresponding to a target query condition of the log query request comprises: determining a target query condition according to the log query request, wherein the log query request further comprises at least one of an application condition, a log path condition, a log time condition, and a query number condition, and the target query condition comprises at least one of the application condition, the log path condition, the log time condition, and the query number condition; and obtaining a set of compressed log data blocks corresponding to the target query condition according to the determined target query condition.

4. The method of claim 2, wherein, The generating a set of no-result compressed log data blocks corresponding to the query keyword according to the log query result comprises: performing an intersection negation process on the log query result and the obtained set of compressed log data blocks to obtain each compressed log data block as a set of no-result compressed log data blocks corresponding to the query keyword.

5. The method of claim 2, wherein, The storing the set of no-result compressed log data blocks comprises: correspondingly adding the query keyword and the set of no-result compressed log data blocks to a cache. 6.An apparatus for processing a log query request, comprising: a determination unit configured to determine whether a received log query request contains a query keyword; a first obtaining unit configured to, in response to determining that the log query request contains a query keyword, obtain a set of compressed log data blocks corresponding to a target query condition of the log query request; a filtering unit configured to, in response to determining that there is a pre-stored no-result compressed log data block corresponding to the query keyword, filter the set of compressed log data blocks according to the pre-stored no-result compressed log data block corresponding to the query keyword; and a selecting unit configured to select, as a log query result, each compressed log data block satisfying a keyword query condition corresponding to the query keyword from the filtered set of compressed log data blocks. The selecting unit is configured to select, according to a keyword query condition corresponding to the query keyword, each compressed log data block satisfying the keyword query condition from the filtered compressed log data block set as a log query result; The second obtaining unit is configured to, in response to determining that the log query request does not contain a query keyword, obtain, according to a query condition corresponding to the log query request, a compressed log data block set corresponding to the query condition as a log query result; The sending unit is configured to send the obtained log query result to a terminal device corresponding to the log query request. 7.An electronic device, comprising: one or more processors; a memory device having stored thereon one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1-5.

8. A computer readable medium having stored thereon a computer program, wherein, The computer program is executed by the processor to implement the method of any one of claims 1-5. 9.A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Simulation result analysis method and system, computer equipment and storage medium

    CN114253909A

  • Masking sensitive information in records of filtered accesses to unstructured data

    US10803197B1