Label generation method and system based on regularization engine label system

By using a rule-based engine-based tag generation method, multi-dimensional sales data is obtained using customer IDs, and the data is cleaned and transformed. Filters and condition trees are used to screen target data, and profit, expense, and revenue indicators are calculated. This solves the problems of time-consuming and inaccurate manual tag definition rules, and achieves fast, efficient, and accurate tag allocation.

CN120973786APending Publication Date: 2025-11-18GUANGZHOU TAIDONG TECH CO LTD

Patent Information

Application Number
CN202511147236.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Manually defining and executing tag rules is time-consuming and inaccurate, making it difficult to quickly, efficiently, and accurately assign tags to customers in complex business scenarios.

Method used

By using a rule-based engine-based tag generation method, multidimensional raw sales data is obtained using customer IDs, the data is cleaned and transformed, and target data is filtered using filters and condition trees. Profit, expense and revenue indicators are calculated, and tags are determined based on thresholds.

Benefits of technology

It enables fast, efficient, and accurate tag assignment for customers in multi-data source environments, simplifies the operation process for business personnel, and improves the flexibility and accuracy of tag generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973786A_ABST
    Figure CN120973786A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of tag generation, and relates to a tag generation method and system based on a regularization engine tag system, and the method comprises the steps: obtaining multi-dimensional original sales data of a plurality of data sources according to a customer ID; converting the multi-dimensional original sales data into standard sales data of a preset standard type; obtaining a filter, and screening target sales data from the standard sales data through the filter; calculating a profit index, an expenditure index, an income index and a payment amount index of the target data according to a preset logic rule; and obtaining labels corresponding to the profit index, the expenditure index, the income index and the payment amount index, and determining that the labels are labels of the customer ID. According to the invention, labels are distributed to clients efficiently and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention generally relates to the field of tag generation technology. More specifically, this invention relates to a tag generation method and a tag generation method based on a rule-based engine tag system. Background Technology

[0002] A tagging system is a structured approach that assigns different tags to different objects (such as users, products, behaviors, etc.). It aims to help classify, analyze, and manage large amounts of data, enhancing its operability and understandability. A tag is a concise description of the characteristics or attributes of a data object, usually a keyword or phrase. For example, on e-commerce platforms, users can be tagged with "high-spending" or "active user," and products can be tagged with "best-selling" or "new product." Tags in a tagging system are typically divided into different categories for more detailed classification of objects. For example, different tag categories can be created based on dimensions such as customer behavior, purchasing habits, and geographic location, such as: User tags: activity level, spending level, loyalty, etc.; Product tags: price range, brand, category, etc.; Behavioral tags: browsing frequency, purchase frequency, etc. A tagging system usually comes with a set of rules to define the conditions under which a tag is assigned to a data object. Rules can be based on data attributes (such as age, income, etc.) or behaviors (such as number of visits, purchase amount, etc.). These rules can be manually set or automatically generated, dynamically adjusted according to changes in the data.

[0003] However, in some complex business scenarios, manually defining and executing label rules is not only time-consuming, but may also lead to errors or inconsistencies due to human factors. Summary of the Invention

[0004] To address the technical problems of the aforementioned method of manually defining and executing tag rules being not only time-consuming but also having relatively low accuracy, this invention provides solutions in the following aspects.

[0005] In the first aspect, a tag generation method based on a rule-based engine tagging system includes: obtaining multidimensional raw sales data from multiple data sources according to a customer ID; converting the multidimensional raw sales data into standard sales data of a preset standard type; obtaining a filter, and filtering target sales data from the standard sales data using the filter; wherein determining the filtering rules of the filter includes: obtaining multiple filtering conditions of the filter configured by relevant personnel in JSON format, wherein the filtering conditions are configured via a standard interface, and the standard interface receives the standard sales data and returns a judgment result on whether the standard sales data meets the filtering conditions; converting all filtering conditions into a condition tree; determining the condition tree as the filtering rules of the filter; calculating the profit indicator, expenditure indicator, revenue indicator, and payment amount indicator of the target data according to preset logical rules; obtaining the tags corresponding to the profit indicator, expenditure indicator, revenue indicator, and payment amount indicator, and determining the tags as tags for the customer ID.

[0006] Preferably, obtaining multidimensional raw sales data from multiple data sources based on customer ID includes: obtaining the associated ID of the customer ID according to a preset customer ID mapping table; using the user's ID and all associated IDs as indexes in the first... i The first data source to obtain multidimensional raw sales data i Dimensional data, i It is a positive integer.

[0007] Preferably, a tag generation method based on a rule-based engine tag system further includes: performing data cleaning on each dimension of the multidimensional original sales data before converting the multidimensional original sales data into standard sales data of a preset standard type.

[0008] Preferably, the first of the multidimensional raw sales data i Data cleaning of the dimensional data includes: cleaning the first dimensional data. i After standardizing and normalizing each data point in the dimensional data, the mean of all data points is calculated. μ and standard deviation σ ; obtained the first i Abnormal data points in the dimensional data and delete the abnormal data points, wherein in response to the first i In the dimensional data, the first j The value of each data point satisfy: or Determine the first i In the dimensional data, the first j These data points are abnormal data points; Preferably, for the first i In the dimensional data, the first j The formula for standardizing data points is: ; in, For the first i The maximum value among all data points in the dimensional data. For the first i The minimum value among all data points in the dimensional data. For the first i In the dimensional data, the first j The normalized value is obtained by standard normalization of each data point.

[0009] Preferably, the standard type is a DataRow type, wherein converting multidimensional raw sales data into standard sales data of a preset standard type includes: mapping multidimensional raw sales data to standard field names; converting standard field names into a DataRow type dataset; and performing null value processing on the DataRow type dataset to obtain the standard sales data.

[0010] Preferably, null values ​​in the DataRow type dataset are handled by deletion.

[0011] Preferably, the result of judging whether the standard sales data meets the filtering conditions is a Boolean value.

[0012] Preferably, the labels corresponding to profit indicators, expenditure indicators, revenue indicators, and payment amount indicators are obtained by looking up tables.

[0013] In a first aspect, a tag generation system based on a rule-based engine tagging system includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement a tag generation method based on a rule-based engine tagging system as described in any of the above-described inventions.

[0014] The beneficial effects of this invention are as follows: This invention, through a flexible tag generation method, enables users to quickly, efficiently, and accurately assign tags to customers in complex environments with multiple data sources. This method greatly facilitates business personnel in flexibly generating different tags based on business rules and requirements. Attached Figure Description

[0015] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent upon reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein: Figure 1 This is a schematic flowchart illustrating the steps of a generation method based on a rule-based engine according to an embodiment of the present invention; Figure 2This is a schematic diagram illustrating the structure of a rule-based generation system according to this embodiment. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0018] Figure 1 This is a schematic flowchart illustrating the steps of a generation method based on a rule-based engine according to an embodiment of the present invention.

[0019] like Figure 1 As shown, a generation method based on a rule-based engine includes steps S1 to S5.

[0020] Step S1: Obtain multidimensional raw sales data from multiple data sources based on the customer ID.

[0021] In one embodiment, obtaining multidimensional raw sales data from multiple data sources based on a customer ID includes: obtaining the associated ID of the customer ID according to a preset customer ID mapping table; using the user's ID and all associated IDs as indexes in the first... i The first data source to obtain multidimensional raw sales data i Dimensional data, i It is a positive integer.

[0022] It's important to note that in databases and information systems, a customer ID is a unique identifier, typically a combination of numbers or alphanumeric characters. Each customer has a unique customer ID, ensuring that each customer can be distinguished and identified. Related IDs, on the other hand, represent the associations between the customer ID and other entities or data. These typically represent different identities or attributes of the customer in other systems or data sources. For example, suppose there's an e-commerce platform where all related IDs of the customer ID include the customer's contact information, email address, and order ID. Through these related IDs, more information about the customer can be obtained, enhancing the overall customer profile. In summary, the customer ID is the unique identifier for the customer, while related IDs are other identifiers or information associated with the customer (such as order IDs, payment information, etc.). These related IDs allow for more comprehensive and accurate acquisition of multi-dimensional raw sales data about the customer, providing more accurate calculation data for subsequent profit, expense, revenue, and payment amount metrics, ultimately leading to more precise customer tagging.

[0023] In one embodiment, the multiple data sources include: an order data source and a payment data source. The order data source includes data related to customer purchasing behavior, such as order amount and order date; the payment data source includes data containing customer payment information, such as payment amount and payment time.

[0024] Step S2: Convert the multidimensional raw sales data into standard sales data of a preset standard type.

[0025] In one embodiment, the standard type is a DataRow type, wherein converting multidimensional raw sales data into standard sales data of a preset standard type includes: mapping multidimensional raw sales data to standard field names; converting standard field names into a DataRow type dataset; and performing null value processing on the DataRow type dataset to obtain the standard sales data.

[0026] It's important to note that DataRow is a class in the .NET Framework used to represent a row of data in a DataTable. It's part of the System.Data namespace and is widely used in database operations and data processing applications. DataRow enables efficient interaction with databases, data transfer, and various data operations.

[0027] A DataRow represents a row in a data table and is part of a DataTable. In a DataTable, each row consists of multiple columns, and a DataRow is a collection of these columns. A DataRow stores a specific row of data. DataRows allow developers to access the stored data in two ways: column names and column indexes. DataRows also provide a very intuitive data modification interface. Data in the current row can be modified through assignment operations. Furthermore, DataRows support multiple states, such as Added, Modified, Deleted, and Unchanged. Developers can use these states to determine whether data needs to be saved to the database. When modifying data, DataRows provide a data validation mechanism. DataColumns can specify data validation rules for each column, such as data type constraints and value range restrictions.

[0028] It should be noted that the standard interface receives data in a specific format (such as standard sales data), processes it according to predefined filtering conditions, and finally returns a result indicating whether the data meets these filtering conditions. The standard interface is used for filtering, screening, or validation operations in data processing.

[0029] A tag generation method based on a rule-based engine tag system also includes: cleaning the data of each dimension in the multidimensional original sales data before converting the multidimensional original sales data into standard sales data of a preset standard type.

[0030] In one embodiment, the first of the multidimensional raw sales data i Data cleaning of the dimensional data includes: cleaning the first dimensional data. i After standardizing and normalizing each data point in the dimensional data, the mean of all data points is calculated. μ and standard deviation σ ; obtained the first i Abnormal data points in the dimensional data and delete the abnormal data points, wherein in response to the first i In the dimensional data, the first j The value of each data point satisfy: or Determine the first i In the dimensional data, the first j These data points are considered outliers. The mean is the arithmetic average of all data points in the dataset. The standard deviation is a measure of the dispersion or volatility of the data points in the dataset relative to the mean.

[0031] In one embodiment, for the first i In the dimensional data, the first j The formula for standardizing data points is: ; in, For the first i The maximum value among all data points in the dimensional data. For the first i The minimum value among all data points in the dimensional data. For the first i In the dimensional data, the first j The normalized value is obtained by standard normalization of each data point.

[0032] In one embodiment, null values ​​are handled by deleting data in a DataRow type dataset.

[0033] It's important to note that the deletion method is a common approach to handling null values, primarily used to process datasets containing empty or missing data. The deletion method directly removes records (rows) or fields (columns) containing null values ​​(such as null or DBNull) to ensure the integrity and quality of the dataset. In practical data processing, when missing data might affect the analysis results, the deletion method is necessary.

[0034] The deletion method examines each row or column in the dataset to determine if it contains null values. If a row or column contains null values, the entire row or column can be deleted. This operation is typically performed during the data loading or preprocessing phase to ensure that subsequent analysis or calculations are based on valid data.

[0035] Step S3: Obtain the filter and filter out the target sales data from the standard sales data using the filter.

[0036] The process of determining the filtering rules for the filter includes: obtaining multiple filtering conditions configured by relevant personnel in JSON format, wherein the filtering conditions are configured via a standard interface, and the standard interface receives the standard sales data and returns a judgment result on whether the standard sales data meets the filtering conditions; converting all filtering conditions into a condition tree; and determining the condition tree as the filtering rules for the filter.

[0037] It should be noted that a rule-based engine is a software component specifically designed for managing and executing business rules. It extracts business logic from application code, defining and storing it in the form of rules. When a specific business logic needs to be executed, the rule-based engine matches and infers based on the input data and predefined rules, thereby generating corresponding operation instructions or decision results. In this invention, relevant personnel combine preset rules (i.e., filtering conditions) and then filter the data corresponding to the customer ID to obtain the data desired by the relevant personnel for determining the customer ID label.

[0038] It's worth noting that JSON (JavaScript Object Notation) is a lightweight data-interchange format that uses a text format that is easy for humans to read and write, while also being easy for machines to parse and generate. It is widely used in scenarios such as network data exchange and API interface communication.

[0039] The basic structure of JSON includes: Object, Array, Key, and Value. An object is enclosed in curly braces and contains key-value pairs. Each key and value is separated by a colon, and key-value pairs are separated by commas. An array is enclosed in square brackets and contains a series of values, separated by commas. Array values ​​can be of any type (object, string, number, etc.). The key is a string, usually enclosed in double quotes. Values ​​can be strings, numbers, boolean values ​​(true or false), objects, or arrays.

[0040] In one embodiment, the result of determining whether standard sales data meets the filtering criteria is a Boolean value. A Boolean value is a data type with only two possible values: true and false. Boolean values ​​are used to determine whether a certain condition is true. For example, in a program, determining whether a number is greater than zero can be achieved using the Boolean expression `number>0`. If the condition is true, it returns true; otherwise, it returns false.

[0041] It should be noted that filters generally refer to tools or mechanisms used to restrict or filter data. A condition tree is a data structure used to represent the logical relationships between multiple filtering conditions; that is, a condition tree is actually a structured representation of filtering rules.

[0042] Converting all filtering conditions into a condition tree means organizing multiple filtering conditions into a tree structure, making the relationships between these conditions clearer and more structured. Filtering conditions are used to restrict or filter data. Common filtering conditions in queries include "transaction amount greater than a preset value" and "cost greater than a preset value." A condition tree is a data structure used to represent the logical relationships between multiple conditions. In a condition tree, each node typically represents a specific condition or operation (such as AND, OR, NOT), and the tree structure represents the combination relationships between these conditions. Condition trees can clearly display the logical relationships (such as AND, OR) between different conditions. This makes querying, calculation, and optimization operations more efficient.

[0043] Step S4: Calculate the profit, expenditure, revenue and payment amount indicators of the target data according to the preset logic rules.

[0044] It should be noted that the preset logical rules are used to calculate and analyze the various dimensions of the target data. Preset formulas are used to calculate profit, expense, revenue, and payment amount indicators for each dimension of the target data. These logical rules are set by relevant personnel.

[0045] Step S5: Obtain the tags corresponding to the profit indicator, expense indicator, revenue indicator and payment amount indicator, and determine that the tag is the tag of the customer ID.

[0046] In one embodiment, the labels corresponding to profit indicators, expense indicators, revenue indicators, and payment amount indicators are obtained by looking up a table. For example, in the mapping table, the label for "Type 1 Customer" meets the following conditions: profit indicator is greater than a preset profit threshold, expense indicator is greater than a preset expense threshold, revenue indicator is greater than a preset revenue threshold, and payment amount indicator is greater than a preset payment amount threshold; the label for "Type 2 A Customer" meets the following conditions: profit indicator is less than or equal to a preset profit threshold, expense indicator is greater than a preset expense threshold, revenue indicator is greater than a preset revenue threshold, and payment amount indicator is greater than a preset payment amount threshold; the label for "Type 2 B Customer" meets the following conditions: profit indicator is greater than a preset profit threshold, expense indicator is less than or equal to a preset expense threshold, revenue indicator is greater than a preset revenue threshold, and payment amount indicator is greater than a preset payment amount threshold. The "Type C Customer (Second Category)" label meets the following conditions: profit indicator is greater than the preset profit threshold, expenditure indicator is greater than the preset expenditure threshold, income indicator is less than or equal to the preset income threshold, and payment amount indicator is greater than the preset payment amount threshold. The "Type A Customer (Third Category)" label meets the following conditions: profit indicator is greater than the preset profit threshold, expenditure indicator is greater than the preset expenditure threshold, income indicator is less than or equal to the preset income threshold, and payment amount indicator is less than or equal to the preset payment amount threshold. The "Type B Customer (Third Category)" label meets the following conditions: profit indicator is less than or equal to the preset profit threshold, expenditure indicator is less than or equal to the preset expenditure threshold, income indicator is greater than the preset income threshold, and payment amount indicator is greater than the preset payment amount threshold.

[0047] Figure 2 This is a schematic diagram illustrating the structure of a rule-based generation system according to this embodiment.

[0048] This invention also provides a generation system based on a rule-based engine. For example... Figure 2 As shown, the system includes a processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement a generation method based on a rule-based engine according to the first aspect of the present invention.

[0049] The system also includes other components well known to those skilled in the art, such as communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0050] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions that can be stored or otherwise maintained by such a computer-readable medium.

[0051] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.

[0052] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. A tag generation method based on a rule-based engine tag system, characterized in that, include: Retrieve multidimensional raw sales data from multiple data sources based on customer ID; Convert multidimensional raw sales data into standard sales data of a preset standard type; Obtain a filter, and use the filter to select target sales data from standard sales data; The process of determining the filtering rules for the filter includes: obtaining multiple filtering conditions configured by relevant personnel in JSON format, wherein the filtering conditions are configured via a standard interface, and the standard interface receives the standard sales data and returns a judgment result on whether the standard sales data meets the filtering conditions; converting all filtering conditions into a condition tree; and determining the condition tree as the filtering rules for the filter. Calculate the profit, expense, revenue, and payment indicators of the target data according to preset logical rules; Obtain the labels corresponding to profit indicators, expense indicators, revenue indicators, and payment amount indicators, and determine that the labels are customer ID labels.

2. The tag generation method based on a rule-based engine tag system according to claim 1, characterized in that, Retrieving multidimensional raw sales data from multiple data sources based on customer ID includes: Retrieve the associated ID of the customer ID based on the preset customer ID mapping table; Indexed by the user's ID and all associated IDs in the first... i The first data source to obtain multidimensional raw sales data i Dimensional data, i It is a positive integer.

3. The tag generation method based on a rule-based engine tag system according to claim 2, characterized in that, It also includes data cleaning of each dimension of the original multidimensional sales data before converting it into standard sales data of a preset standard type.

4. The tag generation method based on a rule-based engine tag system according to claim 3, characterized in that, Data cleaning of the i-th dimension of the multidimensional raw sales data includes: For the first i After standardizing and normalizing each data point in the dimensional data, the mean of all data points is calculated. μ and standard deviation σ ; Obtain the i Abnormal data points in the dimensional data and delete the abnormal data points, wherein in response to the first i In the dimensional data, the first j The value of each data point satisfy: or Determine the first i In the dimensional data, the first j These data points are considered outliers.

5. The tag generation method based on a rule-based engine tag system according to claim 4, for the first... i In the dimensional data, the first j The formula for standardizing data points is: ; in, For the first i The maximum value among all data points in the dimensional data. For the first i The minimum value among all data points in the dimensional data. For the first i In the dimensional data, the first j The normalized value is obtained by standard normalization of each data point.

6. The tag generation method based on a rule-based engine tag system according to claim 1, characterized in that, The standard type is DataRow, and the standard sales data that converts multidimensional raw sales data into a preset standard type includes: Map multidimensional raw sales data to standard field names; Convert standard field names into a dataset of type DataRow; Null values ​​are processed from the DataRow type dataset to obtain the standard sales data.

7. A tag generation method based on a rule-based engine tag system according to claim 6, characterized in that, Null values ​​are handled in a DataRow type dataset by deletion.

8. The tag generation method based on a rule-based engine tag system according to claim 1, characterized in that, The result of determining whether the standard sales data meets the filtering conditions is a Boolean value.

9. A tag generation method based on a rule-based engine tag system according to claim 1, characterized in that, The labels corresponding to profit indicators, expenditure indicators, revenue indicators, and payment amount indicators are obtained by looking up tables.

10. A tag generation system based on a rule-based engine tagging system, characterized in that, The memory stores a computer program, and the processor executes the computer program to implement a tag generation method based on a rule-based engine tag system as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Data processing method, device, equipment and medium

    CN112269805A

  • Portrait generation system and method, electronic equipment and storage medium

    CN112287015A

  • Screening method and device for insured customers, electronic equipment and storage medium

    CN112488845A

  • Data label implementation method and system based on tobacco and wine sales

    CN114528452A

  • User screening method and device, computer equipment, storage medium and product

    CN116909538A

Cited By

  • A multi-dimensional intelligent labeling method and system for advertisement creative materials

    CN122529815A