CN110968742A - Data filtering method and device - Google Patents

Data filtering method and device Download PDF

Info

Publication number
CN110968742A
CN110968742A CN201811163257.3A CN201811163257A CN110968742A CN 110968742 A CN110968742 A CN 110968742A CN 201811163257 A CN201811163257 A CN 201811163257A CN 110968742 A CN110968742 A CN 110968742A
Authority
CN
China
Prior art keywords
filtering
filter
data
model
condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811163257.3A
Other languages
Chinese (zh)
Inventor
肖为
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811163257.3A priority Critical patent/CN110968742A/en
Publication of CN110968742A publication Critical patent/CN110968742A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data filtering method and device. Wherein, the method comprises the following steps: acquiring data to be filtered; acquiring a filtering model corresponding to data to be filtered, wherein the filtering model is of a tree structure, each filtering condition of the filtering model corresponds to a leaf node of the tree structure, other nodes of the tree structure correspond to a filtering condition group of the filtering model, and filtering types of child nodes belonging to the same father node are consistent; and filtering the data to be filtered by using the filtering model to obtain a filtering result. The invention solves the technical problems that the data filtering method in the prior art is poor in flexibility and cannot meet the requirement of complex filtering scenes.

Description

Data filtering method and device
Technical Field
The invention relates to the field of internet, in particular to a data filtering method and device.
Background
In the web front-end development process, very complex filtering scenes exist for filtering dimensions and indexes, and multiple groups of logical filtering of logical or concurrent logical filtering of the dimensions and the indexes are often required.
In this case, the conditional filtering component may be a "and logic" group and an "or logic" group, adding the filtering condition within different groups, or treating the "and logic" as a primary node of the data structure and then adding a child node (secondary level) for the primary node as an "or logic". However, the general condition filtering components are single, and either perform or logic filtering, which cannot be implemented or performed in or logic, and only generate filtering at a second level, which is poor in flexibility and cannot meet the complex filtering scenario requirement.
Aiming at the problems that the data filtering method in the prior art is poor in flexibility and cannot meet the complex filtering scene, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a data filtering method and device, which at least solve the technical problems that the data filtering method in the prior art is poor in flexibility and cannot meet the requirement of a complex filtering scene.
According to an aspect of an embodiment of the present invention, there is provided a data filtering method, including: acquiring data to be filtered; acquiring a filtering model corresponding to data to be filtered, wherein the filtering model is of a tree structure, each filtering condition of the filtering model corresponds to a leaf node of the tree structure, other nodes of the tree structure correspond to a filtering condition group of the filtering model, and filtering types of child nodes belonging to the same father node are consistent; and filtering the data to be filtered by using the filtering model to obtain a filtering result.
Further, the set of filter conditions comprises sub-filter conditions and/or a set of sub-filter conditions, or the set of filter conditions is empty.
Further, the method further comprises: and (5) constructing a filtering model.
Further, constructing the filtering model includes: constructing a filtering model by utilizing the empty model and a user editing instruction; or building a filtering model using the user selected model and the user editing instructions.
Further, the user editing instructions include one or more of the following instructions: an adding instruction is collected through the first input control and is used for adding a filtering condition or a filtering condition group; a modification instruction is acquired through the second input control and is used for modifying the content of the filtering condition or the filtering type in the filtering condition group; and the deleting instruction is acquired through the third input control and is used for deleting the filtering condition or the filtering condition group.
Further, the content of the filter condition includes a filter item, a filter logic, and a filter value; in the case that the modification instruction is to modify the filter condition content, the method further includes: detecting whether a filter value in the content of the filter condition matches the filter term and the filter logic; and if not, carrying out misoperation prompt.
Further, the method further comprises: and optimizing the filtering model, wherein the obtained filtering model corresponding to the data to be filtered is the optimized filtering model corresponding to the data to be filtered.
According to another aspect of the embodiments of the present invention, there is also provided a data filtering apparatus, including: the first acquisition module is used for acquiring data to be filtered; the second obtaining module is used for obtaining a filtering model corresponding to the data to be filtered, wherein the filtering model is of a tree structure, each filtering condition of the filtering model corresponds to one leaf node of the tree structure, other nodes of the tree structure correspond to a filtering condition group of the filtering model, and filtering types of child nodes belonging to the same father node are consistent; and the filtering module is used for filtering the data to be filtered by utilizing the filtering model to obtain a filtering result.
Further, the set of filter conditions comprises sub-filter conditions and/or a set of sub-filter conditions, or the set of filter conditions is empty.
Further, the above apparatus further comprises: and the construction module is used for constructing a filtering model.
Further, the building module comprises: the first construction unit is used for constructing a filtering model by utilizing the empty model and a user editing instruction; or a second construction unit for constructing the filtering model using the user-selected model and the user-edited instruction.
Further, the user editing instructions include one or more of the following instructions: an adding instruction is collected through the first input control and is used for adding a filtering condition or a filtering condition group; a modification instruction is acquired through the second input control and is used for modifying the content of the filtering condition or the filtering type in the filtering condition group; and the deleting instruction is acquired through the third input control and is used for deleting the filtering condition or the filtering condition group.
Further, the content of the filter condition includes a filter item, a filter logic, and a filter value; in the case that the modification instruction is to modify the content of the filter condition, the apparatus further includes: the detection module is used for detecting whether the filtering value in the content of the filtering condition is matched with the filtering item and the filtering logic; and the prompt module is used for carrying out misoperation prompt if the operation signals are not matched.
Further, the above apparatus further comprises: and the optimization module is used for optimizing the filtering model, and the obtained filtering model corresponding to the data to be filtered is the optimized filtering model corresponding to the data to be filtered.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the above data filtering method.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes the data filtering method described above.
In the embodiment of the invention, after the data to be filtered is obtained, the filtering model corresponding to the data to be filtered can be further obtained, and the filtering data is filtered by using the filtering model to obtain a final filtering result.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of data filtering according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative filtration model according to an embodiment of the present invention; and
fig. 3 is a schematic diagram of a data filtering apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a data filtering method, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flow chart of a data filtering method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
and step S102, acquiring data to be filtered.
Specifically, the data to be filtered may be data that a user needs to filter, for example, the data may be data in a web front-end development process, and the data may be divided according to dimensions and indexes.
And step S104, acquiring a filtering model corresponding to the data to be filtered, wherein the filtering model is of a tree structure, each filtering condition of the filtering model corresponds to one leaf node of the tree structure, other nodes of the tree structure correspond to a filtering condition group of the filtering model, and the filtering types of the child nodes belonging to the same father node are consistent.
Specifically, in order to filter data to be filtered according to different dimensions, indexes, and the like, different filtering models may be set in advance according to different dimensions and indexes, the number of nodes included in the filtering models is different, that is, the number of filtering conditions and filtering condition groups in the filtering models is different, the number of filtering conditions included in different filtering condition groups is different, and the filtering types are also different. The filtering type may be and logic, or may be or logic, but is not limited thereto.
Optionally, the set of filter conditions comprises sub-filter conditions and/or a set of sub-filter conditions, or the set of filter conditions is empty.
It should be noted that, the filtering model adopts tree structure data, nodes in the tree structure may be expanded according to the form of filtering conditions or a filtering condition group, and the filtering type of the filtering condition group in the nodes may be defined as required, so as to ensure that the nodes in the tree structure can be continuously derived inside the filtering condition group, that is, the filtering condition group may include sub-filtering condition groups to satisfy various complex filtering scenarios. The set of filter conditions may serve as a parent node in the tree structure, and the filter conditions included in the set of filter conditions may serve as child nodes of the parent node. The user may modify the filtering model according to the actual filtering requirement, for example, delete the filtering condition and/or the sub-filtering condition group included in the filtering condition group, and the filtering condition group is empty.
For example, as shown in fig. 2, when filtering data to be filtered according to a dimension, a filtering condition may include a dimension name and a corresponding condition, where the corresponding condition may be that the data is greater than, less than, or equal to the data input by the user in the range input by the user, and specifically, the selection input may be performed according to an actual filtering requirement.
And S106, filtering the data to be filtered by using the filtering model to obtain a filtering result.
According to the embodiment of the invention, after the data to be filtered is obtained, the filtering model corresponding to the data to be filtered can be further obtained, and the filtering data is filtered by using the filtering model to obtain a final filtering result.
Optionally, in the above embodiment of the present invention, the method further includes:
and step S108, constructing a filtering model.
Specifically, before filtering the data to be filtered, a corresponding filtering model may be pre-established according to a filtering requirement, and the data to be filtered is filtered by using the established filtering model, so as to obtain a final filtering result.
Optionally, in the foregoing embodiment of the present invention, in step S108, constructing the filtering model includes:
and step S1082, constructing a filtering model by using the empty model and the user editing instruction. Or
Specifically, the empty model mentioned above may refer to a model that includes only one node but does not include any child node below the node, and a user may construct a final filtering model according to actual filtering requirements through a user editing instruction.
And step S1084, constructing a filtering model by using the model selected by the user and the user editing instruction.
Specifically, in order to simplify the operation process of the user, a plurality of models can be pre-established for the user to select, and after the user selects a certain model, the selected model can be modified through a user editing instruction according to the actual filtering requirement, so that the final filtering model is obtained.
Optionally, the user editing instructions comprise one or more of the following instructions: an adding instruction is collected through the first input control and is used for adding a filtering condition or a filtering condition group; a modification instruction is acquired through the second input control and is used for modifying the content of the filtering condition or the filtering type in the filtering condition group; and the deleting instruction is acquired through the third input control and is used for deleting the filtering condition or the filtering condition group.
Specifically, the user may add or delete nodes to the empty model or the selected model as needed, modify the filtering condition content or the filtering type corresponding to the nodes, and the like.
In order to facilitate a user to add nodes on the basis of the existing nodes, a first input control can be set for the filter condition group corresponding to each filter condition group, the first input control comprises a condition adding sub-control and a condition group adding sub-control, and the user can add an independent filter condition in the current filter condition group by clicking the condition adding sub-control; the user can add one sub-filter condition group in the current filter condition group by clicking the condition group adding sub-control. For example, as shown in fig. 2, the condition addition sub-control may be a "new condition" in the drop-down menu of "add" after each filter condition group, and the condition group addition sub-control may be a "new condition group" in the drop-down menu of "add" after each filter condition group. By setting the first input control, the situation that the interior of the filter condition group can continue to derive the child nodes is guaranteed, and infinite extension is achieved.
Optionally, the content of the filter term includes filter items, filter logic, and filter values. For example, as shown in FIG. 2, the filter terms may be dimensions of account, project ID, media ID, payment type, project name, etc.; the filtering logic may be "in …", "equal to", etc.; the filter values may be numeric, literal, or "all," etc.
Specifically, in order to facilitate the user to modify the content or the filter type of the filter condition, a second input control may be set for the filter condition group corresponding to each filter condition group, where the second input control includes a conditional content modification sub-control and a filter type modification sub-control, and the user may modify the content of the current filter condition by clicking the conditional content modification sub-control; the user can modify the filter type by clicking on the filter type modification sub-control, and optionally can select between the sum logic and or the logic. For example, as shown in FIG. 2, the conditional content modification child controls may include a filter item modification child control, a filter logic modification child control, and a filter value modification child control; the filter type modification sub-control can be a single selection button behind each filter condition group, and comprises two buttons, one is a logical button, the other is an logical button, and a user can press any one button according to needs and can only press one button at the same time. The filtering condition group can be flexibly switched and/or filtered under the same data structure by modifying the sub-control through the filtering type.
Furthermore, in order to facilitate the user to delete the filter condition group or the filter condition, a third input control may be set for each filter condition, including a condition deletion sub-control and a condition group deletion sub-control, and the user may delete the entire filter condition group by clicking the condition group deletion sub-control; the user can delete the corresponding filtering condition by clicking the condition deletion sub-control. For example, as shown in FIG. 2, the condition group deletion sub-control may be a "remove condition group" after each filter condition group, and the condition deletion sub-control may be a "cross" number after each filter condition.
It should be noted that, through a selection control, the user can select from the "deletion condition" and the "deletion condition group" by clicking, and execute the corresponding deletion operation.
Optionally, in the above embodiment of the present invention, when the modification instruction is to modify the content of the filter condition, the method further includes:
step S110, it is detected whether the filter value in the content of the filter condition matches the filter item and the filter logic.
In step S112, if the operation is not matched, an erroneous operation is prompted.
Specifically, since different filter items and filter logics correspond to different filter values, for example, as shown in fig. 2, when a filter item is "pay type" and the filter logic is "in …", the corresponding filter value should be text; when the filter item is "media ID" and the filter logic is "equal", the corresponding filter value should be a number.
In an optional scheme, if the filtering value modified by the user through the filtering value modification control is not matched with the filtering item and the filtering logic, the filtering value is modified illegally, so that the filtering model cannot realize the filtering function, the modification can be prohibited for the user, and an misoperation prompt is displayed to inform the user that the filtering model cannot be modified. For example, as shown in fig. 2, when the filter item is "media ID" and the filter logic is "equal to", the user needs to input numbers at this time, and if the user inputs characters, it can be determined that the user has illegal modification and needs to perform an incorrect operation prompt.
According to the scheme, different input controls are added in the filtering model, so that the convenience and convenience in operation and misoperation prompt of a user can be met. And a filtering logic interface is presented more intuitively.
Optionally, in the above embodiment of the present invention, the method further includes:
and step S114, optimizing the filtering model, wherein the filtering model corresponding to the acquired data to be filtered is the optimized filtering model corresponding to the data to be filtered.
Specifically, when the user deletes the filtering condition through the third input control, the filtering condition group is empty, so as to avoid affecting the filtering efficiency of the whole filtering model and reduce the complexity of the query statement, the filtering model needs to be optimized, the empty filtering condition group is deleted, and the multilayer nested condition groups are simplified, thereby obtaining the final filtering model.
Example 2
According to an embodiment of the present invention, an embodiment of a data filtering apparatus is provided.
Fig. 3 is a schematic diagram of a data filtering apparatus according to an embodiment of the present invention, as shown in fig. 3, the apparatus including the steps of:
the first obtaining module 32 is configured to obtain data to be filtered.
Specifically, the data to be filtered may be data that a user needs to filter, for example, the data may be data in a web front-end development process, and the data may be divided according to dimensions, indexes, and the like.
The second obtaining module 34 is configured to obtain a filtering model corresponding to data to be filtered, where the filtering model is a tree structure, each filtering condition of the filtering model corresponds to a leaf node of the tree structure, and other nodes of the tree structure correspond to a filtering condition group of the filtering model, and filtering types between child nodes belonging to the same parent node are the same.
Specifically, in order to filter data to be filtered according to different dimensions, indexes, and the like, different filtering models may be set in advance according to different dimensions, indexes, and the like, the number of nodes included in the filtering models is different, that is, the number of filtering conditions and filtering condition groups in the filtering models is different, the number of filtering conditions included in different filtering condition groups is different, and the filtering types are also different. The filtering type may be and logic, or may be or logic, but is not limited thereto.
Optionally, the set of filter conditions comprises sub-filter conditions and/or a set of sub-filter conditions, or the set of filter conditions is empty.
It should be noted that, the filtering model adopts tree structure data, nodes in the tree structure can be expanded according to the form of filtering conditions or a filtering condition group, and the filtering type of the filtering condition group in the nodes can be defined as required, so as to ensure that the nodes in the tree structure can be continuously derived from the inside of the filtering condition group, that is, the filtering condition group can include sub-filtering condition groups to meet various complex filtering scenarios. The set of filter conditions may serve as a parent node in the tree structure, and the filter conditions included in the set of filter conditions may serve as child nodes of the parent node. The user may modify the filtering model according to the actual filtering requirement, for example, delete the filtering condition and/or the sub-filtering condition group included in the filtering condition group, and the filtering condition group is empty.
And the filtering module 36 is configured to filter the data to be filtered by using the filtering model to obtain a filtering result.
According to the embodiment of the invention, after the data to be filtered is obtained, the filtering model corresponding to the data to be filtered can be further obtained, and the filtering data is filtered by using the filtering model to obtain a final filtering result.
Optionally, in the above embodiment of the present invention, the apparatus further includes: and the construction module is used for constructing a filtering model.
Specifically, before filtering the data to be filtered, a corresponding filtering model may be pre-established according to a filtering requirement, and the data to be filtered is filtered by using the established filtering model, so as to obtain a final filtering result.
Optionally, in the foregoing embodiment of the present invention, the building module includes: the first construction unit is used for constructing a filtering model by utilizing the empty model and a user editing instruction; or a second construction unit for constructing the filtering model using the user-selected model and the user-edited instruction.
Specifically, the empty model mentioned above may refer to a model that includes only one node but does not include any child node below the node, and a user may construct a final filtering model according to actual filtering requirements through a user editing instruction. In order to simplify the operation process of the user, a plurality of models can be pre-established for the user to select, and after the user selects a certain model, the selected model can be modified through a user editing instruction according to the actual filtering requirement, so that the final filtering model is obtained.
Optionally, the user editing instructions comprise one or more of the following instructions: an adding instruction is collected through the first input control and is used for adding a filtering condition or a filtering condition group; a modification instruction is acquired through the second input control and is used for modifying the content of the filtering condition or the filtering type in the filtering condition group; and the deleting instruction is acquired through the third input control and is used for deleting the filtering condition or the filtering condition group.
Specifically, the user may add or delete nodes to the empty model or the selected model as needed, modify the filtering condition content or the filtering type corresponding to the nodes, and the like.
In order to facilitate a user to add nodes on the basis of the existing nodes, a first input control can be set for the filter condition group corresponding to each filter condition group, the first input control comprises a condition adding sub-control and a condition group adding sub-control, and the user can add an independent filter condition in the current filter condition group by clicking the condition adding sub-control; the user can add one sub-filter condition group in the current filter condition group by clicking the condition group adding sub-control. For example, as shown in fig. 2, the condition addition sub-control may be a "new condition" in the drop-down menu of "add" after each filter condition group, and the condition group addition sub-control may be a "new condition group" in the drop-down menu of "add" after each filter condition group. By setting the first input control, the situation that the interior of the filter condition group can continue to derive the child nodes is guaranteed, and infinite extension is achieved.
Optionally, the content of the filter term includes filter items, filter logic, and filter values. For example, as shown in FIG. 2, the filter terms may be dimensions of account, project ID, media ID, payment type, project name, etc.; the filtering logic may be "in …", "equal to", etc.; the filter values may be numeric, literal, or "all," etc.
Specifically, in order to facilitate the user to modify the content or the filter type of the filter condition, a second input control may be set for the filter condition group corresponding to each filter condition group, where the second input control includes a conditional content modification sub-control and a filter type modification sub-control, and the user may modify the content of the current filter condition by clicking the conditional content modification sub-control; the user can modify the filter type by clicking on the filter type modification sub-control, and optionally can select between the sum logic and or the logic. For example, as shown in FIG. 2, the conditional content modification child controls may include a filter item modification child control, a filter logic modification child control, and a filter value modification child control; the filter type modification sub-control can be a single selection button behind each filter condition group, and comprises two buttons, one is a logical button, the other is an logical button, and a user can press any one button according to needs and can only press one button at the same time. The filtering condition group can be flexibly switched and/or filtered under the same data structure by modifying the sub-control through the filtering type.
Furthermore, in order to facilitate the user to delete the filter condition group or the filter condition, a third input control may be set for each filter condition, including a condition deletion sub-control and a condition group deletion sub-control, and the user may delete the entire filter condition group by clicking the condition deletion sub-control; the user can delete the corresponding filter condition by clicking the condition group to delete the child control. For example, as shown in FIG. 2, the condition group deletion sub-control may be a "remove condition group" after each filter condition group, and the condition deletion sub-control may be a "cross" number after each filter condition.
It should be noted that, through a selection control, the user can select from the "deletion condition" and the "deletion condition group" by clicking, and execute the corresponding deletion operation.
Through the scheme, the convenient operation and misoperation prompt of the user can be met by adding different input controls in the filtering model. And a filtering logic interface is presented more intuitively.
Optionally, in the above embodiment of the present invention, when the modification instruction is to modify the content of the filter condition, the apparatus further includes: the detection module is used for detecting whether the filtering value in the content of the filtering condition is matched with the filtering item and the filtering logic; and the prompt module is used for carrying out misoperation prompt if the operation signals are not matched.
Specifically, since different filter items and filter logics correspond to different filter values, for example, as shown in fig. 2, when a filter item is "pay type" and the filter logic is "in …", the corresponding filter value should be text; when the filter item is "media ID" and the filter logic is "equal", the corresponding filter value should be a number.
In an optional scheme, if the filtering value modified by the user through the filtering value modification control is not matched with the filtering item and the filtering logic, the filtering value is modified illegally, so that the filtering model cannot realize the filtering function, the modification can be prohibited for the user, and an misoperation prompt is displayed to inform the user that the filtering model cannot be modified. For example, as shown in fig. 2, when the filter item is "media ID" and the filter logic is "equal to", the user needs to input numbers at this time, and if the user inputs characters, it can be determined that the user has illegal modification and needs to perform an incorrect operation prompt.
Optionally, in the above embodiment of the present invention, the apparatus further includes: and the optimization module is used for optimizing the filtering model, and the obtained filtering model corresponding to the data to be filtered is the optimized filtering model corresponding to the data to be filtered.
Specifically, when the user deletes the filtering condition through the third input control, the filtering condition group is empty, so as to avoid affecting the filtering efficiency of the whole filtering model and reduce the complexity of the query statement, the filtering model needs to be optimized, the empty filtering condition group is deleted, and the multilayer nested condition groups are simplified, thereby obtaining the final filtering model.
The data filtering device comprises a processor and a memory, wherein the first acquiring module, the second acquiring module, the filtering module and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, complex filtering scenes are met by adjusting kernel parameters, a flexible filtering scheme is realized, and abundant filtering input controls are realized.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium having a program stored thereon, which when executed by a processor implements the data filtering method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the data filtering method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: (method claim step, independent + dependent). The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
acquiring data to be filtered; acquiring a filtering model corresponding to data to be filtered, wherein the filtering model is of a tree structure, each filtering condition of the filtering model corresponds to a leaf node of the tree structure, other nodes of the tree structure correspond to a filtering condition group of the filtering model, and filtering types of child nodes belonging to the same father node are consistent; and filtering the data to be filtered by using the filtering model to obtain a filtering result.
The set of filter conditions includes a sub-filter condition and/or a set of sub-filter conditions, or the set of filter conditions is empty.
And (5) constructing a filtering model.
The construction of the filtering model comprises the following steps: constructing a filtering model by utilizing the empty model and a user editing instruction; or building a filtering model using the user selected model and the user editing instructions.
The user editing instructions comprise one or more of the following instructions: an adding instruction is collected through the first input control and is used for adding a filtering condition or a filtering condition group; a modification instruction is acquired through the second input control and is used for modifying the content of the filtering condition or the filtering type in the filtering condition group; and the deleting instruction is acquired through the third input control and is used for deleting the filtering condition or the filtering condition group.
The content of the filter condition includes a filter item, filter logic, and a filter value; in the case that the modification instruction is to modify the filter condition content, the method further includes: detecting whether a filter value in the content of the filter condition matches the filter term and the filter logic; and if not, carrying out misoperation prompt.
And optimizing the filtering model, wherein the obtained filtering model corresponding to the data to be filtered is the optimized filtering model corresponding to the data to be filtered.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of filtering data, comprising:
acquiring data to be filtered;
acquiring a filtering model corresponding to the data to be filtered, wherein the filtering model is of a tree structure, each filtering condition of the filtering model corresponds to a leaf node of the tree structure, other nodes of the tree structure correspond to a filtering condition group of the filtering model, and filtering types of child nodes belonging to the same father node are consistent;
and filtering the data to be filtered by using the filtering model to obtain a filtering result.
2. Method according to claim 1, wherein the set of filter conditions comprises a sub-filter condition and/or a set of sub-filter conditions, or wherein a set of filter conditions is empty.
3. The method of claim 1, further comprising: and constructing the filtering model.
4. The method of claim 3, wherein the constructing the filtering model comprises:
constructing a filtering model by utilizing the empty model and a user editing instruction; or
A filtering model is constructed using the user-selected model and the user-edited instructions.
5. The method of claim 4, wherein the user editing instructions comprise one or more of the following instructions:
an adding instruction is collected through the first input control and is used for adding a filtering condition or a filtering condition group;
a modification instruction is acquired through the second input control and is used for modifying the content of the filtering condition or the filtering type in the filtering condition group;
and the deleting instruction is acquired through the third input control and is used for deleting the filtering condition or the filtering condition group.
6. The method of claim 5, wherein the content of the filter criteria comprises filter terms, filter logic, and filter values; in the case that the modification instruction is to modify the filter condition content, the method further includes:
detecting whether a filter value in the content of the filter condition matches the filter term and the filter logic;
and if not, carrying out misoperation prompt.
7. The method of claim 6, further comprising:
and optimizing the filtering model, wherein the obtained filtering model corresponding to the data to be filtered is the optimized filtering model corresponding to the data to be filtered.
8. A data filtering device, comprising:
the first acquisition module is used for acquiring data to be filtered;
the second obtaining module is used for obtaining a filtering model corresponding to the data to be filtered, wherein the filtering model is of a tree structure, each filtering condition of the filtering model corresponds to a leaf node of the tree structure, other nodes of the tree structure correspond to filtering condition groups of the filtering model, and filtering types of child nodes belonging to the same father node are consistent;
and the filtering module is used for filtering the data to be filtered by utilizing the filtering model to obtain a filtering result.
9. A storage medium comprising a stored program, wherein the program, when executed, controls an apparatus in which the storage medium is located to perform the data filtering method of any one of claims 1 to 7.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the data filtering method according to any one of claims 1 to 7 when running.
CN201811163257.3A 2018-09-30 2018-09-30 Data filtering method and device Pending CN110968742A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811163257.3A CN110968742A (en) 2018-09-30 2018-09-30 Data filtering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811163257.3A CN110968742A (en) 2018-09-30 2018-09-30 Data filtering method and device

Publications (1)

Publication Number Publication Date
CN110968742A true CN110968742A (en) 2020-04-07

Family

ID=70029540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811163257.3A Pending CN110968742A (en) 2018-09-30 2018-09-30 Data filtering method and device

Country Status (1)

Country Link
CN (1) CN110968742A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114416070A (en) * 2022-01-25 2022-04-29 重庆允丰科技有限公司 Node assembly and device for visually configuring trigger

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686146A (en) * 2008-09-28 2010-03-31 华为技术有限公司 Method and equipment for fuzzy query, query result processing and filtering condition processing
CN102004777A (en) * 2010-11-19 2011-04-06 中国科学院软件研究所 Customizable Web information integration method and system
CN106933889A (en) * 2015-12-31 2017-07-07 华为技术有限公司 For regular collocation method, display methods and the client screened
CN107330021A (en) * 2017-06-20 2017-11-07 北京神州泰岳软件股份有限公司 Data classification method, device and equipment based on multiway tree

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686146A (en) * 2008-09-28 2010-03-31 华为技术有限公司 Method and equipment for fuzzy query, query result processing and filtering condition processing
CN102004777A (en) * 2010-11-19 2011-04-06 中国科学院软件研究所 Customizable Web information integration method and system
CN106933889A (en) * 2015-12-31 2017-07-07 华为技术有限公司 For regular collocation method, display methods and the client screened
CN107330021A (en) * 2017-06-20 2017-11-07 北京神州泰岳软件股份有限公司 Data classification method, device and equipment based on multiway tree

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114416070A (en) * 2022-01-25 2022-04-29 重庆允丰科技有限公司 Node assembly and device for visually configuring trigger
CN114416070B (en) * 2022-01-25 2023-03-24 重庆允丰科技有限公司 Node assembly and device for visually configuring trigger

Similar Documents

Publication Publication Date Title
CN111414166B (en) Code generation method, device, equipment and storage medium
CN107066519B (en) Task detection method and device
CN105373419A (en) Background application operation method and system
CN106843820B (en) Code processing method and device
CN109241026B (en) Data management method, device and system
CN111784468B (en) Account association method and device and electronic equipment
CN112182349A (en) Method, device and system for querying compliance file
CN108874379B (en) Page processing method and device
CN110968742A (en) Data filtering method and device
CN111984666A (en) Database access method and device, computer readable storage medium and computer equipment
US10042638B2 (en) Evaluating documentation coverage
CN110008398B (en) Data classification management recommendation method and device
CN105677347A (en) Method and device for processing data
CN110968408A (en) Execution stream removing method and device, electronic equipment and storage medium
CN107070770B (en) Resource transmission method and device
CN111553187B (en) Method and system for identifying form in CAD drawing
CN112182115A (en) Relationship display method and device, storage medium and electronic device
CN110019296B (en) Database query script generation method and device, storage medium and processor
CN110968580B (en) Method and device for creating data storage structure
CN115914358A (en) Message pushing method and device, electronic equipment and computer storage medium
CN108428189B (en) Social resource processing method and device and readable medium
CN113359530A (en) Sequence control method and device
CN108009877B (en) Information mining method and device
CN111935204A (en) Program recommendation method and device and electronic equipment
CN110737524A (en) task rule management method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200407