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

By automatically generating filter components and performing data filtering according to the filter conditions entered by users, the problem of data table filtering operations in front-end development depends on manual coding, and improve development efficiency and system maintainability.

CN119271885AActive Publication Date: 2025-01-07RENLIJIA NETWORK TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411303730.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-07
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

During the front-end development process, the data filtering operation of data tables relies on developers to manually write filtering code, resulting in high time costs, frequent code redundancy and errors, reducing the system's maintainability and scalability.

Method used

By obtaining the target field information in the data table, the corresponding filter components are automatically generated, and the user inputs the filter conditions to filter data, simplifying the development process and avoiding code redundancy and errors.

Benefits of technology

It significantly simplifies the development of data filtering functions of data tables, improves the maintainability and scalability of the system, and reduces the development workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271885A_ABST
    Figure CN119271885A_ABST
Patent Text Reader

Abstract

The invention provides a data filtering method, a readable storage medium, electronic equipment and a program product, data is maintained in a corresponding data table, and at least one field is configured in the data table; the method comprises the following steps: acquiring field information of a target field; generating a corresponding target filtering component according to the field information; and obtaining a filtering condition input by a user for the target filtering component, and filtering the 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 field of database technology, and in particular to a data filtering method, a readable storage medium, an electronic device, and a program product. Background Art

[0002] In the front-end development process, data tables are a common form of displaying and managing data. When users need to query specific data from a large amount of data displayed on the front-end page, they can perform corresponding data filtering operations based on the fields in the data table, thereby quickly filtering out irrelevant data and significantly improving the efficiency of data query.

[0003] In the related technology, the implementation of the above-mentioned data filtering operation usually relies on developers to manually write corresponding filtering codes for data tables and configure corresponding filtering components. This method not only consumes a lot of time and manpower costs, but also faces complex and changeable data structures. It is more prone to code redundancy and errors, thereby reducing the maintainability and scalability of the overall system. Summary of the invention

[0004] In view of this, the present specification provides a data filtering method, a readable storage medium, an electronic device and a program product to solve the deficiencies in the related art.

[0005] Specifically, this specification is implemented through the following technical solutions:

[0006] According to a first aspect of an embodiment of this specification, a data filtering method is provided, wherein the data is maintained in a corresponding data table, and the data table is configured with at least one field; the method comprises:

[0007] Get the field information of the target field;

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

[0009] 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.

[0010] According to a second aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0011] According to a third aspect of the embodiments of this specification, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method described in the first aspect are implemented.

[0012] According to a fourth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the method described in the first aspect when executed by a processor.

[0013] In the technical solution provided in the present specification, by obtaining the field information of the target field in the data table, a corresponding target filtering component can be generated, eliminating the process of manually configuring the filtering component, and thus facilitating dynamic and flexible filtering of the data in the above data table according to the filtering conditions input by the user for the above target filtering component. In short, the above solution 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 errors, and improving the maintainability and scalability of the overall system.

[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification, and for ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0016] Figure 1 is a schematic diagram of the architecture of a data filtering system shown in an exemplary embodiment of this specification;

[0017] Figure 2 is a flowchart of a data filtering method shown in an exemplary embodiment of this specification;

[0018] Figure 3 is a flowchart of another data filtering method shown in an exemplary embodiment of this specification;

[0019] Figure 4 is a schematic structural diagram of an electronic device shown in an exemplary embodiment of this specification;

[0020] Figure 5 It is a structural schematic diagram of a data filtering device shown in an exemplary embodiment of this specification. DETAILED DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification.

[0022] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, the single step described in this specification may be decomposed into multiple steps for description in other embodiments; and the multiple steps described in this specification may also be combined into a single step for description in other embodiments. It should be understood that although the terms first, second, third, etc. may be used in this specification 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, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0023] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0024] An embodiment of a data filtering method of the present specification is 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 this specification. Figure 1 As shown, the above system may 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 consists 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 part of the information in the corresponding data record, such as Figure 1 As shown, the data table 10 may include m fields, where m is a positive integer.

[0027] The filter component 12 is a component used in the front-end page to filter data in the data table. The filter component 12 allows users to filter and display data according to specific filter conditions so that users can more effectively view and operate the data they are interested in. Figure 1 As shown, the filter components 12 may include n components, each of which corresponds to any field in the data table 10, and each corresponding field is different, wherein n is a positive integer not greater than m.

[0028] It should be noted that the data table 10 and the filter component 12 are different parts of the same front-end page. Reasonable interface layout and style design can be used to ensure that the generated filter component is beautiful and easy to use. For example, the filter component can be placed above or on the side of the data matrix to facilitate user operation. This is not limited in this manual.

[0029] Figure 2 This is a flow chart of a data filtering method shown in an exemplary embodiment of this specification. The above data is maintained in a corresponding data table, and at least one field is configured in the above data table. The above method includes:

[0030] Step S202, obtaining field information of the target field.

[0031] When the data in the above data table needs to be screened and filtered according to the target field, the field information of the above target field can be obtained to facilitate the automatic generation of the corresponding filtering component. The field information includes but is not limited to the field name, data type (such as text, number, date, etc.), and the optional value corresponding to the enumeration type of the data type.

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

[0033] In one embodiment, the front-end page can obtain the field information of the target field from the corresponding data source during the process of initializing the target field of the data table. The initialization operation of the data table can be triggered by the initialization operation of the front-end page itself, and the front-end page can participate in the initialization together with the front-end page; or it can be triggered by an independent initialization operation for the data table, and the front-end page can initialize the corresponding target field according to the controls such as timer and table refresh button in the front-end page. The data source can be a preset database, spreadsheet, JSON (JavaScript Object Notation) file, etc., which is not limited in this specification. In this embodiment, the acquired field information is directly derived from the data source, and no modification occurs in the middle. Considering that there is no need to obtain it again after the first acquisition, the resource occupation is low, so it is suitable for data filtering scenarios of data tables with fixed field information.

[0034] In another embodiment, the front-end page can respond to a field setting request initiated for the target field to obtain the field information corresponding to the target field in the field setting request. 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 name, data type and other field information of the target field, and the field setting request triggered by the field setting operation can carry the modified field information. Considering that the number of times and timing of the user's dynamic update of the target field and the modified field information are not fixed, it is suitable for data filtering scenarios of data tables where field information needs to be modified in real time.

[0035] Step S204: Generate a corresponding target filtering component according to the field information.

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

[0037] For example, when the data type is text, the corresponding component type can be determined to be a text input box; when the data type is a number, the corresponding component type can be determined to be a number input box that supports range search; when the data type is a date, the corresponding component type can be determined to be a date selector; when the data type is an enumeration type, the corresponding component type can be determined to be a drop-down menu; when the data type is an address type, the corresponding component type can be determined to be a region selector; when the data type is an object type, the corresponding conditional generation component type can be generated by custom processing.

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

[0039] Of course, when the component type is determined based on 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 can be determined when the component types corresponding to the two are inconsistent. For example, if there is field information of a target field, its data type has a higher priority than the field name. If the data type is text type, but the field name matches the number-related keyword "age", then the component type corresponding to the target field can still be determined as a text input box based on the data type.

[0040] This manual can also determine whether to generate a target filtering component based on differences in component types.

[0041] In one embodiment, the component type determined above can be matched with each expected component type in the expected component type set. In the case of a match failure, the generation operation of the target filter component can be canceled, and in the case of a match success, the target filter component can continue to be generated. The above-mentioned expected component type set can include component types preset by the user, such as text, number type, etc. When the above-mentioned 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 above-mentioned target field, and accordingly, for component types that do not support or the user does not want to have data filtering functions, they can be removed from the expected component type set, such as attachment types.

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

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

[0044] In the generated target filter component, the user can input the corresponding filter condition so that the data in the data table is filtered according to the above filter condition. Specifically, the target filter component can be bound to the data in the data table, that is, the input event of the target filter component is monitored through the event monitoring mechanism. When the user inputs the filter condition in the target filter component, the front-end page edge can capture the user input in time and apply the filter condition to the above data table. The form of the above filter condition is associated with the component type of the target filter component. For example, when the target filter component is a text input box, the text entered by the user in the text input box will be used as the above filter condition; or when the target filter component is a date selector, the date selected by the user in the date selector will be used as the above filter condition.

[0045] Those skilled in the art will appreciate that after the target filter component is generated, it can be set with a default empty filter condition, that is, no data is filtered, or a preset filter condition can be set so that the corresponding data is directly filtered when the target filter component is generated. Of course, no matter what the initial filter condition is, it can be updated and modified by the user inputting a new filter condition.

[0046] As mentioned above, the event monitoring mechanism can establish a binding relationship between the filter conditions input by the user into the target filter component and the data in the data table. The present application can obtain the filter conditions input by the user at different input stages of the target filter component, thereby implementing data filtering in the data table.

[0047] In one embodiment, when the target filter component triggers an input completion event, the filter condition input by the user for the target filter component can be obtained. At this time, the filter condition is obtained only after the user has completely input the condition, 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 filter condition is low, and the execution interval of the data filtering operation is large, which reduces the average computing resources required per unit time.

[0048] In another embodiment, when the target filter component triggers an 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 fully 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 each time the user inputs the filter condition to the target filter component, so the user can obtain the filter result that meets at least a part of the filter condition in real time, which has a higher filter result output efficiency than the previous embodiment.

[0049] For each filter component, in addition to the above-mentioned filter conditions, the corresponding filter logic needs to be configured to ensure the normal filtering of the data in the data table. For example, when the date selector is used as the target filter component, the date entered by the user for the target filter component can be "January 1, 2024". At this time, the front-end page automatically captures the input content and applies it as the filter condition. At the same time, 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'". In this case, the data table will only display the corresponding data. For another example, when the text input box is used as the target filter component, the front-end page automatically captures the content entered by the user in the text input box and applies it as the filter condition. In this case, the data table will only display the data whose name contains the text.

[0050] In short, the front-end page can filter the data in the above data table according to the filtering logic and filtering conditions corresponding to the above target filtering component. The so-called filtering logic can be configured with one or more according to the specific form of the target filtering component. Taking the above date selector as an example, when the user enters the filtering conditions of "January 1, 2024" and "January 1, 2025" for the target filtering component, the filtering logic corresponding to the target filtering component can be "filter all data between 'January 1, 2024' and 'January 1, 2025' in the corresponding target field".

[0051] In this specification, the target field may include multiple fields, wherein each field may be configured with a corresponding field priority to facilitate 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 filtering conditions of the second field can be taken as the 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 filtering conditions of the second field can be taken as the intersection. Among them, there are two situations for the user. The first situation is that the priority of each field in the data table is the same, and the user's filtering requirements for these fields are relatively broad. The data in the filtering result only needs to meet the filtering conditions corresponding to the filtering component of at least one of the fields. The second situation is that there may be some fields with higher priorities in the data table, and the user has stricter filtering requirements for these fields. For example, after the filtering conditions are input for the filtering components of these fields, the filtering results obtained must only contain data that meets the filtering conditions. Of course, the above priorities can be preset by the front-end page or set by the user, and this specification does not limit this.

[0053] Combine the following Figure 3 Explain another data filtering method, such as Figure 3 As shown, the method comprises the following steps:

[0054] Step S302, obtaining data from the data table.

[0055] In one embodiment, it is assumed that there is an employee system. A front-end page of the employee system contains a data table for displaying information, named "employee information table". Users can filter by name, date, category and other filtering conditions. The specific content is as follows:

[0056] Form 1 Employee Information Form

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

[0058] Step S304, parsing the target field in the data table.

[0059] In one embodiment, the above data table displays employee information, including employee ID, name, department and entry date 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 target filter component can be generated according to the data type of the target field.

[0061] In one embodiment, assuming that the data types of the above target fields all match the fields in the expected component type set, then each field supports the generation of a corresponding target filter component, and step S308 can be further performed. Of course, if there is any field that matches the expected component type set, step S312 can be directly performed.

[0062] Step S308: Generate and display the target filtering component.

[0063] In one embodiment, based on the data types of the above-mentioned employee ID, name, department and date of employment, a numeric input box, a text input box, a drop-down menu and a date selector can be generated for each field, wherein the options in the drop-down menu include all possible departments (such as the marketing department, the human resources department, the technical department and the finance department).

[0064] Step S310: Whether the user sets the field.

[0065] In one embodiment, a field setting request initiated by a user for any of the above fields can be received. If it exists, 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 filtering condition input by the user for the target filtering component.

[0067] In one embodiment, assuming that the option "Technology Department" is selected in the drop-down menu of the department field, the employee system may use "Technology Department" as a filtering condition for the employee information table.

[0068] Step S314, filter the data in the data table according to the filtering conditions and display the filtering results.

[0069] In one embodiment, by selecting "Technology Department" as a filtering condition, the system can filter out employee information belonging to the "Technology Department" from the original data table according to this condition (as follows), and display this information in the filtered data table. Such filtering operations can help users quickly find specific information they are interested in.

[0070] Table 2 Filtered employee information table

[0071] Employee ID Name department Date of joining 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. 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 may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or logic devices. Corresponding to the embodiment of the aforementioned data filtering method, this specification also provides an embodiment of a data filtering device.

[0073] Figure 5 A block diagram of a data filtering device is shown in an embodiment of the present invention. Figure 5 , wherein the data is maintained in a corresponding data table, and the data table is configured with at least one field; the device may include:

[0074] A field information acquisition unit 502 is used to acquire field information of a target field;

[0075] A target filter component generating unit 504 is used to generate a corresponding target filter component according to the field information;

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

[0077] Optionally, the field information acquiring unit 502 is specifically used to:

[0078] In the process of initializing the target field of the data table, obtaining the field information of the target field from the 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 field name; the data filtering unit 506 is specifically used to:

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

[0082] The target filtering component is generated according to the determined component type.

[0083] Optionally, the device further comprises:

[0084] a cancel generation unit for matching the determined component type with each expected component type in the set of expected component types;

[0085] In case of a match failure, the generation operation of the target filtering component is canceled.

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

[0087] When the target filter component triggers an input execution event, obtaining a filter condition input by a user for the target filter component;

[0088] When the target filtering component triggers an input end event, the filtering condition input by the user for the target filtering component is obtained.

[0089] Optionally, each filtering component is configured with corresponding filtering logic; the data filtering unit 506 is specifically used for:

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

[0091] Optionally, the target field includes multiple fields, each field is respectively configured with a corresponding field priority; the data filtering unit 506 is specifically used for:

[0092] In the case where the field priorities corresponding to the first field and the second field are the same, a union of the data filtering results obtained according to the filtering condition of the first field and the filtering condition of the second field is taken;

[0093] In the case where the field priorities corresponding to the first field and the second field are different, the intersection of the data filtering results obtained according to the filtering condition of the first field and the filtering condition of the second field is taken.

[0094] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0095] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

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

[0097] Based on the same concept as the above method, this specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0098] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.

[0099] Although the present invention includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments of the present invention may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claimed as such, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.

[0100] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or requiring that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments 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, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.

[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data filtering method, characterized in that: The data is maintained in a corresponding data table, and the data table is configured with at least one field; the method comprises: Get the field information of the target field; Generate a corresponding target filtering component according to the field information; 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.

2. The method according to claim 1, characterized in that The acquiring of the field information of the target field includes: In the process of initializing the target field of the data table, obtaining the field information of the target field from the corresponding data source; or, 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.

3. The method according to claim 1, characterized in that The field information includes a corresponding data type and a field name; and generating a corresponding target filtering component according to the field information includes: Determine the component type of the corresponding filter component according to the data type and / or the field name; The target filtering component is generated according to the determined component type.

4. The method according to claim 3, characterized in that: The method further comprises: matching the determined component type with each expected component type in a set of expected component types; In case of a match failure, the generation operation of the target filtering component is canceled.

5. The method according to claim 1, characterized in that 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 includes: When the target filter component triggers an input execution event, obtaining a filter condition input by a user for the target filter component; When the target filtering component triggers an input end event, the filtering condition input by the user for the target filtering component is obtained.

6. The method according to claim 1, characterized in that Each filtering component is configured with corresponding filtering logic; filtering the data in the data table according to the filtering condition includes: The data in the data table is filtered according to the filtering logic corresponding to the target filtering component and the filtering condition.

7. The method according to claim 1, characterized in that The target field includes a plurality of fields, each field is respectively configured with a corresponding field priority; filtering the data in the data table according to the filtering condition includes: In the case where the field priorities corresponding to the first field and the second field are the same, a union of the data filtering results obtained according to the filtering condition of the first field and the filtering condition of the second field is taken; In the case where the field priorities corresponding to the first field and the second field are different, the intersection of the data filtering results obtained according to the filtering condition of the first field and the filtering condition of the second field is taken.

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

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Filtering user interface for a data summary table

    CN101263453A

  • Method and apparatus for implementing field filtration

    CN101442539A

  • System and method for data filtering

    CN102567413A

  • Data retrieval method and device and electronic equipment

    CN115422232A

  • Report processing method and device, storage medium and electronic equipment

    CN116303462A