Multi-dimensional label-based user screening SQL statement assembly method and system

Through the user filtering SQL statement assembly method and system based on multi-dimensional tags, the problem of inefficient SQL query of large amounts of user data is solved, efficient and accurate user screening and query are achieved, and the threshold for use is lowered.

CN120216532APending Publication Date: 2025-06-27BEIJING BAIJU YIXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510228791.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, SQL query for large amounts of user data is inefficient, and users need to understand how SQL statements are written, the threshold for use is high, and maintenance is cumbersome.

Method used

Provide a user-screening SQL statement assembly method and system based on multi-dimensional tags. Multi-dimensional tag combination is obtained through user interaction modules. The back-end module uses the preset rule engine to parse the tag combination, convert it into SQL condition expressions, and assemble it into a complete SQL query statement.

Benefits of technology

It reduces the time and workload of manually writing SQL, improves the efficiency and accuracy of user screening, lowers the threshold for use, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216532A_ABST
    Figure CN120216532A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of big data screening, and discloses a user screening SQL statement splicing method and system based on multi-dimensional tags, and the method comprises the steps: a user interaction module, which is used for sending a multi-dimensional tag combination to a back-end module; the back-end module is used for analyzing the multi-dimensional label combination based on a preset rule engine, determining at least one label and converting each label into a corresponding SQL condition expression; and the back-end module is used for assembling the at least one SQL condition expression, determining an SQL statement corresponding to the multi-dimensional label combination, executing the SQL statement, determining a query result corresponding to the multi-dimensional label combination, and sending the query result to the result display module. According to the method provided by the embodiment of the invention, the multi-dimensional labels selected by the user are automatically converted into the SQL condition expressions through the rule engine module, and the conditions are combined into the complete SQL query statement through the SQL assembly module, so that the time and the workload of manually compiling the SQL are reduced, and the screening efficiency of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of big data screening, and particularly relates to a method and system for assembling SQL statements for user screening based on multi-dimensional tags. Background Art

[0002] With the rapid development of the Internet and information technology, enterprises and organizations have accumulated a large amount of user data; the user data usually contains various attribute information of users, such as age, gender, purchase completion status, service duration, etc., and these information are usually referred to as multi-dimensional tags.

[0003] In the related art, SQL queries for a large amount of user data often rely on manual query methods, which may lead to the problem of low query efficiency. Therefore, how to improve the SQL query efficiency for a large amount of user data has become a problem to be solved. Summary of the Invention

[0004] In view of this, the present disclosure provides a method and system for assembling SQL statements for user screening based on multi-dimensional tags to solve the problem of how to improve the SQL query efficiency for a large amount of user data.

[0005] On the one hand, the present disclosure provides a method for assembling SQL statements for user screening based on multi-dimensional tags, which is applied to a user screening system. The user screening system includes: a user interaction module, a backend module, and a result display module. The method includes: the user interaction module obtains the multi-dimensional tag combination input by the user and sends the multi-dimensional tag combination to the backend module; the backend module parses the multi-dimensional tag combination based on a preset rule engine, determines at least one tag as the parsing result, and converts each tag in the at least one tag into a corresponding SQL conditional expression; the backend module assembles the at least one SQL conditional expression, determines the SQL statement corresponding to the multi-dimensional tag combination, executes the SQL statement, determines the query result corresponding to the multi-dimensional tag combination, and sends the query result to the result display module; the result display module displays the query result corresponding to the multi-dimensional tag combination to the user.

[0006] On the other hand, the present disclosure also provides a user screening system, which includes a user interaction module, a backend module, and a result display module, where: The user interaction module is used to obtain the multi-dimensional label combination input by the user and send the multi-dimensional label combination to the backend module; The backend module is used to parse the multi-dimensional label combination based on a preset rule engine, determine at least one label as the parsing result, and convert each label in the at least one label into a corresponding SQL conditional expression; The backend module is used to assemble at least one SQL conditional expression, determine the SQL statement corresponding to the multi-dimensional label combination, execute the SQL statement, determine the query result corresponding to the multi-dimensional label combination, and send the query result to the result display module; The result display module is used to display the query result corresponding to the multi-dimensional label combination to the user.

[0007] On the other hand, the present disclosure also provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to implement the above-mentioned method for assembling a user screening SQL statement based on multi-dimensional labels.

[0008] On the other hand, the present disclosure also provides a computer program product, including computer instructions, and the computer instructions are used to cause a computer to execute the above-mentioned method for assembling a user screening SQL statement based on multi-dimensional labels.

[0009] Through the method and system for assembling a user screening SQL statement based on multi-dimensional labels in the above embodiments of the present disclosure, the rule engine module automatically converts the multi-dimensional labels selected by the user into SQL conditional expressions, and the SQL assembly module combines these conditions into a complete SQL query statement, reducing the time and workload of manually writing SQL and improving the efficiency of user screening. Based on multi-dimensional labels, it is possible to more accurately screen the target user group that meets the conditions and further improve the screening efficiency.

[0010] In addition, the user selects labels through the interaction module, and the system automatically generates corresponding query statements, avoiding complex operation processes, greatly simplifying the user's operation process, reducing the usage threshold for user screening, and enhancing the user experience. Description of the Drawings

[0011] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related art, the following will briefly introduce the drawings required to be used in the description of the specific embodiments or the related technical solutions. Obviously, the following drawings are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0012] Figure 1aShows an exemplary schematic diagram of the architecture of a user screening system to which a method for assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure is applied;

[0013] Figure 1b Is a flowchart of a method for assembling a user screening SQL statement based on multi-dimensional tags provided by an embodiment of the present disclosure;

[0014] Figure 2 Shows a schematic diagram of the composition of individual processing tags of a method for assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure;

[0015] Figure 3 Shows a schematic diagram of the composition of ordinary tags of a method for assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure;

[0016] Figure 4 Shows a schematic diagram of the architecture of the backend module of a method for assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure;

[0017] Figure 5 Shows a specific flowchart of a method for assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure;

[0018] Figure 6 Is a schematic diagram of the structure of another user screening system provided by an embodiment of the present disclosure;

[0019] Figure 7 Is a schematic diagram of the structure of yet another user screening system provided by an embodiment of the present disclosure. Detailed implementation manners

[0020] With the rapid development of the Internet and information technology, enterprises and organizations have gradually accumulated a vast amount of user data. This data not only includes basic information of users, such as age, gender, location, etc., but also more detailed and complex multi-dimensional tags, such as order completion status, user behavior characteristics, service duration, preference settings, etc. These multi-dimensional tags enable enterprises to create a more accurate portrait of users, thereby providing support for subsequent intelligent marketing, intelligent scheduling, and service optimization.

[0021] In the face of a vast amount of data and complex tag combinations, the query method of manually writing SQL statements in related technologies has become unable to meet the requirements of modern data processing, and usually has the following problems:

[0022] 1. The query method of manually writing SQL statements has a slow query speed and low execution efficiency when facing large-scale data sets. Especially when the query conditions are complex, the performance bottleneck is more obvious.

[0023] 2. The users who perform queries need to understand how to write SQL statements to conduct queries. The threshold for users is relatively high, resulting in a poor user experience for non-professional users.

[0024] 3. As business requirements change, the query logic and rules also need to be continuously adjusted. When manually writing SQL queries, whenever the requirements change, the query statements must be modified again. The maintenance work is cumbersome and error-prone.

[0025] To solve the above problems, in various embodiments of the present disclosure, a method for assembling a user screening SQL statement based on multi-dimensional tags is provided, which is applied to a user screening system. The user screening system includes: a user interaction module, a backend module, and a result display module. The method includes: the user interaction module obtains the multi-dimensional tag combination input by the user and sends the multi-dimensional tag combination to the backend module; the backend module parses the multi-dimensional tag combination based on a preset rule engine, determines at least one tag as the parsing result, and converts each tag in the at least one tag into a corresponding SQL conditional expression; the backend module assembles the at least one SQL conditional expression, determines the SQL statement corresponding to the multi-dimensional tag combination, executes the SQL statement, determines the query result corresponding to the multi-dimensional tag combination, and sends the query result to the result display module; the result display module displays the query result corresponding to the multi-dimensional tag combination to the user.

[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present disclosure.

[0027] Please refer to Figure 1a , Figure 1a which shows an exemplary schematic diagram of the architecture of a user screening system to which a method for assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure is applied. As Figure 1a shown, the user screening system includes: a user interaction module, a backend module, and a result display module.

[0028] Among them, the user interaction module and the result display module can be located at the front-end position in the user screening system and can directly interact with users; the user interaction module can provide a graphical operation interface for users, enabling users to input multi-dimensional tag combinations; the result display module can also provide a result display interface for users to view the query results.

[0029] Further, the user interaction module and the result display module can be deployed in the user device. For example, the user device can include, but is not limited to, a browser and a mobile device.

[0030] In addition, the backend module can be deployed on the server side of the system to perform the logical operations of user screening in the system.

[0031] As an example, the data interaction method between the front-end location and the backend module can be through HyperText Transfer Protocol (HTTP) requests and Application Program Interface (API) calls, etc., which will not be elaborated here.

[0032] Further reference Figure 1b , Figure 1b is a flowchart of a method for assembling an SQL statement for user screening based on multi-dimensional tags provided by an embodiment of the present disclosure, which is applied to the user screening system shown in the above Figure 1a . The process of this method can include the following steps:

[0033] Step S101, the user interaction module obtains the multi-dimensional tag combination input by the user and sends the multi-dimensional tag combination to the backend module.

[0034] In this embodiment, the user interaction module can display the tags to the user in the operation forms of a dropdown box, checkboxes, radio buttons, etc., so that the user can input a multi-dimensional tag combination composed of at least one tag by clicking, selecting, dragging, etc.

[0035] Here, as an example, the operator for user screening can be a service provider (SP) in a online car-hailing service enterprise, and the user to be screened can be an online car-hailing driver.

[0036] For example, the multi-dimensional tag combination input by the user can be "gender + equals + male AND age + greater than + 18". That is, the user interaction module can provide the user with options such as the name of the tag, the specific value of the tag, and the relationship between the name and the specific value. Among them, the name of the tag can include, but is not limited to, gender, age, the number of completed orders of the driver, and date; the relationship between the name and the specific value can include, but is not limited to, equals, greater than, and less than. The relationship between different tags can include: AND, OR, and EXCEPT.

[0037] In a possible implementation, after the user finishes inputting the multi-dimensional label combination, it is necessary to perform data verification and formatting on the multi-dimensional label combination to determine that the labels in the multi-dimensional label combination conform to the preset format and the logical relationship is legal; the result of formatting can be to construct the multi-dimensional label combination into an object containing labels and logical relationships.

[0038] Furthermore, the user interaction module gives an error reminder to the user when an error occurs during the process of sending the multi-dimensional label combination to the backend module.

[0039] Step S102, the backend module parses the multi-dimensional label combination based on a preset rule engine, determines at least one label as the parsing result, and converts each label in the at least one label into a corresponding SQL conditional expression.

[0040] In this embodiment, the preset rule engine can be a rule-driven component, which can be used to process and convert the labels in the multi-dimensional label combination according to predefined mapping rules.

[0041] Here, the predefined mapping rules can be predefined by the user and stored in the database. The mapping rules can represent the SQL conditional expressions mapped by each label.

[0042] For example, the SQL expression mapped by gender in the rule is "column name: sex", "equal to" is mapped to "operator: =", and "male" is mapped to "value: 1".

[0043] Furthermore, the backend module can also use the preset rule engine to judge the priority in the multi-dimensional label combination to ensure the logical correctness of the SQL conditional expression.

[0044] Step S103, the backend module assembles at least one SQL conditional expression, determines the SQL statement corresponding to the multi-dimensional label combination, executes the SQL statement, determines the query result corresponding to the multi-dimensional label combination, and sends the query result to the result display module.

[0045] In this embodiment, the backend module uses the logical relationship in the multi-dimensional label combination to assemble and merge at least one SQL conditional expression, embeds the merged SQL conditional expression into the complete SQL query structure to determine the SQL statement; sends the SQL statement to the database and obtains the query result, and sends the query result to the result display module.

[0046] Here, when determining the SQL statement, the SQL statement can be optimized. For example, when there are duplicate conditions in the SQL statement, the backend module can remove the duplicates from the SQL statement. When there are logically equivalent conditions in the SQL statement, the logically equivalent conditions are merged.

[0047] Step S104, the result display module displays the query results corresponding to the multi-dimensional label combinations to the user.

[0048] In this embodiment, the result display module can display the query results to the user in the form of a table or a chart.

[0049] As an example, the display form of the chart can include at least one of the following: bar chart, pie chart, line chart, or scatter chart.

[0050] In a possible implementation, the result display module can further provide the user with a secondary filter and a search box, enabling the user to further filter or search the query results.

[0051] In the method and system for assembling SQL statements for user screening based on multi-dimensional labels in the above embodiments of the present disclosure, the rule engine module automatically converts the multi-dimensional labels selected by the user into SQL conditional expressions, and the SQL assembly module combines these conditions into a complete SQL query statement, reducing the time and workload of manually writing SQL and improving the efficiency of user screening. Based on multi-dimensional labels, it is possible to more accurately screen the target user group that meets the conditions, further improving the screening efficiency. The user selects labels through the interaction module, and the system automatically generates the corresponding query statement, avoiding complex operation processes, greatly simplifying the user's operation process, reducing the usage threshold for user screening, and enhancing the user experience.

[0052] In a possible implementation of the above step S101, the multi-dimensional label combination includes at least one label combination and the logical relationship between each label combination; wherein, the label combination includes at least one label and the logical relationship between each label.

[0053] In this embodiment, the label can characterize the user's attributes or behavioral characteristics and can describe the user's information in different dimensions. The label combination can characterize the logical relationship between multiple labels. The logical relationship between labels can include: AND (AND), OR (OR), NOT (NOT).

[0054] For example, "age greater than 30" and "gender is male" can form a label combination, "number of trips > 5" or "region = Beijing" can form another label combination, and the above two label combinations can form a multi-dimensional label combination. For example, ( "age greater than 30" and "gender is male") and ( "number of trips greater than 5" or "location is Beijing").

[0055] In the method and system for assembling SQL statements for user screening based on multi-dimensional tags in the above embodiments of the present disclosure, through the combination of multi-dimensional tags, the system can consider multiple feature dimensions of users simultaneously, and users can customize multiple tag combinations and precisely construct screening conditions through logical relationships, improving the accuracy of user screening. Users select tags and configure logical relationships through a graphical interface, avoiding the writing of complex SQL statements, making the system more intuitive and convenient to use. Users do not need to understand the underlying database query language, optimizing the user experience and reducing human errors at the same time.

[0056] In a possible implementation manner of the above embodiment, the backend module includes a rule engine module. The backend module parses the multi-dimensional tag combination based on a preset rule engine, determines at least one tag as the parsing result, and converts each tag in the at least one tag into a corresponding SQL conditional expression, which is implemented based on the following steps:

[0057] The rule engine module parses the multi-dimensional tag combination based on a preset rule engine, and determines the logical relationship between at least one tag and each tag in the at least one tag as the parsing result;

[0058] The rule engine module constructs a preset syntax tree based on the parsing result, stores the logical relationship in the operator container of the preset syntax tree, and stores the tags in the first rule container and / or the second rule container of the preset syntax tree;

[0059] The rule engine module classifies the tags based on a preset classification tag in the first rule container and / or the second rule container, and determines at least one tag type; the tag type includes at least one of the following: business tag, ordinary tag, separately processed tag;

[0060] The rule engine module separately converts each tag type in the at least one tag type in the first rule container and / or the second rule container, and determines the SQL conditional expression corresponding to each tag type respectively.

[0061] In this embodiment, as an example, when the input multi-dimensional tag combination is "age > 30" and "gender is male", the parsing result can be age > 30 AND sex = 1.

[0062] Furthermore, the operator container of the preset syntax tree can be used to store logical operators, and the first rule container and the second rule container can be used to store tags and conditions. Among them, the first rule container can specifically refer to the left node rule container, and the second rule container can specifically refer to the right node rule container.

[0063] As an example, for the multi-dimensional label combination "(age > 30 AND sex = 1) OR city = 'Beijing'", the constructed preset syntax tree can be as follows:

[0064]

[0065] Among them, the first rule container can store age > 30, the second rule container can store sex = 1 and city = 'Beijing', and the operator container can store AND and OR.

[0066] In a possible implementation, the rule engine module classifies the labels in the first rule container and / or the second rule container based on the preset classification labels to determine at least one label type, which may include:

[0067] The rule engine module extracts the labels to be processed from the first rule container and / or the second rule container, classifies each label according to the preset classification labels, and determines the label type corresponding to each label.

[0068] Here, the business labels in the label type can be related to the user's business logic; the ordinary labels can refer to the basic query condition labels, which can be used for simple condition judgment; the separate processing labels involve special query logic or data processing, and may require additional calculations, processing of time ranges, or judgments based on multiple conditions; the combined labels can be composed of multiple labels.

[0069] Further, please refer to Figure 2 , Figure 2 which shows a schematic diagram of the composition of the separate processing labels of a method for assembling a user screening SQL statement based on multi-dimensional labels according to an embodiment of the present disclosure. Among them, the separate processing labels can include: labels that need to be de-duplicated (optional), population rule labels, event template - numerical labels, and event template - enumeration labels.

[0070] Among them, the labels that need to be de-duplicated refer to the user data with duplicates, which need to be separately processed for de-duplication. The population rule labels can refer to complex conditions related to user groups. The event template - numerical labels can represent numerical conditions for a certain event, and these conditions involve numerical comparison, range query, or aggregation calculation. The event template - enumeration labels can represent enumeration value conditions for a certain event, and these conditions usually involve data of the enumeration type.

[0071] Even further, please refer to Figure 3 , Figure 3The figure shows a schematic diagram of the composition of ordinary tags for a method of assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure. Among them, ordinary tags may include, but are not limited to: date type tags, enumeration type tags, numeric type tags, boolean type tags, text type tags, combined type tags, array type tags, composite tags (optional).

[0072] As an example, business tags may include, but are not limited to: driver level, driver credit score; ordinary tags may include, but are not limited to: driver age, driver gender, etc.; individual processing tags may be as follows: "driving duration > 40 hours / week", "driver unit price is above 20 and below 50".

[0073] In a possible implementation manner, the rule engine module, in the first rule container and / or the second rule container, respectively converts each tag type in at least one tag type, and determines the SQL conditional expression corresponding to each tag type, which may include:

[0074] The rule engine module directly converts ordinary tags into SQL conditional expressions in the first rule container and / or the second rule container; for business tags, additional logical processing or database association operations are performed to obtain the SQL conditional expression corresponding to the business tags; for individual processing tags, individual calculations are performed to determine the SQL conditional expression corresponding to the individual processing tags.

[0075] In the method and system for assembling a user screening SQL statement based on multi-dimensional tags in the above embodiments of the present disclosure, the rule engine parses the multi-dimensional tag combination to ensure that the logical relationship between each tag is correctly understood and converted, improving the efficiency and accuracy of screening and querying. The rule engine module can automatically generate accurate query conditions according to the multi-dimensional tag combination and its logical relationship, reducing the degree of manual intervention and improving automation.

[0076] In a possible implementation manner of the above step S103, the backend module further includes: an SQL assembly module. The backend module assembles at least one SQL conditional expression to determine the SQL statement corresponding to the multi-dimensional tag combination, which is implemented based on the following steps:

[0077] The SQL assembly module determines the SQL conditional expressions of the first rule container and the second rule container based on the SQL conditional expressions of each tag type in the first rule container and / or the second rule container;

[0078] The SQL assembly module merges the SQL conditional expressions of the first rule container and the second rule container based on the logical relationship in the operator container to determine the SQL statement corresponding to the multi-dimensional tag combination.

[0079] In this embodiment, the SQL assembly module uses logical relationships in the first rule container and the second rule container respectively to merge the SQL conditional expressions of each label type, and determines the SQL conditional expressions of the first rule container and the second rule container.

[0080] Further, the SQL assembly module reads the logical relationship in the operator container, merges the SQL conditional expressions of the first rule container and the second rule container, and determines the SQL statement corresponding to the multi-dimensional label combination.

[0081] Specifically, the merging principle of AND in the logical relationship is to return the intersection of the SQL conditional expressions of the first rule container and the second rule container; the merging principle of OR in the logical relationship is to return the union of the SQL conditional expressions of the first rule container and the second rule container; the merging principle of MINUS in the logical relationship is to return the table records that exist in the SQL conditional expressions of the first rule container and do not exist in the SQL conditional expressions of the second rule container.

[0082] In the method and system for assembling SQL statements for user screening based on multi-dimensional labels in the above embodiments of the present disclosure, through the reasonable application of logical relationships, the SQL assembly module can flexibly handle the logical relationships between different label combinations, ensure that the query results meet the requirements of multi-dimensional label combinations, improve the accuracy of automatic generation of SQL statements, and further improve the accuracy of user screening. By merging the SQL conditional expressions of each label type with logical relationships, the SQL assembly module ensures the consistency of the query, and further improves the efficiency of the query.

[0083] In a possible implementation manner of the above embodiment, the backend module further includes: a data access module. The backend module executes the SQL statement, determines the query result corresponding to the multi-dimensional label combination, and sends the query result to the result display module, which is implemented based on the following steps:

[0084] The data access module uses the SQL statement to initiate a query to the database, determines the query result corresponding to the multi-dimensional label combination, and sends the query result to the result display module.

[0085] In this embodiment, the data access module obtains the SQL statement from the SQL assembly module, sends an SQL query request to the database through a preset database connection interface, and enables the database to perform relevant operations according to the SQL statement to query the specified query result in the SQL statement.

[0086] In a possible implementation manner, after obtaining the query result, the data access module can format the query result and convert it into a format suitable for the result display module.

[0087] In the method and system for assembling a user screening SQL statement based on multi-dimensional tags in the above embodiments of the present disclosure, the data access module can efficiently extract target data corresponding to multi-dimensional tag combinations from the database and ensure accurate transmission of the results to the user, further improving efficiency.

[0088] Exemplarily, the backend module such as Figure 4 shown Figure 4 shows a schematic diagram of the backend module architecture of a method for assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure. Among them, the backend module includes: a rule engine module, an SQL assembly module, and a data access module.

[0089] In a specific embodiment, please refer to Figure 5 , Figure 5 shows a schematic diagram of the specific process of a method for assembling a user screening SQL statement based on multi-dimensional tags according to an embodiment of the present disclosure. The figure includes the following steps:

[0090] Step S501, rule classification;

[0091] Here, in the SQL expression set, it is divided into a first rule container, an operator container, and a second rule container; in the first rule container and the second rule container, steps S501 - S503 are respectively executed; in step S501, the rules are divided into business tags, separately processed tags, and ordinary tags;

[0092] Step S502, determination of SQL conditional expressions;

[0093] Here, in the first rule container and the second rule container, the business tag SQL conditional expressions, separately processed tag SQL conditional expressions, and ordinary tag SQL conditional expressions are respectively determined;

[0094] Step S503, integration of SQL conditional expressions within the rule container;

[0095] Here, in the first rule container, the SQL conditional expressions of each tag are integrated, and in the second rule container, the SQL conditional expressions of each tag are integrated;

[0096] Step S504, integration of SQL conditional expressions between containers;

[0097] Here, the entity operator functions in the operator container, the integrated SQL conditional expression (i.e., LeftSqlNode) in the first rule container, and the integrated SQL conditional expression (i.e., RightSqlNode) in the second rule container are used for integration; among them, the entity operator functions include AND, OR, and MINUS.

[0098] Further, the AND operator is calculated as return %s InterSect(%s), and the return value is the intersection of LeftSqlNode and RightSqlNode; the OR operator is calculated as return %s union(%s), and the return value is the union of LeftSqlNode and RightSqlNode; the MINUS operator is calculated as return %s except(%s), and the return value is the result that is in LeftSqlNode but not in RightSqlNode (or the result that is in RightSqlNode but not in LeftSqlNode).

[0099] In one embodiment, a user screening system 600 is provided, which corresponds one-to-one with the method for assembling the user screening SQL statement based on multi-dimensional tags in the above embodiment. As Figure 6 shown, the user screening system 600 includes a user interaction module 601, a backend module 602, and a result display module 603. Among them, the detailed descriptions of each functional module are as follows:

[0100] The user interaction module 601 is configured to obtain the multi-dimensional tag combination input by the user and send the multi-dimensional tag combination to the backend module;

[0101] The backend module 602 is configured to parse the multi-dimensional tag combination based on a preset rule engine, determine at least one tag as the parsing result, and convert each tag in the at least one tag into a corresponding SQL conditional expression;

[0102] The backend module 602 is configured to assemble at least one SQL conditional expression, determine the SQL statement corresponding to the multi-dimensional tag combination, execute the SQL statement, determine the query result corresponding to the multi-dimensional tag combination, and send the query result to the result display module;

[0103] The result display module 603 is configured to display the query result corresponding to the multi-dimensional tag combination to the user.

[0104] In one embodiment, the multi-dimensional tag combination includes at least one tag combination and the logical relationship between each tag combination; wherein, the tag combination includes at least one tag and the logical relationship between each tag.

[0105] In one embodiment, the backend module 602 includes a rule engine module 6021; wherein,

[0106] The rule engine module 6021 is configured to parse the multi-dimensional tag combination based on a preset rule engine, and determine the logical relationship between at least one tag and each tag in the at least one tag as the parsing result;

[0107] A rule engine module 6021, configured to construct a preset syntax tree based on a parsing result, store logical relationships in an operator container of the preset syntax tree, and store tags in a first rule container and / or a second rule container of the preset syntax tree;

[0108] The rule engine module 6021 is configured to classify tags based on preset classification tags in the first rule container and / or the second rule container to determine at least one tag type; the tag type includes at least one of the following: business tag, general tag, separately processed tag;

[0109] The rule engine module 6021 is configured to perform conversions on each tag type in at least one tag type respectively in the first rule container and / or the second rule container to determine SQL conditional expressions respectively corresponding to each tag type.

[0110] In one embodiment, a SQL assembly module 6022 is included in the backend module 602; wherein,

[0111] The assembly module 6022 is configured to determine SQL conditional expressions of the first rule container and the second rule container based on the SQL conditional expressions of each tag type respectively in the first rule container and / or the second rule container;

[0112] The assembly module 6022 is configured to merge the SQL conditional expressions of the first rule container and the second rule container based on the logical relationships in the operator container to determine an SQL statement corresponding to the multi-dimensional tag combination.

[0113] In one embodiment, a data access module 6023 is further included in the backend module 602; wherein,

[0114] The data access module 6023 is configured to initiate a query to a database using the SQL statement, determine a query result corresponding to the multi-dimensional tag combination, and send the query result to the result display module.

[0115] It should be noted that: when the user screening system provided in the above embodiment implements the method for assembling an SQL statement for user screening based on multi-dimensional tags, only the division of the above program modules is used for illustration. In practical applications, the above processing can be allocated to different program modules according to needs, that is, the internal structure of the above system is divided into different program modules to complete all or part of the above-described processing. In addition, the system provided in the above embodiment and the corresponding Figure 1b The embodiments of the method shown belong to the same concept, and the specific implementation process is detailed in the method embodiments and will not be elaborated here.

[0116] The embodiments of the present disclosure also provide a computer device having the aboveFigure 6 The method for assembling a user screening SQL statement based on multi-dimensional tags as shown.

[0117] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of another user screening system provided by an embodiment of the present disclosure. As Figure 7 shown, the computer device includes: one or more processors 10, a memory 20, and an interface for connecting each component, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 7 Here, one processor 10 is taken as an example.

[0118] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a general array logic, or any combination thereof.

[0119] Among them, the memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiments.

[0120] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0121] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, a hard disk, or a solid state drive; the memory 20 may further include a combination of the above types of memory.

[0122] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected by a bus or other means. Figure 7 Taking connection by a bus as an example.

[0123] The input device 30 can receive input digital or character information, and generate key signal inputs related to user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor), etc. The above display device includes, but is not limited to, a liquid crystal display, a light emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.

[0124] The computer device further includes a communication interface for the computer device to communicate with other devices or a communication network.

[0125] The embodiments of the present disclosure further provide a computer-readable storage medium. The methods according to the embodiments of the present disclosure can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the methods described herein can be stored as such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state drive, etc.; further, the storage medium may further include a combination of the above types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.

[0126] A part of the present disclosure can be applied as a computer program product, for example, computer program instructions, which when executed by a computer, can invoke or provide the methods and / or technical solutions according to the present disclosure through the operations of the computer. Those skilled in the art should understand that the forms of existence of computer program instructions in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways for a computer to execute computer program instructions include, but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0127] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for assembling user screening SQL statements based on multi-dimensional tags, characterized in that: Applied to a user screening system, the user screening system includes: a user interaction module, a backend module and a result display module, and the method includes: A user interaction module, which obtains a multi-dimensional tag combination input by a user and sends the multi-dimensional tag combination to a backend module; The backend module parses the multi-dimensional tag combination based on a preset rule engine, determines at least one tag as a parsing result, and converts each tag in the at least one tag into a corresponding SQL conditional expression; The backend module assembles at least one of the SQL conditional expressions, determines an SQL statement corresponding to the multi-dimensional tag combination, executes the SQL statement, determines a query result corresponding to the multi-dimensional tag combination, and sends the query result to a result display module; The result display module displays the query results corresponding to the multi-dimensional tag combination to the user.

2. The method according to claim 1, characterized in that The multi-dimensional label combination includes a logical relationship between at least one label combination and each label combination; wherein the label combination includes a logical relationship between at least one label and each label.

3. The method according to claim 2, characterized in that The backend module includes a rule engine module, which parses the multi-dimensional tag combination based on a preset rule engine, determines at least one tag as a parsing result, and converts each tag in the at least one tag into a corresponding SQL conditional expression, which is implemented based on the following steps: A rule engine module, which parses the multi-dimensional tag combination based on a preset rule engine, and determines a logical relationship between at least one tag and each tag in the at least one tag as a parsing result; The rule engine module constructs a preset syntax tree based on the parsing result, stores the logical relationship in an operator container of the preset syntax tree, and stores the label in a first rule container and / or a second rule container of the preset syntax tree; The rule engine module, in the first rule container and / or the second rule container, classifies the tags based on preset classification tags to determine at least one tag type; the tag type includes at least one of the following: a business tag, a common tag, and a separate processing tag; The rule engine module converts each tag type in the at least one tag type in the first rule container and / or the second rule container, and determines the SQL conditional expression corresponding to each tag type.

4. The method according to claim 3, characterized in that The backend module also includes: an SQL assembly module, which assembles at least one of the SQL conditional expressions to determine the SQL statement corresponding to the multi-dimensional tag combination, based on the following steps: An SQL assembly module determines the SQL conditional expressions of the first rule container and the second rule container based on the SQL conditional expressions of each tag type in the first rule container and / or the second rule container; The SQL assembly module combines the SQL condition expressions of the first rule container and the second rule container based on the logical relationship in the operator container to determine the SQL statement corresponding to the multi-dimensional label combination.

5. The method according to claim 1, characterized in that: The back-end module also includes: a data access module, a back-end module, executing the SQL statement, determining the query result corresponding to the multi-dimensional tag combination, and sending the query result to the result display module, which is implemented based on the following steps: The data access module uses SQL statements to initiate queries to the database, determines the query results corresponding to the multi-dimensional tag combinations, and sends the query results to the result display module.

6. A user screening system, characterized in that: The user screening system includes a user interaction module, a backend module and a result display module, wherein: A user interaction module, used to obtain a multi-dimensional tag combination input by a user, and send the multi-dimensional tag combination to a backend module; The backend module is used to parse the multi-dimensional tag combination based on a preset rule engine, determine at least one tag as a parsing result, and convert each tag in the at least one tag into a corresponding SQL conditional expression; The backend module is used to assemble at least one of the SQL conditional expressions, determine the SQL statement corresponding to the multi-dimensional tag combination, execute the SQL statement, determine the query result corresponding to the multi-dimensional tag combination, and send the query result to the result display module; The result display module is used to display the query results corresponding to the multi-dimensional tag combination to the user.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the user screening SQL statement assembling method based on multi-dimensional tags according to any one of claims 1 to 5.

8. A computer program product, characterized in that It includes computer instructions, which are used to enable a computer to execute the user screening SQL statement assembling method based on multi-dimensional tags according to any one of claims 1 to 5.