Specific target circling method and application in potential customer group screening

Through the specific target circle selection method, SQL query statements are generated using a visual logic editor and logic computing engine, which solves the problem that business personnel can hardly complete data analysis independently, and realizes an efficient and secure data analysis and decision-making process.

CN119557323AActive Publication Date: 2025-03-04SUZHOU YANTU EDUCATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411669825.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-04
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

In traditional data processing processes, business personnel with non-technical backgrounds find it difficult to complete data analysis independently, resulting in inefficient decision-making and relying on IT departments, making it difficult to respond to market changes quickly.

Method used

Provide a specific target circle selection method, by collecting user behavior data and business data, developing user attributes, configuring circle selection rules using a visual logic editor, generating JSON format data, and parsing and generating SQL query statements in the logical computing engine to achieve circle selection for specific target groups.

Benefits of technology

It lowers the technical threshold, allowing business personnel with non-technical backgrounds to easily participate in data analysis, improve decision-making efficiency, simplify operational processes, enhance flexibility and scalability, and reduce security risks such as SQL injection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557323A_ABST
    Figure CN119557323A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of electronic data processing and information retrieval, and particularly relates to a specific target circling method and application in potential customer group screening. According to the circling method and the application, the calculation of intersection, union and difference is realized by utilizing the RoaringBitmap algorithm through accurate bit operation, and the operation between two containers is efficiently realized, so that the storage performance and the calculation performance are excellent. Meanwhile, a self-developed visual editor is used, so that the process of user circle selection is greatly simplified, the burden of non-technical workers on data preprocessing is reduced, and the work of the non-technical workers can be more focused and focused, for example, the work is focused on the formulation of business logic and marketing strategies. Through the application, a worker can carry out configuration on a visual page, and does not need to deeply understand a data structure and an algorithm principle at the back. The user circle selection function becomes simple and quick, and accurate screening of the target user group can be realized only by simple clicking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electronic data processing and information retrieval, and in particular relates to a specific target selection method and its application in potential customer group screening. Background Art

[0002] With the rapid development of information technology, enterprises are increasingly relying on data analysis to make decisions in daily operations and strategic planning. Data analysis can help enterprises identify trends, optimize operations, discover new business opportunities, and gain advantages in the competitive market. Therefore, data has become an important asset of enterprises, and how to effectively analyze and utilize this data has become an increasing focus of enterprise management.

[0003] However, in the traditional data processing process, business personnel with non-technical backgrounds often need to rely on the support of the IT department to obtain and analyze data. This dependency not only increases the workload of the IT department, but also prolongs the decision-making cycle. Whenever business personnel need specific data reports or analysis results, they often need to submit a request to the IT department and then wait for IT personnel to extract data, write query scripts, and generate reports. This process is time-consuming and inefficient, especially when data needs to be updated frequently or instant decisions need to be made.

[0004] Due to the lack of appropriate tools and technical support, business personnel face high technical barriers in participating in data analysis. Traditional data query and analysis tools usually require certain programming skills and a deep understanding of database systems. For business personnel who do not have these skills, it is difficult to complete data analysis tasks independently, which limits their role in the decision-making process. In addition, this dependence also makes it difficult for business personnel to respond to market changes in a timely manner and to quickly obtain the information they need to make decisions. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a specific target selection method and its application in potential customer group screening. The purpose of the present invention is to enable personnel with non-technical backgrounds to easily participate in data analysis, and to improve the overall decision-making efficiency without affecting the existing IT infrastructure, especially to help business personnel focus more on business logic and strategy formulation.

[0006] The first aspect of the present invention is to provide a method for selecting a specific target, comprising the following steps: Step 101: Collecting user behavior data and business data on the terminal platform; Step 102: Classify and count the data collected in step 101, develop attributes for the user, and form structured data of user attributes; Step 103: Based on the user attributes developed in step 102, configure the rules selected by the user in the visual logic editor, and generate corresponding JSON format data on the front end; Step 104: The backend obtains the JSON format data generated by the frontend in step 103 for subsequent parsing; Step 105: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the filtered fields and data types; Step 106: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the screening condition, and the corresponding function is obtained according to the screening condition and the data type, which is used to splice the condition part of the query statement; Step 107: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the conditional relationship within a single conditional group; Step 108: Based on the JSON format data obtained in step 104, the data is parsed in a logic operation engine to obtain the relationship between the condition groups; Step 109: Generate a single query statement according to the filtered fields and data types obtained in step 105 and the filtering conditions obtained in step 106; the query statement uses a bitmap as an output result so as to perform logical operations on the bitmap later; Step 110: combining the single query statement generated in step 109 with the condition relationship in the single condition group obtained in step 107, generating a query statement for the same condition group; the query statement for the same condition group uses a bitmap as an output result; Step 111: Generate a final query statement through the condition group relationship obtained in step 108 and the query statement of the same condition group generated in step 110; the final query statement uses a bitmap as an output result; Step 112: Execute the final query statement generated in step 111 to select a specific target group.

[0007] As a further optimization scheme of the above-mentioned specific target selection method, in step 103, the operation interface of the visual logic editor has a number of editable condition group units, the number of condition group units is increased or decreased by operation buttons, and the logical relationship between the condition group units is set by operation buttons; through the setting of logical relationships, the condition group units are combined to form a condition combination; a number of conditions and the logical relationships between them can be edited in each condition group unit.

[0008] As a further optimization scheme of the above-mentioned specific target selection method, in step 105, define an empty list for storing the filter fields and their data types; traverse the 'conditionDatas' list under the 'data' field in json_data, the list contains one or more condition groups; for each condition group condition_group, traverse each condition in the condition group again; for each condition, obtain the field name and data type in the condition and add them to the list for storing the filter fields and their data types.

[0009] As a further optimization solution of the above-mentioned specific target selection method, in step 106, define an empty list for storing filtering conditions; traverse the condition groups in the JSON data, find the 'data' field in json_data, and continue to access the 'conditionDatas' list under 'data', which contains all condition groups; for each condition group condition_group, traverse each condition in the condition group again; for each condition, obtain the field name, operator, and value in the condition, and add them to the list used to store filtering conditions.

[0010] As a further optimization scheme of the above-mentioned specific target selection method, in step 107, an empty list is defined for storing the conditional relationship within each conditional group; the conditional groups in the JSON data are traversed, and the 'data' field is found in json_data; the 'conditionDatas' list under 'data' is continued to be accessed, which contains all the conditional groups; for each conditional group condition_group, the conditional relationship in the conditional group is obtained and added to the list used to store the conditional relationship within each conditional group.

[0011] As a further optimization solution of the above-mentioned specific target selection method, in step 108, a variable for storing the relationship between condition groups is defined; the 'data' field is found in json_data, and the 'groupRelation' field under 'data' is accessed, which specifies the logical relationship between all condition groups, and is assigned to the variable for storing the relationship between condition groups.

[0012] As a further optimization scheme of the above-mentioned specific target selection method, in step 109, define an empty list for storing the generated single query statement; traverse the tuples of the list returned by step 106; build a basic SQL query statement structure SELECT rb_build (array_agg(id)::int[]) AS bt FROM table WHERE field_nameoperator value; then fill in the information required by the query statement and store it in the list for storing the generated single query statement.

[0013] As a further optimization scheme of the above-mentioned specific target selection method, in step 110, an empty list is defined for storing the generated conditional group query statements; the list returned by step 107 is traversed, and the query statements generated by step 109 are merged according to each value to generate query statements at the conditional group level, which are stored in the list for storing the generated conditional group query statements.

[0014] As a further optimization solution of the above-mentioned specific target selection method, in step 111, S11.1: according to the value of the list returned in step 106, use the corresponding SQL function to merge the query statements at the condition group level generated in step 110 to obtain the final SQL query statement.

[0015] The second aspect of the present invention provides an application of the above-mentioned specific target selection method in the screening of potential customer groups, so as to facilitate non-technical personnel to screen potential customer groups efficiently and accurately.

[0016] Beneficial Effects The selection method provided by the present invention has many advantages, such as simplifying the selection process, lowering the technical threshold, improving security, and enhancing flexibility and scalability.

[0017] The method of the present invention significantly improves the efficiency and security of user selection, while lowering the technical threshold, so that business personnel with non-technical backgrounds can also easily participate in the data analysis and decision-making process. Through the self-developed visual editor, users can accurately screen the target user group with a simple click, which greatly simplifies the operation process and reduces the workload of data preprocessing. This intuitive page configuration method allows business personnel to quickly get started without having to deeply understand the data structure and algorithm principles behind it, thereby improving work efficiency.

[0018] The method of the present invention also performs well in improving flexibility and scalability. The easy version control and reuse of the JSON configuration file allows new query conditions and logic to be easily added to the JSON file, and then the conversion logic is updated to support new query requirements. This design not only improves the reusability of the query logic, but also enables the system to adapt to changing business needs more flexibly. At the same time, by converting JSON to SQL, verification and cleanup steps can be added to the conversion process to ensure that the generated SQL statement is safe and effective, reducing security risks such as SQL injection.

[0019] The method of the present invention improves the maintainability and upgradeability of the system by realizing the decoupling between logic design and execution. The front end is responsible for collecting user requirements and expressing them in the form of JSON, while the back end is responsible for parsing JSON and generating corresponding SQL queries. This separation helps to maintain and upgrade different parts of the system without affecting other parts, so that the system can adapt to changing business needs more flexibly. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a partial interface diagram of the visual logic editor.

[0021] Figure 2 A corresponding relationship diagram of query statement functions referenced by different data type filtering conditions.

[0022] Figure 3 It is the corresponding relationship diagram of the key functions corresponding to the conditional relationship. DETAILED DESCRIPTION

[0023] The present invention is further illustrated by specific examples below. These examples are exemplary and are intended to illustrate the problem and explain the present invention, but are not intended to be limiting.

[0024] Step 101: Collect the user's behavior data on the terminal platform and business database related data.

[0025] Some of the business data generated by users on the terminal platform are as follows: Time, user code, user age, user name, order number, course name; 2023 / 1 / 3 11:11, 1, 20, Zhang San, 123, Mathematics; 2023 / 1 / 4 09:15, 1, 20, Zhang San, 234, English; 2023 / 1 / 5 11:11, 2, 21, Li Si, 235, Chinese; 2023 / 1 / 6 11:11,2,21,Li Si,236,Computer; 2023 / 1 / 7 11:11, 3, 25, Dynasty, 237, Computer.

[0026] Some of the behavior data of users on the terminal platform are as follows: Time, user code, action, course name; 2023 / 1 / 1 10:11,1,click,math; 2023 / 1 / 2 10:11,1,Views,Mathematics; 2023 / 1 / 3 10:11,1,click,math; 2023 / 1 / 3 18:06,1,click,English; 2023 / 1 / 4 19:01,2,click,computer; 2023 / 1 / 5 10:11, 2, clicks, Chinese; 2023 / 1 / 6 10:11,3,Browse,Computer.

[0027] Step 102: Based on the data collected in step 101, the behavior data is classified and counted to develop refined attributes for the user.

[0028] For each user, their behavior data is classified and counted, combined with their business information, to extract personalized attribute characteristics to build a detailed user feature portrait. The following is part of the constructed user attribute data: User code, course list, user name, user age, number of math clicks, ...; 1, [Mathematics, English], Zhang San, 20, 2, …; 2, [Chinese, Computer], Li Si, 21, 0, …; 3,[Computer], Dynasty, 25, 0,….

[0029] Step 103: Based on the user attributes developed in step 102, configure the rules selected by the user in the visual logic editor to generate the JSON format data required by the logic operation engine.

[0030] On the operator side, there is a visual logic editor. Figure 1 As shown, the operation interface has several editable condition group units, the number of condition group units can be increased or decreased through the operation button, the logical relationship between the condition group units can be set through the operation button, and through the setting of the logical relationship, these condition group units are combined to form a condition combination. Several conditions and the logical relationship between these internal conditions can be edited in each condition group unit.

[0031] like Figure 1As shown, the interface shows that the edited condition combinations include: Condition combination C Condition Group Unit C1 Condition C1.1: Gender is "Male"; Condition C1.2: The registration date is greater than or equal to May 1, 2024; Condition Group Unit C2 Condition C2.1: The province is "Shanxi Province"; Condition C2.2: The target school is "Taiyuan University of Technology".

[0032] In the condition combination C, the condition group unit C1 and the condition group unit C2 take a union, the conditions inside the condition group unit C1 take an intersection, and the conditions inside the condition group unit C2 take an intersection.

[0033] The operator can use a web interface, a mobile terminal APP interface, etc. Taking the web interface as an example, when the user selects and configures the query conditions through the visual logic editor, the front end will monitor the user's interactive events (such as clicks, inputs, etc.) and convert these operations into data in JSON format.

[0034] The above process mainly includes the following steps: User operation: Users select and configure query conditions through the interface provided by the front end, such as selecting a field, entering condition values, etc.

[0035] Event monitoring: The front-end JavaScript code will monitor these user operation events and record the user's choices.

[0036] State management: Based on the user's actions, the front-end framework (such as React, Vue, or Angular) will update the state of the application, which contains all the user's selection information.

[0037] JSON generation: When the user completes the configuration and submits (for example, clicks the "Save" or "Generate Query" button), the front end generates a JSON object based on the state of the application.

[0038] Step 104: The backend obtains the JSON object generated in step 103 on the front end for subsequent parsing.

[0039] For example, after the staff performs the operation in step 103, the JSON object data obtained by the backend is as follows: json key attribute description groupRelation Relation between conditional groups conditionRelation The relationship between multiple conditions in a condition group params.type data type params.fieldName query field params.operator query conditions params.value The value of the query condition { "data": { "groupRelation": "or", "conditionDatas": [ { "conditionRelation": "and", "params": [ { "id": "5d6b93bb-b34d-5a89-6f49-5ccedd4655e5", "type": "string", "fieldName": "gender", "fieldNameShow": "Gender", "operator": "equal", "operatorShow":"equal to", "value": [ "male" ], "valueShow": "Male," }, { "id": "4f5e4f52-9483-1444-3f40-2a637bcc99b0", "type": "date", "fieldName": "reg_date", "fieldNameShow": "Registration Date", "operator": "greater_equal", "operatorShow": "Greater Than or Equal To", "value": "2024-05-01", "valueShow": "2024-05-01" } ] }, { "conditionRelation": "and", "params": [ { "id": "d6b544a6-bb64-48cb-3ec3-7a6fd61e93cc", "type": "string", "fieldName": "province", "fieldNameShow": "Province", "operator": "equal", "operatorShow": "equals", "value": [ "Shanxi Province" ], "valueShow": "Shanxi Province," }, { "id": "6ef1dafe-3819-3881-3c26-50d2964b0b0b", "type": "string", "fieldName": "target_school_name", "fieldNameShow": "Target School", "operator": "equal", "operatorShow": "equals", "value": [ "Taiyuan University of Technology" ], "valueShow": "Taiyuan University of Technology," } ] } ] } } Step 105: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the filtered fields and data types.

[0040] Specifically, parse the JSON data to obtain the filter fields and their data types through the following steps: S5.1: Define an empty list fields_with_types to store the filter fields and their data types.

[0041] S5.2: Traverse the 'conditionDatas' list under the 'data' field in json_data. This list contains one or more condition groups.

[0042] S5.3: For each condition group condition_group, traverse each condition condition in the condition group again.

[0043] S5.4: For each condition: get the field name field_name in the condition, that is, condition['fieldName']; get the data type field_type in the condition, that is, condition['type']; then add the pair of values ​​(field_name, field_type) to the fields_with_types list.

[0044] S5.5: After all conditions have been traversed, return the fields_with_types list.

[0045] After the above steps, the returned results are as follows: [ ('gender', 'string'), ('reg_date', 'date'), ('province', 'string'), ('target_school_name', 'string') ].

[0046] Four fields and their corresponding data types are obtained, namely gender (string type), registration date (date type), province (string type), and target school name (string type).

[0047] Step 106: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the filtering conditions, and the corresponding functions are obtained according to the filtering conditions and data types to be used for splicing the condition part of the query statement.

[0048] Specifically, parse the JSON data to obtain the filter conditions and corresponding functions through the following steps: S6.1: Define an empty list conditions to store the filtering conditions.

[0049] S6.2: Traverse the condition groups in the JSON data, find the 'data' field in json_data, and continue to access the 'conditionDatas' list under 'data', which contains all the condition groups.

[0050] S6.3: For each condition group condition_group, traverse each condition condition in the condition group again.

[0051] S6.4: For each condition, get the field name field_name in the condition, that is, condition['fieldName']; get the operator operator in the condition, that is, condition['operator']; get the value value in the condition, that is, condition['value'].

[0052] S6.5: Add the condition information (field_name, operator, value) to the conditions list.

[0053] S6.6: When all conditions have been traversed, return the conditions list.

[0054] After the above steps, the returned results are as follows: [ ('gender', 'equal', ['male']), ('reg_date', 'greater_equal', '2024-05-01'), ('province', 'equal', ['Shanxi Province']), ('target_school_name', 'equal', ['Taiyuan University of Technology']) ].

[0055] Step 107: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the conditional relationship within a single conditional group and the corresponding function.

[0056] Specifically, the conditional relationships and corresponding functions within a single conditional group are parsed through the following steps: S7.1: Define an empty list relations to store the conditional relations within each conditional group.

[0057] S7.2: Traverse the condition groups in the JSON data and find the 'data' field in json_data; continue to access the 'conditionDatas' list under 'data', which contains all the condition groups.

[0058] S7.3: For each condition group condition_group, obtain the condition relation relation in the condition group, that is, condition_group['conditionRelation'].

[0059] S7.4: Add relation to the relations list.

[0060] S7.5: When all condition groups have been traversed, return the relations list.

[0061] The returned results are as follows: [ 'and', 'and' ].

[0062] Note: There may be multiple conditions in a single condition group. Therefore, it is necessary to clarify the logical relationship between the multiple conditions, namely, intersection, union, and difference, before generating a query statement for a condition group.

[0063] Step 108: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the relationship between the condition groups and the corresponding functions.

[0064] Specifically, the relationship between condition groups and the corresponding functions are analyzed through the following steps: S8.1: Define a variable group_relation to store the relationship between condition groups.

[0065] S8.2: Extract the relationship between condition groups from JSON data: Find the 'data' field in json_data and continue to access the 'groupRelation' field under 'data', which specifies the logical relationship between all condition groups.

[0066] S8.3: Return the relationship group_relation between the extracted condition groups.

[0067] The returned results are as follows: "group_relation": "or".

[0068] This result indicates that in the final query statement, the logical relationship between different condition groups is an "OR" relationship.

[0069] Note: There may be multiple condition groups in the entire selection result, so it is necessary to clarify the logical relationship between multiple condition groups.

[0070] Step 109: Generate a single query statement according to the filtered fields and data types obtained in step 105 and the filtering conditions obtained in step 106. The generated query statement uses a bitmap as an output result so that logical operations can be efficiently performed on the bitmap later.

[0071] Specifically, a single query statement is generated through the following steps: S9.1: Define an empty list queries to store the generated single query statement.

[0072] S9.2: Traverse the conditions list returned in step 106, and for each (field_name, operator, value) tuple: S9.3: Build the basic SQL query statement structure SELECT rb_build (array_agg(id)::int[]) AS bt FROM table WHERE field_name operator value;.

[0073] S9.4: Handle different data types and operators. If value is an array, use the IN operator. If it is a single value, directly use the equal sign = or other comparison operators.

[0074] S9.5: Make sure that the table name table is correctly replaced with the actual table name used, which is shown here as tags_dev.dws_user_nature_all_tag or tags_dev.dws_user_nature_all_tagWW.

[0075] S9.6: Add the constructed query statement to the queries list.

[0076] S9.7: When all tuples have been processed, return the queries list.

[0077] The single query statement generated according to the above steps includes the following four items: SELECT rb_build (array_agg(id)::int[]) AS bt FROM tags_dev.dws_user_nature_all_tagWW WHERE gender IN ('male') SELECT rb_build (array_agg(id)::int[]) AS bt FROM tags_dev.dws_user_nature_all_tag WHERE reg_date>= '2024-05-01' SELECT rb_build (array_agg(id)::int[]) AS bt FROM ags_dev.dws_user_nature_all_tag WHERE province IN ('Shanxi Province') SELECT rb_build (array_agg(id)::int[]) AS bt FROM tags_dev.dws_user_nature_all_tag WHERE target_school_name IN ('Taiyuan University of Technology')).

[0078] Step 110: Combine the single query statement generated in step 109 with the condition relationship in the single condition group obtained in step 107 to generate a query statement for the same condition group, the result of which is also a bitmap.

[0079] Specifically, the query statement for the same condition group is generated through the following steps: S10.1: Define an empty list group_queries to store the generated conditional group query statements.

[0080] S10.2: Traverse the relations list returned in step 107, and for each relation value: S10.3: Merge the query statements generated in step 109 according to the relation value (such as AND or OR) to generate a query statement at the condition group level.

[0081] S10.4: Use the WITH clause to create a temporary view (CTE) and save the query results of each condition group in a temporary table.

[0082] S10.5: For AND relationships, use the rb_and_null2empty function to combine the results; for OR relationships, use the rb_or_null2empty function.

[0083] S10.6: Add the constructed conditional group-level query statement to the group_queries list.

[0084] S10.7: When all relations have been processed, return the group_queries list.

[0085] The query statements for the same condition group generated according to the above steps include the following two groups: WITH a_base1 AS ( SELECT rb_build (array_agg(id)::int[]) AS bt FROMtags_dev.dws_user_nature_all_tagWW WHERE gender IN ('male') ), b_base1 AS ( SELECT rb_build (array_agg(id)::int[]) AS bt FROMtags_dev.dws_user_nature_all_tag WHERE reg_date>= '2024-05-01') SELECT rb_or_null2empty (rb_and_null2empty (COALESCE(a_base1.bt, rb_build ('{}'))), COALESCE(b_base1.bt, rb_build ('{}'))) FROM a_base1, b_base1 WITH a_base2 AS ( SELECT rb_build (array_agg(id)::int[]) AS bt FROMtags_dev.dws_user_nature_all_tag WHERE province IN ('Shanxi Province')), b_base2 AS ( SELECT rb_build (array_agg(id)::int[]) AS bt FROMtags_dev.dws_user_nature_all_tag WHERE target_school_name IN ('Taiyuan University of Technology')) SELECT rb_and_null2empty (COALESCE(a_base2.bt, rb_build ('{}')),COALESCE(b_base2.bt, rb_build ('{}')))) FROM a_base2, b_base2 Step 111: Generate a final bitmap query statement through the conditional group relationship obtained in step 108 and the group query statement generated in step 110.

[0086] Specifically, the final query statement is generated through the following steps: S11.1: According to the group_relation value (such as OR) returned in step 106, use the corresponding SQL function (such as rb_or_null2empty or rb_and_null2empty) to merge the query statement at the conditional group level generated in step 110.

[0087] S11.2: Return the final SQL query statement to the system for execution.

[0088] The above steps complete the entire process from user interface operation to the final SQL query statement. The final SQL query statement generated is as follows: WITH a_base1 AS ( SELECT rb_build (array_agg(id)::int[])AS bt FROM tags_dev.dws_user_nature_all_tagWW WHERE gender IN ('male') ), b_base1 AS ( SELECT rb_build (array_agg(id)::int[])AS bt FROM tags_dev.dws_user_nature_all_tag WHERE reg_date>= '2024-05-01' ), a_base2 AS ( SELECT rb_build (array_agg(id)::int[])AS bt FROM tags_dev.dws_user_nature_all_tag WHERE province IN ('Shanxi Province') ), b_base2 AS ( SELECT rb_build (array_agg(id)::int[])AS bt FROM tags_dev.dws_user_nature_all_tag WHERE target_school_name IN ('Taiyuan University of Technology')) SELECT rb_or_null2empty (rb_and_null2empty (COALESCE(a_base1.bt, rb_build ('{}')), COALESCE(b_base1.bt, rb_build ('{}'))),rb_and_null2empty(COALESCE(a_base2.bt, rb_build ('{}')), COALESCE(b_base2.bt, rb_build ('{}')))) FROM a_base1, b_base1, a_base2, b_base2 In the bitmap output generated by the above query statement, each sub-query generates a bitmap, and then logical operations are performed on these bitmaps through bitmap operation functions (rb_and_null2empty and rb_or_null2empty), finally generating a bitmap result. This kind of bitmap operation can reduce the time complexity of the processing process and contribute to the efficient calculation of intersections, unions, and differences of large amounts of data. The explanation of the generated bitmap query statement is as follows: Generate the basic bitmap a_base1 and b_base1 respectively generate bitmaps of user IDs that meet the conditions of gender IN ('male') and reg_date >= '2024-05-01'.

[0089] a_base2 and b_base2 respectively generate bitmaps of user IDs that meet the conditions of province IN ('Shanxi Province') and target_school_name IN ('Taiyuan University of Technology').

[0090] Merge the bitmaps rb_and_null2empty (COALESCE(a_base1.bt, rb_build ('{}')), COALESCE(b_base1.bt, rb_build ('{}'))) calculates the intersection of the a_base1 and b_base1 bitmaps.

[0091] rb_and_null2empty (COALESCE(a_base2.bt, rb_build ('{}')), COALESCE(b_base2.bt, rb_build ('{}'))) calculates the intersection of the a_base2 and b_base2 bitmaps.

[0092] Final merge rb_or_null2empty calculates the union of the above two intersection bitmaps to obtain the final bitmap result.

[0093] Step 112: Execute the final query statement generated in Step 111 to complete the population selection.

[0094] Note: Parse the JSON format data in the logical operation engine to obtain the filtering conditions, and obtain the corresponding functions according to the filtering conditions and data types for splicing the condition part of the query statement. The query statement functions referred to by the filtering conditions of different data types are as Figure 2 shown.

[0095] Note: There may be multiple conditions in a single condition group. You need to make sure that the relationship between the multiple conditions is intersection, union, or difference before you can generate a query statement for a condition group. The key functions corresponding to the condition relationship are as follows: Figure 3 shown.

[0096] Effect verification In order to evaluate the performance of the above target selection method in actual business scenarios compared with mature commercial solutions purchased on the market, the following comparative experiment was conducted. In the experiment, each solution was tested for a week, during which a single solution executed about 1,400 selection tasks per day. By recording the running time of each task and dividing it into five time intervals (1-5 seconds, 5-10 seconds, 10-30 seconds, 30-60 seconds, >60 seconds), the proportion of tasks in each time interval was counted, and the results are as follows: The circled solution of the present invention: The number of tasks with a running time of 1 to 5 seconds accounts for 45.2%; The number of tasks with a running time of 5 to 10 seconds accounts for 30.5%; The number of tasks with a running time of 10-30 seconds accounts for 9.2%; The number of tasks with a running time of 30-60 seconds accounts for 10.1%; The number of tasks with a running time of > 60s accounts for 5.0%.

[0097] Commercial solution: The number of tasks with a running time of 1 to 5 seconds: 0%; The number of tasks with a running time of 5-10s accounts for 0%; The number of tasks with a running time of 10-30 seconds accounts for 10.3%; The number of tasks with a running time of 30-60 seconds accounts for 24.1%; The number of tasks with a running time of > 60s accounts for 65.6%.

[0098] The results show that the task execution speed of the self-developed solution in each time interval is significantly better than that of the commercial solution. The proportion of tasks in the two intervals of 1-5 seconds and 5-10 seconds of the self-developed solution is 45.2% and 30.5% respectively, which is significantly higher than the 0% and 0% of the commercial solution. In the longer running time interval, the performance of the self-developed solution is also superior, indicating that it has significant advantages in task execution speed, resource utilization and user experience.

[0099] As mentioned above, the user selection method and application uses the RoaringBitmap algorithm to implement the calculation of intersection, union, and difference through precise bit operations, and efficiently implements operations between two containers, so that both storage and computing performance are excellent. At the same time, the use of a self-developed visual editor greatly simplifies the user selection process, reduces the burden on non-technical staff in data preprocessing, and enables them to be more focused and focused on their work, such as focusing on business logic and marketing strategy formulation. Through this application, staff can configure on an intuitive page without having to deeply understand the data structure and algorithm principles behind it. The user selection function becomes simple and quick, and with a simple click, accurate screening of the target user group can be achieved.

[0100] The solution uses a self-developed logical operation engine to parse the JSON generated by the front end on the back end, convert it into SQL for query, and this operation has the following advantages: Unified interface and flexibility: By allowing staff to configure query conditions through a visual interface and save them in JSON format, a unified interface can be provided for non-technical personnel to use while maintaining the flexibility of the back-end processing logic. Non-technical personnel, such as business personnel, do not need to write SQL code directly, but only need to select and configure conditions through a graphical interface.

[0101] Abstraction level: The JSON file describes the logic of the query, but does not specify how to execute this logic in the underlying database. By converting JSON to SQL through the logical operation engine, high-level logical abstractions can be converted into specific query instructions for a specific database system. This means that even if the backend database changes, the front-end configuration interface can remain unchanged as long as the JSON to SQL conversion logic is adjusted.

[0102] Reusability and extensibility: JSON configuration files are easy to version control and reuse. For non-technical personnel, it is easy to save commonly used query configurations for future reuse. In addition, as business needs change, new query conditions and logic can be easily added to the JSON file, and then the conversion logic can be updated to support new query requirements.

[0103] Security and effectiveness: Directly asking staff to write SQL queries may pose security risks, such as SQL injection attacks. By converting JSON to SQL, convenient conditions are provided for adding validation and cleaning steps during the conversion process to ensure that the generated SQL statements are safe and effective.

[0104] Cross-platform compatibility: JSON is a lightweight data exchange format that is easy for humans and machines to read and can be used across platforms. Converting JSON to SQL makes it possible to deploy and run the same query logic in different environments.

[0105] Separation of concerns: This approach achieves decoupling between logical design and execution. The front end is responsible for collecting user requirements and expressing them in the form of JSON, while the back end is responsible for parsing JSON and generating corresponding SQL queries. This separation helps maintain and upgrade different parts of the system without affecting other parts.

[0106] Through the above mechanisms, the system can adapt to changing business needs more flexibly and enable business personnel with non-technical backgrounds to participate in data analysis and decision-making, thereby improving work efficiency.

[0107] The above embodiments are exemplary, and their purpose is to illustrate the technical concept and features of the present invention so that people familiar with the technology in this field can understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for selecting a specific target, characterized in that: The following steps are involved: Step 101: Collecting user behavior data and business data on the terminal platform; Step 102: Classify and count the data collected in step 101, develop attributes for the user, and form structured data of user attributes; Step 103: Based on the user attributes developed in step 102, configure the rules selected by the user in the visual logic editor, and generate corresponding JSON format data on the front end; Step 104: The backend obtains the JSON format data generated by the frontend in step 103 for subsequent parsing; Step 105: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the filtered fields and data types; Step 106: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the screening condition, and the corresponding function is obtained according to the screening condition and the data type, which is used to splice the condition part of the query statement; Step 107: Based on the JSON format data obtained in step 104, the data is parsed in the logic operation engine to obtain the conditional relationship within a single conditional group; Step 108: Based on the JSON format data obtained in step 104, the data is parsed in a logic operation engine to obtain the relationship between the condition groups; Step 109: Generate a single query statement according to the filtered fields and data types obtained in step 105 and the filtering conditions obtained in step 106; the query statement uses a bitmap as an output result so as to perform logical operations on the bitmap later; Step 110: combining the single query statement generated in step 109 with the condition relationship in the single condition group obtained in step 107, generating a query statement for the same condition group; the query statement for the same condition group uses a bitmap as an output result; Step 111: Generate a final query statement through the condition group relationship obtained in step 108 and the query statement of the same condition group generated in step 110; the final query statement uses a bitmap as an output result; Step 112: Execute the final query statement generated in step 111 to select a specific target group.

2. The specific target selection method according to claim 1, characterized in that: In step 103, the operation interface of the visual logic editor has several editable condition group units, the number of condition group units is increased or decreased by operation buttons, and the logical relationship between condition group units is set by operation buttons; through the setting of logical relationships, condition group units are combined to form condition combinations; several conditions and the logical relationships between them can be edited in each condition group unit.

3. The specific target selection method according to claim 1, characterized in that: In step 105, define an empty list for storing the filter fields and their data types; traverse the 'conditionDatas' list under the 'data' field in json_data, which contains one or more condition groups; for each condition group condition_group, traverse each condition in the condition group again; for each condition, obtain the field name and data type in the condition and add them to the list for storing the filter fields and their data types.

4. The specific target selection method according to claim 3, characterized in that: In step 106, define an empty list for storing filtering conditions; traverse the condition groups in the JSON data, find the 'data' field in json_data, and continue to access the 'conditionDatas' list under 'data', which contains all condition groups; for each condition group condition_group, traverse each condition in the condition group again; for each condition, obtain the field name, operator, and value in the condition, and add them to the list used to store filtering conditions.

5. The specific target selection method according to claim 4, characterized in that: In step 107, an empty list is defined for storing the conditional relationships within each conditional group; the conditional groups in the JSON data are traversed, and the 'data' field is found in json_data; the 'conditionDatas' list under 'data' is continued to be accessed, which contains all the conditional groups; for each conditional group condition_group, the conditional relationships in the conditional group are obtained and added to the list for storing the conditional relationships within each conditional group.

6. The specific target selection method according to claim 5, characterized in that: In step 108, a variable for storing the relationship between condition groups is defined; the 'data' field is found in json_data, and the 'groupRelation' field under 'data' is accessed, which specifies the logical relationship between all condition groups, and is assigned to the variable for storing the relationship between condition groups.

7. The specific target selection method according to claim 6, characterized in that: In step 109, define an empty list for storing the generated single query statement; traverse the tuples of the list returned in step 106; build a basic SQL query statement structure SELECT rb_build (array_agg(id)::int[]) AS bt FROM table WHERE field_name operator value; then fill in the information required by the query statement and store it in the list for storing the generated single query statement.

8. The specific target selection method according to claim 7, characterized in that: In step 110, an empty list is defined for storing the generated conditional group query statements; the list returned by step 107 is traversed, and the query statements generated by step 109 are merged according to each value to generate a query statement at the conditional group level, which is stored in the list for storing the generated conditional group query statements.

9. The specific target selection method according to claim 8, characterized in that: In step 111, S11.1: according to the value of the list returned in step 106, use the corresponding SQL function to merge the query statement at the condition group level generated in step 110 to obtain the final SQL query statement.

10. Application of a specific target selection method in screening potential customer groups, characterized by: The specific target selection method is the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Data generation method, information screening method, equipment and medium

    CN116126918A

  • SQL (Structured Query Language) query visual configuration method and system for screening data as required

    CN118626532A

  • Efficient indexing for querying arrays in databases

    US20210357373A1