Log query method and device

By using bitmap to store log identifiers in a multidimensional database and using bitmap operations, the problem of low log query efficiency is solved, and a faster log query process is achieved.

CN119537440AActive Publication Date: 2025-02-28SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510014171.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-02-28
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

In multi-dimensional databases, when the number of logs stored in relational databases is large, computing devices need to traverse a large number of logs to select logs that meet the specified query conditions, resulting in long query time and low query efficiency.

Method used

The log identifier of the log is stored in the form of a bitmap. Through efficient bit operations supported by the bitmap, the target log identifier is determined based on the log relationship of multiple filter dimensions, and the time for computing devices to determine the target log identifier and log is shortened.

Benefits of technology

Improve the efficiency of log queries, shorten the query time, and reduce the query load on the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537440A_ABST
    Figure CN119537440A_ABST
Patent Text Reader

Abstract

The invention discloses a log query method and device, and relates to the technical field of databases. The computing device stores the log identifier of the log in the form of a bitmap. In the log query process, the computing device can determine the target log identifier according to the log relationship of the multiple screening dimensions by using the efficient bit operation provided by the bitmap support, so that the time required by the computing device to determine the target log identifier is shortened, the time required by the computing device to determine the target log is further shortened, and the log query efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] During the use of a multidimensional database, operations such as inserting, querying, updating, and deleting are performed on cells of the multidimensional database based on business needs, and a computing device generates logs to record the operations performed on the cells. Generally, a computing device can use a relational database to store logs, and write a standardized structured query language (SQL) based on specified query conditions to select logs that meet the specified query conditions from all logs stored in the relational database.

[0003] In the above process, when the number of logs stored in the relational database is large, the computing device needs to traverse a large number of logs to select logs that meet the specified query conditions, resulting in long query time and low query efficiency. Summary of the invention

[0004] The present application provides a log query method and device for solving the problem of low log query efficiency.

[0005] In a first aspect, the present application provides a log query method. The method is applied to a database, and the database stores multiple logs. The log identifier of each log is stored in the form of a bitmap. The log identifier is used to uniquely mark the log in the database. The method provided in the first aspect of the present application includes: a computing device obtains a log query request. The log query request includes one or more target filtering conditions. The computing device queries the database for a target log identifier that matches the one or more target filtering conditions based on the log query request. Among them, the database stores log relations of multiple filtering dimensions. The log relationship of a filtering dimension includes: log identifiers under multiple filtering conditions. The target log identifier includes: one or more log identifiers that match the log query request. The computing device reads the target log from the database based on the target log identifier.

[0006] In the first aspect of the present application, the computing device stores the log identifier of the log in the form of a bitmap. During the log query process, the computing device can use the efficient bit operations provided by the bitmap support to determine the target log identifier according to the log relationship of multiple screening dimensions, shorten the time required for the computing device to determine the target log identifier, and further shorten the time required for the computing device to determine the target log, thereby improving the efficiency of log query.

[0007] Exemplarily, the above method can be executed by a computing device, or by a computing device cluster including multiple computing devices, or by a component of a computing device, such as a processor, chip or chip system of the computing device, or by a logic module or software that can implement all or part of the functions of the computing device, etc.

[0008] In a possible implementation, the computing device queries the target log identifier that matches one or more target filtering conditions from the database according to the log query request, including: the computing device queries the log relationships of multiple filtering dimensions according to the log query request, and determines the log relationships of the target filtering dimensions that match the one or more target filtering conditions. And the computing device queries the target log identifier that matches the one or more target filtering conditions according to the log relationships of the target filtering dimensions. In this way, the computing device determines the target log identifier according to the log relationships of the target filtering dimensions. The scope of the log relationships of the filtering dimensions that need to be queried is narrowed, the time required for log query is shortened, and the efficiency of log query is improved.

[0009] In another possible implementation, the log relationship of the target filtering dimension includes the log relationship of the first filtering dimension. The computing device queries the target log identifier that matches one or more target filtering conditions based on the log relationship of the target filtering dimension, including: the computing device determines the first log identifier that matches the first target filtering condition based on the log relationship of the first filtering dimension. The computing device determines the second log identifier that matches the second target filtering condition based on the log relationship of the first filtering dimension. The first target filtering condition and the second target filtering condition belong to one or more target filtering conditions. And the computing device calculates the OR of the bitmap of the first log identifier and the bitmap of the second log identifier to obtain the target log identifier. In this way, the computing device uses the efficient bit operation of the bitmap to determine the target log identifier, shorten the time required for log query, and improve the efficiency of log query.

[0010] In another possible implementation, the log relationship of the target screening dimension includes the log relationship of the first screening dimension and the log relationship of the second screening dimension. The computing device queries the target log identifier that matches one or more target screening conditions according to the log relationship of the target screening dimension, including: the computing device queries the target log identifier that matches one or more target screening conditions according to the log relationship of the first screening dimension and the log relationship of the second screening dimension in a specified query order. In this way, the computing device queries the log relationships of different dimensions in a specified query order, shortens the time required for log query, and improves the efficiency of log query.

[0011] In another possible implementation, the specified query order is determined according to the number of log identifiers of log relations of different screening dimensions. In this way, the computing device determines the specified query order according to the number of log identifiers of log relations of different screening dimensions, which can reduce the amount of calculation required to determine the target log identifier.

[0012] In another possible implementation, the specified query order is used to indicate that the log relationship of the target filtering dimension is queried in the order of the log relationship of the first filtering dimension and the log relationship of the second filtering dimension. The computing device queries the target log identifier that matches one or more target filtering conditions according to the log relationship of the first filtering dimension and the log relationship of the second filtering dimension in the specified query order, including: the computing device determines the third log identifier that matches the third target filtering condition according to the log relationship of the first filtering dimension. The computing device determines the fourth log identifier that matches the fourth target filtering condition according to the log relationship of the second filtering dimension. Among them, the third target filtering condition and the fourth target filtering condition belong to one or more target filtering conditions. And the computing device calculates the bitmap of the third log identifier and the bitmap of the fourth log identifier to obtain the target log identifier. In this way, the computing device calculates the bitmap of the log identifier determined by the log relationship of different filtering dimensions, and determines the target log identifier using the efficient bit operation of the bitmap, thereby shortening the time required for log query and improving the efficiency of log query.

[0013] In another possible implementation, before the computing device obtains the log query request, the method further includes: the computing device obtains multiple logs. A log includes one or more filtering conditions. The computing device generates a log identifier for each of the multiple logs. The computing device stores the log identifier of each of the multiple logs in the form of a bitmap. And the computing device generates a log relationship of multiple filtering dimensions based on the filtering conditions of each log, the filtering dimensions corresponding to the filtering conditions, and the log identifier of each log. In this way, the computing device generates log relationships of multiple filtering dimensions, which provides a controllable number of log identifiers under multiple filtering conditions included in the log relationship of each filtering dimension, shortens the time required for log query, and improves the efficiency of log query.

[0014] In another possible implementation, the method further includes: the computing device obtains the first log. The first log includes one or more filtering conditions. The computing device generates a first log identifier for the first log. The computing device stores the first log identifier in the form of a bitmap. And the computing device adds the one or more filtering conditions and the first log identifier to the log relationship of multiple filtering dimensions. In this way, the computing device can use the above process to add the new log to the log relationship of multiple filtering dimensions, so that the log relationship of multiple filtering dimensions includes the relevant information of the latest generated log, which provides a guarantee for the accuracy of the query results.

[0015] In another possible implementation, multiple logs are used to record operations performed on each cell in the multidimensional database.

[0016] In another possible implementation, the computing device provides an operation interface, and generates a log query request based on the operation performed by the user on the operation interface. In this way, the user can complete the log query operation through the operation interface, which is convenient to operate and improves the interaction friendliness.

[0017] In another possible implementation, the computing device provides a result display interface, which includes the target log, so that the user can directly see the target log, thereby improving the friendliness of the interaction.

[0018] In a second aspect, the present application provides a log query device, which includes modules for executing the log query method in the first aspect or any possible design of the first aspect.

[0019] In a third aspect, the present application provides a processor, wherein the processor includes an interface circuit and a control circuit, wherein the interface circuit is used to obtain a log query request and cooperate with the control circuit to implement the operation steps of the method in the first aspect or any possible design of the first aspect.

[0020] In a fourth aspect, the present application provides a computing device cluster. The computing device cluster includes at least one computing device, each computing device includes a processor and a memory. The processor of at least one computing device is used to execute instructions stored in the at least one memory, so that the computing device cluster performs the operation steps of the log query method in the first aspect or any possible design of the first aspect.

[0021] In a fifth aspect, the present application provides a computer-readable storage medium, including: computer software instructions; when the computer software instructions are executed in a computing device, the computing device executes the operation steps of the method described in the first aspect or any possible implementation of the first aspect.

[0022] In a sixth aspect, the present application provides a computer program product. When the computer program product is executed on a computer cluster, the computing device cluster executes the operation steps of the method described in the first aspect or any possible implementation of the first aspect.

[0023] The beneficial effects of the second to sixth aspects above can refer to the description of the first aspect or any implementation of the first aspect, and will not be repeated here. Based on the implementations provided by the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1This is an example diagram of a multidimensional data model;

[0025] Figure 2 Schematic diagram of two log screening methods;

[0026] Figure 3 A schematic diagram of the architecture of a log query system provided for this application;

[0027] Figure 4 A schematic diagram of the structure of a chip provided in this application;

[0028] Figure 5 A flow chart of a log query method provided by this application;

[0029] Figure 6 An example diagram of a log query process provided by this application;

[0030] Figure 7 This is a comparison chart of log query methods;

[0031] Figure 8 A schematic diagram of the structure of a log query device provided by this application;

[0032] Fig. 9 A schematic diagram of the structure of a computing device cluster provided for this application;

[0033] Fig.10 A schematic diagram of the connection between computing devices provided for this application. DETAILED DESCRIPTION

[0034] The present application provides a log query method. In the method, a computing device stores log identifiers of logs in the form of a bitmap. During the log query process, the computing device can use the efficient bit operations provided by the bitmap support to determine the target log identifier according to the log relationship of multiple screening dimensions, shorten the time required for the computing device to determine the target log identifier, and further shorten the time required for the computing device to determine the target log, thereby improving the efficiency of log query.

[0035] In order to make the description of the following embodiments clear and concise, relevant terms that may be involved in this application are first briefly introduced.

[0036] A multidimensional data model is a data structure used to represent and query data. In a multidimensional data model, data is organized into a multidimensional data cube, with each dimension representing a different data attribute. A multidimensional data model allows data to be viewed and analyzed in a multidimensional manner. Figure 1 is an example diagram of a multidimensional data model, such as Figure 1As shown, the multidimensional data model includes three dimensions: time, region, and product. Users can determine a specified cell (cube) based on time, region, and product, and perform operations such as inserting, querying, updating, and deleting on the specified cell. The computing device can use logs to record operations performed on the cell.

[0037] Multi Dimensional Database (MDD) is a database system based on the multidimensional data model.

[0038] Logging is a technology for recording the history of database operations. Exemplarily, logging can be used to record operations performed on cells of a multidimensional data model in a multidimensional database.

[0039] A bitmap is a data structure that implements bit operations. A bitmap uses one bit to represent the state of an object, such as "1" to indicate that the object exists, and 0 to indicate that the object does not exist. In this case, "0110" can mean that 2 and 3 exist, and 1 and 4 do not exist.

[0040] A rolled bitmap is a data structure of a compressed bitmap. A rolled bitmap uses multiple data structures (such as containers and data) to store data to reduce storage space waste caused by data sparsity of the data to be stored.

[0041] The above briefly introduces the relevant terms involved in this application, and the following briefly introduces the relevant technologies involved in this application.

[0042] During the use of the multidimensional database, the computing device generates a log for each operation performed on each cell in the multidimensional data model. The number of cells in the multidimensional data model is large, and as the number of operations on the cells of the multidimensional data model increases, the number of logs generated by the computing device also increases. And the computing device can use Figure 2 Method 1 and method 2 shown in the figure select logs that meet the specified filtering conditions from a large number of logs. Figure 2 Schematic diagram of two log filtering methods.

[0043] Method 1

[0044] like Figure 2As shown in (a), the computing device uses the log analysis component ELK to select logs that meet the specified filtering conditions from a large number of logs. Specifically, the computing device uses data capture and log collection components (such as Logsta and Beat) to capture all logs. The computing device uses data storage and search components (such as Elasticsearch) to select logs that meet the specified filtering conditions from all logs. And the computing device uses visualization components (such as Kibana) to display logs that meet the specified filtering conditions.

[0045] In the above process, when there is high concurrent writing, data storage and search components (such as Elasticsearch) have write delays, resulting in low log query efficiency.

[0046] Method 2

[0047] like Figure 2 As shown in (b), the computing device obtains a log table that stores logs in a preset format, and stores the log table in a relational database. The computing device receives a SQL query statement in a standardized structured query language (SQL) written by a user based on a specified filtering condition, and selects logs that meet the specified filtering condition from the relational database based on the SQL query statement.

[0048] In the above process, when the number of logs between different logs of the same cell is large, the computing device needs to traverse all logs between different logs to obtain all logs of the same cell, which takes a long time to query and has low query efficiency.

[0049] In view of the low efficiency of log query in both the above-mentioned method 1 and method 2, the present application provides a log query method. This method can be applied to Figure 3 The log query system shown.

[0050] Figure 3 A schematic diagram of the architecture of a log query system provided for this application, such as Figure 3 As shown, the log query system 300 includes a computing device 310. The computing device 310 can be a common computer device, such as a personal computer, a tablet computer, a server with an external display device, etc. The computing device 310 can obtain input data (such as obtaining a log query request), process the input data (such as obtaining a target log from a log query request), and obtain and output a result (such as a target log).

[0051] The computing device 310 includes a communication interface 314, a processor 311, a memory 312, and a bus 316. The communication interface 314 is used to communicate with a device outside the computing device 310. For example, a user inputs a log query request to the computing device 310 through the communication interface 314. The communication interface may be an input / output (I / O) interface.

[0052] The processor 311 is the computing core and control core of the computing device 310, which may include: a central processing unit (CPU), a specific integrated circuit, other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. In practical applications, the computing device 310 may also include multiple processors. The processor 311 may include one or more processor cores. An operating system and other software programs are installed in the processor 311, so that the processor 311 can access the memory 312 and various peripheral component interconnect express (PCIe) devices.

[0053] The processor 311 is connected to the memory 312 via the bus 316. The memory 312 is the main memory of the computing device 310. The bus 316 may be a double data rate (DDR) bus or other types of buses. The memory 312 is usually used to store various running software in the operating system. In order to improve the access speed of the processor 311, the memory 312 needs to have the advantage of fast access speed. In traditional computer devices, dynamic random access memory (DRAM) is usually used as the memory 312. In addition to DRAM, the memory 312 may also be other random access memories, such as static random access memory (SRAM). In addition, the memory 312 may also be a read-only memory (ROM). For example, the read-only memory may be a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), etc. This embodiment does not limit the number and type of the memory 312.

[0054] In some possible scenarios, the computing device 310 may further include a display 318. The display 318 may display an operation interface, and in response to a user's operation on the operation interface, obtain a log query request, etc. The display 318 may also display a result display interface, which includes a target log. The display 318 may be a liquid crystal display (LCD), etc.

[0055] In some possible situations, in order to store data (such as target logs) persistently, the log query system 300 is further provided with a data storage system 313, which may be located outside the computing device 310 (such as a storage device). Figure 3 As shown), the data storage system 313 exchanges data with the computing device 310 through the network. Optionally, the data storage system 313 may also be located inside the host, such as the data storage system 313 exchanges data with the processor 311 through the bus 316. In this case, the data storage system 313 is a hard disk.

[0056] In some possible scenarios, the log query system 300 may further include a client device 320. In this scenario, the computing device 310 may obtain a log query request from the client device 320. The client device 320 provides an operation interface, generates a log query request based on the operation performed by the user on the operation interface, and sends the log query request to the computing device 310. The client device 320 may be a common computing device, including but not limited to: a personal computer, a server, a mobile phone, a tablet computer, etc.

[0057] For example, Figure 3 The processor 311 in the embodiment may be implemented by a chip, such as Figure 4 As shown, Figure 4 A schematic diagram of the structure of a chip provided in the present application, illustratively, the chip 400 includes a core 401, a CPU 402, a system buffer 403, an input / output (I / O) device 405 and a double data rate synchronous dynamic random access memory (DDR) 406.

[0058] Among them, CPU 402 is used to accept tasks (such as log query tasks, etc.) and call core 401 to execute the tasks. In the case where chip 400 has multiple cores 401, CPU 402 is also used to undertake scheduling tasks. For example, CPU 402 can be implemented by an ARM processor, which is small in size, low in power consumption, uses a 34-bit reduced instruction set, and has simple and flexible addressing. Of course, in some embodiments, CPU 402 can also be implemented by other processors.

[0059] Core 401 is used to provide the computing power required in the log query task. In an optional scenario, core 401 includes a load / store unit (LSU), a cube computing unit, a scalar computing unit, a vector computing unit and a buffer. Among them, LSU is used to load data to be processed and store processed data, and can also be used for the read and write management of internal data in the core between different buffers, and to complete some format conversion operations. The cube computing unit is used to provide the core computing power of matrix multiplication. The scalar computing unit is a single instruction single data (SISD) processor, which only processes one piece of data (usually an integer or floating point number) at the same time. The vector computing unit, also known as an array processor, is a processor that can directly operate a group of arrays or vectors for calculation. The number of buffers may be one or more, such as the buffer mainly refers to the level 1 buffer (L1 buffer), which is used to temporarily store some data that the core 401 needs to use repeatedly to reduce reading and writing from the bus. In addition, the implementation of certain data format conversion functions also requires the source data to be located in the buffer. In this embodiment, since the buffer is located in the core, the distance between the cube computing unit in the core and the storage area where the data is located is shortened, reducing the access of the cube computing unit to DDR 406, thereby reducing the data access delay and the core data processing delay.

[0060] The system buffer 403 mainly refers to the secondary cache, which is used to temporarily store input data, intermediate results or final results passing through the chip.

[0061] DDR 406 is an off-chip memory, which can also be replaced by high bandwidth memory (HBM) or other off-chip memory. DDR 406 is located between the chip and the external memory, overcoming the access speed limitation when computing resources share memory reading and writing.

[0062] The I / O device 405 included in the chip 400 refers to the hardware for data transmission, and can also be understood as a device connected to the I / O interface. Common I / O devices include network cards, printers, keyboards, mice, etc. All external memories can also be used as I / O devices, such as hard disks, floppy disks, optical disks, etc.

[0063] The core 401, the CPU 402, the system buffer 403, the I / O device 405, and the DDR 406 are connected via a bus. The bus may include a path for transmitting information between the above components (such as the CPU 402 and the system buffer 403). In addition to the data bus, the bus may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus may be a PCIe bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a computer express link (CXL), a cache coherent interconnect for accelera-tors (CCIX), etc. For example, the core 401 can access these I / O devices 405 via the PCIe bus. The core 401 is connected to the system buffer 403 via the DDR bus. Here, different system buffers 403 may use different data buses to communicate with the core 401, so the DDR bus may also be replaced by other types of data buses, and the embodiment of the present application does not limit the bus type.

[0064] For example, when the CPU 402 loads the data to be processed by the log query task (such as the log query request) into the DDR 406, the LSU in the core 401 reads (loads) the data from the DDR 406, and processes the data to obtain the processing result (such as the target log). When the processing result is obtained, the LSU loads (stores) the processing result into the DDR 406, and the network interface card sends it to the data storage system 313 for persistent storage.

[0065] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the computing device and chip. In other embodiments, the computing device and chip may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0066] Combine the following Figure 3 and Figure 4 The content shown provides a detailed description of the log query method provided by this application.

[0067] Figure 5This is a flow chart of a log query method provided by the present application. The log query method can be executed by a computing device, a computing device cluster, a component of a computing device (such as a processor, chip or chip system of a computing device), etc., and can also be implemented by a logic module or software. In the case where the log query method is executed by a computing device, the computing device can be Figure 3 The computing device 310 and the client device 320 are shown. For the hardware implementation of the computing device, please refer to the aforementioned Figure 3 In the case where the log query method is executed by a component of a computing device, the computing device component may be Figure 4 The chip shown in the figure, etc. For the hardware implementation of the chip, please refer to the aforementioned Figure 4 In some optional examples, the log query method can also be executed by other computing devices. For the hardware implementation of other computing devices, please refer to the aforementioned Figure 3 , Figure 4 The description is not repeated here.

[0068] Here, a computing device is used to execute the log query method provided in this embodiment as an example for explanation. Figure 5 As shown, the log query method provided in this embodiment includes the following S510 to S530.

[0069] S510, the computing device obtains a log query request.

[0070] The log query request includes one or more target filtering conditions.

[0071] The computing device may obtain the log query request in a variety of ways. Examples of two possible ways are given below.

[0072] Example 1: A computing device receives a log query request.

[0073] For example, a computing device can receive a log query request sent by a user using a client. In this case, the computing device can provide a callable interface to the outside world, and the client uses the interface to query the log. Specifically, the client accesses the interface of the computing device from the management plane or browser, and the computing device obtains the log query request based on the above access. The management plane of the client is used to implement the management of the client.

[0074] Example 2: A computing device generates a log query request.

[0075] In this case, the computing device may generate a log query request based on the operation used. The above operations include but are not limited to: touch, slide, click, etc. The computing device may also generate a log query request when it detects that the log generation condition is met. The above log generation condition may include but is not limited to: the number of logs that meet the specified condition is greater than or equal to the log number threshold. The specified condition may include but is not limited to: date, cell, operation type, etc.

[0076] In some possible scenarios, the computing device may adopt an interface layer to obtain a log query request, and adopt an engine layer to determine a target log identifier based on the obtained log query request, and determine a target log according to the target log identifier.

[0077] Based on the exemplary description of the manner in which the computing device obtains the log query request, the following uses S520 to describe the process in which the computing device determines the target log identifier.

[0078] S520: The computing device queries a database for a target log identifier that matches one or more target screening conditions according to the log query request.

[0079] The database stores log relationships of multiple filtering dimensions, and a log relationship of a filtering dimension includes: log identifiers under multiple filtering conditions, and the computing device can use S61 to S64 to generate log relationships of multiple filtering dimensions. For details, please refer to the relevant description below. The target log identifier includes: one or more log identifiers that match the log query request.

[0080] The computing device is provided with a database, and a plurality of logs are stored in the database. The log identifier of each log in the plurality of logs is stored in the form of a bitmap, and the log identifier of the log is used to uniquely mark the log in the database. For example, the computing device can store the corresponding relationship between the log and the bitmap of the log identifier. The computing device can store the above-mentioned corresponding relationship in a variety of forms, such as using the method shown in Table 1 to store the corresponding relationship between the log and the bitmap of the log identifier. In some possible situations, the corresponding relationship between the log and the log identifier can also be referred to as log data.

[0081] Table 1 An example of the correspondence between logs and log identification bitmaps

[0082]

[0083] The computing device can determine the log relationship of the target filtering dimension that matches one or more target filtering conditions from the log relationship of multiple filtering dimensions, and determine the target log identifier based on the log relationship of the target filtering dimension. Specifically, the computing device queries the log relationship of multiple filtering dimensions according to the log query request, and determines the log relationship of the target filtering dimension that matches one or more target filtering conditions. And the computing device queries the target log identifier that matches one or more target filtering conditions according to the log relationship of the target filtering dimension.

[0084] In some possible situations, when the screening dimension corresponding to the target screening condition is the same as the first screening dimension among multiple screening dimensions, the first screening dimension can be considered to be the target screening dimension that matches the target screening condition. For example, the target screening condition is xx year x month x day. Multiple screening dimensions include time, operation type, and cell. In this case, the screening dimension corresponding to the target screening condition xx year x month x day is time. The computing device determines that time among multiple screening dimensions is the target screening dimension that matches the target screening condition.

[0085] The above describes the process of determining the target filtering dimension according to one or more target filtering conditions, and determining the target log identifier according to the target filtering dimension. Depending on the number of filtering dimensions included in the target filtering dimension, the process of determining the target log identifier according to the target filtering dimension by the computing device is also different, which is described below in different situations.

[0086] In case A, the number of filtering dimensions included in the target filtering dimension is 1.

[0087] In this case, depending on the number of target screening conditions, the process of the computing device determining the target log identifier according to the target screening dimensions is also different, which is described below in different cases.

[0088] In case a1, the number of target screening conditions is 1.

[0089] In this case, the computing device may perform the following process to determine the target log identifier: Specifically, the computing device determines the log identifier matching the target screening condition according to the log relationship of the target screening dimension, and the computing device determines the log identifier as the target log identifier.

[0090] Exemplarily, the log relationship of the target screening dimension is shown in Table 2. The target screening condition is xx year x month 1. In this case, the computing device determines that the log identifiers matching the target screening condition are 1 and 2 according to the log relationship of the target screening dimension shown in Table 2, and the computing device determines 1 and 2 as the target log identifiers.

[0091] Table 2 An example of log relationship of target screening dimension

[0092]

[0093] Case a2: the number of target screening conditions is greater than or equal to 2.

[0094] In this case, the computing device can determine multiple log identifiers that match multiple target filtering conditions based on the log relationship of the target filtering dimension, and the computing device can OR the bitmap of the above multiple log identifiers based on one target filtering condition to obtain the target log identifier.

[0095] Take the log relationship of the target filtering dimension as the log relationship of the first filtering dimension. Take the target filtering condition including the first target filtering condition and the second target filtering condition as an example. In this case, the computing device can perform the following process to determine the target log identifier. Specifically, the computing device determines the first log identifier that matches the first target filtering condition based on the log relationship of the first filtering dimension. The computing device determines the second log identifier that matches the second target filtering condition based on the log relationship of the first filtering dimension. The first target filtering condition and the second target filtering condition belong to one or more target filtering conditions. And the computing device calculates the OR of the bitmap of the first log identifier and the bitmap of the second log identifier to obtain the target log identifier.

[0096] The above text takes the case where the target filtering conditions include two, namely the first target filtering condition and the second target filtering condition as an example to illustrate the process of the computing device determining the target log identifier. According to the needs of the actual application, the target filtering conditions may also include other target filtering conditions, such as the third target filtering condition. In this case, the computing device determines the third log identifier that matches the third target filtering condition based on the log relationship of the first filtering dimension. And the computing device calculates the bitmap of the first log identifier, the bitmap of the second log identifier, and the bitmap of the third log identifier to obtain the target log identifier. For the specific method of calculating the bitmap, please refer to the description of the general technology, which will not be repeated here.

[0097] Exemplarily, the log relationship of the target screening dimension is shown in Table 2 above. The target screening conditions include xx / xx / 1 and xx / xx / 2. In this case, the computing device determines that the log identifiers matching xx / xx / 1 are 1 and 2, and that the log identifiers matching xx / xx / 2 are 33 and 55, according to the log relationship of the target screening dimension shown in Table 2. The computing device then calculates the OR of the above log identifiers 1, 2, 33, and 55, and obtains the target log identifiers 1, 2, 33, and 55.

[0098] In case B, the number of filtering dimensions included in the target filtering dimension is greater than or equal to 2.

[0099] In this case, according to the different number of target filtering conditions corresponding to each filtering dimension in the target filtering dimension, the process of the computing device determining the target log identifier according to the target filtering dimension is also different, which is described below in different cases.

[0100] In case b1, the number of target filtering conditions corresponding to each filtering dimension is 1.

[0101] In this case, the computing device determines the log identifier corresponding to each target filtering condition according to the log relationship of multiple target filtering dimensions, and the computing device performs a bitmap summation of the log identifiers in units of one target filtering dimension to obtain the target log identifier.

[0102] Taking the case where the target screening dimension includes the first screening dimension and the second screening dimension, the target screening condition includes the third target screening condition and the fourth target screening condition, and the third target screening condition corresponds to the first screening dimension and the fourth target screening condition corresponds to the second screening dimension as an example, the process of the computing device determining the target log identifier is described. Specifically, the computing device determines the third log identifier that matches the third target screening condition based on the log relationship of the first screening dimension. The computing device determines the fourth log identifier that matches the fourth target screening condition based on the log relationship of the second screening dimension. And the computing device ANDs the bitmap of the third log identifier and the bitmap of the fourth log identifier to obtain the target log identifier.

[0103] The above text takes the case where the target screening dimensions include two, namely the first screening dimension and the second screening dimension, as an example to illustrate the process of the computing device determining the target log identifier. According to the needs of the actual application, the target screening dimensions may also include other screening dimensions, such as the third screening dimension. The target screening conditions may also include other target screening conditions, such as the fifth target screening conditions. In this case, the computing device uses the above method to determine the fifth log identifier that matches the fifth target screening condition. And the computing device sums the bitmap of the third log identifier, the bitmap of the fourth log identifier, and the bitmap of the fifth log identifier to obtain the target log identifier. For the specific method of summing the bitmap, please refer to the description of the general technology, which will not be repeated here.

[0104] Exemplarily, the target screening dimension includes a first screening dimension and a second screening dimension. The log relationship of the first screening dimension is shown in Table 2 above, and the log relationship of the second screening dimension is shown in Table 3 below. The third target screening condition is xx / xx / xx. The fourth target screening condition is cell 1. In this case, the computing device determines that the log identifiers that match the third screening condition are 1 and 2 based on the log relationship of the first screening dimension shown in Table 2. The computing device determines that the log identifiers that match the fourth screening condition are 1 and 55 based on the log relationship of the second screening dimension shown in Table 3. And the computing device ANDs the above-mentioned log identifiers 1, 2, 1 and 55, and obtains the target log identifier 1.

[0105] Table 3 Another example of log relationship of target filter dimension

[0106]

[0107] In case b2, among the multiple screening dimensions, there is at least one screening dimension for which the number of target screening conditions corresponding to the dimension is greater than or equal to 2.

[0108] In this case, the computing device can use the method described in the above case a2 to determine the log identifier under each filtering dimension in the target filtering dimension, and use the method described in the above case b1 to determine the target log identifier based on the log identifiers under each filtering dimension. For specific descriptions, please refer to the relevant instructions above and will not be repeated here.

[0109] Exemplarily, the target screening dimension includes a first screening dimension and a second screening dimension. The target screening condition includes the first target screening condition to the third target screening condition. The log relationship of the first screening dimension is shown in Table 2 above, and the log relationship of the second screening dimension is shown in Table 3 above. The first target screening condition is xx year x month 1 day, the second target screening condition is xx year x month 2 day, and the third target screening condition is cell 1. In this case, the computing device determines that the log identifiers matching the first target screening condition are 1 and 2 according to the log relationship of the first screening dimension. The computing device determines that the log identifiers matching the second target screening condition are 33 and 55 according to the log relationship of the first screening dimension. And the computing device calculates the bitmap of the above log identifiers and obtains log identifiers of 1, 2, 33 and 55. The computing device determines that the log identifiers matching the third target screening condition are 1 and 55 according to the log relationship of the second screening dimension. And the computing device calculates the log identifiers 1, 2, 33 and 55, and the log identifiers 1 and 55, and determines that the target log identifiers are 1 and 55.

[0110] In some possible situations, in order to further improve the efficiency of the computing device in determining the target log identifier. When the target filtering dimension includes multiple filtering dimensions, the computing device can filter the multiple filtering dimensions according to the specified query order. For example, the log relationship of the target filtering dimension includes the log relationship of the first filtering dimension and the log relationship of the second filtering dimension. In this case, the computing device queries the target log identifier that matches one or more target filtering conditions according to the log relationship of the first filtering dimension and the log relationship of the second filtering dimension in the specified query order.

[0111] In some possible situations, the above-mentioned specified query order is determined according to the number of log identifiers possessed by log relations of different screening dimensions. For example, the specified query order is to query the log relations of different screening dimensions in the order from small to large according to the number of log identifiers possessed by log relations of different screening dimensions. In this way, the number of log identifiers determined according to the log relations of the screening dimensions is reduced to reduce the amount of calculation of the computing device for ORing and ANDing the log identifiers, thereby improving the query efficiency. The computing device can determine the number of log identifiers according to the statistical information of the log identifiers of the log relations of different screening dimensions under multiple screening conditions.

[0112] Exemplarily, the target screening dimensions include time, cell, and operation type. The log relationship of time is shown in Table 2 above, the log relationship of cell is shown in Table 3 above, and the log relationship of operation type is shown in Table 4 below. The screening conditions include xx / x / 1, xx / x / 2, and cell 2 insertion. In this case, the computing device can determine the target log identifier in the following order. Specifically, the computing device determines that the log identifier that matches cell 2 is 2 based on the log relationship of the cell. The computing device determines that the log identifier that matches the insertion is 1 based on the log relationship of the operation type. And the computing device ANDs the above-mentioned log identifier 2 and log identifier 1 to determine that the target log identifier is empty. In this case, the computing device does not need to determine the log identifier that matches the screening conditions xx / x / 1 and xx / x / 2 based on the log relationship of time, and can determine that the target log identifier is empty, which shortens the time required for querying to obtain the target log identifier and improves the efficiency of the query. And the target log can be determined without querying all the screening conditions, reducing the requirements for the screening conditions.

[0113] Table 4 Another example of log relationship of target screening dimension

[0114]

[0115] S530: The computing device reads the target log from the database according to the target log identifier.

[0116] The computing device can determine the target log according to the correspondence between the log and the bitmap of the log identifier. Taking the correspondence between the log and the bitmap of the log identifier as shown in Table 1, and the target log identifiers are 1 and 55 as an example, in this case, the computing device can directly determine the target logs as log1 and log55 according to the correspondence shown in Table 1.

[0117] The above describes the process of the computing device determining the target log according to the target log identifier in combination with S510 to S530. The following describes the process of the computing device generating log relationships of multiple filtering dimensions according to multiple logs in combination with S61 to S64.

[0118] S61: The computing device obtains multiple logs.

[0119] A log includes one or more filter conditions. The filter conditions include but are not limited to: time, operation type, cell, etc. The time can refer to xx year x month x day, or other time formats set according to the needs of actual applications, such as xx year x month x day x hour, etc. The operation type includes but is not limited to: insert, update, delete, etc.

[0120] Exemplarily, the multiple logs include log 1 and log 2. Log 1 includes the filter condition xx year x month 1 day, and performs an insert operation on cells [3, 5, 7]. Log 2 includes the filter condition xx year x month 1 day, and performs an update operation on cells [1, 2, 3].

[0121] S62: The computing device generates a log identifier for each of the multiple logs.

[0122] The computing device may generate a log identifier for each of the multiple logs in a variety of ways, such as the computing device generating a log identifier for each of the multiple logs in a self-incrementing manner. For example, the computing device obtains logs i to log i+1, and the generation time of log i is earlier than the generation time of log i+1. In this case, the computing device may generate a log identifier i for log i, and a log identifier i+1 for log i+1. Where i≥1 and i is an integer.

[0123] S63: The computing device stores the log identifier of each log in the plurality of logs in the form of a bitmap.

[0124] For example, the log identifier of log 5 is 5. In this case, the computing device may use 00010000 to store the log identifier of log 5.

[0125] In some possible situations, in order to further reduce the storage resources occupied by storing log identifiers, the computing device may also store the log identifier of each log in the plurality of logs in the form of a compressed bitmap. For more information about the computing device using the compressed bitmap format data, please refer to the general technical description, which will not be described here.

[0126] S64, the computing device generates a log relationship of multiple filtering dimensions according to the filtering condition of each log, the filtering dimension corresponding to the filtering condition, and the log identifier of each log.

[0127] The filter dimension corresponding to the filter condition may refer to the filter dimension to which the filter condition belongs. For example, when the filter condition is xx / xx / 1, time may be considered as the filter dimension corresponding to the filter condition. For another example, when the filter condition is insert, operation type may be considered as the filter dimension corresponding to the filter condition. For another example, when the filter condition is cell [1, 2, 3], cell may be considered as the filter dimension corresponding to the filter condition.

[0128] Exemplarily, the multiple logs include log 1 and log 2. Log 1 includes the filter condition xx year x month 1 day, and performs an insert operation on cell [3, 5, 7]. Log 2 includes the filter condition xx year x month 1 day, and performs an update on cell [1, 2, 3]. The log identifier of log 1 is 1, and the log identifier of log 2 is 2. In this case, the computing device can generate the corresponding relationship of time shown in Table 5 below, the corresponding relationship of operation type shown in Table 6, and the corresponding relationship of cells shown in Table 7 based on the above content.

[0129] Table 5 Correspondence of time

[0130]

[0131] Table 6 Correspondence between operation types

[0132]

[0133] Table 7 Correspondence between cells

[0134]

[0135] In some possible scenarios, after the computing device generates log relationships of multiple filtering dimensions based on multiple logs using the above S61 to S64, a new log may also be generated. For example, according to the needs of actual applications, the computing device performs operations such as inserting, updating, and deleting on cells of the multidimensional data model, and the computing device generates logs to record the above operations. In this case, the computing device can use the following process to update the log relationship of the multidimensional filtering dimension based on the relevant information of the new log. Specifically, the computing device obtains a first log, which includes one or more filtering conditions. The computing device generates a first log identifier for the first log, and stores the first log identifier in the form of a bitmap. And the computing device adds the one or more filtering conditions and the first log identifier to the log relationship of multiple filtering dimensions.

[0136] Exemplarily, the new log is log 3. Log 3 includes the screening condition xx year x month 2, and deletes the cell [3, 5, 7]. In this case, the computing device generates a log identifier 3 for log 3, and stores the log identifier 3 in the form of a bitmap. The computing device adds the relevant information of log 3 to the above-mentioned Tables 5 to 7 to obtain the following Tables 8 to 10.

[0137] Table 8 Correspondence of time

[0138]

[0139] Table 9 Correspondence between operation types

[0140]

[0141] Table 10 Correspondence between cells

[0142]

[0143] The above describes the process of a computing device inserting logs into a log relationship of multiple filtering dimensions. The following is an example of a computing device using an interface layer to receive a log query request, and using an engine layer to determine a target log identifier based on the log query request, and determining a target log based on the target log identifier, to exemplify the log query process.

[0144] Figure 6 An example diagram of a log query process provided for this application, such as Figure 6 As shown, the client calls the interface of the computing device from the management plane and initiates a log query request. The interface layer of the computing device receives the log query request, and the interface layer of the computing device transmits the log query request to the engine layer of the computing device. The engine layer of the computing device queries the log relationships and log data of multiple screening dimensions to determine the target log identifier. The computing device determines the target log according to the target log identifier.

[0145] In the above Figure 7 On the basis of explaining the log query process, the following is a comparison between the log query method provided by the conventional technology and the log query method provided by the present application, taking multiple logs including log1 to log99, and multiple logs for recording the operations performed by the computing device on the cells of the three-dimensional data model, and the filtering dimensions corresponding to the filtering conditions of the multiple logs include time, operation type, and cells as an example. In the present application, log i can also be referred to as logi, where i is a positive integer greater than or equal to 1.

[0146] Figure 7 This is a comparison chart of log query methods, such as Figure 7 As shown in (a), in the conventional technology, the computing device generates a log table. The log table includes the filtering conditions of each log from log1 to log99, and each log. For example, the log to be queried is the log associated with the cell [3, 5, 7]. In this case, the computing device traverses the log table one by one and determines that the target logs are log1 and log55. For another example, the log to be queried is the insert operation performed on the cell [3, 5, 7] on xx / x / 1. In this case, the computing device obtains the log recording xx / x / 1 in the log table, obtains the log about the cell [3, 5, 7] in the log recording xx / x / 1, and determines from the above log about the cell [3, 5, 7] that the operation performed is the insert operation.

[0147] like Figure 7 As shown in (b), in this application, the computing device can generate a log identifier for each log, and generate a log relationship of multiple filtering dimensions according to the filtering conditions of each log. And the computing device determines the target log identifier according to the log relationship of multiple filtering dimensions, and determines the target log according to the target log identifier.

[0148] Specifically, the computing device generates a log identifier for each log from log1 to log99, and stores the above log identifier in the form of a bitmap. The computing device generates a log relationship of time according to the time of each log from log1 to log99, generates a log relationship of operation type according to the operation type of each log, generates a log relationship of cells according to the cells corresponding to each log, and generates log data according to the corresponding relationship between the log identifier and the log. And the computing device determines the target log identifier based on the log identifiers of multiple filtering dimensions according to the target filtering conditions included in the log query request, and determines the target log according to the target log identifier and the log data.

[0149] For example, the target screening condition is cell [3, 5, 7]. In this case, the computing device determines the target log identifiers as 1 and 55 according to the log relationship of the cells. And the computing device determines the target logs as log1 and log55 according to the log data.

[0150] For another example, the target screening conditions are: cell [3, 5, 7], xx / xx / 1, and insert operation. In this case, the computing device determines log identifiers 1 and 55 based on the log relationship between the cell [3, 5, 7] and the cell. The computing device determines log identifiers 1 and 2 based on the log relationship between xx / xx / 1 and time. And the computing device determines log identifier 1 based on the log relationship between the insert operation and the operation type. The computing device ANDs the bitmaps of log identifiers 1 and 55, the bitmaps of log identifiers 1 and 2, and the bitmap of log identifier 1, and determines that the target log identifier is 1. And the computing device determines that the target log is log1 based on the target log identifier 1 and the log data.

[0151] In the embodiment of the present application, the computing device stores the log identifier of the log in the form of a bitmap. During the log query process, the computing device can use the efficient bit operations provided by the bitmap support to determine the target log identifier according to the log relationship of multiple screening dimensions, shorten the time required for the computing device to determine the target log identifier, and further shorten the time required for the computing device to determine the target log, thereby improving the efficiency of log query.

[0152] It is understandable that in order to implement the functions in the above embodiments, the computing device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0153] Combined with the above Figures 1 to 7 , describes in detail the log query method provided according to this embodiment, and will now be combined with Figure 8 , describes the log query device provided according to this embodiment.

[0154] Figure 8 A structural diagram of a log query device provided by this application, such as Figure 8As shown, the log query device 800 includes: a transceiver module 810 and a processing module 820. The transceiver module 810 is used to: obtain a log query request. The log query request includes one or more target filtering conditions. The processing module 820 is used to: query the target log identifier that matches the one or more target filtering conditions from the database according to the log query request. Among them, the database stores log relations of multiple filtering dimensions, and the log relationship of one filtering dimension includes: log identifiers under multiple filtering conditions, and the target log identifier includes: one or more log identifiers that match the log query request. The processing module 820 is also used to: read the target log from the database according to the target log identifier.

[0155] In some possible situations, the processing module 820 is used to: query the log relations of multiple screening dimensions according to the log query request, and determine the log relations of the target screening dimensions that match one or more target screening conditions. The processing module 820 is also used to: query the target log identifiers that match one or more target screening conditions according to the log relations of the target screening dimensions.

[0156] In some possible situations, the log relationship of the target filtering dimension includes the log relationship of the first filtering dimension. The processing module 820 has a function for: determining a first log identifier that matches the first target filtering condition based on the log relationship of the first filtering dimension. The processing module 820 also has a function for: determining a second log identifier that matches the second target filtering condition based on the log relationship of the first filtering dimension. The first target filtering condition and the second target filtering condition belong to one or more target filtering conditions. The processing module 820 also has a function for: taking the OR of the bitmap of the first log identifier and the bitmap of the second log identifier to obtain the target log identifier.

[0157] In some possible situations, the log relationship of the target screening dimension includes the log relationship of the first screening dimension and the log relationship of the second screening dimension. The processing module 820 is used to: query the target log identifier matching one or more target screening conditions according to the log relationship of the first screening dimension and the log relationship of the second screening dimension in a specified query order.

[0158] In some possible scenarios, the specified query order is determined according to the number of log identifiers possessed by log relations of different screening dimensions.

[0159] In some possible situations, the specified query order is used to indicate that the log relationship of the target filtering dimension is queried in the order of the log relationship of the first filtering dimension and the log relationship of the second filtering dimension. The processing module 820 has a function for: determining a third log identifier that matches the third target filtering condition based on the log relationship of the first filtering dimension. The processing module 820 also has a function for: determining a fourth log identifier that matches the fourth target filtering condition based on the log relationship of the second filtering dimension. Among them, the third target filtering condition and the fourth target filtering condition belong to one or more target filtering conditions. The processing module 820 also has a function for: taking the bitmap of the third log identifier and the bitmap of the fourth log identifier to obtain the target log identifier.

[0160] In some possible situations, the transceiver module 810 is further used to obtain multiple logs. A log includes one or more filtering conditions. The processing module 820 is further used to generate a log identifier for each of the multiple logs. The processing module 820 is further used to store the log identifier of each of the multiple logs in the form of a bitmap. The processing module 820 is further used to generate log relations of multiple filtering dimensions according to the filtering condition of each log, the filtering dimension corresponding to the filtering condition, and the log identifier of each log.

[0161] In some possible situations, the transceiver module 810 is further used to: obtain a first log. The first log includes one or more filtering conditions. The processing module 820 is further used to: generate a first log identifier for the first log. The processing module 820 is further used to: store the first log identifier in the form of a bitmap. The processing module 820 is further used to: add the one or more filtering conditions and the first log identifier to a log relationship of multiple filtering dimensions.

[0162] In some possible situations, the log query device 800 further includes a display module 830. The display module 830 is used to display an operation interface. The processing module 820 is used to generate a log query request based on an operation performed by a user on the operation interface.

[0163] In some possible situations, the display module 830 is further used for: a result display interface, where the result display interface includes a target log.

[0164] In some possible scenarios, multiple logs are used to record operations performed on cells in a multidimensional database.

[0165] Specifically, for more descriptions about the transceiver module 810, the processing module 820 and the display module 830, please refer to the above descriptions about the log query method, which will not be repeated here.

[0166] When the log query device 800 corresponds to the steps performed by the computing device in the log query method described in the embodiments of the present application, the above and other operations and / or functions of each module in the log query device 800 are respectively for implementing the method flow performed by the computing device in the aforementioned figures.

[0167] It is worth noting that if the above-mentioned log query devices are implemented through software modules, for example, the software module can be provided to users through a cloud service subscription model, and users can choose different subscription levels according to their needs; for example, the software module can also provide enterprise-level customized services with professional domain customization, interface personalization and extended functions according to the needs of users or enterprises.

[0168] In addition, the log query device 800 provided in the present application can also be provided to users as a value-added service, which is not limited in the present application.

[0169] The log query device of the embodiment of the present application can also be implemented by hardware. For example, the hardware refers to a computing device, a chip or a processor. For the specific implementation of the computing device, please refer to Figure 3 For details about the implementation of chips and processors, please refer to Figure 4 The description is not repeated here.

[0170] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a computing device. Of course, the processor and the storage medium can also exist as discrete components in a network device or a terminal device.

[0171] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device, which may be a server with a display. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0172] like Fig. 9 As shown, Fig. 9 This is a schematic diagram of the structure of a computing device cluster provided by the present application, and the computing device cluster includes at least one computing device 310. The memory 312 in one or more computing devices 310 in the computing device cluster may store the same instructions for executing the log query method.

[0173] In some possible implementations, the memory 312 of one or more computing devices 310 in the computing device cluster may also store partial instructions for executing the log query method. In other words, the combination of one or more computing devices 310 may jointly execute instructions for executing the log query method.

[0174] It should be noted that the memory 312 in different computing devices 310 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the computing devices. That is, the instructions stored in the memory 312 in different computing devices 310 can implement the functions of one or more units in the transceiver module 810, the processing module 820 and the display module 830.

[0175] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.10 A possible implementation is shown. Fig.10 As shown, Fig.10 A schematic diagram of a connection between computing devices provided in the present application, wherein two computing devices 310A and 310B are connected via a network. Specifically, the connection is made to the network via a communication interface in each computing device. In this type of possible implementation, the instructions stored in the memory 312 in the computing device 310A can implement the functions implemented by the transceiver module 810 and the display module 830. At the same time, the instructions stored in the memory 312 in the computing device 310B can implement the functions implemented by the processing module 820.

[0176] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be a software or program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the log query method.

[0177] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. 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 hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the log query method.

[0178] The present application also provides a chip. The chip includes an interface circuit and a control circuit. The interface circuit is used to obtain a log query request, and the control circuit is used to implement the function of a computing device in a log query method.

[0179] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by 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 programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).

[0180] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A log query method, characterized in that: The method is applied to a database, wherein the database stores a plurality of logs, wherein a log identifier of each log is stored in the form of a bitmap, and the log identifier is used to uniquely mark the log in the database, and the method comprises: Obtaining a log query request; the log query request includes one or more target screening conditions; According to the log query request, querying the database for a target log identifier that matches the one or more target screening conditions; The database stores log relations of multiple screening dimensions, wherein a log relation of a screening dimension includes: log identifiers under multiple screening conditions, and the target log identifier includes: one or more log identifiers matching the log query request; The target log is read from the database according to the target log identifier.

2. The method according to claim 1, characterized in that The step of querying the database for a target log identifier that matches the one or more target screening conditions according to the log query request includes: querying the log relationships of the multiple screening dimensions according to the log query request, and determining the log relationships of the target screening dimensions that match the one or more target screening conditions; According to the log relationship of the target screening dimension, the target log identifiers matching the one or more target screening conditions are queried.

3. The method according to claim 2, characterized in that The log relationship of the target screening dimension includes the log relationship of the first screening dimension, The querying of the target log identifiers matching the one or more target screening conditions according to the log relationship of the target screening dimension includes: Determining a first log identifier matching a first target screening condition according to the log relationship of the first screening dimension; Determine, according to the log relationship of the first screening dimension, a second log identifier matching a second target screening condition; the first target screening condition and the second target screening condition belong to the one or more target screening conditions; The bitmap of the first log identifier and the bitmap of the second log identifier are ORed to obtain the target log identifier.

4. The method according to claim 2, characterized in that: The log relationship of the target screening dimension includes the log relationship of the first screening dimension and the log relationship of the second screening dimension. The querying of the target log identifiers matching the one or more target screening conditions according to the log relationship of the target screening dimension includes: In a specified query order, according to the log relationship of the first screening dimension and the log relationship of the second screening dimension, query the target log identifiers that match the one or more target screening conditions.

5. The method according to claim 4, characterized in that The specified query order is determined according to the number of log identifiers possessed by log relations of different screening dimensions.

6. The method according to claim 4 or 5, characterized in that: The specified query order is used to indicate that the log relationship of the target screening dimension is queried in the order of the log relationship of the first screening dimension and the log relationship of the second screening dimension. The step of searching for target log identifiers matching the one or more target screening conditions according to the log relationship of the first screening dimension and the log relationship of the second screening dimension in the specified query order includes: Determining, according to the log relationship of the first screening dimension, a third log identifier matching a third target screening condition; Determine, according to the log relationship of the second screening dimension, a fourth log identifier matching a fourth target screening condition; wherein the third target screening condition and the fourth target screening condition belong to the one or more target screening conditions; The bitmap of the third log identifier and the bitmap of the fourth log identifier are ANDed to obtain the target log identifier.

7. The method according to any one of claims 1 to 5, characterized in that Before obtaining the log query request, the method further includes: Get multiple logs; a log includes one or more filter conditions; Generating a log identifier for each of the plurality of logs; storing a log identifier of each log in the plurality of logs in the form of a bitmap; A plurality of log relationships of the filtering dimensions are generated according to the filtering condition of each log, the filtering dimension corresponding to the filtering condition, and the log identifier of each log.

8. The method according to claim 7, characterized in that The method further comprises: Obtain a first log; the first log includes one or more screening conditions; generating a first log identifier for the first log; storing the first log identifier in the form of a bitmap; The one or more filtering conditions and the first log identifier are added to the log relationship of the multiple filtering dimensions.

9. A log query device, characterized in that: The device comprises: The transceiver module is used to: obtain a log query request; the log query request includes one or more target screening conditions; A processing module, configured to: query a database for a target log identifier that matches the one or more target screening conditions according to the log query request; The database stores log relations of multiple screening dimensions, wherein a log relation of a screening dimension includes: log identifiers under multiple screening conditions, and the target log identifier includes: one or more log identifiers matching the log query request; The processing module is further used to read the target log from the database according to the target log identifier.

10. A processor, characterized in that: The processor comprises an interface circuit and a control circuit; the interface circuit is used to obtain a log query request and cooperate with the control circuit to execute the method according to any one of claims 1 to 8.

11. A computing device cluster, characterized in that: The computing device cluster includes at least one computing device, each computing device including a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 8.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes computer instructions; when the computer instructions are executed in a computing device, the computing device executes the method according to any one of claims 1 to 8.

13. A computer program product, characterized in that When the computer program product is run in a computing device, the computing device performs the method of any one of claims 1-8.

Citation Information

Patent Citations

  • Object query platform, object query method and device and query server

    CN111813812A

  • Log query method and device, storage medium and electronic equipment

    CN112100138A

  • Log retrieval method and device and electronic equipment

    CN113177023A

  • Data query method and device, electronic equipment and storage medium

    CN117591480A

  • Method and Apparatus for Recording Associations with Logs

    US20080243751A1