Multi-dimensional classification method and device and storage medium

By splitting and decomposing tag generation rules, the complexity of tag calculation is reduced, the problem of high multi-dimensional tag calculation complexity in the existing technology is solved, and efficient tag calculation and flexible business scenario support are achieved.

CN118709092APending Publication Date: 2024-09-27ZHONGKE YUNGU TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410916264.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-28
Filing Date
2024-07-09
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The existing labeling system has high computational complexity when calculating multi-dimensional labels, consumes a lot of computing resources, and cannot effectively support complex business scenarios and dynamic indicator additions.

Method used

By obtaining the classification tasks to be executed and the preset label generation rules, the processing is split to generate independent classification conditions, and the data table identifier is determined based on the metadata field, and is decomposed into parallel query task groups for calculation, thereby reducing the complexity of label calculations.

Benefits of technology

It effectively reduces the complexity and cost of label calculation, supports complex calculation rules and dynamic indicator addition, and improves the flexibility and efficiency of the label system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709092A
    Figure CN118709092A
Patent Text Reader

Abstract

The invention discloses a multi-dimensional classification method, and the method comprises the steps: obtaining a to-be-executed classification task, and enabling the classification task to be an object which is determined under a target label; obtaining a preset label generation rule corresponding to the classification task and a plurality of to-be-classified objects; splitting the preset label generation rule to determine a plurality of classification conditions based on the preset label generation rule, and determining a combination relationship between any two classification conditions; determining a first target object meeting each classification condition in the plurality of to-be-classified objects; for each classification condition, performing duplicate removal processing on the first target object meeting the classification condition to obtain a second target object; and determining an object matched with the target label from the second target object according to a combination relationship between any two classification conditions. According to the scheme, after the preset label generation rule is flattened, the preset label generation rule is decomposed into independent classification conditions, and the complexity and the calculation cost during label calculation are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of tag management technology, and specifically to a multi-dimensional classification method, device and storage medium. Background Art

[0002] In the construction machinery industry, there are a large number of analysis scenarios with customers, employees, etc. as the analysis subjects. These analysis scenarios often cover multiple business processes of the analysis subjects. In order to realize complex data analysis scenarios and support the personalized operation of the analysis subjects by business operators, the labeling system needs to complete the calculation of multi-dimensional labeling tasks. How to support complex calculation rules, support more business scenarios, and complete the calculation of multi-dimensional labeling tasks has become one of the problems faced by the labeling system. In the prior art, it is usually necessary to associate the indicator tables of each dimension of the analysis subject into a large wide table, which will consume a lot of computing resources and has high computational complexity. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a multi-dimensional classification method, device and storage medium to solve the high complexity of label calculation and large consumption of computing resources in the prior art.

[0004] In order to achieve the above objectives, the first aspect of the present application provides a multi-dimensional classification method, the classification method comprising:

[0005] Obtaining a classification task to be performed, where the classification task refers to determining the objects included under the target label;

[0006] Obtaining preset label generation rules corresponding to the classification task and multiple objects to be classified;

[0007] Splitting the preset label generation rules to determine multiple classification conditions based on the preset label generation rules, and determining a combination relationship between any two classification conditions;

[0008] Determine a first target object that meets each classification condition among a plurality of objects to be classified;

[0009] For each classification condition, performing deduplication processing on the first target object that meets the classification condition to obtain the second target object;

[0010] An object matching the target label is determined from the second target object according to a combination relationship between any two classification conditions.

[0011] In an embodiment of the present application, determining the first target object that meets each classification condition among multiple objects to be classified includes: grouping each classification condition to divide each classification condition into a corresponding query task group; and sequentially performing parallel calculations on all classification conditions included in each query task group to determine the first target object corresponding to each classification condition included in each query task group among the multiple objects to be classified.

[0012] In an embodiment of the present application, each classification condition is grouped and processed to divide each classification condition into a corresponding query task group, including: generating a query subtask corresponding to each classification condition in the object to be classified; for each classification condition, determining the basic indicator corresponding to the classification condition and the data table identifier of the data table storing the basic indicator based on the query subtask according to the metadata field included in the classification condition; for any two classification conditions, if the data table identifiers corresponding to the two classification conditions are the same, the two classification conditions are divided into the same query task group; for any two classification conditions, if the data table identifiers corresponding to the two classification conditions are different, the two classification conditions are divided into different query task groups.

[0013] In an embodiment of the present application, the method further includes: before obtaining a preset label generation rule corresponding to the classification task, obtaining a plurality of basic indicators; for each basic indicator, storing the basic indicator in a data table corresponding to the data dimension of the basic indicator.

[0014] In an embodiment of the present application, each basic indicator is recorded in a corresponding data table in the data format of metadata, and the fields of the metadata include a data table identifier of the data table where each basic indicator is stored and an indicator field corresponding to each basic indicator.

[0015] In an embodiment of the present application, obtaining preset label generation rules corresponding to a classification task includes: upon receiving a user's creation instruction for a classification task to be executed, displaying an editing interface for the preset label generation rules according to the creation instruction; determining the basic indicators selected by the user through the editing interface; obtaining the calculation rules for the preset label generation rules input by the user through the editing interface; and calling the basic indicators selected by the user in the data warehouse to generate the preset label generation rules corresponding to the classification task according to the basic indicators and calculation rules selected by the user.

[0016] In an embodiment of the present application, obtaining a plurality of basic indicators includes: obtaining business data from a business system and loading it into a data warehouse; and extracting and transforming the business data in the data warehouse to generate a plurality of basic indicators.

[0017] In an embodiment of the present application, the preset label generation rules are split and processed to determine multiple classification conditions based on the preset label generation rules, and the combination relationship between any two classification conditions is determined, including: the preset label generation rules are split and processed based on operators and / or separators to determine multiple classification conditions based on the preset label generation rules, and the combination relationship between any two classification conditions is determined based on operators and / or separators.

[0018] A second aspect of the present application provides a multi-dimensional classification device, comprising:

[0019] a memory configured to store instructions; and

[0020] The processor is configured to call instructions from a memory and implement the above-mentioned multi-dimensional classification method when executing the instructions.

[0021] A third aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the above-mentioned multi-dimensional classification method.

[0022] Through the above technical solution, a classification task to be performed is obtained, and the classification task refers to determining the objects included under the target label; obtaining the preset label generation rules and multiple objects to be classified corresponding to the classification task; splitting the preset label generation rules to determine multiple classification conditions based on the preset label generation rules, and determine the combination relationship between any two classification conditions; determining the first target object that meets each classification condition among the multiple objects to be classified; for each classification condition, performing deduplication processing on the first target object that meets the classification condition to obtain the second target object; and determining the object that matches the target label from the second target object according to the combination relationship between any two classification conditions. After flattening the preset label generation rules, they are decomposed into independent classification conditions, which reduces the complexity of label calculation and reduces the calculation cost.

[0023] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:

[0025] Figure 1 A schematic diagram of a process flow of a multi-dimensional classification method according to an embodiment of the present application is schematically shown;

[0026] Figure 2A schematic diagram of a process flow of a multi-dimensional classification method according to a specific embodiment of the present application is shown;

[0027] Figure 3 The structure block diagram of a multi-dimensional classification device according to an embodiment of the present application is schematically shown;

[0028] Figure 4 The schematic diagram shows a structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0030] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0031] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0032] Figure 1 The following schematically shows a flow chart of a multi-dimensional classification method according to an embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides a multi-dimensional classification method, which may include the following steps.

[0033] S102, obtaining a classification task to be performed, where the classification task refers to determining objects included under a target tag.

[0034] It can be understood that a label refers to a human-defined feature identifier that uses highly refined features to describe a class of subjects, such as describing a person's age, gender, interest preferences, etc. Different labels can be integrated through a structured data system to combine different subject portraits. After obtaining the classification task to be executed, you can find the objects included in the target label according to the task requirements of the classification task.

[0035] S104, obtaining preset label generation rules corresponding to the classification task and a plurality of objects to be classified.

[0036] It can be understood that the preset label generation rules refer to the classification rules generated through a series of basic indicators and the set conditions that need to be met for the basic indicators, and are used to classify the subjects and label them with target labels. The object to be classified refers to the object to be labeled, which can be a person or an object, such as employees, customers, orders, etc. in the field of engineering machinery industry. Specifically, the preset label generation rules contain "and or not" conditions formed by the arrangement and combination of basic indicators of multiple dimensions, and the target group is filtered out through a series of conditions. For example, for the high-value customer label in the customer label, the label generation rule is that the purchase amount is greater than 10,000, agricultural machinery is included in the purchase type, and the overdue amount is less than 100,000. When creating a label, the label creator needs to combine the above rules through the label system.

[0037] In an embodiment of the present application, the method further includes: before obtaining a preset label generation rule corresponding to the classification task, obtaining a plurality of basic indicators; for each basic indicator, storing the basic indicator in a data table corresponding to the data dimension of the basic indicator.

[0038] Basic indicators refer to indicators that cannot be further decomposed in the evaluation indicator system, which can be divided into qualitative basic indicators and quantitative basic indicators. For each basic indicator, the basic indicator can be assigned to the corresponding data table storage according to the data dimension. Data dimension refers to the classification of different labels of the subject, and each dimension contains customer-specific indicators or labels. For example, when the subject is a customer, the dimension can be divided into dimensions such as customer basic attributes, customer consumption attributes, and customer behavior attributes. Furthermore, the customer basic attributes include indicators or labels such as gender, age, and interest preferences.

[0039] There are usually two ways to calculate labels, one is SQL and the other is rule engine. In SQL, multiple dimension indicator tables are associated into a large wide table of all indicators during label calculation, and then the analysis is performed according to the label calculation rules to filter the main data. In contrast, when using the rule engine, multiple dimension label tables are associated into a large wide table of all dimensions before label calculation and stored, and then the data and label calculation rules are input into the rule engine to complete the label calculation. It can be seen that no matter which calculation method is used, when performing multi-dimensional label calculation, the indicator tables of multiple dimensions need to be associated and spliced. However, when the analysis subject contains multiple dimensions and each dimension contains multiple fields, the associated wide table has many fields. For example, when the analysis subject has 5 dimensions and each dimension has 100 indicator fields, the associated wide table will have 500 fields, and the calculation efficiency and performance during association are not high. In addition, the label calculation rules usually cannot support complex business scenarios with multiple dimensions. The current label rule definition only supports label definition under the same dimension, and does not support rule definition of cross-dimensions. Moreover, the dimensional indicators of the analysis subject are constantly increasing, and neither the SQL calculation method nor the rule engine calculation method can support the addition of a large number of indicators. Especially for large and wide tables, the storage system that stores large and wide tables, such as relational databases, has restrictions on the size and amount of data for each table. If it is not stored locally, more computing resources are required for label calculation.

[0040] In response to the above problems, in an embodiment of the present application, for each basic indicator, the basic indicator is stored in a data table corresponding to the data dimension of the basic indicator, wherein each basic indicator is recorded in the corresponding data table in the data format of metadata, and the fields of the metadata include the data table identifier of the data table where each basic indicator is stored and the indicator field corresponding to each basic indicator.

[0041] It can be understood that metadata, also known as intermediary data or relay data, refers to data used to describe data, mainly information describing data attributes, used to support functions such as indicating storage location, historical data, resource search, and file records. The corresponding data table can be found through the data table identifier included in the metadata field, and the basic indicators in the data table can be further found according to the indicator field. Basic indicators can be stored in different data tables according to different data dimensions. For example, the data table is shown in Table 1 below.

[0042] Table 1 Data table of basic indicators

[0043] table_dimA index_A table_dimB index_B table_dimC index_C table_dimD index_D

[0044] In an embodiment of the present application, obtaining preset label generation rules corresponding to a classification task includes: upon receiving a user's creation instruction for a classification task to be executed, displaying an editing interface for the preset label generation rules according to the creation instruction; determining the basic indicators selected by the user through the editing interface; obtaining the calculation rules for the preset label generation rules input by the user through the editing interface; and calling the basic indicators selected by the user in the data warehouse to generate the preset label generation rules corresponding to the classification task according to the basic indicators and calculation rules selected by the user.

[0045] It can be understood that the creation instruction refers to an instruction triggered by the user to create a preset label generation rule for the target label for the classification task to be executed. Then, the interactive interface for modifying the preset label generation rules can be used to add or delete basic indicators and calculation rules. Through the editing interface, the basic indicators selected by the user and the calculation rules for the preset label generation rules input by the user can be determined. The calculation rules can refer to AND or NOT conditions. The basic indicators can be stored in the data warehouse, and after determining the basic indicators selected by the user, the selected basic indicators are called from the data warehouse to the label system. The label system refers to a system for managing labels, labeling subjects, and screening objects (subjects) that meet the target labels. In the label system, the preset label generation rules corresponding to the classification task can be generated according to the basic indicators and calculation rules.

[0046] In an embodiment of the present application, obtaining a plurality of basic indicators includes: obtaining business data from a business system and loading it into a data warehouse; and extracting and transforming the business data in the data warehouse to generate a plurality of basic indicators.

[0047] It can be understood that for the generation of basic indicators, business data can be obtained from the business system. Business systems include but are not limited to at least one business system in the marketing business system, risk control business system and service business system to obtain business data. Then, the business data can be extracted and converted by ETL operation to generate multiple basic indicators. ETL operation refers to the process of loading the data of the business system into the data warehouse after extraction, cleaning and conversion. The purpose is to integrate the scattered, messy and non-uniform data in the enterprise together to provide an analysis basis for the decision-making of the enterprise. In the case where the subject of the business data is the enterprise customer, multiple basic indicators include but are not limited to the amount of customer repayment, the amount of customer overdue, the number of customer orders, the number of customer purchases, the number of customer service calls, customer classification and customer risk level, purchased products, purchase amount, etc. If only business data is collected and the corresponding basic indicators are not generated for the business data, such indicators are invalid for the label generation rules. Then, when editing the preset label generation rules in the editing interface, the corresponding indicators will not appear in the editing interface. Basic indicators need to be added to the data warehouse before they can appear in the editing interface of the label generation rules.

[0048] S106: Split the preset tag generation rule to determine multiple classification conditions based on the preset tag generation rule, and determine a combination relationship between any two classification conditions.

[0049] The preset label generation rules contain "and or not" conditions formed by the permutations and combinations of basic indicators of multiple dimensions. By splitting the preset label generation rules, multiple classification conditions can be obtained. A classification condition can refer to a condition consisting of a basic indicator and a constraint condition for the basic indicator. The combination relationship between classification conditions can be an "and or not" condition formed by permutations and combinations. For example, for the high-value customer label in the customer label, its label generation rule is that the purchase amount is greater than 10,000, the purchase type includes agricultural machinery, and the overdue amount is less than 100,000. Then, the classification conditions include the purchase amount is greater than 10,000, the purchase type includes agricultural machinery, and the overdue amount is less than 100,000. The combination relationship refers to two "and" conditions between the classification conditions, that is, the "and" condition.

[0050] In an embodiment of the present application, the preset label generation rules are split and processed to determine multiple classification conditions based on the preset label generation rules, and the combination relationship between any two classification conditions is determined, including: the preset label generation rules are split and processed based on operators and / or separators to determine multiple classification conditions based on the preset label generation rules, and the combination relationship between any two classification conditions is determined based on operators and / or separators.

[0051] It can be understood that operators and separators can be "and or not" conditions. The preset label generation rules may be nested in many layers, and the label calculation needs to start from the innermost nesting. The preset label generation rules cannot be further split, so they need to be flattened, that is, the brackets in the preset label generation rules are removed. For example, the rule ((r1or r2)and r3)or r4 is flattened to r1 and r3 or r2 and r3 or r4. The calculation results of the two are the same. The classification conditions obtained after splitting are r1, r3, r2, r3, r4. The calculation process is as follows:

[0052] r1=[1,2,3,4], r2=[4,5,6,7], r3=[1,3,4,7,8], r4=[2,3,4,6,8,9]

[0053] ((r1 or r2)and r3)or r4

[0054] =(([1,2,3,4]or[4,5,6,7])and[1,3,4,7,8])or[2,3,4,6,8,9]

[0055] =([1,2,3,4,5,6,7]and[1,3,4,7,8])or[2,3,4,6,8,9]

[0056] =[1,3,4,7]or[2,3,4,6,8,9]

[0057] =[1,2,3,4,6,7,8,9]

[0058] r1 and r3 or r2 and r3 or r4

[0059] =[1,2,3,4]and[1,3,4,7,8]or[4,5,6,7]and[1,3,4,7,8]or[2,3,4,6,8,9]

[0060] =[1,3,4]or[4,5,6,7]and[1,3,4,7,8]or[2,3,4,6,8,9]

[0061] =[1,3,4,5,6,7]and[1,3,4,7,8]or[2,3,4,6,8,9]

[0062] =[1,3,4,7]or[2,3,4,6,8,9]=[1,2,3,4,6,7,8,9]

[0063] S108: Determine a first target object that meets each classification condition among the multiple objects to be classified.

[0064] For each classification condition, objects that meet the classification condition can be screened out from multiple objects to be classified. The first target object refers to the subject that meets the classification condition among multiple objects to be classified. It can be seen that each classification condition in the preset label generation rule after flattening is actually independent of each other and does not affect each other. Each classification condition will only screen a specific field in the data table of the basic indicator once. For example, for the rule that the purchase amount is greater than 10,000 and there is agricultural machinery in the purchase type and the overdue amount is less than 100,000, its classification condition 1 represents that the customer's purchase amount is greater than 10,000, and this classification condition only involves the customer's purchase amount. For example, for the rule ((r1 or r2)and r3)or r4, after flattening, it becomes r1 and r3 or r2 and r3 or r4. The classification conditions obtained after splitting are r1, r3, r2, r3, r4. For each classification condition, the first target object found is r1 = [1, 2, 3, 4], r2 = [4, 5, 6, 7], r3 = [1, 3, 4, 7, 8], r4 = [2, 3, 4, 6, 8, 9].

[0065] In an embodiment of the present application, determining the first target object that meets each classification condition among multiple objects to be classified includes: grouping each classification condition to divide each classification condition into a corresponding query task group; and sequentially performing parallel calculations on all classification conditions included in each query task group to determine the first target object corresponding to each classification condition included in each query task group among the multiple objects to be classified.

[0066] It can be understood that due to the independence between the classification tasks, it is possible to determine whether to perform concurrent processing based on the number of classification tasks and server performance. Concurrent processing consumes computing resources, but it can improve computing efficiency. Then, the classification conditions can be grouped to divide each classification condition into a corresponding query task group. Specifically, the grouping basis can be determined based on the number of classification conditions and server performance, and the classification conditions of the same query task group are processed concurrently, while the classification conditions of different query task groups are processed serially. Thereby, all the classification conditions included in each query task group are calculated in parallel in turn to determine the first target object corresponding to each classification condition included in each query task group among multiple objects to be classified.

[0067] In an embodiment of the present application, each classification condition is grouped and processed to divide each classification condition into a corresponding query task group, including: generating a query subtask corresponding to each classification condition in the object to be classified; for each classification condition, determining the basic indicator corresponding to the classification condition and the data table identifier of the data table storing the basic indicator based on the query subtask according to the metadata field included in the classification condition; for any two classification conditions, if the data table identifiers corresponding to the two classification conditions are the same, the two classification conditions are divided into the same query task group; for any two classification conditions, if the data table identifiers corresponding to the two classification conditions are different, the two classification conditions are divided into different query task groups.

[0068] It can be understood that each classification condition is calculated to obtain the first target object Qn that meets the condition under each classification condition, and the final group set Q = [Q1, ..., Qn] is obtained after all tasks are calculated. For basic indicators stored in a relational database, each classification condition is equivalent to a simple SQL query subtask. For example, select entry_idfrom table_dimA where index_A>20, and the calculation result obtained is a primary key set that can uniquely identify the subject. For each classification condition, the basic indicator corresponding to the classification condition and the data table identifier of the data table storing the basic indicator are determined based on the metadata field included in the classification condition based on the query subtask. For any two classification conditions, if the data table identifiers corresponding to the two classification conditions are the same, the two classification conditions are divided into the same query task group, and if the data table identifiers corresponding to the two classification conditions are different, the two classification conditions are divided into different query task groups. The classification conditions of the same query task group are processed concurrently, and the classification conditions of different query task groups are processed serially. The computational complexity is greatly reduced, and there is no requirement for the complexity of the rules of the label calculation task, and any complex calculation rules can be supported.

[0069] Relatively speaking, each classification condition only operates on the data table of the basic indicators of a certain dimension, rather than performing multi-field filtering operations on the large wide table after the data tables of all dimensions are linked. Users do not need to worry about the indicator fields exceeding the number limit of the data table storage fields. In addition, when there are new fields, if the number of fields exceeds the limit, add a new indicator data storage table and maintain the metadata of the relationship between the field and the data table.

[0070] S110: For each classification condition, perform deduplication processing on the first target objects that meet the classification condition to obtain second target objects.

[0071] The second target object refers to the first target object after deduplication. For example, for the classification condition V(task), the first target object obtained is V(task) = [r1, r3, r2, r3, r4], then the second target object after deduplication V min ()=[r1,r2,r3,r4].

[0072] S112: Determine an object matching the target label from the second target object according to a combination relationship between any two classification conditions.

[0073] It can be understood that according to the preset label generation rules after flattening and splitting, the group set Q calculated based on all classification conditions is Q = [Q1,…,Qn]. Combined with the combination relationship between any two classification conditions, a simple set operation is formed through the combination relationship formed by multiple group sets and operators. It can be seen that compared with the previous solution, the operation complexity is greatly reduced, and there is no requirement for the complexity of the label generation rules, and any complex calculation rules can be supported. Further, the objects matching the target label are analyzed, such as sent to the front-end report or sent to the downstream business system.

[0074] Through the above technical solution, a classification task to be performed is obtained, and the classification task refers to determining the objects included under the target label; obtaining the preset label generation rules and multiple objects to be classified corresponding to the classification task; splitting the preset label generation rules to determine multiple classification conditions based on the preset label generation rules, and determine the combination relationship between any two classification conditions; determining the first target object that meets each classification condition among the multiple objects to be classified; for each classification condition, performing deduplication processing on the first target object that meets the classification condition to obtain the second target object; and determining the object that matches the target label from the second target object according to the combination relationship between any two classification conditions. After flattening the preset label generation rules, they are decomposed into independent classification conditions, which reduces the complexity of label calculation and reduces the calculation cost.

[0075] Figure 2 The following schematically shows a flow chart of a multi-dimensional classification method according to an embodiment of the present application. Figure 2 As shown, in the embodiment of the present application, the multi-dimensional classification method includes the following steps:

[0076] Step 1: Preparation of basic indicators: Obtain business data from the business system and load it into the data warehouse. Perform ETL operations on the business data in the data warehouse to generate multiple basic indicators.

[0077] Step 2, basic indicator storage and metadata organization: For each basic indicator, store the basic indicator in the data table corresponding to the data dimension of the basic indicator, wherein each basic indicator is recorded in the corresponding data table in the data format of metadata, and the metadata fields include the data table identifier of the data table where each basic indicator is stored and the indicator field corresponding to each basic indicator.

[0078] Step 3, edit the preset label generation rule: when receiving the creation instruction of the user for the classification task to be executed, display the editing interface for the preset label generation rule according to the creation instruction; determine the basic indicator selected by the user through the editing interface; obtain the calculation rule for the preset label generation rule input by the user through the editing interface; call the basic indicator selected by the user in the data warehouse to generate the preset label generation rule corresponding to the classification task according to the basic indicator selected by the user and the calculation rule. For example, the preset label generation rule is ((r1 or r2) and r3) or r4.

[0079] Step 4, flattening the label generation rules: split the preset label generation rules based on operators and / or separators to determine multiple classification conditions based on the preset label generation rules, and determine the combination relationship between any two classification conditions based on operators and / or separators. The rule ((r1 or r2) and r3) or r4 is flattened to r1 and r3 or r2 and r3 or r4.

[0080] Step 5, split label generation rule: split r1 and r3 or r2 and r3 or r4, and the resulting classification conditions are r1, r3, r2, r3, r4.

[0081] Step 6, group processing: generate a query subtask corresponding to each classification condition in the object to be classified; for each classification condition, determine the basic indicators corresponding to the classification condition and the data table identifier of the data table storing the basic indicators based on the query subtask according to the metadata fields included in the classification condition; for any two classification conditions, if the data table identifiers corresponding to the two classification conditions are the same, the two classification conditions are divided into the same query task group; for any two classification conditions, if the data table identifiers corresponding to the two classification conditions are different, the two classification conditions are divided into different query task groups.

[0082] Step 7: Determine whether to process concurrently, process the classification conditions of the same query task group concurrently, and process the classification conditions of different query task groups serially. Thus, all the classification conditions included in each query task group are calculated in parallel in turn to determine the first target object corresponding to each classification condition included in each query task group among the multiple objects to be classified.

[0083] Step 8: Determine the group set corresponding to all classification conditions based on the combination relationship to obtain the objects that match the target label among the objects to be classified.

[0084] Step 9: Send the report to the front-end or to the downstream business system to analyze and apply the results.

[0085] Figure 1 FIG. 1 is a flow chart of a multi-dimensional classification method in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0086] Figure 3 The structure block diagram of a multi-dimensional classification method according to an embodiment of the present application is schematically shown. Figure 3 As shown, the embodiment of the present application provides a multi-dimensional classification device, which may include:

[0087] Memory 310, configured to store instructions; and

[0088] The processor 320 is configured to call instructions from the memory 310 and implement the above-mentioned multi-dimensional classification method when executing the instructions.

[0089] Specifically, in the embodiment of the present application, the processor 320 may be configured to:

[0090] Obtaining a classification task to be performed, where the classification task refers to determining the objects included under the target label;

[0091] Obtaining preset label generation rules corresponding to the classification task and multiple objects to be classified;

[0092] Splitting the preset label generation rules to determine multiple classification conditions based on the preset label generation rules, and determining a combination relationship between any two classification conditions;

[0093] Determine a first target object that meets each classification condition among a plurality of objects to be classified;

[0094] For each classification condition, performing deduplication processing on the first target object that meets the classification condition to obtain the second target object;

[0095] An object matching the target label is determined from the second target object according to a combination relationship between any two classification conditions.

[0096] In the embodiment of the present application, the processor 320 may also be configured to:

[0097] Each classification condition is grouped to be divided into a corresponding query task group; all classification conditions included in each query task group are calculated in parallel in turn to determine the first target object corresponding to each classification condition included in each query task group among multiple objects to be classified.

[0098] In the embodiment of the present application, the processor 320 may also be configured to:

[0099] Generate a query subtask corresponding to each classification condition in the object to be classified; for each classification condition, determine the basic indicator corresponding to the classification condition and the data table identifier of the data table storing the basic indicator based on the query subtask according to the metadata fields included in the classification condition; for any two classification conditions, if the data table identifiers corresponding to the two classification conditions are the same, the two classification conditions are divided into the same query task group; for any two classification conditions, if the data table identifiers corresponding to the two classification conditions are different, the two classification conditions are divided into different query task groups.

[0100] In the embodiment of the present application, the processor 320 may also be configured to:

[0101] Before obtaining the preset label generation rule corresponding to the classification task, a plurality of basic indicators are obtained; for each basic indicator, the basic indicator is stored in a data table corresponding to the data dimension of the basic indicator.

[0102] In an embodiment of the present application, each basic indicator is recorded in a corresponding data table in the data format of metadata, and the fields of the metadata include a data table identifier of the data table where each basic indicator is stored and an indicator field corresponding to each basic indicator.

[0103] In the embodiment of the present application, the processor 320 may also be configured to:

[0104] When receiving a creation instruction from the user for a classification task to be performed, an editing interface for preset label generation rules is displayed according to the creation instruction; the basic indicators selected by the user are determined through the editing interface; the calculation rules for the preset label generation rules input by the user are obtained through the editing interface; the basic indicators selected by the user in the data warehouse are called to generate preset label generation rules corresponding to the classification task according to the basic indicators selected by the user and the calculation rules.

[0105] In the embodiment of the present application, the processor 320 may also be configured to:

[0106] Obtain business data from the business system and load it into the data warehouse; extract and transform business data in the data warehouse to generate multiple basic indicators.

[0107] In the embodiment of the present application, the processor 320 may also be configured to:

[0108] The preset label generation rule is split and processed based on the operator and / or separator to determine multiple classification conditions based on the preset label generation rule, and the combination relationship between any two classification conditions is determined based on the operator and / or separator.

[0109] Through the above technical solution, the preset label generation rules are flattened and decomposed into independent classification conditions, and the original large table association operation is converted into a set operation based on the primary key of the analysis subject, reducing the complexity of label calculation. At the same time, through the metadata storage design of basic indicators, the mapping relationship between the indicators of each dimension of the analysis subject and its storage table is used to support the dynamic addition of indicators, solving the problems of the existing label system being unable to support complex label calculations and the inability to dynamically add field rules, and can support flexible and changeable label calculation business scenarios.

[0110] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned multi-dimensional classification method.

[0111] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store multi-dimensional classified data. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a multi-dimensional classification method is implemented.

[0112] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0114] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0117] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0118] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0119] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0120] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0121] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A multi-dimensional classification method, characterized in that: The classification method includes: Obtaining a classification task to be performed, wherein the classification task refers to determining objects included under a target label; Obtaining a preset label generation rule corresponding to the classification task and a plurality of objects to be classified; Splitting the preset label generation rule to determine a plurality of classification conditions based on the preset label generation rule, and determining a combination relationship between any two classification conditions; Determine a first target object that meets each classification condition among the multiple objects to be classified; For each classification condition, performing deduplication processing on the first target objects that meet the classification condition to obtain the second target objects; An object matching the target tag is determined from the second target objects according to a combination relationship between any two classification conditions.

2. The multi-dimensional classification method according to claim 1, characterized in that: The step of determining a first target object among the plurality of objects to be classified that meets each classification condition comprises: Grouping each classification condition to divide each classification condition into a corresponding query task group; All classification conditions included in each query task group are calculated in parallel in sequence to determine the first target object corresponding to each classification condition included in each query task group among the multiple objects to be classified.

3. The multi-dimensional classification method according to claim 2, characterized in that: The grouping process of each classification condition to divide each classification condition into a corresponding query task group includes: Generate a query subtask corresponding to each classification condition in the object to be classified; For each classification condition, based on the query subtask and according to the metadata fields included in the classification condition, determine the basic indicator corresponding to the classification condition and the data table identifier of the data table storing the basic indicator; For any two classification conditions, if the data table identifiers corresponding to the two classification conditions are the same, the two classification conditions are classified into the same query task group; For any two classification conditions, when the data table identifiers corresponding to the two classification conditions are different, the two classification conditions are divided into different query task groups.

4. The multi-dimensional classification method according to claim 1, characterized in that: The method further comprises: Before obtaining the preset label generation rules corresponding to the classification task, obtaining a plurality of basic indicators; For each basic indicator, the basic indicator is stored in a data table corresponding to the data dimension of the basic indicator.

5. The multi-dimensional classification method according to claim 4, characterized in that: Each basic indicator is recorded in a corresponding data table in the data format of metadata, and the fields of the metadata include a data table identifier of the data table where each basic indicator is stored and an indicator field corresponding to each basic indicator.

6. The multi-dimensional classification method according to claim 4, characterized in that: The obtaining of a preset label generation rule corresponding to the classification task includes: When receiving a creation instruction from a user for a classification task to be executed, displaying an editing interface for the preset tag generation rule according to the creation instruction; Determining the basic index selected by the user through the editing interface; Acquiring, through the editing interface, a calculation rule for the preset tag generation rule input by the user; The basic indicators selected by the user in the data warehouse are called to generate preset label generation rules corresponding to the classification task according to the basic indicators selected by the user and the calculation rules.

7. The multi-dimensional classification method according to claim 4, characterized in that: The obtaining of multiple basic indicators includes: Obtain business data from the business system and load it into the data warehouse; The business data is extracted and transformed in the data warehouse to generate a plurality of basic indicators.

8. The multi-dimensional classification method according to claim 1, characterized in that: The splitting process of the preset label generation rule to determine a plurality of classification conditions based on the preset label generation rule and determining a combination relationship between any two classification conditions includes: The preset label generation rule is split and processed based on an operator and / or a separator to determine a plurality of classification conditions based on the preset label generation rule, and a combination relationship between any two classification conditions is determined based on the operator and / or the separator.

9. A multi-dimensional classification device, characterized in that: include: a memory configured to store instructions; as well as A processor is configured to call the instructions from the memory and implement the multi-dimensional classification method according to any one of claims 1 to 8 when executing the instructions.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing a machine to execute the multi-dimensional classification method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Interface configuration method and device and storage medium

    CN119336408A

  • Object data determination method and device, storage medium and electronic device

    CN120873670A