Methods, apparatus and electronic devices for generating tag sets

By annotating and quality-evaluating business data in specific domains, the label set is updated, solving the problem of low label set quality and generating a high-quality target label set that supports accurate description and classification of objects.

CN117668625BActive Publication Date: 2026-11-17BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211008886.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2026-11-17
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

In existing technologies, the quality of the tag sets obtained by tag mining is low, which affects the accurate description or classification of objects.

Method used

By acquiring multiple business data in a specific field, the data is labeled based on the label definition statements of a preset label set. The label quality is determined and the label set is updated according to the labeling results, generating a high-quality target label set.

Benefits of technology

It generates a high-quality set of tags, laying the foundation for accurate descriptions or classifications of objects in a specific domain, and improving the quality and accuracy of the tag set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117668625B_ABST
    Figure CN117668625B_ABST
Patent Text Reader

Abstract

This application proposes a method, apparatus, and electronic device for generating a tag set, relating to the field of computer technology. The method includes: acquiring multiple first business data within a specific domain, and tag definition statements corresponding to each tag in a preset tag set, wherein the tag definition statements represent the definition of the corresponding tag; for each first business data, labeling the first business data based on the tag definition statements corresponding to each tag in the preset tag set to obtain a labeling result for the first business data; determining the quality of each tag in the preset tag set based on the labeling results of multiple first business data, and updating the preset tag set based on the quality of each tag in the preset tag set to obtain a first target tag set within the specific domain. Thus, a high-quality tag set within a specific domain can be generated, laying the foundation for accurate description or classification of objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus and electronic device for generating a tag set. Background Technology

[0002] In many business areas, it is necessary to use tags to describe or classify objects such as products, users, and text. For example, in the mobile phone category, tags such as "good resolution," "high pixel count," and "large memory" are commonly used to describe or classify mobile phones; in the pharmaceutical field, tags such as "good efficacy," "poor efficacy," "high price," and "strong dependence" are commonly used to describe or classify drugs.

[0003] In different business domains, the first step is to know which tags exist in order to determine the corresponding tags for an object, thereby achieving an accurate description or classification of the object. To know which tags exist within a specific business domain, it is necessary to mine the tag set within that domain. The quality of the tag set greatly influences the accuracy of describing or classifying objects.

[0004] Related technologies typically rely on business experts to summarize and analyze large amounts of business data in a specific field to mine a set of tags within that field. This approach is limited by the experience and manpower of business experts, which may result in some low-quality tags in the mined tag set, leading to a lower quality of the mined tag set. Summary of the Invention

[0005] This application aims to at least partially address one of the technical problems in the related art.

[0006] This application proposes a method, apparatus, and electronic device for generating a tag set, in order to solve the technical problem of low quality of tag sets obtained by tag mining in related technologies.

[0007] The first aspect of this application proposes a method for generating a tag set, comprising: acquiring multiple first business data in a specific domain, and tag definition statements corresponding to each tag in a preset tag set, wherein the tag definition statements are used to represent the definition of the corresponding tag; for each first business data, labeling the first business data based on the tag definition statements corresponding to each tag in the preset tag set to obtain a labeling result of the first business data; determining the quality of each tag in the preset tag set according to the labeling results of the multiple first business data, and updating the preset tag set according to the quality of each tag in the preset tag set to obtain a first target tag set in the specific domain.

[0008] A second aspect of this application provides a tag set generation apparatus, comprising: a first acquisition module, configured to acquire multiple first business data within a specific domain, and tag definition statements corresponding to each tag in a preset tag set, wherein the tag definition statements represent the definition of the corresponding tag; a first annotation module, configured to annotate each first business data based on the tag definition statements corresponding to each tag in the preset tag set, to obtain an annotation result for the first business data; and a first update module, configured to determine the quality of each tag in the preset tag set based on the annotation results of the multiple first business data, and update the preset tag set based on the quality of each tag in the preset tag set, to obtain a first target tag set within the specific domain.

[0009] A third aspect of this application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a tag set generation method as proposed in a first aspect of this application.

[0010] A fourth aspect of this application provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform a tag set generation method as proposed in a first aspect of this application.

[0011] A fifth aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements a method for generating a tag set as proposed in a first aspect of this application.

[0012] One embodiment of the above invention has the following advantages or beneficial effects:

[0013] By acquiring multiple primary business data within a specific domain, and labeling each primary business data based on the label definition statements corresponding to each label in a preset label set, the quality of each label in the preset label set is determined based on the labeling results of multiple primary business data. Then, the preset label set is updated based on the quality of each label to obtain the primary target label set within the specific domain. This can generate a high-quality label set within the specific domain, laying the foundation for accurately describing or classifying objects.

[0014] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0015] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0016] Figure 1 This is a flowchart illustrating the method for generating a tag set provided in Embodiment 1 of this application;

[0017] Figure 2 This is a flowchart illustrating the tag set generation method provided in Embodiment 2 of this application;

[0018] Figure 3 This is a flowchart illustrating the tag set generation method provided in Embodiment 3 of this application;

[0019] Figure 4 This is a schematic diagram of the structure of the tag set generation device provided in Embodiment 4 of this application;

[0020] Figure 5 This is a schematic diagram of the structure of the tag set generation device provided in Embodiment 5 of this application;

[0021] Figure 6 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present application is shown. Detailed Implementation

[0022] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0023] It should be noted that the acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0024] This application addresses the technical problem of low quality in tag sets obtained from mining in related technologies by proposing a method, apparatus, electronic device, storage medium, and computer program product for generating tag sets. The method includes: acquiring multiple first business data within a specific domain, and tag definition statements corresponding to each tag in a preset tag set, whereby the tag definition statements represent the definition of the corresponding tag; for each first business data, labeling the first business data based on the tag definition statements corresponding to each tag in the preset tag set to obtain a labeling result for the first business data; determining the quality of each tag in the preset tag set based on the labeling results of the multiple first business data, and updating the preset tag set based on the quality of each tag in the preset tag set to obtain a first target tag set within the specific domain. This allows for the generation of a high-quality tag set within a specific domain, laying the foundation for accurate description or classification of objects.

[0025] The following description, with reference to the accompanying drawings, describes a method, apparatus, electronic device, storage medium, and computer program product for generating a tag set according to embodiments of this application.

[0026] The method for generating a tag set provided in this application embodiment will be described below. It should be noted that the tag set generation method provided in this application embodiment is executed by a tag set generation device, which will be referred to as the generation device below. This generation device can be an electronic device or can be configured within an electronic device to generate a high-quality tag set within a specific field.

[0027] Among them, the electronic device can be a personal computer (PC), cloud device, mobile device, server, etc. The mobile device can be any hardware device such as mobile phone, tablet computer, personal digital assistant, wearable device, vehicle device, etc. This application does not limit it.

[0028] Figure 1 This is a flowchart illustrating the tag set generation method provided in Embodiment 1 of this application. Figure 1 As shown, the method for generating this tag set may include the following steps 101-103.

[0029] Step 101: Obtain multiple first business data in a specific domain, as well as the tag definition statements corresponding to each tag in the preset tag set. The tag definition statements are used to represent the definition of the corresponding tag.

[0030] The specific field can be any business field such as mobile phone category, computer category, pharmaceutical field, news field, academic field, e-commerce field, etc., and this application does not impose any restrictions on it.

[0031] Business data refers to data related to business operations, which can be content data, metric data, etc., and this application does not impose any restrictions on this. Content data is data in text format, such as an article or a short message. Metric data is data in metric format. For ease of distinction in this embodiment, business data within a specific domain is referred to as first business data.

[0032] For example, if the primary business data is content data in the news field, a primary business data item can include a news article; if the primary business data is content data in the medical field, a primary business data item can include a user's portable medical service information, online diagnosis and treatment information, etc.; if the primary business data is indicator data in the e-commerce field, a primary business data item can include a table containing data corresponding to various indicators such as store opening hours, product data, and sales volume.

[0033] A preset tag set includes multiple tags. Each tag can be user-defined or a set of tags for a specific domain that are pre-maintained. This application does not impose any restrictions on this.

[0034] A tag definition statement is used to represent the definition of a corresponding tag. It can be pre-written and stored using a preset writing method, and this tag definition statement can be understood by electronic devices. For example, for the tag "young girl", the corresponding tag definition statement can represent the definition of "young girl", that is, what conditions must be met to be labeled as "young girl".

[0035] Step 102: For each piece of first business data, the first business data is labeled based on the label definition statements corresponding to each label in the preset label set to obtain the labeling results of the first business data.

[0036] In the example embodiment, for each first business data, the label definition statement corresponding to each label in the preset label set can be used to determine whether the first business data meets the definition of the corresponding label. If the first business data meets the definition of the corresponding label, the label is used to annotate the first business data. If the first business data does not meet the definition of the corresponding label, the label is not used to annotate the first business data, thereby obtaining the annotation result of the first business data.

[0037] Correspondingly, each piece of primary business data can be labeled with 0, 1, or more tags.

[0038] For example, assuming a preset tag set includes 100 tags, taking tag 1 and tag 2 as examples, for each piece of first business data, we can determine whether the first business data meets the definition of tag 1 based on the tag definition statement corresponding to tag 1, and determine whether the first business data meets the definition of tag 2 based on the tag definition statement corresponding to tag 2. If the first business data meets the definition of tag 1 but does not meet the definition of tag 2, then tag 1 can be used to annotate the first business data.

[0039] Step 103: Based on the annotation results of multiple first business data, determine the quality of each tag in the preset tag set, and update the preset tag set according to the quality of each tag in the preset tag set to obtain the first target tag set in a specific domain.

[0040] The quality of a tag indicates its value; a high-quality tag has high value, while a low-quality tag has low value.

[0041] In the example embodiment, for each tag in the preset tag set, the coverage, independence, and correlation with other tags of the tag in all the first business data can be statistically analyzed based on the annotation results of multiple first business data. Then, based on the coverage, independence, and correlation with other tags of the tag in all the first business data, the quality of the tag can be determined. In this way, tags with lower quality in the preset tag set can be deleted or the definition of tags with lower quality can be modified to update the preset tag set and obtain a high-quality first target tag set in a specific domain.

[0042] For example, suppose the total number of first business data is 1000, and 10 of these first business data are labeled as tag 1. Then, the coverage of tag 1 can be determined to be 10 / 1000. Since the coverage of tag 1 is low, it can be determined that the quality of tag 1 is low. Therefore, tag 1 can be deleted from the preset tag set to update the preset tag set.

[0043] It should be noted that the process of updating the preset tag set based on the quality of each tag in the preset tag set can be executed automatically by the generating device. For example, the generating device can automatically delete tags of lower quality based on the quality of each tag in the preset tag set. Alternatively, it can be executed by the generating device based on user instructions. For example, the generating device can display the quality of each tag in the preset tag set, and the user can select which tags need to be deleted or have their definitions modified based on the quality of each tag, triggering an update instruction. Thus, the generating device can update the preset tag set based on the update instruction triggered by the user to obtain a first target tag set within a specific domain. This application does not impose any limitations on this.

[0044] In the example embodiment, after obtaining a first set of target tags within a specific domain, a single-level or multi-level tag system for that domain can be constructed based on the names and definitions of each tag in the first set of target tags. In a single-level tag system, there are no parent-child relationships between tags; in a multi-level tag system, there are parent-child relationships between tags. This tag system categorizes various tags needed by the enterprise and defines tag attributes, thereby facilitating the management, maintenance, application, and evaluation of tags.

[0045] Taking a two-layer tag system as an example, when constructing a two-layer tag system for a specific domain based on a first target tag set in a specific domain, the names of the parent tags of multiple tags in the first target tag set can be obtained, and the definitions of these multiple tags can be merged to obtain the definition of the parent tag. Then, based on the names and definitions of each tag in the first target tag set and the names and definitions of each parent tag, a two-layer tag system can be constructed.

[0046] It should be noted that, in this embodiment of the application, after obtaining the first target tag set in a specific field, the first target tag set can be used as a preset tag set, and steps 101-103 can be repeated to further update the first target tag set. Therefore, by repeatedly iterating through steps 101-103, the first target tag set can be iteratively updated, making the first target tag set in the specific field more complete and further improving its quality.

[0047] In summary, the tag set generation method provided in this application obtains multiple first business data in a specific domain, annotates each first business data based on the tag definition statements corresponding to each tag in the preset tag set, determines the quality of each tag in the preset tag set based on the annotation results of multiple first business data, and then updates the preset tag set according to the quality of each tag to obtain a first target tag set in the specific domain. This method can generate a high-quality tag set in the specific domain, laying the foundation for accurately describing or classifying objects.

[0048] To clearly illustrate how, in this embodiment of the application, each piece of first business data is annotated based on the tag definition statements corresponding to each tag in the preset tag set to obtain the annotation result of the first business data, the following will be combined with... Figure 2 The method for generating the tag set in the embodiments of this application will be further explained.

[0049] Figure 2 This is a flowchart illustrating the tag set generation method provided in Embodiment 2 of this application. Figure 2As shown, the method for generating a tag set may include the following steps 201-204.

[0050] Step 201: Obtain multiple first business data in a specific domain, as well as the tag definition statements corresponding to each tag in the preset tag set. The tag definition statements are used to represent the definition of the corresponding tag.

[0051] The specific implementation process and principle of step 201 can be referred to the description of the above embodiments, and will not be repeated here.

[0052] Step 202: For each piece of first business data, for each tag in the preset tag set, execute the tag definition statement corresponding to the tag in the preset tag set to determine whether the first business data meets the tag definition.

[0053] The tag definition statement can be a semi-regular statement, defining tags based on semi-regular expressions. Specifically, the tag definition statement can combine regular expressions and query statements such as SQL (Structured Query Language) database query statements, using keywords, regular expressions, and preset logical operators to define tags.

[0054] The tag definition statement uses clauses and integrates common logical predicates such as "and," "or," and "not," as well as parentheses, to form more complex statements. Because of the use of logical predicates such as "and," "or," and "not," as well as parentheses, each clause only needs to be a simple regular expression. In this embodiment, logical predicates such as "and," "or," and "not," as well as symbols such as parentheses, are referred to as preset logical operators. The tag definition statement may include one or more clauses.

[0055] Taking the first business data as the content data as an example, the clause structure can be in the following form:

[0056] #XXXXXX'Regular Expression M'

[0057] In this clause, "#" represents a business data macro definition, signifying a piece of business data, while "XXXXXX" represents an omitted element in the statement, indicating an operator used to determine whether the business data matches the regular expression M, such as the `rlike` operator in SQL. The meaning of this clause is: business data that satisfies the regular expression M.

[0058] For a given set of first business data, by executing the tag definition statement corresponding to a certain tag, it can be determined whether the tag definition statement matches the first business data. In this way, it can be determined whether the first business data matches the definition corresponding to the tag definition statement, that is, whether the first business data satisfies the definition of the tag.

[0059] When the tag definition statement meets the expression of SparkSQL's query conditions, the SparkSQL SQL engine can be invoked to execute the tag definition statement, eliminating the need to study the execution logic of the tag definition statement itself. Specifically, the execution process of the tag definition statement calls the SparkSQL SQL engine, which in turn calls the open-source Spark library to determine whether the tag definition statement is true. If true, it returns true; otherwise, it returns false. A return of true indicates that the tag definition statement matches the first business data, meaning that the first business data satisfies the definition of the corresponding tag.

[0060] In the example embodiment, when the label definition statement includes a clause, step 202 can be implemented in the following way:

[0061] For each piece of first business data, for each tag in the preset tag set, if the tag definition statement corresponding to the tag includes a clause, the first business data is used to replace the business data macro definition included in the clause of the tag definition statement corresponding to the tag, and the replaced tag definition statement is executed to determine whether the first business data satisfies the regular expression in the clause; if the first business data satisfies the regular expression in the clause, it is determined that the first business data satisfies the tag definition; if the first business data does not satisfy the regular expression in the clause, it is determined that the first business data does not satisfy the tag definition.

[0062] In the example embodiment, when the label definition statement includes multiple clauses, the clauses can be connected by preset logical operators. Accordingly, step 202 can be implemented in the following way:

[0063] For each piece of first business data, for each tag in the preset tag set, if the tag definition statement corresponding to the tag includes multiple clauses, the first business data is used to replace the business data macro definitions included in each clause of the tag definition statement corresponding to the tag, and the replaced tag definition statement is executed to determine whether the first business data satisfies the regular expressions in each clause and whether it satisfies the logic of the preset logical operator connecting each clause; if the first business data satisfies the regular expressions and logic in each clause, it is determined that the first business data satisfies the tag definition; if the first business data does not satisfy the regular expressions and / or does not satisfy the logic in the clause, it is determined that the first business data does not satisfy the tag definition.

[0064] The preset logical operators can include logical predicates such as "and", "or", and "not", as well as parentheses.

[0065] For example, a label definition statement can take the form: Clause 1 and Clause 2 and Clause 3. This label definition statement means that all data in Clauses 1, 2, and 3 must be satisfied simultaneously. When a first piece of business data satisfies the meaning of this label definition statement, it is considered that the first piece of business data satisfies the logic of the preset logical operators connecting the clauses.

[0066] Alternatively, the label definition statement can be in the following form: (clause 1 or clause 2) and clause 3. This label definition statement means: all data that satisfies clause 3 and at least one of clauses 1 and 2. When a first piece of business data satisfies the meaning of this label definition statement, it is considered that the first piece of business data satisfies the logic of the preset logical operators connecting the clauses.

[0067] In a tag definition statement that includes one or more clauses, the regular expression within the clause can be any regular expression. In one possible implementation, the regular expression in the clause can include multiple keywords, separated by a preset delimiter, such as "a|b|c|d", where "a", "b", "c", and "d" represent keywords, and "|" is the preset delimiter. This regular expression means that if a certain business data contains any one of a, b, c, or d, then the business data is considered to satisfy this regular expression.

[0068] Tag definition statements, including those in the form of regular expressions like #XXXXXX'a|b|c|d', are typically used to retrieve whether business data contains a keyword and / or its synonyms. Using this type of regular expression to represent tag definitions ensures the robustness of the tag definition. Furthermore, this type of regular expression only requires combining these logical operators using predefined logical operators such as and, or, not, and parentheses. By using predefined logical operators like and, or, not, and parentheses, the complexity of regular expressions can be greatly reduced, allowing for the definition of very complex semantic logic with a single tag definition statement.

[0069] Correspondingly, when the regular expression included in the clause of the tag definition statement is in the above form, the replaced tag definition statement is executed. If it is determined that the first business data contains at least one target keyword among multiple keywords separated by a preset delimiter, then the first business data satisfies the regular expression. If it is determined that the first business data does not contain any keyword among multiple keywords separated by a preset delimiter, then the first business data does not satisfy the regular expression.

[0070] It should be noted that when a tag definition statement includes multiple clauses, each clause may include a business data macro definition, or it may include only one business data macro definition. This application does not impose any restrictions on this.

[0071] For example, suppose tag 1 is "the pendant is too big". The tag definition statement for tag 1 includes two clauses, namely:

[0072] #XXXXXX'Pendant|Pendant'and XXXXXX'Too big|A bit too big|A little too big'

[0073] The meaning of this tag definition statement is business data containing at least one of the keywords "pendant" or "pendant" and at least one of the keywords "too big", "a bit big", or "a little too big".

[0074] For a given first business data point, "This pendant is too big," we can use this first business data point to replace the business data macro definition "#" in the clause of the tag definition statement corresponding to tag 1, and then execute the replaced tag definition statement to determine whether the first business data point satisfies the regular expressions in each clause and whether it satisfies the logic of the preset logical operators connecting the clauses. That is, whether the first business data point "This pendant is too big" satisfies the regular expression 'pendant|pendant' in the clause, and also satisfies the regular expression 'too big|a bit big|a little too big' in the clause. Since "This pendant is too big" includes the keyword "pendant" and also includes "too big," we can determine that the first business data satisfies the regular expressions in each clause and the logic of the preset logical operators connecting the clauses, and therefore we can determine that the first business data satisfies the definition of tag 1.

[0075] It is understandable that some identical segments may appear in the tag definition statements corresponding to different tags. In the example embodiments, some frequently occurring segments (i.e., the preset strings in the embodiments of this application) can be defined as macro definitions. The macro definitions can be directly used in the tag definition statements to reference the preset strings. That is, the clauses in the tag definition statements can also include the second macro definition of the preset strings. Alternatively, tags can also be defined as macro definitions. The tags can be referenced in the tag definition statements through the macro definitions of the tags. That is, the clauses in the tag definition statements can also include the first macro definition of the preset tags.

[0076] When a clause includes a first macro definition of a preset tag and / or a second macro definition of a preset string, the first macro definition and / or the second macro definition need to be replaced with the content defined by the macro definition when executing the tag definition statement. Accordingly, before step 202, the process may also include: replacing the first macro definition with the tag definition statement of the preset tag corresponding to the first macro definition, and / or replacing the second macro definition with the preset string corresponding to the second macro definition, to obtain the formatting definition statement corresponding to the tag;

[0077] Accordingly, step 202 may include:

[0078] For each piece of first business data, for each tag in the preset tag set, execute the formatting definition statement corresponding to the tag to determine whether the first business data meets the tag definition.

[0079] The first macro definition of the preset tag can be in the following form: "&tag name&".

[0080] For example, taking the second macro definition of a preset string as an example, suppose the tag definition statement corresponding to the tag "poor resolution" is:

[0081] #XXXXXX'resolution'and#XXXXXX'poor|not good|not very good|not great|bad|not very good|not very good|poor|average|garbage'

[0082] The tag definition statement corresponding to the tag "poor heat dissipation" is:

[0083] #XXXXXX'heat dissipation'and#XXXXXX'poor|not good|not very good|not great|not very good|not very good|bad|average|garbage'

[0084] Both of these tags contain a fragment like "#XXXXXX'poor|not good|not very good|not great|bad|not very good|not very good|poor|average|garbage'" in their tag definition statements. This fragment can be used as a preset string and defined as the macro definition "poor". The macro definition is used as "#macro definition name#".

[0085] The macro definition for "bad" can be defined as the following preset string: #XXXXXX'poor|unacceptable|not so good|not great|bad|not very good|poor|average|garbage'. Correspondingly, the tag definition statement for "poor resolution" can be: #XXXXXX'resolution'and#bad#, and the tag definition statement for "poor heat dissipation" can be: #XXXXXX'heat dissipation'and#bad#. Here, #bad# is the second macro definition of the preset string.

[0086] Alternatively, the content defined by the macro definition of "bad," i.e., the preset string, can be as follows: "poor|not good|not very good|not great|bad|not very good|poor|average|garbage." Correspondingly, the tag definition statement for the tag "poor resolution" can be: "#XXXXXX'resolution'and#XXXXXX'#poor#'", and the tag definition statement for the tag "poor heat dissipation" can be: "#XXXXXX'heat dissipation'and#XXXXXX'#poor#'". Here, #poor# is the second macro definition of the preset string.

[0087] In this embodiment of the application, taking the label "poor resolution" as an example, for a certain first business data, before executing the label definition statement corresponding to the label, "#poor#" in the corresponding label definition statement can be replaced with the content defined by the macro definition of "poor" to obtain the format definition statement corresponding to the label "poor resolution". Then, the format definition statement corresponding to the label is executed to determine whether the first business data meets the definition of the label "poor resolution".

[0088] Using macros in tag definition statements greatly simplifies the complexity of these statements and allows for the reuse of pre-compiled semantic rules, significantly reducing the cost of writing tag definition statements. Furthermore, if a new synonym for "bad" is discovered later, only the content defined by the macro needs to be modified to change the tag definition statements for all tags using that macro, eliminating the need to modify each tag's definition individually. This enables cost-effective and efficient modification of tag definition statements.

[0089] In addition, in this embodiment, a preset annotation model that meets the interface standard of the generation device can be registered and published as a UDF (User-Defined Function), and these UDFs can be called in the tag definition statement to realize the calling of the preset annotation model. Accordingly, step 202 can be implemented in the following way:

[0090] For each piece of first business data, for each tag in the preset tag set, if the tag definition statement corresponding to the tag includes the call statement corresponding to the preset annotation model, the call statement is executed to call the corresponding preset annotation model, and the preset annotation model is used to determine whether the first business data meets the tag definition.

[0091] Among them, the preset annotation model is a pre-set model used to annotate business data.

[0092] The calling statement can take the following form: UDF method name (parameter) = a value.

[0093] For example, suppose a classification model is registered as a UDF: gender_classify, used to determine the gender of a piece of text. This classification model is a binary classification model. If the classification model returns 1 to indicate that the text corresponds to male and 0 to indicate that the text corresponds to female, then the label definition statement corresponding to the label "male" can include the following call statement: gender_classify('#') = 1.

[0094] By executing the call statement, the generation device can invoke the corresponding classification model and use the classification model to determine whether the first business data meets the definition of the label "male". If the classification model returns 1, it can be determined that the first business data meets the definition of the label "male". If the classification model returns 0, it can be determined that the first business data does not meet the definition of the label "male".

[0095] By supporting preset annotation models, some preset annotation models can be applied to the tag definition statements corresponding to the tags, making the tag definition statements more expressive and more accurate.

[0096] In addition, taking the first business data as the indicator data as an example, the clauses in the label definition statement corresponding to the label can also be in one of the following forms: indicator value <= indicator, indicator <= indicator value, indicator = indicator value.

[0097] For example, the tag definition statement for the tag "young girl" can be in the following form:

[0098] 15 <= age and age <= 20 and gender = 'female'.

[0099] By executing the label definition statement, it can be determined whether the first business data meets the definition corresponding to "young girl".

[0100] It should be noted that the description of the tag definition statement of the form #XXXXXX'regular expression M' in the above embodiments also applies to the tag definition statement of this form, and will not be repeated here.

[0101] Step 203: If the first business data meets the label definition, label the first business data using the label.

[0102] In the embodiments of this application, for each first service data, if the first service data meets the definition of a certain label, the first service data can be labeled using that label.

[0103] Therefore, the label definition statements corresponding to each label in the embodiments of this application can also be used to label business data.

[0104] Step 204: Based on the annotation results of multiple first business data, determine the quality of each tag in the preset tag set, and update the preset tag set according to the quality of each tag in the preset tag set to obtain the first target tag set in a specific domain.

[0105] The specific implementation process and principle of steps 204-204 can be referred to the description of the above embodiments, and will not be repeated here.

[0106] In summary, the tag set generation method provided in this application provides that, by acquiring multiple first business data within a specific domain, annotating each first business data based on the tag definition statements corresponding to each tag in a preset tag set, determining the quality of each tag in the preset tag set based on the annotation results of multiple first business data, and then updating the preset tag set according to the quality of each tag, a first target tag set within the specific domain is obtained. This method can generate a high-quality tag set within a specific domain, laying the foundation for accurate description or classification of objects. Furthermore, the tag definition statements corresponding to the tags in this application embodiment can accurately and formulaically describe the tag definition, avoiding ambiguity in the understanding of the tags, and possessing strong expressive power. They are not only understandable by electronic devices but also simple and easy to understand by humans, making them highly applicable.

[0107] The following is combined Figure 3 The method for generating a tag set provided in the embodiments of this application will be further explained.

[0108] Figure 3 This is a flowchart illustrating the tag set generation method provided in Embodiment 3 of this application. Figure 3 As shown, the method for generating a tag set may include the following steps 301-307.

[0109] Step 301: Obtain multiple first business data in a specific domain, as well as the tag definition statements corresponding to each tag in the preset tag set. The tag definition statements are used to represent the definition of the corresponding tag.

[0110] Step 302: For each piece of first business data, the first business data is labeled based on the label definition statements corresponding to each label in the preset label set to obtain the labeling results of the first business data.

[0111] The specific implementation process and principle of steps 301-302 can be referred to the description of the above embodiments, and will not be repeated here.

[0112] Step 303: Based on the annotation results of multiple first business data, determine the quality value of each label in the preset label set under at least one preset quality indicator.

[0113] The preset quality indicators can be set as needed. For example, they can include a coverage indicator to show how well a tag is covered in all the first business data, an independence indicator to show how independently a tag is presented in all the first business data, and a correlation indicator to show how well a tag is related to other tags. Accordingly, the quality value of a tag under the coverage indicator is the tag's coverage; the quality value of a tag under the independence indicator is the tag's independence; and the quality value of a tag under the correlation indicator is the tag's correlation.

[0114] The coverage of a certain label A can be determined based on the number of first business data points labeled with label A in all first business data. The more first business data points labeled with label A in all first business data, the higher the coverage and quality of label A, and thus the higher the value of label A.

[0115] The degree of independence of a label A can be determined by the following formula (1):

[0116] DEP(A)=O(A) / V(A) (1)

[0117] Where DEP(A) represents the independence of label A, O(A) represents the number of first business data labeled as label A but not labeled as any other label, and V(A) represents the number of all first business data labeled as label A.

[0118] The correlation between a label A and a label B can be determined using the following formula (2):

[0119] R(A,B)=V(A,B) / (V(A)+V(B)-V(A,B)) (2)

[0120] Where R(A,B) represents the correlation between label A and label B, V(A) represents the number of all first business data labeled as label A, V(B) represents the number of all first business data labeled as label B, and V(A,B) represents the number of all first business data simultaneously labeled as label A and label B. Formula (2) shows that when the same business data is simultaneously labeled as label A and label B, it indicates a certain correlation between label A and label B. The higher the proportion of business data simultaneously labeled as label A and label B, the closer the correlation between label A and label B.

[0121] Following the method shown in formula (2) above, the correlation between the two labels shown in Table 1 below can be obtained.

[0122]

[0123] Step 304: Based on the quality value of each label under at least one preset indicator, filter each label in the preset label set, and obtain the first target label set based on the filtered labels.

[0124] In the example embodiment, for the coverage and independence metrics, their respective thresholds can be preset. This allows the deletion of tags from the preset tag set whose coverage and independence are lower than the corresponding thresholds, resulting in a filtered first target keyword set. The threshold values ​​can be arbitrarily set as needed, and this application does not impose any restrictions on them.

[0125] For the relevance index, since the definitions of highly relevant tags are relatively similar, the corresponding index threshold can be preset. This allows one of the two tags in the preset tag set whose relevance is higher than the corresponding index threshold to be deleted, thus obtaining the first target keyword set after filtering.

[0126] For example, assuming the threshold for the correlation index is 0.8, then for the labels "poor flexibility" and "poor softness" in the table above, we can keep only the label "poor flexibility" and delete the label "poor softness".

[0127] Understandably, in some cases, it may be necessary to combine existing tag definitions to create new tags. For example, sometimes it is necessary to merge some synonymous tags into one tag, and sometimes it is necessary to create a parent tag for some tags. In the embodiments of this application, at least two tags can also be merged according to a preset fusion method to obtain a merged tag, or the tag definition statements corresponding to at least two tags can be merged according to a preset fusion method to obtain the merged tag definition statement corresponding to the merged tag.

[0128] In an example embodiment, the user can specify at least two tags to be merged from a preset tag set. The generating device can then determine these two tags based on user instructions, perform fusion processing on them according to a preset fusion method to obtain merged tags, and further perform fusion processing on the tag definition statements corresponding to the at least two tags according to the preset fusion method to obtain merged tag definition statements. The generating device can then add the merged tags with corresponding merged tag definition statements to the preset tag set to update the preset tag set. The updated preset tag set is then used as the preset tag set in steps 302-304 to obtain a first target tag set within a specific domain.

[0129] Accordingly, prior to step 302, the following may also be included:

[0130] According to a preset fusion method, at least two tags to be merged in a preset tag set are merged to obtain a merged tag. The at least two tags to be merged are determined based on user instructions. Also according to the preset fusion method, the tag definition statements corresponding to the at least two tags are merged to obtain the merged tag definition statement corresponding to the merged tag. The preset fusion method can also be determined based on user instructions.

[0131] The preset fusion methods can include intersection fusion, union fusion, and custom fusion.

[0132] Intersection fusion refers to merging at least two tags to be merged to obtain a merged tag that simultaneously satisfies the definitions of at least two tags before fusion. For example, merging tags 1, 2, and 3 using intersection fusion results in a merged tag defined as (the definition of tag 1) and (the definition of tag 2) and (the definition of tag 3), satisfying the definitions of tags 1, 2, and 3. For instance, merging the tags "fashionable person" and "young girl" yields the merged tag "fashionable girl".

[0133] Union fusion refers to merging at least two tags to be merged to obtain a merged tag that satisfies at least one of the definitions of all tags. For example, merging tags 1, 2, and 3 using union fusion results in a merged tag defined as (the definition of tag 1) or (the definition of tag 2) or (the definition of tag 3), satisfying the definition of at least one of tags 1, 2, and 3. For instance, tags such as "poor resilience," "insufficient resilience," "too little elasticity," "too small elasticity," and "insufficient elasticity" have similar basic meanings and can be merged. For example, retaining one tag might result in the merged tag "insufficient elasticity."

[0134] Union fusion can be used not only for disambiguating synonymous tags but also for constructing tag parent-child hierarchies. For example, a user can select a batch of tags describing the same type of problem, and the generation device can then merge these tags according to the union fusion method based on user instructions. The resulting merged tag becomes the parent tag of this batch of tags, and the original batch of tags becomes the child tags, thus constructing a parent-child hierarchical relationship between tags. For instance, tags such as "too thick," "too thin," "too long," and "too short" can be merged using the union fusion method to generate a merged tag "size problem," which can then be used as the parent tag of these original tags.

[0135] Custom fusion refers to combining the definitions of at least two tags to be merged according to user-defined logic, using preset logical operators such as and, or, and parentheses to form the definition of the merged tag. Custom fusion allows users to flexibly construct new tags based on existing tags, realizing personalized tag definitions.

[0136] In the example embodiment, the tag definition statements corresponding to at least two tags to be merged are connected according to the preset logical operators corresponding to the preset fusion method, so as to quickly obtain the fusion tag definition statement corresponding to the fusion tag.

[0137] Taking intersection fusion as an example, if the tag definition statement for the tag "fashionable person" is: #XXXXXX'regular expression M1', and the tag definition statement for the tag "young girl" is: #XXXXXX'regular expression M2', then the tag definition statements for these two tags can be connected with "and" to obtain the fusion tag definition statement for the fused tag "fashionable girl": #XXXXXX'regular expression M1'and #XXXXXX'regular expression M2'.

[0138] Taking the preset blending method as custom blending as an example, users can specify a blending statement, which can reference the corresponding tag through the tag's macro definition. When blending tag definition statements corresponding to at least two tags, the tag's macro definition in the blending statement can be replaced with the corresponding tag's tag definition statement to obtain the blended tag definition statement corresponding to the blended tag. The tag's macro definition can be in the following form: "&tag name&".

[0139] For example, suppose the user-specified fusion statement is: (&tag1&and&tag2&)or(&tag3&or&tag4&). This fusion statement means that the definitions of tag1 and tag2 are satisfied simultaneously, or the definitions of tag3 and tag4 are satisfied simultaneously. The generation device can replace &tag1& in the fusion statement with the tag definition statement corresponding to tag1, &tag2& with the tag definition statement corresponding to tag2, &tag3& with the tag definition statement corresponding to tag3, and &tag4& with the tag definition statement corresponding to tag4, to obtain the tag definition statements corresponding to the fused tags.

[0140] In an example embodiment, the user can also specify at least two tags to be fused in the first target tag set, so that the generating device can determine at least two tags to be fused in the first target tag set based on user instructions, and then perform fusion processing on the at least two tags to be fused in the first target tag set according to a preset fusion method to obtain the fused first target tag set. That is, after step 304, it may further include:

[0141] According to the preset fusion method, at least two tags to be fused in the first target tag set are fused to obtain the fused first target tag set, wherein the at least two tags to be fused are determined based on user instructions.

[0142] By fusing at least two tags to be merged in the first target tag set to obtain the merged first target tag set, it is possible to expand the high-quality tags included in the first target tag set. Then, based on the first target tag set and the merged first target tag set, a richer tag system for a specific domain can be constructed.

[0143] Step 305: Obtain multiple second business data from other fields.

[0144] Other fields can be any business field that is different from the specific field, such as the medical field, the news field, the academic field, the e-commerce field, etc. This application does not impose any restrictions on this.

[0145] Business data refers to data related to business operations. It can be content data, indicator data, etc., and this application does not impose any restrictions on it. In this application embodiment, for ease of distinction, business data from other fields is referred to as second business data.

[0146] Step 306: For each second business data, the second business data is labeled based on the label definition statements corresponding to each label in the first target label set to obtain the labeling results of the second business data.

[0147] Step 307: Based on the annotation results of multiple second business data, determine the quality of each tag in the first target tag set, and update the first target tag set according to the quality of each tag in the first target tag set to obtain the second target tag set in other domains.

[0148] The process of performing steps 306-307 based on multiple second business data in other fields is similar to the process of performing steps 302-304 based on multiple first business data in a specific field, and will not be described again here.

[0149] For example, suppose the specific domain is the mobile phone category. The first target tag set for this domain includes tags such as "poor screen resolution," "slow running speed," "system lag," "high heat generation," "poor customer service," and "slow delivery speed." These tags might also apply to the computer category. In this embodiment, steps 305-307 described above can be used to annotate each second business data point in the computer category based on the tag definition statements corresponding to these tags, thus obtaining the annotation results for the second business data. Then, based on the annotation results of multiple second business data points, the quality of each tag in the first target tag set is determined, and the first target tag set is updated based on the quality of each tag in the first target tag set to obtain the second target tag set within the computer category. Therefore, by utilizing the similarity and correlation between tag sets in different business domains, the tag set for the mobile phone category can be applied to generate the tag set for the computer category, achieving tag propagation between different domains.

[0150] By reusing existing tag sets within a specific domain and applying them to new business domains, it's possible to rapidly generate tag sets for those new domains, thus quickly constructing a tag system for them. As the research domain becomes richer and deeper, the tag system will gradually become more comprehensive and sophisticated. Over time, more tag systems will emerge, each with more refined tags, resulting in an increasing number of tags meeting quality requirements. Consequently, the efficiency of researching tag systems for new business domains will also increase significantly.

[0151] Figure 4 This is a schematic diagram of the structure of the tag set generation device provided in Embodiment 4 of this application.

[0152] like Figure 4 As shown, the tag set generation device 400 may include: a first acquisition module 410, a first annotation module 420, and a first update module 430.

[0153] The first acquisition module 410 is used to acquire multiple first business data in a specific domain, as well as the tag definition statements corresponding to each tag in the preset tag set. The tag definition statements are used to represent the definition of the corresponding tag.

[0154] The first annotation module 420 is used to annotate each piece of first business data based on the label definition statements corresponding to each label in the preset label set, so as to obtain the annotation result of the first business data.

[0155] The first update module 430 is used to determine the quality of each tag in the preset tag set based on the annotation results of multiple first business data, and update the preset tag set according to the quality of each tag in the preset tag set to obtain the first target tag set in a specific domain.

[0156] It should be noted that the tag set generation device 400 provided in this application embodiment can execute the tag set generation method of the foregoing embodiment. The tag set generation device 400 can be an electronic device or can be configured in an electronic device to generate a high-quality tag set in a specific field.

[0157] Among them, electronic devices can be PCs, cloud devices, mobile devices, servers, etc. Mobile devices can be any hardware devices such as mobile phones, tablets, personal digital assistants, wearable devices, and in-vehicle devices, and this application does not limit them.

[0158] It should be noted that the explanations and descriptions in the aforementioned embodiments of the tag set generation method also apply to the tag set generation apparatus of this embodiment, and will not be repeated here.

[0159] The tag set generation device of this application embodiment acquires multiple first business data in a specific domain, annotates each first business data based on the tag definition statements corresponding to each tag in a preset tag set, determines the quality of each tag in the preset tag set based on the annotation results of multiple first business data, and then updates the preset tag set according to the quality of each tag to obtain a first target tag set in a specific domain. It can generate a high-quality tag set in a specific domain, laying the foundation for accurate description or classification of objects.

[0160] Figure 5 This is a schematic diagram of the structure of the tag set generation device provided in Embodiment 5 of this application.

[0161] like Figure 5 As shown, the tag set generation device 500 may include, specifically, a first acquisition module 510, a first annotation module 520, and a first update module 530. Wherein, Figure 5The first acquisition module 510, the first annotation module 520, and the first update module 530 are in conjunction with Figure 4 The first acquisition module 410, the first annotation module 420, and the first update module 430 have the same function and structure.

[0162] In one possible implementation of this application embodiment, the first annotation module 520 includes:

[0163] The processing unit is used to execute the tag definition statement corresponding to each tag in the preset tag set to determine whether the first business data meets the tag definition.

[0164] The labeling unit is used to label the first business data using labels, provided that the first business data meets the label definition.

[0165] In another possible implementation of this application embodiment, the processing unit includes:

[0166] The first processing subunit is used to replace the business data macro definition included in the clause of the tag definition statement corresponding to the tag with the first business data, and execute the replaced tag definition statement to determine whether the first business data satisfies the regular expression in the clause when the tag definition statement corresponding to the tag includes a clause.

[0167] The first determining subunit is used to determine the definition of the label if the first business data satisfies the regular expression in the clause.

[0168] The second determining subunit is used to determine that the first business data does not meet the definition of the label if the first business data does not meet the regular expression in the clause.

[0169] In another possible implementation of this application embodiment, the processing unit further includes:

[0170] The second processing subunit is used to replace the business data macro definitions included in each clause of the tag definition statement corresponding to the tag with the first business data, and execute the replaced tag definition statement to determine whether the first business data satisfies the regular expression in each clause and whether it satisfies the logic of the preset logical operator connecting each clause.

[0171] The third determining subunit is used to determine whether the first business data satisfies the definition of the label, provided that the first business data satisfies the regular expressions and logic in each clause.

[0172] The fourth determining subunit is used to determine if the first business data does not meet the definition of the label when the first business data does not meet the regular expression and / or logic in the clause.

[0173] In another possible implementation of this application embodiment, the regular expression includes multiple keywords, each keyword being separated by a preset delimiter; the processing unit further includes:

[0174] The fifth determining subunit is used to determine whether the first business data satisfies a regular expression when the first business data contains at least one target keyword among multiple keywords separated by a preset delimiter.

[0175] In another possible implementation of this application embodiment, the clause further includes a first macro definition of a preset tag and / or a second macro definition of a preset string;

[0176] The first annotation module 520 also includes:

[0177] The replacement unit is used to replace the first macro definition with the tag definition statement of the preset tag corresponding to the first macro definition, and / or replace the second macro definition with the preset string corresponding to the second macro definition, so as to obtain the formatting definition statement corresponding to the tag;

[0178] Processing unit, used for:

[0179] Execute the formatting definition statement corresponding to the label to determine whether the first business data meets the label definition.

[0180] In another possible implementation of this application embodiment, the processing unit includes:

[0181] The third processing subunit is used to execute the call statement when the tag definition statement corresponding to the tag includes the call statement corresponding to the preset annotation model, so as to call the corresponding preset annotation model and use the preset annotation model to determine whether the first business data meets the tag definition.

[0182] In another possible implementation of this application embodiment, the first update module 530 includes:

[0183] The determining unit is used to determine the quality value of each label in the preset label set under at least one preset quality indicator based on the annotation results of multiple first business data.

[0184] The filtering unit is used to filter each tag in the preset tag set according to the quality value of each tag under at least one preset indicator, and obtain the first target tag set based on the filtered tags.

[0185] In another possible implementation of this application embodiment, the tag set generation device 500 further includes:

[0186] The first fusion module is used to perform fusion processing on at least two tags to be fused in a preset tag set according to a preset fusion method to obtain fused tags, wherein the at least two tags to be fused are determined based on user instructions;

[0187] The second fusion module is used to fuse the tag definition statements corresponding to at least two tags according to a preset fusion method, so as to obtain the fusion tag definition statement corresponding to the fused tag.

[0188] In another possible implementation of this application embodiment, the tag set generation device 500 further includes:

[0189] The third fusion module is used to perform fusion processing on at least two tags to be fused in the first target tag set according to a preset fusion method, so as to obtain the fused first target tag set, wherein the at least two tags to be fused are determined based on user instructions.

[0190] In another possible implementation of this application embodiment, the tag set generation device 500 may further include:

[0191] The second acquisition module 540 is used to acquire multiple second business data in other fields;

[0192] The second annotation module 550 is used to annotate each second business data based on the label definition statements corresponding to each label in the first target label set, so as to obtain the annotation result of the second business data.

[0193] The second update module 560 is used to determine the quality of each tag in the first target tag set based on the annotation results of multiple second business data, and update the first target tag set according to the quality of each tag in the first target tag set to obtain a second target tag set in other domains.

[0194] The tag set generation device of this application embodiment acquires multiple first business data in a specific domain, annotates each first business data based on the tag definition statements corresponding to each tag in a preset tag set, determines the quality of each tag in the preset tag set based on the annotation results of multiple first business data, and then updates the preset tag set according to the quality of each tag to obtain a first target tag set in a specific domain. It can generate a high-quality tag set in a specific domain, laying the foundation for accurate description or classification of objects.

[0195] To implement the above embodiments, this application also proposes an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a tag set generation method as proposed in any of the foregoing embodiments of this application.

[0196] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute a tag set generation method as proposed in any of the foregoing embodiments of this application.

[0197] To implement the above embodiments, this application also proposes a computer program product, including a computer program that, when executed by a processor, implements a method for generating a tag set as proposed in any of the foregoing embodiments of this application.

[0198] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0199] like Figure 6 As shown, the electronic device 600 may include a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0200] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0201] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the tag set generation method. For example, in some embodiments, the tag set generation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the tag set generation method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the tag set generation method by any other suitable means (e.g., by means of firmware).

[0202] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0203] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0204] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0205] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0206] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.

[0207] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. A server can be a cloud server, a server in a distributed system, or a server incorporating blockchain technology.

[0208] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0209] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method of generating a set of labels, characterized by, include: Acquire multiple first business data within a specific domain, as well as tag definition statements corresponding to each tag in a preset tag set, wherein the tag definition statements are used to represent the definition of the corresponding tag; For each piece of the first business data, the first business data is labeled based on the label definition statements corresponding to each label in the preset label set, so as to obtain the labeling result of the first business data; Based on the annotation results of multiple first business data, the quality of each tag in the preset tag set is determined, and the preset tag set is updated according to the quality of each tag in the preset tag set to obtain the first target tag set in the specific domain; The step of annotating the first business data based on the tag definition statements corresponding to each tag in the preset tag set to obtain the annotation result of the first business data includes: For each tag in the preset tag set, execute the tag definition statement corresponding to the tag in the preset tag set to determine whether the first business data meets the tag definition; If the first business data satisfies the definition of the tag, the first business data is labeled using the tag; The step of executing the tag definition statement corresponding to the tag in the preset tag set to determine whether the first business data meets the tag definition includes: If the tag definition statement corresponding to the tag includes a clause, the first business data is used to replace the business data macro definition included in the clause of the tag definition statement corresponding to the tag, and the replaced tag definition statement is executed to determine whether the first business data satisfies the regular expression in the clause; If the first business data satisfies the regular expression in the clause, it is determined that the first business data satisfies the definition of the tag; If the first business data does not satisfy the regular expression in the clause, it is determined that the first business data does not satisfy the definition of the tag.

2. The method according to claim 1, characterized in that, The method further includes: When the tag definition statement corresponding to the tag includes multiple clauses, the first business data is used to replace the business data macro definition included in each clause of the tag definition statement corresponding to the tag, and the replaced tag definition statement is executed to determine whether the first business data satisfies the regular expression in each clause and whether it satisfies the logic of the preset logical operator connecting each clause; If the first business data satisfies the regular expression and logic in each of the clauses, it is determined that the first business data satisfies the definition of the tag; If the first business data does not satisfy the regular expression in the clause and / or does not satisfy the logic, it is determined that the first business data does not satisfy the definition of the tag.

3. The method according to claim 2, characterized in that, The regular expression includes multiple keywords, and each keyword is separated by a preset delimiter; the method further includes: If the first business data contains at least one target keyword among the plurality of keywords separated by the preset delimiter, it is determined that the first business data satisfies the regular expression.

4. The method according to claim 2, characterized in that, The clause also includes a first macro definition of a preset label and / or a second macro definition of a preset string; Before executing the tag definition statement corresponding to the tag in the preset tag set to determine whether the first business data meets the tag definition, the method further includes: The first macro definition is replaced by the tag definition statement of the preset tag corresponding to the first macro definition, and / or the second macro definition is replaced by the preset string corresponding to the second macro definition, to obtain the formatting definition statement corresponding to the tag; The step of executing the tag definition statement corresponding to the tag in the preset tag set to determine whether the first business data meets the tag definition includes: Execute the formatting definition statement corresponding to the label to determine whether the first business data meets the definition of the label.

5. The method according to claim 1, characterized in that, The step of executing the tag definition statement corresponding to the tag in the preset tag set to determine whether the first business data meets the tag definition includes: If the tag definition statement corresponding to the tag includes a call statement corresponding to a preset annotation model, the call statement is executed to call the corresponding preset annotation model, and the preset annotation model is used to determine whether the first business data meets the tag definition.

6. The method according to any one of claims 1-2, characterized in that, The step of determining the quality of each tag in the preset tag set based on the annotation results of multiple first business data, and updating the preset tag set according to the quality of each tag in the preset tag set to obtain the first target tag set in the specific domain, includes: Based on the annotation results of multiple first business data, determine the quality value of each tag in the preset tag set under at least one preset quality indicator; Based on the quality value of each tag under at least one preset indicator, each tag in the preset tag set is filtered, and the first target tag set is obtained based on the filtered tags.

7. The method according to any one of claims 1-2, characterized in that, Before labeling each piece of the first business data based on the tag definition statements corresponding to each tag in the preset tag set to obtain the labeling result of the first business data, the method further includes: According to a preset fusion method, at least two tags to be fused in the preset tag set are fused to obtain fused tags, wherein the at least two tags to be fused are determined based on user instructions; According to the preset fusion method, the tag definition statements corresponding to the at least two tags are fused to obtain the fused tag definition statement corresponding to the fused tag.

8. The method according to any one of claims 1-2, characterized in that, After updating the preset tag set according to the quality of each tag in the preset tag set to obtain the first target tag set in the specific domain, the method further includes: According to a preset fusion method, at least two tags to be fused in the first target tag set are fused to obtain a fused first target tag set, wherein the at least two tags to be fused are determined based on user instructions.

9. The method according to any one of claims 1-2, characterized in that, After updating the preset tag set according to the quality of each tag in the preset tag set to obtain the first target tag set in the specific domain, the method further includes: Acquire multiple secondary business data from other fields; For each piece of the second business data, the second business data is labeled based on the label definition statements corresponding to each label in the first target label set to obtain the labeling result of the second business data; Based on the annotation results of multiple second business data, the quality of each tag in the first target tag set is determined, and the first target tag set is updated according to the quality of each tag in the first target tag set to obtain the second target tag set in the other domains.

10. A device for generating a tag set, characterized in that, include: The first acquisition module is used to acquire multiple first business data in a specific domain, as well as the tag definition statements corresponding to each tag in a preset tag set, wherein the tag definition statements are used to represent the definition of the corresponding tag; The first annotation module is used to annotate each piece of the first business data based on the tag definition statements corresponding to each tag in the preset tag set, so as to obtain the annotation result of the first business data. The first update module is used to determine the quality of each tag in the preset tag set based on the annotation results of multiple first business data, and update the preset tag set based on the quality of each tag in the preset tag set to obtain the first target tag set in the specific domain. The first annotation module includes: The processing unit is configured to execute the tag definition statement corresponding to each tag in the preset tag set for each tag in the preset tag set, so as to determine whether the first business data meets the definition of the tag; A labeling unit is used to label the first business data using the label when the first business data meets the definition of the label. The processing unit includes: The first processing subunit is configured to, when the tag definition statement corresponding to the tag includes a clause, use the first business data to replace the business data macro definition included in the clause of the tag definition statement corresponding to the tag, and execute the replaced tag definition statement to determine whether the first business data satisfies the regular expression in the clause; The first determining subunit is configured to determine that the first business data satisfies the definition of the tag if the first business data satisfies the regular expression in the clause; The second determining subunit is used to determine that the first business data does not satisfy the definition of the tag if the first business data does not satisfy the regular expression in the clause.

11. The apparatus according to claim 10, characterized in that, The processing unit further includes: The second processing subunit is configured to, when the tag definition statement corresponding to the tag includes multiple clauses, use the first business data to replace the business data macro definition included in each clause of the tag definition statement corresponding to the tag, and execute the replaced tag definition statement to determine whether the first business data satisfies the regular expression in each clause and whether it satisfies the logic of the preset logical operator connecting each clause; The third determining subunit is used to determine that the first business data satisfies the definition of the tag if the first business data satisfies the regular expression and the logic in each of the clauses; The fourth determining subunit is used to determine that the first business data does not satisfy the definition of the tag if the first business data does not satisfy the regular expression in the clause and / or does not satisfy the logic.

12. The apparatus according to claim 10, characterized in that, The regular expression includes multiple keywords, and each keyword is separated by a preset delimiter; The processing unit further includes: The fifth determining subunit is used to determine that the first business data satisfies the regular expression when the first business data contains at least one target keyword among the plurality of keywords separated by the preset delimiter.

13. The apparatus according to claim 10, characterized in that, The clause also includes a first macro definition of a preset label and / or a second macro definition of a preset string; The first annotation module further includes: The replacement unit is used to replace the first macro definition with the tag definition statement of the preset tag corresponding to the first macro definition, and / or replace the second macro definition with the preset string corresponding to the second macro definition, so as to obtain the format definition statement corresponding to the tag; The processing unit is used for: Execute the formatting definition statement corresponding to the label to determine whether the first business data meets the definition of the label.

14. The apparatus according to claim 10, characterized in that, The processing unit includes: The third processing subunit is used to execute the call statement when the tag definition statement corresponding to the tag includes a call statement corresponding to the preset annotation model, so as to call the corresponding preset annotation model and use the preset annotation model to determine whether the first business data meets the definition of the tag.

15. The apparatus according to any one of claims 10-11, characterized in that, The first update module includes: The determining unit is used to determine the quality value of each tag in the preset tag set under at least one preset quality indicator based on the annotation results of multiple first business data. The filtering unit is used to filter each tag in the preset tag set according to the quality value of each tag under at least one preset indicator, and obtain the first target tag set according to the filtered tags.

16. The apparatus according to any one of claims 10-11, characterized in that, The device further includes: The first fusion module is used to perform fusion processing on at least two tags to be fused in the preset tag set according to a preset fusion method to obtain fused tags, wherein the at least two tags to be fused are determined based on user instructions; The second fusion module is used to perform fusion processing on the tag definition statements corresponding to the at least two tags according to the preset fusion method, so as to obtain the fusion tag definition statement corresponding to the fused tag.

17. The apparatus according to any one of claims 10-11, characterized in that, The device further includes: The third fusion module is used to perform fusion processing on at least two tags to be fused in the first target tag set according to a preset fusion method, so as to obtain a fused first target tag set, wherein the at least two tags to be fused are determined based on user instructions.

18. The apparatus according to any one of claims 10-11, characterized in that, Also includes: The second acquisition module is used to acquire multiple second business data from other fields; The second annotation module is used to annotate each piece of the second business data based on the tag definition statements corresponding to each tag in the first target tag set, so as to obtain the annotation result of the second business data. The second update module is used to determine the quality of each tag in the first target tag set based on the annotation results of multiple second business data, and update the first target tag set based on the quality of each tag in the first target tag set to obtain the second target tag set in the other domain.

19. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

20. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Service approval method and device, electronic equipment and storage medium

    CN114817347A