Data filtering method and device, electronic equipment and storage medium

By constructing the mapping relationship between tables in the business database and the comparison conditions for receiving user input, a condition matcher is generated, which solves the complexity of business database query filtering and realizes simple data filtering operations for ordinary users.

CN120448380AActive Publication Date: 2025-08-08WUHAN BAISIJIE TECH CO LTD

Patent Information

Application Number
CN202510471094.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-08-08
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

In the prior art, the query filtering of business databases is difficult and is difficult for ordinary users to operate, especially considering the differences and syntax issues of different databases.

Method used

By constructing mapping relationships between and within each table in the business database, receiving comparison columns, comparison characters and comparison values input by users, determining data filtering conditions based on this information, generating a condition matcher for data verification, and directly obtaining data in the target table that meets user needs.

Benefits of technology

Users do not need to consider the syntax and performance issues of database query statements, and directly select comparison columns and comparison values through mapping relationships, simplifying data filtering operations and suitable for non-professional technicians.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448380A_ABST
    Figure CN120448380A_ABST
Patent Text Reader

Abstract

The invention provides a data filtering method and device, electronic equipment and a storage medium, and belongs to the technical field of software information systems.The method comprises the steps that mapping relations between tables in a service database and inside the tables are built; after the mapping relation is displayed, receiving an input comparison column, a comparison symbol and a comparison value; determining a data filtering condition based on the comparison column, the comparator and the comparison value; and based on the data filtering condition, determining data meeting user requirements in a target table of the business database. According to the method, the data filtering condition is finally determined through the mapping relation between the tables in the business database and the mapping relation inside the tables and the data selection instruction input by the user, and the technical problems that the query filtering work of the business database is large in difficulty and not easy to operate are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software information systems, and in particular to a data filtering method, device, electronic equipment and storage medium. Background Art

[0002] Most software systems rely on relational databases to maintain business data. The need to query business data is very common in daily work, such as compiling some report data or tracking and querying the detailed status based on a certain business document.

[0003] Querying business data typically requires writing specialized database query statements, such as SQL. However, database query statements present a high barrier to entry for average system end users. Furthermore, differences between business databases, along with syntax and performance issues, make query filtering within business databases challenging and difficult for average users. Summary of the Invention

[0004] In view of this, it is necessary to provide a data filtering method, device, electronic device and storage medium to solve the technical problem that query filtering of business databases is difficult and intractable.

[0005] In order to solve the above problems, in a first aspect, the present invention provides a data filtering method, comprising: Construct mapping relationships between tables and within tables in the business database; After displaying the mapping relationship, receiving input comparison column, comparison operator and comparison value; Determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value; Based on the data filtering condition, data that meets the user requirements is determined in the target table of the business database.

[0006] In a possible implementation, determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value includes: Determine at least one data filtering sub-condition based on the comparison column, comparison operator, and comparison value required to construct the data filtering condition; When the number of data filtering sub-conditions is at least two, combining at least two different data filtering sub-conditions according to a set combination relationship to obtain a data filtering condition; The combination relationship includes: and / or.

[0007] In a possible implementation, determining the data filtering condition based on the comparison column, the comparison operator, and the comparison value further includes: When the number of the data filtering sub-condition is one, the data filtering sub-condition is determined to be the data filtering condition.

[0008] In a possible implementation, determining data that meets user requirements in the target table of the business database based on the data filtering condition includes: Generate a condition matcher based on the data filtering condition; The data in the target table of the business database is verified based on the condition matcher to obtain data that meets user requirements.

[0009] In a possible implementation, verifying the data in the target table of the business database based on the condition matcher to obtain data that meets user requirements includes: Based on the condition matcher, the data corresponding to the comparison column in the target table of the business database is compared with the comparison operator and comparison value corresponding to the condition matcher, and the data that meets the user requirements is determined based on the comparison result.

[0010] In a possible implementation, the condition matcher compares the data corresponding to the comparison column in the target table of the business database with the comparison operator and the comparison value corresponding to the condition matcher, and determines the data that meets the user requirement based on the comparison result, including: In a case where the condition matcher corresponds to at least two different data filtering sub-conditions, the condition matcher compares the data corresponding to the comparison column in the target table of the business database with the comparison operator and the comparison value corresponding to each data filtering sub-condition respectively; Perform a logical OR / logical AND operation on the comparison results corresponding to each data filter sub-condition, and determine the data that meets the user's needs based on the operation results.

[0011] In a possible implementation, the comparison value corresponding to the column data in the target table of the business database is a static comparison value or a dynamic comparison value.

[0012] In a second aspect, the present invention further provides a data filtering device, comprising: Mapping relationship building module, used to build mapping relationships between tables and within tables in the business database; A comparison data determination module, configured to receive input comparison columns, comparison operators, and comparison values after displaying the mapping relationship; A condition building module, configured to determine a data filtering condition based on the comparison column, the comparison operator, and the comparison value; The data filtering module is used to determine the data that meets the user's requirements in the target table of the business database based on the data filtering conditions.

[0013] In a third aspect, the present invention further provides an electronic device comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps of any one of the above data filtering methods.

[0014] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the data filtering method as described in any one of the above items.

[0015] The beneficial effect of adopting the above-mentioned implementation method is: the data filtering method, device, electronic device and storage medium provided by the present invention are directly based on the mapping relationship between and within each table in the business database. The user selects the required comparison column and the corresponding comparison operator and comparison value based on the mapping relationship to determine the data filtering conditions, and then determines the data in the target table of the business database that meets the user's needs. At this time, the user does not need to consider the syntax and performance issues corresponding to the query statement of the business database, nor does he need to consider the differences between different types of databases. He can directly select data. The process of selecting comparison columns, comparison operators and comparison values does not require writing database query statements. Even for ordinary users who are not professional technicians, the operation is relatively simple, thereby solving the technical problem that the query filtering work of the business database is difficult and not easy to operate. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A flow chart of an embodiment of the data filtering method provided by the present invention; Figure 2 A flow chart of generating data filtering conditions provided by the present invention; Figure 3 A functional block diagram of an embodiment of a data filtering device provided by the present invention; Figure 4 This is a schematic structural diagram of an embodiment of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0018] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0019] In the description of the embodiments of the present application, unless otherwise specified, “a plurality of” means two or more.

[0020] The terms "including" and "having" and any variations thereof in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or device comprising a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products or devices.

[0021] The naming or numbering of the steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0022] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0023] The present invention provides a data filtering method, device, electronic device and storage medium, which are described below respectively.

[0024] like Figure 1 As shown, the present invention provides a data filtering method, comprising: S101: Construct mapping relationships between tables and within tables in a business database.

[0025] It can be understood that the business data of the system are all structured and stored in a relational database. The present invention maps out all the tables in the business database, the columns in the tables, and the relationships between the tables (the relationship between primary keys and foreign keys, for example: the relationship between the order table, the order detail table, and the product table, one order has multiple order details, and each order detail contains one product). At this time, the user does not need to worry about the structure and design of the database.

[0026] S102: After displaying the mapping relationship, receiving input comparison column, comparison operator and comparison value.

[0027] As you can understand, each condition must include a comparison column, a comparison operator, and a comparison value. The comparison column is selected based on the mapped database column and supports columns from both the primary table and the tables establishing relationships. When constructing conditions, you're not limited to setting a single condition for a particular column. For example, the amount of an order detail can be filtered using two conditions: "Order detail.amount > 10,000" and "Order detail.amount < 50,000."

[0028] For example, consider two business database tables. The first table contains columns of order number, order name, and order date, while the second table contains columns of order number and order amount. Each table contains multiple order numbers. Based on each order's unique order number, a mapping relationship can be constructed between the two tables, as well as within each table. Specifically, the order numbers, order names, order dates, and order amounts in the two tables are mapped to form a one-to-one correspondence, or mapping relationship. In other words, this mapping relationship encompasses both the correspondence between different columns within the same table and the correspondence between columns in different tables.

[0029] The mapping relationship and the corresponding optional comparison operators and comparison values are displayed on the display, and the user can perform human-computer interaction through the display. The mapping relationship can list multiple selectable comparison columns. For example, if the data in the comparison column is a date, the corresponding comparison operator can be "earlier than, later than, or equal to". The user can arbitrarily select one or more comparison columns and corresponding comparison operators, and select or enter the corresponding comparison value. For example, the first comparison column selected by the user is the order date, the corresponding comparison value is "1 month", and the corresponding comparison operator is "earlier than". The second comparison column is the order amount, the corresponding comparison value is 5000, and the corresponding comparison operator is ">". The final data filtering condition is "order details that are earlier than 1 month and the order amount is >5000".

[0030] S103: Determine a data filtering condition based on the comparison column, the comparison operator, and the comparison value.

[0031] It can be understood that the columns and comparison operators involved in the conditions can be the amounts in the order details, the comparison operator is ">", and the comparison value is 10000. The data filtering condition is "Order details.Amount>10000".

[0032] S104: Based on the data filtering condition, determine the data that meets the user's requirements in the target table of the business database.

[0033] It can be understood that the data filtered out by satisfying the data filtering conditions is the data in the target table of the business database that meets the user's needs.

[0034] The method provided by the present invention can be implemented based on an application on a terminal or a server, the terminal can be a mobile phone or a computer, and the server can be a cloud server or an edge server. The data selection instruction input by the user can be input through the interactive screen of the terminal or through the keyboard of the server.

[0035] The present invention maps all tables in the system's database, all columns within the tables, and the relationships between them (for example, the relationship between the order table, order detail table, and product table, where one order has multiple order details, each containing one product). Taking a business table as the primary focus, the present invention supports selecting columns (including columns within tables whose relationships are established between them, meaning join-table queries), comparison operators, and comparison values to construct filter conditions. In other words, a specification is constructed in the format of "column, comparison operator, comparison value," and then data is read to verify whether it meets this specification. For example, "personnel's age > 50" is a filter condition.

[0036] Conventional data filtering involves generating a SQL statement based on a series of complex operations and then querying and filtering the database. This requires consideration of database differences, statement syntax, and performance issues. The solution provided by this invention takes a different approach, determining whether the data meets the requirements based on the data itself. Data can be sourced in multiple ways (database reading and interface transmission), significantly improving usability.

[0037] In some embodiments, determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value includes: Determine at least one data filtering sub-condition based on the comparison column, comparison operator, and comparison value required to construct the data filtering condition; When the number of data filtering sub-conditions is at least two, combining at least two different data filtering sub-conditions according to a set combination relationship to obtain a data filtering condition; The combination relationship includes: and / or.

[0038] It can be understood that each data filtering sub-condition can be used as a minimum unit, and multiple minimum units can be constructed into a condition group based on the combination relationship, that is, constitute a data filtering condition. Multiple condition groups can also be constructed into a large group based on the combination relationship, and the combination relationship is and, and, or.

[0039] The process of an example data filtering condition is as follows Figure 2For example, the two filter conditions "Order Details.Amount > 10,000" and "Order Details.Amount < 50,000" are combined into a filter condition for amounts between 10,000 and 50,000. These two conditions can also be combined into Group A, and then further combined with Group B (Order Details.Operator = Current User). Figure 2 The selected columns in are the comparison columns.

[0040] In some embodiments, determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value further includes: When the number of the data filtering sub-condition is one, the data filtering sub-condition is determined to be the data filtering condition.

[0041] It is understandable that, when the number of data filtering sub-conditions is one, data filtering is determined directly based on this data filtering sub-condition without further combination.

[0042] In some embodiments, determining data that meets user requirements in a target table of the business database based on the data filtering condition includes: Generate a condition matcher based on the data filtering condition; The data in the target table of the business database is verified based on the condition matcher to obtain data that meets user requirements.

[0043] It is understood that after users set conditions according to rules, the data will be stored in a specific format (JSON format) as a filtering rule. These stored filtering rules are generated by the condition filtering module to generate a condition matcher. The condition matcher provides an interface to verify whether the incoming data meets the requirements of this matcher.

[0044] In some embodiments, verifying the data in the target table of the business database based on the condition matcher to obtain data that meets user requirements includes: Based on the condition matcher, the data corresponding to the comparison column in the target table of the business database is compared with the comparison operator and comparison value corresponding to the condition matcher, and the data that meets the user requirements is determined based on the comparison result.

[0045] As you can understand, the condition matcher internally parses the set conditions, then reads the state of the incoming data column based on the comparison column of the condition. It then compares the comparison operator and the comparison value, ultimately outputting a Boolean conclusion. The comparison rule converts the values into constant values for comparison. For example, "Order Details.Amount > 10,000" reads the amount data from the order details and performs a numerical comparison. Other similar calculations are similar. Combinations perform logical OR or logical AND calculations based on the combination logic.

[0046] In some embodiments, the condition matcher compares the data corresponding to the comparison column in the target table of the business database with the comparison operator and the comparison value corresponding to the condition matcher, and determines the data that meets the user requirement based on the comparison result, including: In a case where the condition matcher corresponds to at least two different data filtering sub-conditions, the condition matcher compares the data corresponding to the comparison column in the target table of the business database with the comparison operator and the comparison value corresponding to each data filtering sub-condition respectively; Perform a logical OR / logical AND operation on the comparison results corresponding to each data filter sub-condition, and determine the data that meets the user's needs based on the operation results.

[0047] It is understandable that when a condition matcher is generated based on at least two different data filtering sub-conditions, it is necessary to compare the data corresponding to the comparison column in the target table with the comparison operator and comparison value of each data filtering sub-condition respectively.

[0048] For example, the comparison operator of the first data filter sub-condition is ">", and the comparison value is 10000. The comparison operator of the second data filter sub-condition is "<", and the comparison value is 50000. The data corresponding to the comparison column is the order details and amount data. The comparison results are logically ANDed. The data that finally meets the user's needs is the order details and amount data between 10000 and 50000.

[0049] In some embodiments, the comparison value corresponding to the column data in the target table of the business database is a static comparison value or a dynamic comparison value.

[0050] It's understandable that comparison values can be static or dynamic. Static comparison values can be manually entered, such as a fixed number (100), a date (January 21, 2025), or a character (P0001). Dynamic comparison values record a business reference, such as today (the current date is read each time), last Friday, the next seven days, or a specific state of the current table (the planned or actual amount of an order detail).

[0051] The input of comparison operators and comparison values will change dynamically according to the data type of the selected column. For example, for date type, you can select today or yesterday, and for numeric type, you can select within the set range.

[0052] In some embodiments, the method provided by the present invention is divided into five steps to construct filtering conditions and then match data that meets the conditions. Specifically, they include: 1. Build database mapping: The business data of the system are all stored in a structured relational database. The present invention maps out all the tables in the business database, the columns in the tables, and the relationships between the tables (the relationships between primary keys and foreign keys, for example: the relationship between the order table, the order detail table, and the product table, where one order has multiple order details and each order detail contains one product). At this time, the user does not need to worry about the structure and design of the database.

[0053] Mapping primarily allows you to select more conditions based on a specific business master table. For example, if the order details table links order and product information, you can use the order details table as the master table and then select certain order or product statuses to create conditions. For example, Order Details.Order.Order Number = P0001 or Order Details.Product.Quantity > 10,000. Theoretically, this can be extended indefinitely as long as the relationship exists.

[0054] 2. Select the columns, comparison operators, and comparison values for the conditions (i.e., data filtering conditions): Each condition must contain comparison columns, comparison operators, and comparison values.

[0055] Comparison columns are selected based on mapped database columns, supporting columns from both the primary table and the associated table. Conditions aren't limited to a single condition per column. For example, the amount of an order detail can be filtered using two conditions: "Order Details.Amount > 10,000" and "Order Details.Amount < 50,000."

[0056] The comparison operator varies depending on the column data type, as shown in Table 1 below.

[0057] Table 1: Data types and comparison methods

[0058] Comparison values can be static or dynamic. Static comparison values can be manually entered, such as a fixed number (100), a date (January 21, 2025), or a character (P0001). Dynamic comparison values record a business reference, such as today (the current date is read each time), last Friday, the next seven days, a state in the current table (the planned or actual amount of an order detail), or a runtime variable (the currently logged-in user).

[0059] The input of comparison operators and comparison values will change dynamically according to the data type of the selected column. For example, for date type, you can select today or yesterday, and for numeric type, you can select within the set range.

[0060] 3. Combine various conditions: Each condition can be used as a minimum unit, which is equivalent to a data filtering condition. Multiple minimum units can be constructed into a condition group based on the combination relationship. Multiple condition groups can also be constructed into a large group based on the combination relationship, which is equivalent to a data filtering condition. The combination relationship is and, and, or.

[0061] For example, the two filter conditions "Order Details.Amount > 10,000" and "Order Details.Amount < 50,000" are combined into a filter condition for amounts between 10,000 and 50,000. These two conditions can also be combined into Group A, which can be further combined with Group B (Order Details.Operator = Current User).

[0062] The combined feature supports conditional filtering settings in all scenarios.

[0063] 4. Storing and reading filter conditions: After users set conditions based on rules, the data will be stored in a specific format (JSON format) as a filtering rule. These stored filtering rules are generated by the conditional filtering module to generate a condition matcher. The condition matcher provides an interface to verify whether the incoming data meets the requirements of the matcher.

[0064] 5. Make comparisons and output conclusions: If you need to verify whether certain data meets a certain filtering rule, you only need to convert the filtering rule into a condition matcher and call the interface.

[0065] Within the condition matcher, the set filter conditions are parsed, and the state of the incoming data column is read according to the comparison column of the filter condition. The comparison is then performed based on the comparison operator and the comparison value, ultimately outputting a Boolean conclusion. The comparison rule converts the data into a constant value for comparison. For example, "Order Details.Amount > 10,000" reads the amount data from the order details and performs a numerical comparison. Other similar calculations are performed. Combinations perform logical OR or logical AND calculations based on the combination logic.

[0066] The method provided by the present invention takes the main table as the center and diverges to connect other business tables with relationships, thereby expanding the scope of condition matching that can be set. The expanded matching scope further improves ease of use.

[0067] Uncertain comparison values are a very common requirement. Generally, comparisons are made based on actual business calculations. The dynamic comparison value provided by the solution of the present invention is only a business reference, and a specific comparison value is generated based on this reference when conditional verification is performed.

[0068] The filtering condition combination provided by the present invention can greatly enrich the possibility of condition setting and theoretically cover all scenarios requiring such filtering.

[0069] like Figure 3 As shown, the present invention further provides a data filtering device 300, comprising: A mapping relationship building module 301 is used to build mapping relationships between tables and within tables in a business database; The comparison data determination module 302 is configured to receive input comparison columns, comparison operators, and comparison values after displaying the mapping relationship; A condition building module 303 is used to determine a data filtering condition based on the comparison column, the comparison operator and the comparison value; The data filtering module 304 is configured to determine data that meets user requirements in the target table of the business database based on the data filtering conditions.

[0070] The data filtering device provided in the above embodiment can implement the technical solution described in the above data filtering method embodiment. The specific implementation principles of the above modules or units can be found in the corresponding content in the above data filtering method embodiment, which will not be repeated here.

[0071] like Figure 4 As shown, the present invention also provides an electronic device 400. The electronic device 400 includes a processor 401, a memory 402 and a display 403. Figure 4 Only some of the components of the electronic device 400 are shown, but it should be understood that implementation of all of the shown components is not required, and more or fewer components may be implemented instead.

[0072] In some embodiments, the memory 402 may be an internal storage unit of the electronic device 400, such as a hard disk or memory of the electronic device 400. In other embodiments, the memory 402 may also be an external storage device of the electronic device 400, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 400.

[0073] Furthermore, the memory 402 may include both an internal storage unit of the electronic device 400 and an external storage device. The memory 402 is used to store application software installed in the electronic device 400 and various data.

[0074] In some embodiments, the processor 401 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program codes stored in the memory 402 or process data, such as the data filtering method of the present invention.

[0075] In some embodiments, display 403 can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 403 is used to display information on electronic device 400 and to display a visual user interface. Components 401-403 of electronic device 400 communicate with each other via a system bus.

[0076] In some embodiments of the present invention, when the processor 401 executes the data filtering program in the memory 402, the following steps may be implemented: Construct mapping relationships between tables and within tables in the business database; After displaying the mapping relationship, receiving input comparison column, comparison operator and comparison value; Determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value; Based on the data filtering condition, data that meets the user requirements is determined in the target table of the business database.

[0077] It should be understood that, when the processor 401 executes the data filtering program in the memory 402 , in addition to the above functions, it can also implement other functions. For details, please refer to the description of the corresponding method embodiment above.

[0078] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 400 mentioned. The electronic device 400 may be a portable electronic device such as a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, or laptop computer. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The portable electronic devices mentioned above may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 400 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0079] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the data filtering method provided by the above methods, the method comprising: Construct mapping relationships between tables and within tables in the business database; After displaying the mapping relationship, receiving input comparison column, comparison operator and comparison value; Determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value; Based on the data filtering condition, data that meets the user requirements is determined in the target table of the business database.

[0080] Those skilled in the art will appreciate that all or part of the process steps of the above-described embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a magnetic disk, an optical disk, a read-only memory, or a random access memory.

[0081] The data filtering method, device, electronic device and storage medium provided by the present invention are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

Claims

1. A data filtering method, characterized in that: include: Construct mapping relationships between tables and within tables in the business database; After displaying the mapping relationship, receiving input comparison column, comparison operator and comparison value; Determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value; Based on the data filtering condition, data that meets the user requirements is determined in the target table of the business database.

2. The data filtering method according to claim 1, characterized in that: Determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value includes: determining at least one data filtering sub-condition based on the comparison column, the comparison symbol, and the comparison value; When the number of data filtering sub-conditions is at least two, combining at least two different data filtering sub-conditions according to a set combination relationship to obtain a data filtering condition; The combination relationship includes: and / or.

3. The data filtering method according to claim 2, characterized in that: Determining a data filtering condition based on the comparison column, the comparison operator, and the comparison value further includes: When the number of the data filtering sub-condition is one, the data filtering sub-condition is determined to be the data filtering condition.

4. The data filtering method according to any one of claims 1 to 3, characterized in that: Determining data that meets user requirements in a target table of the business database based on the data filtering condition includes: Generate a condition matcher based on the data filtering condition; The data in the target table of the business database is verified based on the condition matcher to obtain data that meets user requirements.

5. The data filtering method according to claim 4, characterized in that: Verifying the data in the target table of the business database based on the condition matcher to obtain data that meets user requirements includes: Based on the condition matcher, the data corresponding to the comparison column in the target table of the business database is compared with the comparison operator and comparison value corresponding to the condition matcher, and the data that meets the user requirements is determined based on the comparison result.

6. The data filtering method according to claim 5, characterized in that: Comparing the data corresponding to the comparison column in the target table of the business database with the comparison operator and the comparison value corresponding to the condition matcher based on the condition matcher, and determining the data that meets the user requirements based on the comparison result, including: In a case where the condition matcher corresponds to at least two different data filtering sub-conditions, the condition matcher compares the data corresponding to the comparison column in the target table of the business database with the comparison operator and the comparison value corresponding to each data filtering sub-condition respectively; Perform a logical OR / logical AND operation on the comparison results corresponding to each data filter sub-condition, and determine the data that meets the user's needs based on the operation results.

7. The data filtering method according to claim 5, characterized in that: The comparison value corresponding to the column data in the target table of the business database is a static comparison value or a dynamic comparison value.

8. A data filtering device, characterized in that: include: Mapping relationship building module, used to build mapping relationships between tables and within tables in the business database; A comparison data determination module, configured to receive input comparison columns, comparison operators, and comparison values after displaying the mapping relationship; A condition building module, configured to determine a data filtering condition based on the comparison column, the comparison operator, and the comparison value; The data filtering module is used to determine the data that meets the user's requirements in the target table of the business database based on the data filtering conditions.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein, The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps of the data filtering method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data filtering method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and device for high-performance query based on Hbase row keys

    CN106528674A

  • Generating Filters Automatically From Data Processing Jobs

    US20130152088A1

  • Dictionary Filtering and Evaluation in Columnar Databases

    US20240256550A1

Cited By

  • Document tracking method and device based on intelligent condition filtering and medium

    CN120973841A