Label marking method, computer device and computer storage medium

By analyzing and applying the tag definition data entered by users on the front-end page, directly tagging the tag tag objects is solved, which requires manual code changes in the modification and maintenance of tag rules in the prior art, and improves the reusability and user experience of the tag tag scheme.

CN114722777BActive Publication Date: 2025-03-18KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210510627.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-11
Publication Date
2025-03-18
Estimated Expiration
2042-05-11

AI Technical Summary

Technical Problem

In the prior art, the modification and maintenance of tag rules require developers to manually change or rewrite the code, resulting in poor reusability, large workload and poor user experience.

Method used

By receiving label definition data entered by the user on the front-end page, parsing and labeling the tag tag object according to the label rules, the code is avoided and the user is allowed to change or add label rules at will on the front-end page.

Benefits of technology

It improves the reusability of the tag labeling scheme, reduces the workload of developers in maintaining and developing tag labeling schemes, and makes the user experience more convenient and fast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722777B_ABST
    Figure CN114722777B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a label marking method, a computer device and a computer storage medium. The computer device receives label definition data input by a user on a front-end page. The label definition data includes label rules. The label rules are used to indicate the conditions satisfied by an object to be marked as a target label. The label definition data is parsed and the label-marked object is labeled according to the label rules. Therefore, the code of the label marking scheme only needs to describe the steps of the computer device to perform label marking, and does not need to encapsulate the label rules. The label rules can be arbitrarily changed or added by the user on the front-end page, which is more convenient and fast for the user, and the user experience is good. The change or addition of label rules will not lead to the change or addition of the code of the label marking scheme. The code of the label marking scheme can be reused continuously, its reusability is improved, and personnel do not need to frequently maintain and develop the code of the label marking scheme, which can reduce the workload of maintenance and development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing and analysis, and specifically to a label marking method, a computer device, and a computer storage medium. Background Art

[0002] Labeling analysis objects is an important scenario in the field of big data applications. It involves a set of complex manual processes, that is, developers need to write code based on user-defined labeling rules, and computer equipment selects objects that meet the labeling rules from multiple analysis objects according to the instructions of the code. The selected objects form a data set, which becomes the label group corresponding to the target label. Among them, the labeling rule represents the conditions that the analysis object can meet to be labeled with the target label. For example, the labeling rule can indicate that the condition that a user can be labeled as an active user is that he has logged into the system more than 3 times in the past week. Any user who has logged into the system more than 3 times in the past week can be marked as an active user.

[0003] In the above method, when the tag rules need to be changed, the developer needs to change the code of the encapsulated tag rules, or when a new tag rule needs to be configured, the developer also needs to rewrite a new set of code. In both cases, the developer needs to change or rewrite the code, which has poor reusability and also leads to a huge workload for the developer to develop and maintain the code. Therefore, the modification and maintenance of tag rules is not convenient and fast enough for users, and it increases the workload of developers. Summary of the invention

[0004] The embodiments of the present application provide a label marking method, a computer device, and a computer storage medium to improve the reusability of label marking schemes and reduce the workload of personnel in maintaining and developing label marking schemes.

[0005] A first aspect of an embodiment of the present application provides a label marking method, the method comprising:

[0006] Receiving tag definition data input by a user on a front-end page, the tag definition data including tag rules, the tag rules being used to indicate conditions that an object must satisfy to be marked as a target tag;

[0007] Parsing the tag definition data to determine tag rules included in the tag definition data;

[0008] The target tag is marked on the tag marking object according to the tag rule.

[0009] A second aspect of an embodiment of the present application provides a computer device, the computer device comprising:

[0010] A receiving unit, configured to receive tag definition data input by a user on a front-end page, wherein the tag definition data includes a tag rule, and the tag rule is used to indicate a condition that an object is marked as a target tag;

[0011] A parsing unit, configured to parse the tag definition data and determine tag rules included in the tag definition data;

[0012] The marking unit is used to mark the target label on the label marking object according to the label rule.

[0013] A third aspect of an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.

[0014] A fourth aspect of an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method of the first aspect.

[0015] A fifth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device executes the method of the first aspect.

[0016] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0017] In this embodiment, the computer device receives the tag definition data input by the user on the front-end page. The tag definition data includes tag rules. The tag rules are used to indicate the conditions satisfied by the object to be marked as the target tag. The tag definition data is parsed and the tagged object is tagged according to the tag rules. Therefore, the code of the tag marking scheme only needs to describe the steps for the computer device to perform tag marking, and does not need to encapsulate the tag rules. The tag rules can be arbitrarily changed or added by the user on the front-end page, which is more convenient and fast for the user, and the user experience is good. In addition, the change or addition of the tag rules will not lead to the change or addition of the code of the tag marking scheme. The code of the tag marking scheme can be reused continuously, its reusability is improved, and personnel do not need to frequently maintain and develop the code of the tag marking scheme, which can reduce the workload of maintenance and development. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of a label marking method in an embodiment of the present application;

[0019] Figure 2 This is another flowchart of the label marking method in the embodiment of the present application;

[0020] Figure 3This is a schematic diagram of the overall architecture of the label marking method in the embodiment of the present application;

[0021] Figure 4 A schematic diagram of a process for constructing a label object entity set model based on label metadata in an embodiment of the present application;

[0022] Figure 5 This is a schematic diagram of the overall process of the label marking method in the embodiment of the present application;

[0023] Figure 6 This is a schematic diagram of the structure of a computer device in an embodiment of the present application;

[0024] Figure 7 This is another structural diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The embodiments of the present application provide a label marking method, a computer device, and a computer storage medium to improve the reusability of label marking schemes and reduce the workload of personnel in maintaining and developing label marking schemes.

[0026] See also Figure 1 In the embodiment of the present application, one embodiment of the label marking method includes:

[0027] 101. Receive tag definition data input by a user on a front-end page, where the tag definition data includes tag rules, and the tag rules are used to indicate conditions that an object must satisfy to be marked as a target tag;

[0028] The method of this embodiment can be applied to a computer device, which can exist in the form of a terminal device or a server device, etc., and is used to provide users with services and functions of tag calculation and tagging. When the computer device is a terminal, it can be a terminal device such as a personal computer (PC) or a desktop computer; when the computer device is a server, it can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud databases, cloud computing, and big data and artificial intelligence platforms.

[0029] The computer device can provide a front-end page for the user, and the user can enter label definition data on the front-end page. The label definition data is any data related to the label marking scheme, which describes the label marked object and label rules and other information, wherein the label rules are used to indicate the conditions that the object must meet to be marked as the target label.

[0030] 102. Parse the tag definition data to determine the tag rules included in the tag definition data;

[0031] The computer device may parse the tag definition data to determine the tag rules included therein, so as to tag the tag-tagged object according to the tag rules in a subsequent step.

[0032] 103. Mark the target label on the label-marking object according to the labeling rule;

[0033] When determining the conditions satisfied by the object represented by the label rule to be marked as the target label, the computer device can determine the label-marked object that needs to be marked with the label, and mark the target label with the label-marked object that meets the conditions represented by the label rule according to the label rule, thereby realizing the label marking of the label-marked object.

[0034] In this embodiment, the computer device receives the tag definition data input by the user on the front-end page. The tag definition data includes tag rules. The tag rules are used to indicate the conditions satisfied by the object to be marked as the target tag. The tag definition data is parsed and the tagged object is tagged according to the tag rules. Therefore, the code of the tag marking scheme only needs to describe the steps for the computer device to perform tag marking, and does not need to encapsulate the tag rules. The tag rules can be arbitrarily changed or added by the user on the front-end page, which is more convenient and fast for the user, and the user experience is good. In addition, the change or addition of the tag rules will not lead to the change or addition of the code of the tag marking scheme. The code of the tag marking scheme can be reused continuously, its reusability is improved, and personnel do not need to frequently maintain and develop the code of the tag marking scheme, which can reduce the workload of maintenance and development.

[0035] The following will be Figure 1 Based on the embodiment shown, the embodiment of the present application is further described in detail. Figure 2 Another embodiment of the label marking method in the embodiment of the present application includes:

[0036] 201. Receive tag definition data input by a user on a front-end page, where the tag definition data includes tag rules, and the tag rules are used to indicate conditions that an object must satisfy to be marked as a target tag;

[0037] In this embodiment, the label marking object is the object marked by the label, such as different objects such as customers, users, and businesses. The label is the name of the rule used to circle a specific set of instances in the label marking object. For example, the key customer label can be defined as a customer set whose number of active users under the label marking object of the customer and the amount of contracts signed by the customer have reached a certain scale.

[0038] The tag administrator defines and maintains tag objects, tags, and other tag definition data through the front-end page Admin GUI of the computer device. Figure 3As shown, in the overall architecture of the method of this embodiment, the front-end page Admin / User GUI can be used as a human-computer interaction platform to receive tag definition data input by the user, and a tag market platform is also provided. Users can subscribe to tag marking results through the tag market of the Admin / User GUI platform, and can also publish tag marking results generated by computer devices to the tag market for other users to subscribe.

[0039] Depend on Figure 3 It can also be seen that the method of this embodiment uses HIVE tool. HIVE is a data warehouse tool based on Hadoop, which is used for data extraction, transformation and loading. This is a mechanism for storing, querying and analyzing large-scale data stored in Hadoop. HIVE is configured with Metastore, metadata, DW-DIM, DW-TDM and other modules. The role of Metastore is that the client connects to the Metastore service, and Metastore then connects to the MySQL database to access metadata. With the Metastore service, multiple clients can connect at the same time, and these clients do not need to know the username and password of the MySQL database, they only need to connect to the Metastore service; DW-DIM is the data dimension layer of the data warehouse, which is aggregated by common dimensions and can be used to calculate and provide entities of label-tagged objects; label-tagged objects can be input into the Metastore of the MySQL database. Metastore stores description information such as label-tagged objects, label groups, label definitions, label releases, etc., and uses MS SQL for storage. The above-mentioned label-tagged objects, label groups, label definitions, label releases and other metadata information can be synchronized to HIVE's metadata; DW-TDM is the data label layer of the data warehouse, corresponding to the label database, which is used to store the entity table and label result table of the label-tagged objects, and can collect samples that need to be labeled from the label data warehouse Label DB in MS SQL. At the same time, the DW-DIM layer data can be solidified as the label-tagged object entities in DW-TDM; metadata metadata can be stored in relational databases such as Derby, MySQL, etc., where MySQL is Microsoft's SQLServer database server. In addition, the label marking results stored in the DW-TDM layer can be migrated to the label data warehouse Label DB in MS SQL for storage. Figure 3In the architecture shown, the Azkaban tool in the DataWarehouse is used to schedule tasks. For example, the Azkaban tool can regularly schedule the built-in label interpreter Interpreter of the Driver to perform label calculation and label marking. The label interpreter Interpreter can use the RPC call service provided by the remote procedure call server RPC Server to call the real-time marked samples in the label data.

[0040] 202. Parse the tag definition data to determine the tag rules included in the tag definition data;

[0041] 203. Mark the target label on the label-marking object according to the labeling rule;

[0042] In one implementation of this embodiment, the method of parsing label definition data may be that a computer device solidifies label marking objects from the data dimension layer DW-DIM of the data warehouse to the data label layer DW-TDM of the data warehouse according to the label definition data, and parses the label definition data to determine the label rules for marking the target label of the label marking object.

[0043] Among them, marking the target label on the label-tagged object according to the label rule can be that the computer device calls the label interpreter Interpreter to connect to the Metastore service to read the label metadata, and marks the target label on the label-tagged object in the data label layer DW-TDM according to the description information corresponding to the label rule in the label metadata; wherein the label metadata is the description information of the label definition data, that is, the description information of the label definition data such as the label-tagged object, label group, label definition, label release, etc.

[0044] For example, under the instruction of data warehouse developers, computer equipment can solidify label-tagged object entities from DW-DIM to the DW-TDM layer, and the label data warehouse Label DB in MS SQL samples data instances of label-tagged object entities from DW-TDM.

[0045] Among them, the target label is marked on the label object according to the description information corresponding to the label rule in the label metadata, and the method can be that the computer device constructs a label set dictionary for the label object in the label metadata, and constructs a label set model based on the label set dictionary, constructs a label object entity set model based on the label metadata, parses the label definition under each label node in the label set model, constructs a where clause, the where clause is used to represent the rule for obtaining data related to the label object, copies the label object entity set model to obtain a copy of the label object entity set model, prunes and optimizes the copy of the label object entity set model, parses the entities and their relationships of each label object in the copy of the label object entity set model, constructs a from clause, the from clause is used to represent the path to obtain data related to the label object, obtains data related to the label object according to the where clause and the from clause, and marks the target label on the label object according to the data related to the label object.

[0046] For example, labeling a target label on a label-labeled object according to the description information corresponding to the label rule in the label metadata includes the following steps:

[0047] 1. Read the metadata of tagged objects and tags under MS SQL or HIVE;

[0048] 2. Construct a label set dictionary for label-marked objects, which can be recorded as _node_sets. The dictionary structure can be recorded as<object(id,number),set{LabelNode}> ;

[0049] 3. Based on _node_sets, construct a label set model, which can be recorded as _dag; where _dag is a directed acyclic graph (DAG);

[0050] 4. Based on the tag object metadata, construct a tag object entity set model, which can be recorded as _tree;

[0051] 5. Explain the label definition under each label node in _dag and construct the where clause, which can be recorded as where_statements;

[0052] 6. Copy the _tree copy, prune the _tree copy according to the hit attributes to achieve the effect of optimizing the _tree copy, and then interpret the label object entities and their relationships in the copy to construct the from clause, which can be recorded as from_statements.

[0053] Therefore, the steps of labeling the set of instances in the label-marked object that meet the conditions represented by the label rules can be: generate_label_script, that is, generate a label operation statement based on _dag, where_statements and from_statements, recorded as statement; labelling, that is, execute statement, apply the label to the set of instances that meet the conditions under the label-marked object, and realize labeling of the label-marked object.

[0054] When labeling the target label of the label-labeled object according to the descriptive information corresponding to the label rule in the label metadata, it is necessary to construct the label set model. The operations of this step can be: verifying the legitimacy of the label-labeled object to which the label set belongs in the label set dictionary, determining the label set method when the label sets belong to the same label-labeled object, constructing an incompletely dependent label set model based on the label set dictionary, calibrating the dependency relationship of the labels in the incompletely dependent label set model, constructing a complete dependent label set model, verifying the legitimacy of the complete dependent label set model, determining that the complete dependent label set model is legal when the complete dependent label set model does not have self-dependence and circular dependency, parsing the complete dependent label set model, constructing a sorted label set according to the order of breadth traversal under the label dependency relationship, and constructing a label data architecture statement according to the sorted label set.

[0055] For example, constructing a tag set model based on a tag set dictionary may include the following steps:

[0056] 1. Verify the legitimacy of the label object to which the label set in _node_sets belongs, requiring that the label set belongs to the same label object;

[0057] 2. Construct incomplete dependent _dag based on _node_sets;

[0058] 3. Calibrate the dependency relationship of the labels in _dag and construct a complete dependency _dag;

[0059] 4. Check the legitimacy of _dag, which cannot be self-dependent or circularly dependent;

[0060] 5. Explain _dag and construct a sorted label set, recorded as _ordered_labels, in the order of breadth traversal under label dependency;

[0061] 6. Construct the tag data architecture statement, and obtain the data architecture statements as _schema_script_mssql and _schema_script_hive. Constructing the data architecture is to initialize the physical table of the tag definition data. The construction statement of the data architecture has been completed when constructing the tag set model _dag. You can directly call the statement to complete the construction of the data architecture in MS SQL and HIVE.

[0062] Among them, the label object entity set model is constructed based on the label metadata. The method of this step can be to extract the main entity of the label-marked object, construct it into the root node of the label object entity set model, and record it as node node, extract the complete set of entities of the label-marked object and the complete set of association relationships of the entities of the label-marked object, extract the relationship set whose parent entity is the node node in the complete set of association relationships, and complete the construction of the label object entity set model when the relationship set is empty. When the relationship set is not empty, the relationship set is grouped according to the identifiers of the parent entity and the child entity to obtain the relationship grouping, traverse the relationship grouping, take out the child entity in the relationship grouping, construct it into a child node, and add the child node to the child node set of the node node, record the child node as node node, and return to execute the step of extracting the complete set of entities of the label-marked object and the complete set of association relationships of the entities of the label-marked object, stop when the relationship set is empty, and complete the construction of the label object entity set model.

[0063] For example, Figure 4 As shown, constructing a tag object entity set model based on tag metadata may include the following steps:

[0064] 1. Extract the main entity of the label object, construct it into the root node of the tree, and record it as node;

[0065] 2. Extract the complete set of entities of the labeled objects and the complete set of entity associations of the labeled objects;

[0066] 3. Extract the relationship set child_mappings whose parent entity is node from the entire set of association relationships. When child_mappings is empty, complete the initialization;

[0067] 4. When child_mappings is not empty, group child_mappings by the id of the parent entity and the child entity to obtain the relationship grouping, recorded as mapping_groups;

[0068] 5. Traverse mapping_groups, extract the child entities in the relationship, build them into child nodes, and add them to the child node set of node;

[0069] 6. Let child be node and recursively execute the above process.

[0070] Therefore, this embodiment abstracts the two concepts of label-marked objects and labels. Users can define any label-marked object through the computer system, configure its entities and entity associations, and then define label rules for the label-marked object to label the object, thereby achieving the effect of custom labeling of any object. The collection of labels can also be classified into the entity of the label-marked object, so that labels can be generated through labels, making the reusability stronger. It can be realized by combining real-time computing of the computer system and offline data warehouse batch processing. Labels can be calculated on demand to improve real-time performance.

[0071] 204. Publishing the tag marking results in the tag data warehouse to the tag market, so that users can subscribe to the tag marking results through the tag market;

[0072] In this embodiment, the label marking results of the label marking object can be stored in the label data warehouse. One implementation method is that the label mart can provide the publication and subscription of the label marking results, the label marking results of the label marking object can be pre-stored in the data label layer DW-TDM, and the label marking results stored in the data label layer DW-TDM can be migrated to the label data warehouse Label DB. When it is necessary to publish the label marking results, the label marking results in the label data warehouse Label DB can be published to the label mart, so that users can subscribe to the label marking results through the label mart.

[0073] In addition, after the computer device calculates and obtains the label marking result, the label marking result can also be directly stored in the label data warehouse. This embodiment does not limit the way of storing the label marking result in the label data warehouse.

[0074] After a tag is published to the tag market, users can obtain access to the tag by subscribing. After using the tag, users can rate the tag application value and quality to clarify the value of the tag and promote the targeted promotion and maintenance of high-quality tags.

[0075] The method flow of this embodiment will be further described below in conjunction with the overall flow chart of the method of this embodiment. Figure 5As shown, the computer equipment uses the task scheduling tool Azkaban to schedule tasks. For example, Azkaban in DataWarehouse is responsible for scheduling configuration tag metadata synchronization tasks, regularly synchronizing Metastore from MS SQL to HIVE, and scheduling entity solidification plans to solidify DW-DIM layer data into label-marked object entities in DW-TDM. Among them, Azkaban is a batch workflow task scheduler launched by Linkedin, which is used to run a set of tasks and processes in a specific order within a workflow. Azkaban uses job files to establish dependencies between tasks and provides a web interface for users to manage and schedule workflows. In addition to using Azkaban as a task scheduling tool, other types of task scheduling tools such as Crontab and Oozie can also be used.

[0076] In addition, the built-in interpreter of the driver reads the metadata in HIVE, constructs a label interpreter, and runs the label marking operation in DW-TDM. At the same time, Azkaban is responsible for scheduling and configuring label synchronization tasks, and regularly synchronizes the label marking result data of DW-TDM to Label DB.

[0077] In this embodiment, the tag market serves as an application market for tags, and is mainly used by administrators to publish tags, manage tag users' subscriptions, and API retrieval. Tag publishing can open the specified tag set to tag users for search through the management interface. When users subscribe to tags, tag users can search for published tag marking results, and obtain the retrieval rights of tag marking results through subscription. The authorized tag marking result data can be obtained through a unified API. At the same time, the tag set of the same tag marking object can be opened to the outside world or to the enterprise through the API in any combination. Tag users only need to subscribe to the required tags to retrieve the tag data grouped by the tag marking object. After the user subscribes to the tag marking result, the system can evaluate the quality of the tag marking result, apply the tag points based on the number of tag searches, and make a quality score for the tag marking result based on the user's evaluation of data accuracy and availability.

[0078] Therefore, this embodiment uses the algorithm of interpreting labels through two data structures, DAG+Tree, to realize the customization and dependency reuse of label marking objects and labels, which has good scalability and can liberate the labor of data warehouse. It also uses the task scheduling tool Azkaban to schedule the InterpreterDriver to realize fully automatic offline and real-time interpretation of labels, and can generate label marking results with one click. At the same time, Interpreter supports multiple engines such as MS SQL and HIVE. Establishing a publish / subscribe mode for label marking results, realizing one-time publishing and multi-party subscription, and establishing a vertical and horizontal comparison mode for the quality of label marking results can reflect the value and optimization space of label marking work.

[0079] The label marking method in the embodiment of the present application is described above. The computer device in the embodiment of the present application is described below. Figure 6 In the embodiment of the present application, one embodiment of the computer device includes:

[0080] The receiving unit 601 is used to receive tag definition data input by a user on a front-end page, wherein the tag definition data includes a tag rule, and the tag rule is used to indicate a condition that an object is marked as a target tag.

[0081] A parsing unit 602, configured to parse the tag definition data and determine tag rules included in the tag definition data;

[0082] The marking unit 603 is used to mark the target label on the label marking object according to the label rule.

[0083] In one implementation of this embodiment, the parsing unit 602 is specifically used to solidify the label marking object from the data dimension layer DW-DIM of the data warehouse to the data label layer DW-TDM of the data warehouse according to the label definition data, and parse the label definition data to determine the label rule used to mark the target label for the label marking object.

[0084] In one implementation of this embodiment, the marking unit 603 is specifically used to call the label interpreter Interpreter to connect to the Metastore service to read the label metadata, and mark the target label for the label marking object in the data label layer DW-TDM according to the description information corresponding to the label rule in the label metadata; wherein the label metadata is the description information of the label definition data.

[0085] In one implementation of the present embodiment, the marking unit 603 is specifically used to construct a label set dictionary of the label-marked object in the label metadata, and construct a label set model based on the label set dictionary; construct a label object entity set model based on the label metadata; parse the label definition under each label node in the label set model, and construct a where clause, wherein the where clause is used to represent a rule for obtaining data related to the label-marked object; copy the label object entity set model to obtain a copy of the label object entity set model, and prune and optimize the copy of the label object entity set model; parse the entities and their relationships of each label-marked object in the copy of the label object entity set model, and construct a from clause, wherein the from clause is used to represent a path for obtaining data related to the label-marked object; obtain data related to the label-marked object according to the where clause and the from clause, and mark the target label for the label-marked object according to the data related to the label-marked object.

[0086] In one implementation of the present embodiment, the marking unit 603 is specifically used to verify the legitimacy of the label marking object to which the label set belongs in the label set dictionary; determine the label set method when the label sets belong to the same label marking object, and construct a non-complete dependent label set model based on the label set dictionary; calibrate the dependency relationship of the labels in the non-complete dependent label set model, and construct a complete dependent label set model; verify the legitimacy of the complete dependent label set model; when the complete dependent label set model does not have self-dependency and does not have circular dependency, determine that the complete dependent label set model is legal, parse the complete dependent label set model, and construct a sorted label set according to the order of breadth traversal under the label dependency relationship; and construct a label data architecture statement according to the sorted label set.

[0087] In one implementation of the present embodiment, the marking unit 603 is specifically used to extract the main entity of the label-marked object, construct it into the root node of the label object entity set model, and record it as node node; extract the complete set of entities of the label-marked object and the complete set of association relationships of the entities of the label-marked object; extract the relationship set whose parent entity is the node node in the complete set of association relationships, and when the relationship set is empty, complete the construction of the label object entity set model; when the relationship set is not empty, group the relationship set according to the identifiers of the parent entity and the child entity to obtain a relationship group; traverse the relationship group, take out the child entities in the relationship group, construct them into child nodes, and add the child nodes to the child node set of the node node; record the child node as node node, and return to execute the steps of extracting the complete set of entities of the label-marked object and the complete set of association relationships of the entities of the label-marked object, stop when the relationship set is empty, and complete the construction of the label object entity set model.

[0088] In one implementation of this embodiment, the label marking result of the label marking object is stored in a label data warehouse; the computer device further includes:

[0089] The publishing unit 604 is used to publish the tag marking result in the tag data warehouse to the tag market, so that the user can subscribe to the tag marking result through the tag market.

[0090] In this embodiment, the operations performed by each unit in the computer device are the same as those described above. Figure 1 to Figure 2 The description in the illustrated embodiment is similar and will not be repeated here.

[0091] In this embodiment, the computer device receives the tag definition data input by the user on the front-end page. The tag definition data includes tag rules. The tag rules are used to indicate the conditions satisfied by the object to be marked as the target tag. The tag definition data is parsed and the tagged object is tagged according to the tag rules. Therefore, the code of the tag marking scheme only needs to describe the steps for the computer device to perform tag marking, and does not need to encapsulate the tag rules. The tag rules can be arbitrarily changed or added by the user on the front-end page, which is more convenient and fast for the user, and the user experience is good. In addition, the change or addition of the tag rules will not lead to the change or addition of the code of the tag marking scheme. The code of the tag marking scheme can be reused continuously, its reusability is improved, and personnel do not need to frequently maintain and develop the code of the tag marking scheme, which can reduce the workload of maintenance and development.

[0092] The computer device in the embodiment of the present application is described below. Figure 7 In the embodiment of the present application, one embodiment of the computer device includes:

[0093] The computer device 700 may include one or more central processing units (CPU) 701 and a memory 705 , wherein the memory 705 stores one or more application programs or data.

[0094] The memory 705 may be a volatile storage or a persistent storage. The program stored in the memory 705 may include one or more modules, each of which may include a series of instruction operations in the computer device. Furthermore, the central processing unit 701 may be configured to communicate with the memory 705 and execute a series of instruction operations in the memory 705 on the computer device 700.

[0095] The computer device 700 may also include one or more power supplies 702, one or more wired or wireless network interfaces 703, one or more input and output interfaces 704, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0096] The CPU 701 can execute the aforementioned Figure 1 to Figure 2 The operations performed by the computer device in the illustrated embodiment will not be described in detail here.

[0097] The present application also provides a computer storage medium, wherein one embodiment includes: the computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the aforementioned Figure 1 to Figure 2 The operations performed by the computer device in the illustrated embodiment.

[0098] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0099] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0101] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A label marking method, characterized in that: The method comprises: Receiving tag definition data input by a user on a front-end page, the tag definition data including tag rules, the tag rules being used to indicate conditions that an object must satisfy to be marked as a target tag; Parsing the tag definition data to determine tag rules included in the tag definition data; The target tag is marked on the tag marking object according to the tag rule; the descriptive information of the tag definition data is determined by the tag metadata; The step of marking the target tag on the tag marking object according to the tag rule includes: Acquire a tag set model and a tag object entity set model based on the tag metadata; Parsing the label definition under each label node in the label set model to construct a where clause; Parsing the entities and relationships of each label-tagged object in the copy of the label object entity set model to construct a from clause; The target tag is marked on the tag-marked object according to the where clause and the from clause.

2. The method according to claim 1, characterized in that The parsing of the tag definition data includes: Solidify the label object from the data dimension layer DW-DIM of the data warehouse to the data label layer DW-TDM of the data warehouse according to the label definition data; The tag definition data is parsed to determine a tagging rule for tagging the tag-tagged object with the target tag.

3. The method according to claim 2, characterized in that The step of marking the target tag on the tag marking object according to the tag rule includes: Call the label interpreter Interpreter to connect to the Metastore service to read the label metadata, and mark the target label for the label marking object in the data label layer DW-TDM according to the description information corresponding to the label rule in the label metadata; wherein the label metadata is the description information of the label definition data.

4. The method according to claim 3, characterized in that The step of marking the target tag on the tag-marking object according to the description information corresponding to the tag rule in the tag metadata includes: Constructing a tag set dictionary of the tag-marked object in the tag metadata, and constructing a tag set model based on the tag set dictionary; Constructing a label object entity set model based on the label metadata; Parsing the label definition under each label node in the label set model, and constructing a where clause, wherein the where clause is used to represent a rule for obtaining data related to the label-tagged object; Copying the label object entity set model to obtain a copy of the label object entity set model, and pruning and optimizing the copy of the label object entity set model; Parsing the entities and relationships of each label-marked object in the copy of the label-marked object entity set model, and constructing a from clause, wherein the from clause is used to represent a path for obtaining data related to the label-marked object; The data related to the label-marked object is acquired according to the where clause and the from clause, and the target label is marked on the label-marked object according to the data related to the label-marked object.

5. The method according to claim 4, characterized in that The constructing a tag set model based on the tag set dictionary includes: Verify the legitimacy of the label marked objects belonging to the label set in the label set dictionary; When the tag sets belong to the same tag-labeled object, determining the tag set method, and constructing a non-completely dependent tag set model based on the tag set dictionary; Calibrate the dependency relationship of the labels in the incomplete dependent label set model to construct a complete dependent label set model; Verify the legitimacy of the complete dependent label set model; When the complete dependent label set model does not have self-dependence and circular dependency, determine that the complete dependent label set model is legal, parse the complete dependent label set model, and construct a sorted label set according to the order of breadth traversal under the label dependency relationship; A label data schema statement is constructed based on the sorted label set.

6. The method according to claim 4, characterized in that The step of constructing a label object entity set model based on the label metadata includes: Extract the main entity of the label object, construct it into the root node of the label object entity set model, and record it as node; Extract the complete set of entities of the label-marked objects and the complete set of association relationships between the entities of the label-marked objects; Extract the relationship set whose parent entity is the node in the entire set of association relationships, and when the relationship set is empty, complete the construction of the label object entity set model; When the relationship set is not empty, grouping the relationship set according to the identifiers of the parent entity and the child entity to obtain a relationship group; Traverse the relationship group, take out the child entities in the relationship group, construct them into child nodes, and add the child nodes to the child node set of the node node; The child node is recorded as node node, and the step of extracting the complete set of entities of the label-marked object and the complete set of associated relationships of the entities of the label-marked object is returned to execute until the relationship set is empty, thereby completing the construction of the label object entity set model.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The label marking result of the label marking object is stored in the label data warehouse; The tag marking results in the tag data warehouse are published to the tag market, so that users can subscribe to the tag marking results through the tag market.

8. A computer device, characterized in that: The computer device comprises: A receiving unit, configured to receive tag definition data input by a user on a front-end page, wherein the tag definition data includes a tag rule, and the tag rule is used to indicate a condition that an object is marked as a target tag; A parsing unit, configured to parse the tag definition data and determine tag rules included in the tag definition data; A marking unit, configured to mark the target tag on the tag marking object according to the tag rule; the description information of the tag definition data is determined by the tag metadata; The marking unit is specifically used for: Acquire a tag set model and a tag object entity set model based on the tag metadata; Parsing the label definition under each label node in the label set model to construct a where clause; Parsing the entities and relationships of each label-tagged object in the copy of the label object entity set model to construct a from clause; The target tag is marked on the tag-marked object according to the where clause and the from clause.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer storage medium, characterized in that: The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Label production method, management method, device and system

    CN112785368A