Label generation method, label generation device, and computer storage medium
By using a label generation method and device, and by filtering and calculating the accessed data using preset templates, the problem of long label development cycles has been solved, enabling self-service generation of new labels and improving label production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU HUACHENG SOFTWARE TECH CO LTD
- Filing Date
- 2023-04-13
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, after business personnel submit new user tag requests, tag developers need to schedule development, resulting in long waiting times and an inability to quickly meet the rapidly changing operational strategies of business users.
A label generation method and apparatus are provided. By acquiring label generation requests and data tables, the access data is filtered and calculated using preset label templates and rule templates to generate labels, supporting self-service label production.
It enables the rapid generation of new tags, shortens tag production time, improves tag development efficiency, and meets the rapidly changing operational needs of business partners.
Smart Images

Figure CN116644063B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis, and in particular to a label generation method, a label generation device, and a computer storage medium. Background Technology
[0002] With the development of big data technology, the model of classifying user behavior and then targeting marketing is becoming increasingly popular among operations teams. Precision marketing significantly improves conversion efficiency and reduces operational costs. The foundation of precision marketing is user profiling, and the basis of user profiling is user tags.
[0003] To improve user conversion and retention rates, tag developers typically need to pre-mine and analyze user tags from massive amounts of user data (hundreds of millions) and provide these tags to business personnel. This helps business personnel better understand users and achieve precise user operations. However, in actual operations, business personnel often have requests for new user tags. After submitting these requests to tag developers, the developers still have to schedule development, resulting in long waiting times for business personnel. This is detrimental to their operational work and cannot meet the rapidly changing operational strategies of the business. Summary of the Invention
[0004] The main technical problem addressed by this application is how to achieve self-service label production based on newly input data. To this end, this application provides a label generation method, a label generation device, and a computer storage medium.
[0005] To address the aforementioned technical problems, this application provides a tag generation method, comprising: obtaining a tag generation request and a corresponding data table in the tag generation request, wherein the tag generation request includes filtered attribute fields; obtaining tag data based on access data in the data table and a preset tag template, wherein the tag data includes data type and tag type; filtering the attribute fields of the access data belonging to the data type in the data table using a rule template corresponding to the tag type; and generating tags based on the filtered data.
[0006] The data types include behavioral data, detailed data, and / or user data. Behavioral data includes the names of events performed by users and their corresponding event attributes. Detailed data includes user business attributes. User data includes user inherent attributes or status attributes.
[0007] After obtaining the tag generation request and the corresponding data table in the tag generation request, the process also includes: configuring the access data to obtain configuration information. The configuration information is used to obtain access data when filtering the attribute fields of access data belonging to the data type. The configuration information includes the data source name, database type, database address, data update frequency and / or data source data type corresponding to the access data.
[0008] The process includes generating tags for the filtered data based on the tag data, and then combining the query statements corresponding to the tags, querying the data table based on the combined results, and obtaining the result data.
[0009] The tag generation method, after querying the data table based on the combined results and obtaining the result data, also includes merging the corresponding result data based on the relationship between multiple access data to obtain the final result data.
[0010] Among them, based on the relationship between multiple access data, the corresponding result data is merged to obtain the final result data, including: if the relationship between multiple access data is AND, then the intersection of the corresponding result data is taken; if the relationship between multiple access data is OR, then the union of the corresponding result data is taken.
[0011] Specifically, the process involves using rule templates corresponding to tag types to filter attribute fields of access data belonging to the data type in the data table, and generating tags for the filtered data based on the tag data. This includes: obtaining the calculation method corresponding to the tag type; using the calculation method to filter attribute fields of access data belonging to the data type in the data table, and generating tags for the filtered data based on the tag data.
[0012] The tag types include first / last type and statistical type; the calculation method for first / last type is to search for the first / last data of all data; the calculation method for statistical type is to aggregate the attribute values of all data.
[0013] To solve the above-mentioned technical problems, another technical solution adopted in this application is: to provide a label generation device, which includes a processor and a memory, the memory being coupled to the processor, the memory storing program data, and the processor executing the program data to implement the label generation method as described above.
[0014] To solve the above-mentioned technical problems, another technical solution adopted in this application is to provide a computer-readable storage medium that stores program data, which, when executed, is used to implement the above-mentioned tag generation method.
[0015] The beneficial effects of this application are as follows: Unlike existing technologies, the tag generation method provided by this invention is applied to a tag generation device. The tag generation device obtains a tag generation request and a corresponding data table from the request. The tag generation request includes filtered attribute fields. Tag data is obtained based on the access data in the data table and a preset tag template. The tag data includes data type and tag type. The attribute fields of the access data belonging to the data type in the data table are filtered using a rule template corresponding to the tag type. Tags are generated based on the filtered data. Compared with conventional tag generation methods, this application's method of generating tags by filtering input data using a preset tag template in the tag generation device allows for flexible definition of tag calculation methods, thereby improving tag development efficiency. By defining the tag calculation method using a preset tag template to filter the access business's own data, new tags can be generated automatically, quickly meeting the needs of business users and shortening tag production time. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] in:
[0018] Figure 1 This is a flowchart illustrating the first embodiment of the label generation method provided in this application;
[0019] Figure 2 This is a schematic diagram of the process by which the label generation method provided in this application is applied to a label generation device;
[0020] Figure 3 This is a schematic diagram of the overall architecture of the label generation device provided in this application;
[0021] Figure 4 This is a functional diagram of the data management module in the label generation device provided in this application;
[0022] Figure 5 This is a flowchart illustrating the second embodiment of the label generation method provided in this application;
[0023] Figure 6 This is a functional diagram of the rule engine module in the tag generation device provided in this application;
[0024] Figure 7This is a flowchart illustrating the calculation method of the rule template corresponding to the first / last tag type in the tag generation method provided in this application;
[0025] Figure 8 This is a flowchart illustrating the process of a user generating tags using the tag generation method provided in this application;
[0026] Figure 9 This is a schematic diagram of the structure of the first embodiment of the label generation device provided in this application;
[0027] Figure 10 This is a schematic diagram of the structure of the second embodiment of the label generation device provided in this application;
[0028] Figure 11 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0030] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0031] The label generation method provided in this application is mainly applied to a label generation device, wherein the label generation device can be a server or a system in which the server and terminal devices cooperate with each other. Accordingly, the various parts of the label generation device, such as various units, sub-units, modules, and sub-modules, can all be set in the server, or they can be set in the server and the terminal devices respectively.
[0032] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed servers, or as a single software program or software module; no specific limitation is made here. In some possible implementations, the tag generation method of this application embodiment can be implemented by a processor calling computer-readable instructions stored in memory.
[0033] User tags are feature representations extracted based on the analysis of user behavior or attributes. These include basic information such as the user's location, gender, and registration details, as well as behavioral information such as when, through what channel, and what actions the user took on our product. Tags are generally classified according to their attributes into static tags, dynamic tags, and computational tags.
[0034] As the business grows, the operating methods become more and more diversified. In order to better classify users, it is necessary to tag users, that is, to assign corresponding tags to consumers who meet the given tag format.
[0035] Whenever business personnel have a new user tag requirement, they need to submit the tag requirement to the tag development team. The tag development team then needs to figure out a new tag calculation method to develop the tag, which results in a long tag development cycle and cannot meet the rapidly changing operational strategies of the business side.
[0036] To this end, this application provides a tag generation method that aims to provide business personnel with a self-service tag generation function, enabling them to flexibly configure tag templates and calculate tags based on multiple data source accesses. This provides convenience for business personnel to obtain new user tags, improves tag delivery efficiency, and facilitates business personnel in carrying out operational work.
[0037] See Figures 1 to 3 , Figure 1 This is a flowchart illustrating the first embodiment of the label generation method provided in this application; Figure 2 This is a schematic diagram of the process by which the label generation method provided in this application is applied to a label generation device; Figure 3 This is a schematic diagram of the overall architecture of the label generation device provided in this application.
[0038] Step 11: Obtain the tag generation request and the corresponding data table in the tag generation request. The tag generation request includes the filtered attribute fields.
[0039] Specifically, the data table stores many records related to the business. These records may include specific actions related to the business or users who perform business operations, etc., without further limitation. Each record includes several attribute fields.
[0040] Specifically, the tag generation request can include filtering conditions for attribute fields related to the desired tag. For example, if a user wants to limit the name of a product in a transaction, they can use the product name "A" as the filtering condition for the product name attribute field in the tag generation request, i.e., product name = A.
[0041] Specifically, after receiving a tag generation request, the tag generation device will obtain access data from the data table, which includes several user data and business-related data corresponding to the user.
[0042] Specifically, after obtaining the tag generation request and the corresponding data table within it, the tag generation device also configures the access data to obtain configuration information. This configuration information is used to filter access data based on its data type. The configuration information includes the data source name, database type, database address, data update frequency, and / or data source data type corresponding to the access data.
[0043] Specifically, users, i.e., business personnel, can use the label generation device to configure new data sources into the data management module of the label generation device. These data sources can come from the user's database or the business database corresponding to the user, including the tagged objects and data from the platform corresponding to each tagged object. The label generation device can generate labels based on new data sources accessed by the user, enriching label generation and filtering, solving the problem that label calculation could only select preset information, thus realizing self-service label generation and calculation, and improving the efficiency of label production.
[0044] See Figure 4 , Figure 4 This is a functional diagram of the data management module in the label generation device provided in this application.
[0045] Specifically, the data management module in the label generation device includes two functions: data source management and data management. Data source management configures the data source information for the incoming data, which is used to reference the data in data management. Data management includes classifying the configured data.
[0046] In one embodiment of this application, the data type may include behavioral data, detailed data, and / or user data. Behavioral data describes what a user did at what time, including the name of the event and the corresponding event attributes, such as a user purchasing an item at 3 PM. Detailed data includes the names of user business attributes, such as the user's order data and browsing history. User data includes the names of the user's inherent attributes or status attributes, such as the user's gender, age, and region.
[0047] Step 12: Obtain tag data based on the access data in the data table and the preset tag template. The tag data includes data type and tag type.
[0048] Specifically, tag data includes data type and tag type. The tag generation device can display the tag types that can be created on the tag creation page of the display screen, based on the tag types supported by the rule engine module, for the user to choose from. The user can select the tag type they want to create by checking boxes or filtering from a list. In response to the user's selection command, the tag generation device selects a tag template corresponding to the tag type and obtains tag data based on the tag template.
[0049] Specifically, tag data includes data type and tag type. The data type defines which one or more types of data the tag supports for calculation. When creating tags later, the tag generation device will retrieve the corresponding data attributes of the data type from the data management module based on the data configuration information, according to the selected tag type.
[0050] Step 13: Use the rule template corresponding to the tag type to filter the attribute fields of the access data that belong to the data type in the data table, and generate tags for the filtered data based on the tag data.
[0051] Specifically, the tag generation device filters the attribute fields of the access data that belong to the data type according to the rule template corresponding to the tag type in the tag data, and generates tags for the filtered data according to the tag selection information output by the rule engine module.
[0052] Optionally, users can limit attribute fields by inputting a tag generation request, that is, inputting filtering conditions for attribute fields through the tag generation request. The tag generation device can filter multiple attribute fields in the data table to obtain more accurate filtering results.
[0053] See Figure 5 and Figure 6 , Figure 5 This is a flowchart illustrating the second embodiment of the label generation method provided in this application. Figure 6 This is a functional diagram of the rule engine module in the tag generation device provided in this application.
[0054] Step 51: Obtain the calculation method corresponding to the tag type.
[0055] Specifically, the rule engine module in the tag generation device is mainly used to define tag types. Each tag category has its own calculation method and supported data types to meet different user scenarios. The rule engine template includes two functions: data types and calculation templates.
[0056] Specifically, the data type definition of the rule engine module specifies which types of data the tag supports for calculation. When creating tags subsequently, the tag generation device retrieves the corresponding data attributes from the data management module based on the data configuration information, according to the selected tag type. The tag generation device uses tag rule engine templates to flexibly define tag calculation methods, improving tag development efficiency.
[0057] Specifically, the calculation template of the rules engine module defines the tag type, the data types supported by different tag types, and the calculation method of data of different data types under different tag types.
[0058] The tag types include first / last type and statistical type; the calculation method for first / last type is to search for the first / last data of all data; the calculation method for statistical type is to aggregate the attribute values of all data.
[0059] Step 52: Use calculation methods to filter the attribute fields of the accessed data that belong to the data type in the data table, and generate tags for the filtered data based on the tag data.
[0060] Specifically, after generating labels for the filtered data based on the label data, the label generation device will also combine the query statements corresponding to the labels, and perform a query in the table corresponding to the data type based on the combination results to obtain the result data.
[0061] In one embodiment of this application, as Figure 7 As shown, Figure 7This is a flowchart illustrating the calculation method of the rule template corresponding to the first / last tag type in the tag generation method provided in this application. Taking the calculation of the last order time of a user's purchase of product A in the past 7 days as an example, the tag generation device selects the order table corresponding to the detailed data in the accessed data as the query table, and obtains the corresponding query statement SQL as from order; the tag generation device then uses the past 7 days as the time period as the filtering condition, and obtains the corresponding query statement SQL as date_sub(curdate().interval 7day)<=time and date_add(curdate().interval 7day)>=time; by filtering out the product name as A, the corresponding query statement SQL is and good_name=“A”; the filtering condition is the last order time, so the last piece of data in all data is retrieved, that is, the corresponding query statement SQL is max(create_time). Therefore, the tag generation device assembles all the SQL statements to obtain the final SQL statement: select user_id, max(create_time) from order where 1=1 and good_name=“A” and date_sub(curdate().interval7day)<=time and date_add(curdate().interval 7day)>=time.
[0062] The tag generation device queries and filters the corresponding tables based on the final SQL statement to obtain the final result data. Similarly, when the data type is behavioral data, the tag generation device selects the table corresponding to the behavioral data in the access data as the query table for tag generation and data query. The specific calculation process is the same as the above process and will not be elaborated here.
[0063] Specifically, the tag generation device queries the table corresponding to the data type based on the combined results, and after obtaining the result data, it merges the corresponding result data based on the relationship between multiple access data to obtain the final result data.
[0064] Specifically, when the tag generation device merges multiple access data, if the relationship between the multiple access data is AND, then the intersection of the corresponding result data is taken; if the relationship between the multiple access data is OR, then the union of the corresponding result data is taken.
[0065] Specifically, after the tag generation device obtains the final result data, it will save the result data as a data structure format of tag number, corresponding user number and attribute value, which will facilitate subsequent user analysis.
[0066] In one embodiment of this application, the process of a user creating tags independently using the tag generation device provided in this application can be as follows: Figure 8 As shown, Figure 8 This is a flowchart illustrating the process of a user generating tags using the tag generation method provided in this application.
[0067] Users input the data required for tag calculation into the tag generation device. The tag generation device adds the input data to the corresponding data table in the data management module's data source management, and maintains the input data. The data is classified by calculating and filtering the attribute fields in the table.
[0068] Users initiate tag creation commands on the tag generation device's display interface. The tag generation device, based on tag templates provided by the rules engine, allows users to select the desired tag type on the display interface. Based on the user's selection, the tag generation device retrieves the data type corresponding to the tag type, which includes behavioral data, user data, and detailed data.
[0069] The tag generation device retrieves the corresponding event table from the data table based on the data category. It then filters the data in the event table according to the calculation method and data type corresponding to the tag type, and generates tags based on the filtering results. After generating tags, the device combines query statements corresponding to the tags according to user needs, queries data in the data table based on the data source information, and saves the final query results, thus realizing self-service tag generation.
[0070] Unlike existing technologies, the tag generation method provided by this invention is applied to a tag generation device. The tag generation device obtains a tag generation request and a corresponding data table from the request. The tag generation request includes filtered attribute fields. Tag data is obtained based on the access data in the data table and a preset tag template. The tag data includes data type and tag type. The attribute fields of the access data belonging to the data type in the data table are filtered using a rule template corresponding to the tag type. Tags are then generated based on the filtered data. Compared to conventional tag generation methods, this application's approach of using a preset tag template to filter input data in the tag generation device to generate tags allows for flexible definition of tag calculation methods, thereby improving tag development efficiency. By using a preset tag template to define the tag calculation method and filtering the access business's own data, new tags can be generated automatically, quickly meeting the needs of business users and shortening tag production time.
[0071] The method described in the above embodiments can be implemented using a tag generation device, as detailed below. Figure 9Describe it. Figure 9 This is a schematic diagram of the structure of the first embodiment of the label generation device provided in this application.
[0072] like Figure 9 As shown, the label generation device 90 of this application embodiment includes a data access module 91, a data acquisition module 92, and a label generation module 93.
[0073] The data access module 91 is used to obtain the tag generation request and the corresponding data table in the tag generation request. The tag generation request includes filtered attribute fields.
[0074] The data acquisition module 92 is used to acquire tag data based on the access data in the data table and the preset tag template. The tag data includes data type and tag type.
[0075] The tag generation module 93 is used to filter the attribute fields of the access data that belong to the data type in the data table using the rule template corresponding to the tag type, and generate tags for the filtered data based on the tag data.
[0076] The method described in the above embodiments can be implemented using a tag generation device, as detailed below. Figure 10 , Figure 10 This is a schematic diagram of the structure of the second embodiment of the label generation apparatus provided in this application. The label generation apparatus 100 includes a memory 101 and a processor 102. The memory 101 is used to store program data, and the processor 102 is used to execute the program data to implement the following method:
[0077] Retrieve the tag generation request and the corresponding data table within the tag generation request. The tag generation request includes filtered attribute fields. Obtain tag data based on the access data in the data table and the preset tag template. The tag data includes data type and tag type. Filter the attribute fields of the access data belonging to the data type in the data table using the rule template corresponding to the tag type. Generate tags based on the filtered data.
[0078] See Figure 11 , Figure 11 This is a schematic diagram of an embodiment of a computer-readable storage medium provided in this application. The computer-readable storage medium 110 stores program data 111, which, when executed by a processor, is used to implement the following method:
[0079] Retrieve the tag generation request and the corresponding data table within the tag generation request. The tag generation request includes filtered attribute fields. Obtain tag data based on the access data in the data table and the preset tag template. The tag data includes data type and tag type. Filter the attribute fields of the access data belonging to the data type in the data table using the rule template corresponding to the tag type. Generate tags based on the filtered data.
[0080] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A label generation method, characterized in that, The tag generation method includes: Obtain the tag generation request and the corresponding data table in the tag generation request, wherein the tag generation request includes filtered attribute fields; Tag data is obtained based on the access data in the data table and the preset tag template, wherein the tag data includes data type and tag type; The method involves: using the rule template corresponding to the tag type to filter the attribute fields of access data belonging to the data type in the data table; and generating tags for the filtered data based on the tag data. This includes: obtaining the calculation method corresponding to the tag type; using the calculation method to filter the attribute fields of access data belonging to the data type in the data table; and generating tags for the filtered data based on the tag data. The tag types include first / last type and statistical type; the calculation method corresponding to the first / last type is to search for the first / last data of all data; the calculation method corresponding to the statistical type is to aggregate the attribute values of all data.
2. The label generation method according to claim 1, characterized in that, The data types include behavioral data, detailed data, and / or user data, wherein the behavioral data includes the names of events performed by the user and their corresponding event attributes, the detailed data includes user business attributes, and the user data includes the user's inherent attributes or status attributes.
3. The label generation method according to claim 1, characterized in that, After obtaining the tag generation request and the corresponding data table in the tag generation request, the method further includes: The access data is configured to obtain configuration information. The configuration information is used to obtain the access data when filtering the attribute fields of the access data belonging to the data type. The configuration information includes the data source name, database type, database address, data update frequency and / or data source data type corresponding to the access data.
4. The label generation method according to claim 1, characterized in that, After generating labels for the filtered data based on the label data, the method further includes: Combine the query statements corresponding to the tags, and perform a query on the data table based on the combined results to obtain the result data.
5. The label generation method according to claim 4, characterized in that, After querying the data table based on the combined results to obtain the result data, the tag generation method further includes: Based on the relationship between multiple access data, the corresponding result data are merged to obtain the final result data.
6. The label generation method according to claim 5, characterized in that, The process of merging the corresponding result data based on the relationship between multiple access data to obtain the final result data includes: If the relationship between the multiple access data is AND, then the intersection of the corresponding result data is taken; If the relationship between the multiple access data is an OR relationship, then the union of the corresponding result data is taken.
7. A label generating apparatus, characterized in that, The label generating apparatus includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the tag generation method as described in any one of claims 1 to 6.
8. A computer storage medium, characterized in that, The computer storage medium is used to store program data, which, when executed by the computer, is used to implement the tag generation method as described in any one of claims 1 to 6.