Data filtering method, readable storage medium, electronic device and program product

By using a filtering component that automatically generates data tables and filters data based on user-input filtering conditions, the high cost and error problems caused by manually writing filtering code in existing technologies are solved, thus simplifying development and improving system maintainability.

CN119271885BActive Publication Date: 2026-04-10RENLIJIA NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
RENLIJIA NETWORK TECH CO LTD
Filing Date
2024-09-18
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, data table filtering operations rely on manually written filtering code, resulting in high time and labor costs. Furthermore, under complex and ever-changing data structures, code redundancy and errors are prone to occur, reducing the maintainability and scalability of the system.

Method used

By obtaining target field information from the data table, the corresponding filter component is automatically generated, and the data table is filtered according to the filter conditions input by the user, avoiding the process of manually configuring the filter component.

Benefits of technology

It simplifies the development process of data table filtering functions, reduces development workload, avoids code redundancy and errors, and improves the maintainability and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271885B_ABST
    Figure CN119271885B_ABST
Patent Text Reader

Abstract

The present specification provides a data filtering method, a readable storage medium, an electronic device and a program product. The data is maintained in a corresponding data table, and at least one field is configured in the data table. The method comprises: obtaining field information of a target field; generating a corresponding target filtering component according to the field information; obtaining a filtering condition input by a user for the target filtering component, and filtering data in the data table according to the filtering condition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to the technical field of database, and particularly relates to a data filtering method, a readable storage medium, an electronic device and a program product. BACKGROUND

[0002] In the front-end development process, a data table is a common form for displaying and managing data. When a user needs to query specific data from a large amount of data displayed on a front-end page, a corresponding data filtering operation can be performed based on the fields of the data table, so as to quickly filter irrelevant data and significantly improve the efficiency of data query.

[0003] In the related art, the implementation of the above data filtering operation usually depends on the manual writing of corresponding filtering code by a developer for a data table, and the configuration of a corresponding filtering component. This method not only consumes a large amount of time cost and labor cost, but also is more likely to cause code redundancy and error phenomenon in the face of complex and variable data structures, thereby reducing the maintainability and expandability of the overall system. SUMMARY

[0004] Therefore, the present specification provides a data filtering method, a readable storage medium, an electronic device and a program product to solve the problems in the related art.

[0005] Specifically, the present specification is implemented by the following technical solutions:

[0006] According to a first aspect of an embodiment of the present specification, a data filtering method is provided, the data being maintained in a corresponding data table, at least one field being configured in the data table; the method comprising:

[0007] obtaining field information of a target field;

[0008] generating a corresponding target filtering component according to the field information;

[0009] obtaining a filtering condition input by a user for the target filtering component, and filtering data in the data table according to the filtering condition.

[0010] According to a second aspect of an embodiment of the present specification, a computer readable storage medium is provided, and a computer program is stored on the computer readable storage medium, the program being executed by a processor to implement the steps of the method according to the first aspect.

[0011] According to a third aspect of an embodiment of the present specification, an electronic device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the steps of the method according to the first aspect.

[0012] According to a fourth aspect of the embodiments of the present specification, a computer program product is provided, comprising computer programs / instructions which, when executed by a processor, implement the steps of the method according to the first aspect.

[0013] In the technical solutions provided in the present specification, by obtaining the field information of the target field in the data table, the target filtering component corresponding thereto can be generated, thereby avoiding the process of manually configuring the filtering component, and facilitating dynamic and flexible filtering of data in the data table according to the filtering condition input by the user for the target filtering component. In summary, the above scheme significantly simplifies the development process of the data filtering function for the data table, reduces the development workload, thereby avoiding the occurrence of problems such as code redundancy or error phenomenon, and improves the maintainability and scalability of the overall system.

[0014] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present specification. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the present specification, and other drawings can also be obtained by those skilled in the art based on these drawings.

[0016] Figure 1 is a schematic diagram of the architecture of a data filtering system according to an example embodiment of the present specification;

[0017] Figure 2 is a schematic diagram of the flow of a data filtering method according to an example embodiment of the present specification;

[0018] Figure 3 is a schematic diagram of the flow of another data filtering method according to an example embodiment of the present specification;

[0019] Figure 4 is a schematic structural diagram of an electronic device according to an example embodiment of the present specification;

[0020] Figure 5 is a schematic structural diagram of a data filtering device according to an example embodiment of the present specification. DETAILED DESCRIPTION

[0021] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, unless otherwise indicated, like numbers in the attached drawings refer to the same or similar elements. The following description of exemplary embodiments is not representative of all possible embodiments consistent with the present description. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present description.

[0022] It should be noted that the steps of the methods in other embodiments are not necessarily performed in the order shown and described in the present description. In some other embodiments, the steps included in the methods can be more or less than those described in the present description. In addition, a single step described in the present description can be broken down into multiple steps in other embodiments; and multiple steps described in the present description can be combined into a single step in other embodiments. It should be understood that although the terms first, second, third, etc. can be used in the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information, without departing from the scope of the present description. Depending on the context, the word "if' as used herein can be interpreted as "when" or "upon determining" or "in response to determining".

[0023] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present description are information and data authorized by the user or authorized by all parties, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation portal for the user to choose authorization or refusal.

[0024] The embodiments of the data filtering method of the present description will be described in detail below with reference to the accompanying drawings.

[0025] Figure 1 is a schematic diagram of the architecture of a data filtering system shown in an exemplary embodiment of the present description, as Figure 1 shown, the above system can include the following parts: a data table 10 and a filtering component 12. Among them:

[0026] The data table 10 is a common form used to display and manage information in the front-end page. The data table 10 is composed of rows and columns. Each row represents a data record, and each column represents a field in the record. Each field can be used to display a part of the information in the corresponding data record, as Figure 1 shown, the data table 10 can include m fields, where m is a positive integer.

[0027] Filtering component 12 is a component in the front-end page used to filter data in a data table. Filtering component 12 allows users to filter and display data based on specific filtering conditions, enabling users to more effectively view and manipulate data they are interested in. For example... Figure 1 As shown, the filter component 12 can contain n components, each of which corresponds to any field in the data table 10, and each corresponding field is different from the others, where n is a positive integer not greater than m.

[0028] It should be noted that, as different parts of the same front-end page, data table 10 and filter component 12 can be designed with reasonable interface layout and style to ensure that the generated filter component is aesthetically pleasing and easy to use. For example, the filter component can be placed above or to the side of the data matrix for easy user operation. This manual does not impose any restrictions on this.

[0029] Figure 2 This is a flowchart illustrating an exemplary embodiment of a data filtering method, wherein the data is maintained in a corresponding data table, and the data table is configured with at least one field; the method includes:

[0030] Step S202: Obtain the field information of the target field.

[0031] When it is necessary to filter or select data in the above data table based on a target field, the field information of the target field can be obtained to facilitate the automatic generation of the corresponding filtering component. This field information includes, but is not limited to, the field name, data type (e.g., text, number, date), and the possible values ​​for enumerated data types.

[0032] This manual provides corresponding methods for obtaining the above field information at different setting stages.

[0033] In an embodiment, the front-end page can obtain the field information of the target field from a corresponding data source in the process of initializing the target field of the data table. The initialization of the data table can be triggered by the initialization of the front-end page itself, in which case the front-end page can participate in the initialization; or triggered by an independent initialization operation of the data table, in which case the front-end page can initialize the corresponding target field according to the controls such as timers, table refresh buttons, etc. in the front-end page. The data source can be a preset database, a spreadsheet, a JSON (JavaScript Object Notation) file, etc., which is not limited in the present specification. In this embodiment, the obtained field information directly comes from the data source without any modification in the middle. Considering that there is no need to repeat the acquisition after the first acquisition, the resource occupation is low, and therefore it is suitable for the data filtering scene of the data table with fixed field information.

[0034] In another embodiment, the front-end page can obtain the field information corresponding to the target field in the field setting request initiated for the target field. The field setting request can be generated by a field setting operation in the front-end page for updating the target field, and the field setting operation can be triggered by a user browsing the front-end page. In this embodiment, the user can trigger the field setting operation to dynamically update the target field of the data table, such as modifying the field information of the target field, e.g. field name, data type, etc. The field setting request triggered by the field setting operation can carry the modified field information. Considering that the number of times, timing of dynamic update of the target field by the user and the modified field information are not fixed, it is suitable for the data filtering scene of the data table with real-time modification of field information.

[0035] In step S204, the corresponding target filtering component is generated according to the field information.

[0036] After obtaining the field information of the target field, the corresponding target filtering component can be directly generated according to the field information, avoiding the step of manually writing the corresponding filtering component for the target field and reducing the development workload. The target filtering component can include a text input box, a number input box, a date selector, a drop-down menu, an area selector, etc. Specifically, the front-end page can determine the component type of the corresponding filtering component according to the data type and / or field name in the field information, and then generate the target filtering component according to the determined component type.

[0037] For example, if the data type is text, the corresponding component type can be determined as a text input box; if the data type is number, the corresponding component type can be determined as a number input box supporting range search; if the data type is date, the corresponding component type can be determined as a date selector; if the data type is enumeration type, the corresponding component type can be determined as a drop-down menu; if the data type is address type, the corresponding component type can be determined as a region selector; and if the data type is object type, the corresponding component type can be determined by self-defined processing.

[0038] For example, if the field name matches a text-related keyword such as "name", the corresponding component type can be determined as a text input box; if the field name matches a number-related keyword such as "price" or "age", the corresponding component type can be determined as a number input box; if the field name matches a date-related keyword such as "date of birth", the corresponding component type can be determined as a date selector; if the field name matches an enumeration type-related keyword such as "gender", "day of the week", or "month", the corresponding component type can be determined as a drop-down menu; and if the field name matches a text-related keyword such as "address", the corresponding component type can be determined as a region selector.

[0039] Of course, in the case of determining the component type according to both the data type and the field name, different priorities can be configured for different data types and field names, so that the final component type is determined when the corresponding component types of the two are inconsistent. For example, there is field information of a target field, and the priority of the data type is higher than that of the field name. If the data type is text type, but the field name matches a number-related keyword such as "age", the corresponding component type of the target field can still be determined as a text input box according to the data type.

[0040] The present specification can also determine whether to generate a target filter component according to the difference in component type.

[0041] In an embodiment, the determined component type can be matched with each expected component type in an expected component type set, and in the case of a failed match, the generation of the target filter component can be cancelled, and in the case of a successful match, the target filter component can be continued to be generated. The expected component type set can include user-predefined component types such as text, number type, etc. When the determined component type exists in the expected component type set, it can be considered that the component of the target filter component corresponding to the target field is of the component type. Accordingly, for component types that do not support or that the user does not wish to have data filtering functions, they can be excluded from the expected component type set, such as attachment type.

[0042] It can be understood that the expected component type set plays a similar role of a whitelist for the generation operation of the target filtering component. The specification can also create an illegal component type set based on a blacklist mechanism, and match the component type determined above with each expected component type in the illegal component type set. If the matching is successful, the generation operation of the target filtering component can be cancelled. If the matching fails, the target filtering component can continue to be generated.

[0043] In step S206, the filtering condition input by the user for the target filtering component is obtained, and the data in the data table is filtered according to the filtering condition.

[0044] In the generated target filtering component, the user can input the corresponding filtering condition, so that the data in the data table is filtered according to the filtering condition. Specifically, the target filtering component can be bound with the data in the data table, that is, the input event of the target filtering component is listened to through an event listening mechanism. When the user inputs the filtering condition in the target filtering component, the front-end page can timely capture the user input and apply the filtering condition to the data table. The form of the filtering condition is associated with the component type of the target filtering component. For example, when the target filtering component is a text input box, the text input by the user in the text input box will be the filtering condition. Or when the target filtering component is a date selector, the date selected by the user in the date selector will be the filtering condition.

[0045] As can be understood by those skilled in the art, after the target filtering component is generated, it can be provided with a default filtering condition that is empty, that is, no filtering is performed on any data, or it can be provided with a preset filtering condition, so that the corresponding data is directly filtered when the target filtering component is generated. Of course, regardless of the initial filtering condition, it can be updated and modified by the user inputting a new filtering condition.

[0046] As described above, the filtering condition input by the user into the target filtering component can be bound with the data in the data table through an event listening mechanism. The application can obtain the filtering condition input by the user at different input stages of the target filtering component, thereby realizing the filtering of the data in the data table.

[0047] In an embodiment, in the case that the target filtering component triggers an input end event, the filtering condition input by the user for the target filtering component can be obtained. At this time, the filtering condition is obtained only after the user completely inputs, so that the front-end page performs the data filtering operation of the data table. In this embodiment, the frequency of the user actively inputting the filtering condition is low, the execution interval of the data filtering operation is large, and the average computing resources required per unit time are reduced.

[0048] In another embodiment, in the case that the target filter component triggers the input execution event, the filter condition input by the user for the target filter component can be obtained. At this time, the filter condition has not been completely input by the user, but the data in the data table can be filtered according to at least a part of the filter condition that has been input. In this embodiment, the data filtering operation of the data table can be executed every time the user inputs the filter condition for the target filter component, so that the user can obtain the filtering result that meets the at least part of the filter condition in real time, and the filtering result output efficiency is higher than that in the previous embodiment.

[0049] For each filter component, in addition to the filter condition, the corresponding filter logic also needs to be configured to ensure the normal filtering of the data in the data table. For example, when the date selector is taken as the target filter component, the date input by the user for the target filter component can be “January 1, 2024”, at this time, the input content is automatically captured by the front-end page and applied as the filter condition, and the filter logic corresponding to the target filter component can be “filter all data in the corresponding target field that is not January 1, 2024”, or “filter all data in the corresponding target field that is later than January 1, 2024”, so that the data table will only display the corresponding data. For example, when the text input box is taken as the target filter component, at this time, the content input by the user in the text input box is automatically captured by the front-end page and applied as the filter condition, so that the data table will only display the data whose name contains the text.

[0050] In summary, the front-end page can filter the data in the above-mentioned data table according to the filter logic corresponding to the above-mentioned target filter component and the filter condition. The filter logic can be configured with one or more according to the specific form of the target filter component. Still taking the date selector as an example, when the filter condition input by the user for the target filter component is “January 1, 2024” and “January 1, 2025”, the filter logic corresponding to the target filter component can be “filter all data in the corresponding target field that is between January 1, 2024 and January 1, 2025”.

[0051] In this specification, the above-mentioned target field can include a plurality of fields, wherein each field can be configured with a corresponding field priority in order to improve the accuracy of the filtering result.

[0052] In one embodiment, when the field priorities corresponding to the first field and the second field are the same, the data filtering results obtained according to the filtering conditions of the first field and the second field can be taken as a union; when the field priorities corresponding to the first field and the second field are different, the data filtering results obtained according to the filtering conditions of the first field and the second field can be taken as an intersection. For the user, there are two scenarios: First, all fields in the data table have the same priority, and the user's filtering requirements for these fields are relatively broad; the filtered data only needs to meet the filtering conditions corresponding to at least one of the fields. Second, the data table may contain some fields with higher priority, and the user's filtering requirements for these fields are more stringent; for example, the filtered results obtained after inputting filtering conditions for the filtering components of these fields must contain only data that meets those filtering conditions. Of course, the above priorities can be preset by the front-end page or customized by the user; this specification does not impose any restrictions on this.

[0053] The following is combined Figure 3 Explain another data filtering method, such as Figure 3 As shown, the method includes the following steps:

[0054] Step S302: Obtain the data from the data table.

[0055] In one embodiment, suppose there is an employee system, and a front-end page containing this employee system includes a data table for displaying information, named "Employee Information Table". Users can filter data based on criteria such as name, date, and category. The specific details are as follows:

[0056] Table 1 Employee Information Table

[0057] Employee ID Name Department Date of Hire 1 Zhang San Finance Department 2023 / 3 / 15 2 Li Si Technology Department 2022 / 5 / 20 3 Wang Wu Personnel Department 2024 / 1 / 10 4 Zhao Liu Marketing Department 2023 / 7 / 22

[0058] Step S304: Parse the target field in the data table.

[0059] In one embodiment, the data table above displays employee information, including employee ID, name, department, and date of employment fields. By parsing the field information of each field, it can be determined that the data types of the above fields are integer (i.e., numeric type), text type, enumeration type, and date type, respectively.

[0060] Step S306: Determine whether the generation of the target filter component is supported based on the data type of the target field.

[0061] In an embodiment, if the data types of the above target fields all match the fields in the expected component type set, it is equivalent to each field supports generating a corresponding target filter component, and step S308 can be further executed. Of course, if there is any field matching the fields in the expected component type set, step S312 can be directly executed.

[0062] Step S308, generating target filter components and displaying.

[0063] In an embodiment, according to the data types of the above employee ID, name, department, and date of employment, a numerical input box, a text input box, a drop-down menu, and a date selector can be generated for each field, respectively, wherein the selectable items of the drop-down menu include all possible departments (such as the marketing department, the personnel department, the technical department, and the finance department).

[0064] Step S310, whether the user sets the field.

[0065] In an embodiment, a field setting request initiated by the user for any of the above fields can be received, and if there is, the original field can be dynamically set according to the field information corresponding to the target field in the field setting request, and step S302 can be re-executed to display a new data table.

[0066] Step S312, obtaining the filter condition input by the user for the target filter component.

[0067] In an embodiment, assuming that the "technical department" selectable item of the drop-down menu of the department field is selected, the above employee system can take the "technical department" as the filter condition of the employee information table.

[0068] Step S314, filtering the data in the data table according to the filter condition, and displaying the filtering result.

[0069] In an embodiment, by selecting the "technical department" as the filter condition, the above system can filter out the employee information belonging to the "technical department" from the original data table according to this condition (as follows), and display these information in the filtered data table. Such filtering operation can help the user quickly find the specific information they are interested in.

[0070] Table 2 filtered employee information table

[0071] Employee ID Name Department Date of Hire 2 Li Si Technology Department 2022 / 5 / 20 5 Qian Qi Technology Department 2021 / 11 / 5

[0072] Figure 4 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Please refer to Figure 4At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and can also include other hardware required by functions. One or more embodiments of the present specification can be implemented in a software manner, such as reading a corresponding computer program from the non-volatile memory 410 into the memory 408 by the processor 402 and then running. Of course, in addition to the software implementation, one or more embodiments of the present specification do not exclude other implementation manners, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or a logic device. Corresponding to the above-mentioned embodiment of the data filtering method, the present specification also provides an embodiment of a data filtering device.

[0073] Figure 5 The embodiment of the present application shows a block diagram of a data filtering device. Please refer to Figure 5 , wherein the data is maintained in a corresponding data table, and at least one field is configured in the data table; the device can include:

[0074] The field information acquisition unit 502 is configured to acquire the field information of the target field;

[0075] The target filtering component generation unit 504 is configured to generate a corresponding target filtering component according to the field information;

[0076] The data filtering unit 506 is configured to acquire a filtering condition input by a user for the target filtering component, and filter the data in the data table according to the filtering condition.

[0077] Optionally, the field information acquisition unit 502 is specifically configured to:

[0078] In the process of initializing the target field in the data table, the field information of the target field is acquired from a corresponding data source; or,

[0079] In response to a field setting request initiated for the target field, the field information corresponding to the target field in the field setting request is acquired.

[0080] Optionally, the field information includes a corresponding data type and a field name; and the data filtering unit 506 is specifically configured to:

[0081] Determine the component type of the corresponding filtering component according to the data type and / or the field name;

[0082] Generate the target filtering component according to the determined component type.

[0083] Optionally, the device further includes:

[0084] canceling generating unit, configured to match the determined component type with each expected component type in the set of expected component types;

[0085] cancel the generation operation of the target filter component in case of a failed match.

[0086] Optionally, the target filter component is configured with a corresponding event listener; and the data filtering unit 506 is specifically configured to:

[0087] in case that the target filter component triggers an input execution event, acquire a filtering condition input by a user for the target filter component;

[0088] in case that the target filter component triggers an input end event, acquire a filtering condition input by a user for the target filter component.

[0089] Optionally, each filter component is configured with a corresponding filtering logic; and the data filtering unit 506 is specifically configured to:

[0090] filter data in the data table according to the filtering logic corresponding to the target filter component and the filtering condition.

[0091] Optionally, the target field contains a plurality of fields, each of which is respectively configured with a corresponding field priority; and the data filtering unit 506 is specifically configured to:

[0092] in case that the field priorities corresponding to the first field and the second field are the same, take the union of data filtering results respectively obtained according to the filtering condition of the first field and the filtering condition of the second field;

[0093] in case that the field priorities corresponding to the first field and the second field are different, take the intersection of data filtering results respectively obtained according to the filtering condition of the first field and the filtering condition of the second field.

[0094] The implementation processes of the functions and roles of the units in the above apparatus are specifically described in the implementation processes of the corresponding steps in the above method, which will not be repeated here.

[0095] For the apparatus embodiments, since they basically correspond to the method embodiments, the relevant parts can be seen from the parts of the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the modules can be selected to achieve the purposes of the schemes of the present specification according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0096] Based on the same concept as the above method, the present specification also provides an electronic device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method according to any one of the above embodiments by running the executable instructions.

[0097] Based on the same concept as the above method, the present specification also provides a computer readable storage medium, which stores computer instructions, and the instructions are executed by a processor to implement the steps of the method according to any one of the above embodiments.

[0098] Based on the same concept as the above method, the present specification also provides a computer program product, which comprises computer program / instructions, and the computer program / instructions are executed by a processor to implement the steps of the method according to any one of the above embodiments.

[0099] Although the present application contains many specific embodiments, these should not be construed as limiting the scope or the claimed scope of any application, but mainly for describing the features of the specific embodiments of the particular application. Some features described in the present application in multiple embodiments can also be implemented in a single embodiment. On the other hand, various features described in a single embodiment can also be implemented separately in multiple embodiments or in any suitable subcombination. In addition, although the features can function as described above in some combinations and even originally claimed as such, one or more features from the claimed combination can be removed in some cases, and the claimed combination can be directed to a subcombination or a variation of a subcombination.

[0100] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring such an order nor limiting it to only that order. One will appreciate that many of the operations can be performed in a manner different than illustrated or that such operations can be omitted. Likewise, specific sequences of operations, or portions thereof, can be combined with other operations, or portions thereof. Additionally, certain of the steps can be performed simultaneously, rather than sequentially, as also described infra. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0101] Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0102] The above descriptions are only preferred embodiments of the present application and are not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. A data filtering method, characterized by, The data is maintained in a corresponding data table, and at least one field is configured in the data table; the method comprises: obtaining field information of a target field, wherein the field information comprises a corresponding data type and a field name, different data types and field names are respectively configured with different priorities; generating a corresponding target filtering component according to the field information; obtaining a filtering condition input by a user for the target filtering component, and filtering data in the data table according to the filtering condition; the generating of the target filtering component according to the field information comprises: determining a component type of the corresponding filtering component according to the data type and the field name; generating the target filtering component according to the determined component type; wherein, in the case that the component types determined according to the data type and the field name are different from each other, the component type corresponding to the higher priority is determined as the final component type.

2. The method of claim 1, wherein, the obtaining of the field information of the target field comprises: obtaining the field information of the target field from a corresponding data source in the process of initializing the target field of the data table; or obtaining the field information corresponding to the target field in a field setting request initiated for the target field.

3. The method of claim 1, wherein, the method further comprises: matching the determined component type with each expected component type in a set of expected component types; in the case of a failed matching, canceling the generation operation of the target filtering component.

4. The method of claim 1, wherein, the target filtering component is configured with a corresponding event listener; the obtaining of the filtering condition input by the user for the target filtering component comprises: in the case that the target filtering component triggers an input execution event, obtaining the filtering condition input by the user for the target filtering component; in the case that the target filtering component triggers an input end event, obtaining the filtering condition input by the user for the target filtering component.

5. The method of claim 1, wherein, each filtering component is configured with a corresponding filtering logic; the filtering of the data in the data table according to the filtering condition comprises: filtering the data in the data table according to the filtering logic corresponding to the target filtering component and the filtering condition.

6. The method of claim 1, wherein, the target field comprises a plurality of fields, and each field is respectively configured with a corresponding field priority; the filtering of the data in the data table according to the filtering condition comprises: in the case that the field priorities corresponding to a first field and a second field are the same, taking a union set of data filtering results obtained according to the filtering condition of the first field and the filtering condition of the second field; in the case that the field priorities corresponding to the first field and the second field are different, taking an intersection set of the data filtering results obtained according to the filtering condition of the first field and the filtering condition of the second field.

7. A computer readable storage medium having stored thereon computer programs / instructions, characterized in that, The program / instruction is executed by the processor to implement the steps of the method of any one of claims 1-6.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the method of any one of claims 1-6.

9. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instruction is executed by the processor to implement the steps of the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Filtering user interface for a data summary table

    CN101263453A

  • System and method for data filtering

    CN102567413A