Information query method, system, computer device and readable storage medium
By constructing a conditional rule tree and using a preset profile rule engine to generate query statements, the problem of complex filtering conditions in user profile tagging processing is solved, and the system design is simplified and its functions are expanded.
Patent Information
- Application Number
- CN202411507127.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In the process of user profile tagging, the large variety of tags makes it difficult to generate complex combinations of filtering conditions and expand other functions.
By constructing a conditional rule tree through a pre-defined profile rule engine, query statements are generated and the required information is retrieved from the database. The conditional rule tree reduces design complexity and facilitates functional expansion.
It simplifies the process of generating filtering conditions for user profile tags, reduces the complexity of system design, and facilitates the expansion of other functions through rule trees.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an information query method, system, computer device and readable storage medium. Background Art
[0002] As the business continues to develop, the number of users gradually increases. In order to facilitate business needs, users need to be labeled and processed. However, there are too many types of labels, which makes the process of combining user labels to generate filtering conditions more complicated in actual application, and it is not easy to expand other functions. Summary of the invention
[0003] In view of the above problems, the present application proposes an information query method, system, computer device and readable storage medium.
[0004] The present application embodiment provides an information query method, including:
[0005] Responding to the search condition information configured in the input box of the interface, and generating a screening condition corresponding to the search condition information; wherein the search condition information includes a plurality of condition type information and a plurality of logical relationship information, and the plurality of logical relationship information is used to associate the plurality of condition type information;
[0006] By using a preset profile rule engine, a conditional rule tree is constructed according to the screening conditions;
[0007] A query statement is generated according to the conditional rule tree, and required information is searched in a database according to the query statement.
[0008] Furthermore, in the above-mentioned information query method, the screening condition includes a relationship logic node block, each of the relationship logic node blocks includes a condition group, and the condition group includes a plurality of relationship logic sub-node blocks and / or a plurality of screening condition node sub-blocks; the step of constructing a condition rule tree according to the screening condition includes:
[0009] When the relationship logic node block is identified, construct the corresponding logic tree node of the conditional rule tree, and read the condition group content in the relationship logic node block;
[0010] If the number of the screening condition node sub-blocks in the condition group content is n, then construct n condition tree sub-nodes of the logic tree node, wherein the screening condition node sub-blocks correspond to the condition tree sub-nodes one by one, and n is an integer greater than or equal to 0;
[0011] If the number of relational logic sub-node blocks in the condition group content is m, then construct m logic tree sub-nodes of the logic tree node, wherein the relational logic sub-node blocks correspond to the logic tree sub-nodes one by one, and m is an integer greater than or equal to 0;
[0012] Identify the conditional subgroups in the relational logic subnode blocks and construct corresponding tree subnodes until all relational logic subnode blocks are identified; obtain a complete conditional rule tree based on the tree subnodes constructed corresponding to all the identified relational logic subnode blocks.
[0013] Furthermore, in the above information query method, the logic tree node and the logic tree sub-node include a node category identifier; and the n condition tree sub-nodes of the logic tree node are constructed, including:
[0014] Constructing n conditional tree child nodes of the logic tree node, and reading the condition type information in each screening condition node sub-block, and filling the condition type information into the corresponding conditional tree child node;
[0015] The m logic tree sub-nodes of the logic tree node are constructed, including:
[0016] The m logic tree sub-nodes of the logic tree node are constructed, and the logic relationship information in each of the relationship logic sub-node blocks is read, and the logic relationship information is filled into the corresponding logic tree sub-node to obtain the node category identifier.
[0017] Further, in the above information query method, the required information includes identification dimension information, the dimension information includes the number of users and / or the user unique identification; the tree node and the tree subnode include node names;
[0018] The preset portrait rule engine includes an attribute module and a method module. The attribute module includes node parameters and customer group identification dimension parameters. The customer group identification dimension parameters are used to return the identification dimension information. The method module is used to construct the node category identification. The node parameters are used to construct the node name.
[0019] The step of searching the database for required information according to the query statement includes:
[0020] The required information is queried in the database according to the query statement and the customer group identification dimension parameters.
[0021] Furthermore, in the above-mentioned information query method, generating a query statement according to the conditional rule tree includes:
[0022] When the logic tree node is identified, a corresponding logic relationship is generated, and the logic relationship is used as a query statement;
[0023] If the direct-level child nodes of the logic tree node include x logic tree child nodes, then x logic sub-relations are added to the logic relationship to obtain a new query statement, wherein the logic tree child nodes correspond to the logic sub-relations one by one, and x is an integer greater than or equal to 0;
[0024] If the direct-level child nodes of the logic tree node include y condition tree child nodes, then y condition type information is added to the logical relationship to obtain a new query statement, wherein the condition tree child nodes correspond to the condition type information one by one, and y is an integer greater than or equal to 0;
[0025] Based on the added condition type information or logical sub-relationships corresponding to the identified child nodes of all levels of the logic tree node, a complete query statement is obtained.
[0026] Further, in the above-mentioned information query method, the interface input box includes a user rule input box and a label data table input box;
[0027] The user rule input box includes several drop-down box condition groups, and the drop-down box condition groups include a main condition drop-down box and several secondary condition drop-down boxes; the label data table input box is used to obtain a basic information selection pool and an industry category selection pool;
[0028] The basic information selection pool includes at least one of a registration date tag, an operating status tag, a permanent location tag, and a gender tag, and the industry category selection pool includes at least one of an industry level tag and an industry type tag;
[0029] The primary condition drop-down box is used to obtain any one label in the basic information selection pool and the industry category selection pool, and the secondary condition drop-down box is used to obtain associated information of the label.
[0030] Furthermore, in the above-mentioned information query method, the condition type information includes any one of registration date information, business status information, permanent location information and gender; the logical relationship information includes any one of a logical relationship, a logical relationship and a non-logical relationship.
[0031] Another embodiment of the present application further provides an information query system, including:
[0032] A generating module, used to respond to the search condition information configured in the interface input box, and generate a screening condition corresponding to the search condition information; wherein the search condition information includes a plurality of condition type information and a plurality of logical relationship information, and the plurality of logical relationship information is used to associate the plurality of condition type information;
[0033] A construction module, used to construct a conditional rule tree according to the screening conditions through a preset portrait rule engine;
[0034] The query module is used to generate a query statement according to the conditional rule tree, and query the required information in the database through the query statement.
[0035] Another embodiment of the present application further proposes a computer device, including a storage unit and a processing unit, wherein the storage unit stores a computer program, and the processing unit executes the steps of the above-mentioned information query method by calling the computer program stored in the storage unit.
[0036] Another embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the above-mentioned information query method.
[0037] The embodiments of the present application have the following beneficial effects:
[0038] The embodiment of the present application proposes an information query method, including: responding to the search condition information configured in the input box of the interface, and generating the screening condition corresponding to the search condition information; wherein the search condition information includes a plurality of condition type information and a plurality of logical relationship information, and the plurality of logical relationship information is used to associate the plurality of condition type information; through a preset portrait rule engine, constructing a condition rule tree according to the screening condition; generating a query statement according to the condition rule tree, and querying the required information in the database according to the query statement. The present application constructs a rule tree through a preset portrait rule engine. Since the rule tree only holds node information, it not only reduces the design complexity, but also facilitates the subsequent data conversion. In addition, it is also convenient to expand other functions according to the rule tree through the preset portrait rule engine. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. In each of the drawings, similar components are numbered similarly.
[0040] Figure 1 A first schematic diagram showing the information query method of some embodiments of the present application;
[0041] Figure 2 A schematic diagram showing an input box of an information query method in some embodiments of the present application;
[0042] Figure 3A schematic diagram of a screening condition module of an information query method in some embodiments of the present application is shown;
[0043] Figure 4 A schematic diagram showing the logical relationship of the information query method of some implementation modes of the present application;
[0044] Figure 5 A second flow chart of the information query method in some embodiments of the present application is shown;
[0045] Figure 6 A schematic diagram of a first conditional rule tree of an information query method in some embodiments of the present application is shown;
[0046] Figure 7 A schematic diagram of a second conditional rule tree of the information query method in some embodiments of the present application is shown;
[0047] Figure 8 A third flow chart showing the information query method of some implementation modes of the present application;
[0048] Fig. 9 A schematic diagram showing the structure of an information query system according to some embodiments of the present application is shown. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0050] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0051] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.
[0052] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0053] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0054] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0055] Usually, user portrait tags involve various types such as numerical type, text type, time type and cascade type. They are highly complex and can easily lead to complex and bloated code implementation logic, and are even more difficult to expand to other functions.
[0056] Therefore, in order to solve the above problems, the present application proposes an information query method.
[0057] Please refer to Figure 1 , is a flow chart of an information query method proposed in an embodiment of the present application. Exemplarily, the information query method is applied in a search system, for example, the search system may be a part of a user portrait platform, etc.
[0058] In some embodiments, Figure 1 As shown, the information query method includes:
[0059] S110, responding to the search condition information configured in the input box of the interface, and generating screening conditions corresponding to the search condition information.
[0060] The user enters the search condition information to be configured in the interface input box, the system responds to the search condition information, and generates corresponding filtering conditions based on the acquired search condition information. It should be noted that the information entered in each interface input box is collectively referred to as search condition information. Since the number of interface input boxes is greater than 1, and the types of all search condition information entered by the user in the input box may be different, the search condition information needs to be classified. Among them, the search condition information includes several condition type information and several logical relationship information, and several logical relationship information is used to associate several condition type information. Among them, the condition type information includes any one of registration date information, business status information, permanent location information and gender; the logical relationship information includes any one of logical relationship, or logical relationship and non-logical relationship.
[0061] In some embodiments of the information query method, Figure 2As shown, the interface input box includes a user rule input box and a label data table input box.
[0062] Users can select an existing table in the label data table input box to obtain the corresponding different types of selection pools, such as the basic information selection pool and industry category selection pool corresponding to the full registration form. The basic information selection pool includes at least one of the registration date label, business status label, permanent location label and gender label, and the industry category selection pool includes at least one of the industry level label and industry type label.
[0063] The user rule input box includes several drop-down box condition groups, and the drop-down box condition group includes a main condition drop-down box and several secondary condition drop-down boxes. The main condition drop-down box and the secondary condition drop-down box in the same drop-down box condition group correspond to each other. Optionally, a drop-down box condition group includes 2 secondary condition drop-down boxes. The user can obtain any label in the basic information selection pool and the industry category selection pool through the main condition drop-down box. Each label has corresponding associated information. When the user determines the content of the main condition drop-down box in a certain drop-down box condition group, the content selected by the secondary condition drop-down box in the drop-down box condition group is the associated information of the associated main condition drop-down box content. Exemplarily, if the main condition drop-down box selects the registration date, the content selected by the corresponding secondary condition drop-down box is the associated information of the registration date, such as relative date, absolute date, last week, last day, etc.
[0064] S210. Build a conditional rule tree based on the screening conditions through the preset portrait rule engine.
[0065] Since the preset portrait rule engine needs to be built based on specific files, it is necessary to compile the condition type information and logical relationship information entered by the user in the interface input box into corresponding filtering conditions. Only then can the preset portrait rule engine read the content in the filtering conditions and build the corresponding rule tree.
[0066] In some embodiments of the information query method, Figure 3 As shown, the screening condition includes several relationship logic node blocks, each relationship logic node block includes a relationship logic node and a condition group, and the condition group includes several relationship logic sub-node blocks and / or several screening condition node sub-blocks. It should be noted that the relationship logic sub-node block includes a relationship logic sub-node and a condition sub-group, and the condition sub-group includes several relationship logic sub-node blocks and / or several screening condition node sub-blocks. Among them, each relationship logic node block includes a relationship logic node, and each relationship logic sub-node block includes a relationship logic sub-node.
[0067] Demonstratively, Figure 3The content of a screening condition is shown, the screening condition includes a relationship logic node block, the relationship logic node block includes a relationship logic node and a condition group, the condition group includes a screening condition node sub-block and a relationship logic sub-node block, the relationship logic sub-node block includes a relationship logic sub-node and a condition sub-group, the condition sub-group includes two screening condition node sub-blocks, and the corresponding simplified logical structure is as follows Figure 4 shown.
[0068] Build a conditional rule tree based on the screening conditions, such as Figure 5 As shown, including:
[0069] S211. When a relational logic root node block is identified, a logic tree node of a corresponding conditional rule tree is constructed, and condition group content in the relational logic node block is read.
[0070] The preset profile rule engine builds a conditional rule tree based on the filtering conditions, mainly presenting the content of the filtering conditions in the form of a conditional rule tree, because the conditional rule tree has many advantages, including:
[0071] First, by generating query conditions through the conditional rule tree, single condition constraints can be implemented in software design, reducing design complexity.
[0072] Second, the characteristic of the conditional rule tree is that it is all node information, and its leaf nodes (i.e., the conditional tree child nodes in this embodiment) correspond to the screening condition node sub-blocks. By using this characteristic, the processor can generate conditions according to the type of labels in the conditional tree child nodes through delegation. For example, for digital types, it is necessary to convert strings to numbers, and then assemble conditions (=, >, <), etc. For date types, it is necessary to convert strings to time, and then assemble conditions (within a time period, after a certain time).
[0073] Since the reading of the filter conditions starts from the first row of data, after the first relational logic node is read, the relational logic node and the subsequent part are used as a relational logic node block, and the logic tree node of the conditional rule tree is constructed, wherein the logic tree node corresponds to the relational logic node.
[0074] S212: If the number of screening condition node sub-blocks in the condition group content is n, construct n condition tree sub-nodes of the logic tree node, wherein the screening condition node sub-blocks correspond to the condition tree sub-nodes one by one, and n is an integer greater than or equal to 0.
[0075] S213. If the number of relational logic sub-node blocks in the conditional group content is m, construct m logic tree sub-nodes of the logic tree node, wherein the relational logic sub-node blocks correspond to the logic tree sub-nodes one by one, and m is an integer greater than or equal to 0.
[0076] It should be noted that each time the number of filtering condition node sub-blocks and relationship logic sub-node blocks is determined, only the number of filtering condition node sub-blocks and relationship logic sub-node blocks at the same level is determined. The division mark between levels can be based on the condition group / condition sub-group. In the same relationship logic sub-node block / relationship logic node block, the content within the condition sub-group / condition group is the next level of the content outside the condition sub-group / condition group. Figure 3 As shown, the relationship logic nodes outside the condition group are taken as the first level; the part in the condition group is taken as the second level, such as the screening condition node sub-block and the relationship logic sub-node; and the content in the condition sub-group is taken as the third level.
[0077] Exemplarily, if the number of relational logic sub-node blocks of the current level in the condition group content is 1, then one logic tree sub-node of the logic tree node is constructed, and the constructed logic tree sub-node is the next level of the logic tree node, that is, the direct level.
[0078] S214, identifying conditional subgroups in the relational logic subnode blocks and constructing corresponding tree subnodes until all relational logic subnode blocks are identified; obtaining a complete conditional rule tree based on the tree subnodes constructed corresponding to all identified relational logic subnode blocks.
[0079] The conditional rule tree may have multiple layers, so it is necessary to identify all the relationship logic sub-node blocks in the conditional sub-groups and construct the tree sub-nodes corresponding to each relationship logic sub-node block. It should be noted that the conditional sub-groups may contain multiple levels of conditional sub-groups. For example, the first-level conditional sub-groups contain the second-level (next level) conditional sub-groups, and the second-level conditional sub-groups may contain the third-level (next level) conditional sub-groups. Therefore, the "relationship logic sub-node blocks" in the above "until all relationship logic sub-node blocks are identified" include the relationship logic sub-node blocks in the conditional sub-groups of all levels. Then, according to the tree sub-nodes (including conditional tree sub-nodes and logic tree sub-nodes) constructed corresponding to the logic tree nodes and all the relationship logic sub-node blocks, a complete conditional rule tree is constructed.
[0080] For example, Figure 6As shown, the number of relational logic sub-node blocks in the conditional group content is 2, namely relational logic sub-node block a and relational logic sub-node block b. Then the corresponding conditional rule tree is: the next level of the logic tree node has logic tree sub-node a and logic tree sub-node b. If the relational logic sub-node block a contains relational logic sub-node block a1, then the corresponding conditional rule tree is: the next level of the logic tree sub-node a has logic tree sub-node a1. If the relational logic sub-node block a1 contains relational logic sub-node block a11 and relational logic sub-node block a12, then the corresponding conditional rule tree is: the next level of the logic tree sub-node a1 has logic tree sub-node a11 and logic tree sub-node a12.
[0081] Demonstratively, combined Figure 4 and Figure 7 , Figure 4 is a logical structure diagram in an embodiment, Figure 7 for Figure 4 The corresponding conditional rule tree includes the node name and node content of each tree node and tree subnode. The node name includes logic tree nodes, logic tree subnodes, and condition tree subnodes, etc., where logic tree subnodes and logic tree nodes are both logic nodes, and condition tree subnodes are condition nodes. The node content includes but is not limited to node category identification and / or condition type information, which is not limited here. Among them, the node category identification includes logic nodes (such as or, and) and condition nodes (info).
[0082] In some embodiments of the information query method, the logic tree node and the logic tree sub-node include a node category identifier; constructing n conditional tree sub-nodes of the logic tree node includes:
[0083] Construct n conditional tree child nodes of the logic tree node, read the conditional type information in each screening conditional node sub-block, and fill the conditional type information into the corresponding conditional tree child node.
[0084] Construct m logical tree child nodes of the logical tree node, including:
[0085] Construct m logic tree child nodes of the logic tree node, read the logic relationship information in each relationship logic child node block, and fill the logic relationship information into the corresponding logic tree child node to obtain a node category identifier.
[0086] Exemplarily, if the logical relationship information in the relationship logic sub-node block is And, the corresponding node category identifier is And.
[0087] like Figure 7 As shown, the conditional rule tree has 1 logic tree node, 1 logic tree sub-node and 3 conditional tree sub-nodes.
[0088] In some implementations of the information query method, the required information includes identification dimension information, and the dimension information includes the number of users and / or the unique identification of users.
[0089] The node parameters are used to construct the node name. The preset portrait rule engine includes an attribute module and a method module. The attribute module includes node parameters and customer group identification dimension parameters. The customer group identification dimension parameters are used to return identification dimension information. The method module is used to construct the node category identification.
[0090] Query the required information in the database according to the query statement, including:
[0091] Query and obtain the required information in the database based on the query statement and customer group identification dimension parameters.
[0092] In some implementations, the constructed rule tree and user identification can also be driven by preset portrait rules to query customer group identification dimension parameters ("user identification" data distribution information), such as the number of users, to make the extended function more convenient. Among them, the customer group identification dimension parameters include the number of users, etc., which are not limited here.
[0093] S310: Generate a query statement according to the conditional rule tree, and query the required information in the database according to the query statement.
[0094] In some embodiments of the information query method, Figure 8 As shown, a query statement is generated according to the conditional rule tree, including:
[0095] S311. When a logic tree node is identified, a corresponding logic relationship is generated and the logic relationship is used as a query statement.
[0096] S312. If the direct-level child nodes of the logic tree node include x logic tree child nodes, then x logic sub-relations are added to the logical relationship to obtain a new query statement, wherein the logic tree child nodes correspond to the logic sub-relations one by one, and x is an integer greater than or equal to 0.
[0097] S313. If the direct-level child nodes of the logic tree node include y condition tree child nodes, y condition type information is added to the logical relationship to obtain a new query statement, wherein the condition tree child nodes correspond to the condition type information one by one, and y is an integer greater than or equal to 0.
[0098] S314: Obtain a complete query statement based on the added condition type information or logical sub-relationship corresponding to the child nodes of all levels of the identified logic tree node.
[0099] It should be noted that the conditional rule tree has multiple layers, so it is necessary to identify the child nodes of all layers before a complete query statement can be generated.
[0100] For example, according to Figure 7 The query statement construction process is as follows: first identify the logic tree node and generate the corresponding logical relationship "or", and the query statement is "or". Then identify that the direct-level child nodes of the logic tree node include 1 logic tree child node and 1 condition tree child node, and identify that the corresponding logical sub-relationship is "and", and the corresponding condition type information is "basic information / registration date". The query statement at this time is "(and) or basic information / registration date". Continue to identify the direct-level child nodes of the logic tree child node, and find that it contains 2 condition tree child nodes, and identify the corresponding condition type information as "basic information / business status" and "basic information / permanent place". The query statement at this time is "(basic information / business status and basic information / permanent place) or basic information / registration date". At this point, a complete query statement is obtained.
[0101] The embodiment of the present application proposes an information query method, including: responding to the search condition information configured in the input box of the interface, and generating filtering conditions corresponding to the search condition information; wherein the search condition information includes a number of condition type information and a number of logical relationship information, and the several logical relationship information is used to associate the several condition type information; through a preset portrait rule engine, a condition rule tree is constructed according to the filtering conditions; a query statement is generated according to the condition rule tree, and the required information is queried in the database according to the query statement. The present application constructs a rule tree through a preset portrait rule engine. Since the rule tree only holds node information, it not only reduces the design complexity, but also facilitates the subsequent data conversion. In addition, it is also convenient to expand other functions according to the rule tree through the preset portrait rule engine.
[0102] Another embodiment of the present application also provides an information query system 400, such as Fig. 9 As shown, the information query system 400 includes:
[0103] The generation module 410 is used to respond to the search condition information configured in the interface input box and generate filtering conditions corresponding to the search condition information; wherein the search condition information includes a number of condition type information and a number of logical relationship information, and the number of logical relationship information is used to associate a number of condition type information.
[0104] The construction module 420 is used to construct a conditional rule tree according to the screening conditions through a preset portrait rule engine.
[0105] The query module 430 is used to generate a query statement according to the conditional rule tree, and query the required information in the database through the query statement.
[0106] Another embodiment of the present application further proposes a computer device, including a storage unit and a processing unit, wherein a computer program is stored in the storage unit, and the processing unit executes the steps of the above-mentioned information query method by calling the computer program stored in the storage unit.
[0107] Another embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded by a processor to execute the steps of the above-mentioned information query method.
[0108] It can be understood that the method steps of this embodiment correspond to the information query method in the above embodiment, wherein the options of the above information query method are also applicable to this embodiment and will not be described repeatedly here.
[0109] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus embodiments described above are merely schematic, for example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0110] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0111] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0112] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. An information query method, characterized in that: include: Responding to the search condition information configured in the input box of the interface, and generating a screening condition corresponding to the search condition information; wherein the search condition information includes a plurality of condition type information and a plurality of logical relationship information, and the plurality of logical relationship information is used to associate the plurality of condition type information; By using a preset profile rule engine, a conditional rule tree is constructed according to the screening conditions; Generate a query statement according to the conditional rule tree, and query the required information in the database according to the query statement; The screening condition includes a relational logic node block, each of the relational logic node blocks includes a condition group, and the condition group includes a plurality of relational logic sub-node blocks and / or a plurality of screening condition node sub-blocks; the step of constructing a conditional rule tree according to the screening condition includes: When the relationship logic node block is identified, construct the corresponding logic tree node of the conditional rule tree, and read the condition group content in the relationship logic node block; If the number of the screening condition node sub-blocks in the condition group content is n, then construct n condition tree sub-nodes of the logic tree node, wherein the screening condition node sub-blocks correspond to the condition tree sub-nodes one by one, and n is an integer greater than or equal to 0; If the number of relational logic sub-node blocks in the condition group content is m, then construct m logic tree sub-nodes of the logic tree node, wherein the relational logic sub-node blocks correspond to the logic tree sub-nodes one by one, and m is an integer greater than or equal to 0; Identify the conditional subgroups in the relational logic subnode blocks and construct corresponding tree subnodes until all relational logic subnode blocks are identified; obtain a complete conditional rule tree based on the tree subnodes constructed corresponding to all the identified relational logic subnode blocks; The logic tree node and the logic tree sub-node include a node category identifier; the n conditional tree sub-nodes of the logic tree node are constructed, including: Constructing n conditional tree child nodes of the logic tree node, and reading the condition type information in each screening condition node sub-block, and filling the condition type information into the corresponding conditional tree child node; The m logic tree sub-nodes of the logic tree node are constructed, including: The m logic tree sub-nodes of the logic tree node are constructed, and the logic relationship information in each of the relationship logic sub-node blocks is read, and the logic relationship information is filled into the corresponding logic tree sub-node to obtain the node category identifier; The required information includes identification dimension information, and the identification dimension information includes the number of users and / or the unique identification of users; the tree node and the tree subnode include node names; The preset portrait rule engine includes an attribute module and a method module. The attribute module includes node parameters and customer group identification dimension parameters. The customer group identification dimension parameters are used to return the identification dimension information. The method module is used to construct the node category identification. The node parameters are used to construct the node name. The customer group identification dimension parameters include user identification data distribution information. The node category identification includes a logical node and a conditional node. The step of searching the database for required information according to the query statement includes: The required information is queried in the database according to the query statement and the customer group identification dimension parameters.
2. The information query method according to claim 1, characterized in that: Generating a query statement according to the conditional rule tree includes: When the logic tree node is identified, a corresponding logic relationship is generated, and the logic relationship is used as a query statement; If the direct-level child nodes of the logic tree node include x logic tree child nodes, then x logic sub-relations are added to the logic relationship to obtain a new query statement, wherein the logic tree child nodes correspond to the logic sub-relations one by one, and x is an integer greater than or equal to 0; If the direct-level child nodes of the logic tree node include y condition tree child nodes, then y condition type information is added to the logic relationship to obtain a new query statement, wherein the condition tree child nodes correspond to the condition type information one by one, and y is an integer greater than or equal to 0; Based on the added condition type information or logical sub-relationships corresponding to the identified child nodes of all levels of the logic tree node, a complete query statement is obtained.
3. The information query method according to claim 1, characterized in that: The interface input box includes a user rule input box and a label data table input box; The user rule input box includes several drop-down box condition groups, and the drop-down box condition groups include a main condition drop-down box and several secondary condition drop-down boxes; the label data table input box is used to obtain a basic information selection pool and an industry category selection pool; The basic information selection pool includes at least one of a registration date tag, an operating status tag, a permanent location tag, and a gender tag, and the industry category selection pool includes at least one of an industry level tag and an industry type tag; The primary condition drop-down box is used to obtain any one label in the basic information selection pool and the industry category selection pool, and the secondary condition drop-down box is used to obtain associated information of the label.
4. The information query method according to any one of claims 1 to 3, characterized in that: The condition type information includes any one of registration date information, business status information, permanent location information and gender; the logical relationship information includes any one of logical relationship, logical relationship and non-logical relationship.
5. An information query system, characterized in that: include: A generating module, used to respond to the search condition information configured in the interface input box, and generate a screening condition corresponding to the search condition information; wherein the search condition information includes a plurality of condition type information and a plurality of logical relationship information, and the plurality of logical relationship information is used to associate the plurality of condition type information; A construction module, used to construct a conditional rule tree according to the screening conditions through a preset portrait rule engine; A query module, used to generate a query statement according to the conditional rule tree, and query the required information in the database through the query statement; The screening condition includes a relational logic node block, each of the relational logic node blocks includes a condition group, and the condition group includes a plurality of relational logic sub-node blocks and / or a plurality of screening condition node sub-blocks; the step of constructing a conditional rule tree according to the screening condition includes: When the relationship logic node block is identified, construct the corresponding logic tree node of the conditional rule tree, and read the condition group content in the relationship logic node block; If the number of the screening condition node sub-blocks in the condition group content is n, then construct n condition tree sub-nodes of the logic tree node, wherein the screening condition node sub-blocks correspond to the condition tree sub-nodes one by one, and n is an integer greater than or equal to 0; If the number of relational logic sub-node blocks in the condition group content is m, then construct m logic tree sub-nodes of the logic tree node, wherein the relational logic sub-node blocks correspond to the logic tree sub-nodes one by one, and m is an integer greater than or equal to 0; Identify the conditional subgroups in the relational logic subnode blocks and construct corresponding tree subnodes until all relational logic subnode blocks are identified; obtain a complete conditional rule tree based on the tree subnodes constructed corresponding to all the identified relational logic subnode blocks; The logic tree node and the logic tree sub-node include a node category identifier; the n conditional tree sub-nodes of the logic tree node are constructed, including: Constructing n conditional tree child nodes of the logic tree node, and reading the condition type information in each screening condition node sub-block, and filling the condition type information into the corresponding conditional tree child node; The m logic tree sub-nodes of the logic tree node are constructed, including: The m logic tree sub-nodes of the logic tree node are constructed, and the logic relationship information in each of the relationship logic sub-node blocks is read, and the logic relationship information is filled into the corresponding logic tree sub-node to obtain the node category identifier; The required information includes identification dimension information, and the identification dimension information includes the number of users and / or the unique identification of users; the tree node and the tree subnode include node names; The preset portrait rule engine includes an attribute module and a method module. The attribute module includes node parameters and customer group identification dimension parameters. The customer group identification dimension parameters are used to return the identification dimension information. The method module is used to construct the node category identification. The node parameters are used to construct the node name. The customer group identification dimension parameters include user identification data distribution information. The node category identification includes a logical node and a conditional node. The step of searching the database for required information according to the query statement includes: The required information is queried in the database according to the query statement and the customer group identification dimension parameters.
6. A computer device, characterized in that: It comprises a storage unit and a processing unit, wherein the storage unit stores a computer program, and the processing unit executes the steps of the information query method according to any one of claims 1 to 4 by calling the computer program stored in the storage unit.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the information query method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Information inquiring method and apparatus
CN105447098A
Information orientation method and device, computing equipment and computer readable storage medium
CN114764460A
Address book management method and device based on multi-way tree structure, equipment and medium
CN117319352A