Rule intelligent labeling generation method based on task semantic parsing

By using zero-sample rule cold start and rule knowledge graphs with multi-dimensional semantic association, combined with cross-attention mechanism and label-aware propagation algorithm, the high labor cost and semantic drift problems in existing technologies are solved, and efficient and accurate semantic annotation rule generation is achieved.

CN122433744APending Publication Date: 2026-07-21山西衡诚科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
山西衡诚科技有限公司
Filing Date
2026-05-06
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies suffer from high labor costs, low efficiency, difficulty in scaling up, and semantic drift in semantic rule generation, especially under weak supervision conditions where it is difficult to automatically generate high-quality semantic annotation rules.

Method used

By using zero-shot rule cold start, a multi-dimensional semantic association rule knowledge graph is constructed. Combined with cross-attention mechanism and label-aware propagation algorithm, high-quality semantic annotation rules are automatically generated to suppress semantic drift.

Benefits of technology

It achieves efficient and automatic generation of high-quality semantic annotation rules, reduces the false matching rate, avoids a vicious cycle, reduces reliance on manual intervention, and improves the accuracy and efficiency of rule generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433744A_ABST
    Figure CN122433744A_ABST
Patent Text Reader

Abstract

The application discloses a rule intelligent labeling generation method based on task semantic analysis, relates to the technical field of data labeling management, and specifically comprises the following steps: performing zero-sample rule cold start, comprehensively calculating confidence scores according to occurrence frequencies, semantic rationality scores and domain general prior knowledge, and selecting a seed rule set; acquiring the seed rule set, constructing a rule knowledge graph based on multi-dimensional semantic association relationships; acquiring a natural language sentence to be labeled, performing bidirectional refining on sentence semantics and rule semantics of the natural language sentence through a cross-attention mechanism, and calculating a matching score; on the rule knowledge graph, label information is propagated from the seed rule to a candidate rule through an attention mechanism; the propagated label and the matching label are compared, inconsistent rules are marked and preferentially submitted for verification; the rule knowledge graph is updated according to a verification result, and a final labeling rule set is iteratively generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data annotation and management technology, specifically to a rule-based intelligent annotation generation method based on task semantic parsing. Background Technology

[0002] In natural language processing and intelligent question answering systems, the construction of semantic rules is a core step in completing downstream tasks such as intent recognition and slot filling. Traditional semantic rule generation methods mainly rely on manual writing by domain experts, which suffers from high labor costs, low efficiency, and difficulty in scaling.

[0003] In the prior art, patent CN115906871A proposes a semantic rule generation method that uses semantic protocols to annotate statements with intent, thereby achieving automatic mining of semantic rules without requiring domain experts to summarize patterns. However, this method relies on predefined semantic protocols and essentially still requires manual pre-setting of the intent space. Furthermore, it fails to address the semantic drift problem during rule iteration. Specifically, when the initial seed rule quality is limited or the data contains noise, statements that should belong to label A are easily mismatched as label B, leading to the generation of new rules based on these incorrect matches, creating a vicious cycle.

[0004] Another published patent, CN202511519129.8, proposes a training tutorial generation method for annotation tasks. By constructing an annotation knowledge graph, it achieves unified or comparative training of annotation rules across platforms. This method is mainly used for the integration and presentation of existing annotation rules, rather than the automatic generation and refinement of new rules; the knowledge graph it constructs uses entities and annotation fields as nodes and does not involve multi-dimensional semantic relationship modeling between rules.

[0005] Therefore, how to suppress semantic drift and automatically generate high-quality semantic annotation rules under weak supervision is a technical problem that urgently needs to be solved.

[0006] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0007] The purpose of this invention is to provide a rule-based intelligent annotation generation method based on task semantic parsing to solve the problems mentioned in the background art.

[0008] To achieve the above objectives, the present invention provides the following technical solution: a rule-based intelligent annotation generation method based on task semantic parsing, specifically including:

[0009] A zero-sample rule cold start is performed, and a confidence score is calculated by combining the frequency of occurrence, semantic reasonableness score, and domain-general prior knowledge to select a seed rule set;

[0010] Obtain the seed rule set and construct a rule knowledge graph based on multidimensional semantic relationships;

[0011] Obtain the natural language statement to be labeled, refine the statement semantics and rule semantics of the natural language statement in both directions through a cross-attention mechanism, and calculate the matching score;

[0012] On the rule knowledge graph, label information is propagated from seed rules to candidate rules through an attention mechanism;

[0013] By comparing propagation tags with matching tags, inconsistent rules are identified, marked, and submitted for verification first.

[0014] The rule knowledge graph is updated based on the verification results, and the final labeled rule set is generated iteratively.

[0015] Preferably, as a preferred embodiment of the rule-based intelligent annotation generation method based on task semantic parsing described in this invention, wherein:

[0016] Perform a zero-sample rule cold start and select a seed rule set, specifically including:

[0017] Construct multiple different prompt templates, and guide the large language model to output candidate entity types, rule patterns, and label spaces from domain-general knowledge through each template;

[0018] The multiple templates include, but are not limited to:

[0019] Entity extraction template: "Please list the common entity types in the [target domain]";

[0020] Rule pattern template: "Please provide common If-Then rule patterns in the [target domain]";

[0021] Tag space template: "Please list the tag categories that may be needed in the [target domain] intent recognition task";

[0022] The multiple templates are input into the large language model to obtain multiple sets of candidate outputs;

[0023] The candidate output includes the set of candidate entities, the set of candidate rule patterns, and the set of candidate labels identified by the template.

[0024] Cross-validate the candidate outputs from different templates and retain at least two candidate entities, rule patterns, and tags that are consistently recognized by both templates.

[0025] Based on the candidate set after consistent filtering, candidate entities and candidate rule patterns are combined to construct the initial rule body, and candidate tags are mapped to the initial rule head;

[0026] The confidence score is calculated by comprehensively considering the frequency of occurrence of the rule in multiple templates, semantic reasonableness score, and general prior knowledge of the domain.

[0027] Rules with a confidence level higher than a preset threshold are selected as the seed rule set.

[0028] Preferably, as a preferred embodiment of the rule-based intelligent annotation generation method based on task semantic parsing described in this invention, wherein:

[0029] Obtain the seed rule set;

[0030] A rule knowledge graph is constructed based on the multidimensional semantic relationships between seed rules.

[0031] The rule knowledge graph uses rules as nodes and semantic relationships between rules as edges.

[0032] The semantic relationships include, but are not limited to: implication, contradiction, parallelism, and irrelevance.

[0033] Preferably, as a preferred embodiment of the rule-based intelligent annotation generation method based on task semantic parsing described in this invention, wherein:

[0034] Obtain the natural language statement to be labeled;

[0035] The natural language statement is bidirectionally refined using a cross-attention mechanism, considering both the semantics of the statement and the semantics of the rules. The matching score between the natural language statement and each candidate rule is then calculated. Specifically, this includes:

[0036] The natural language statement and the candidate rule are respectively encoded into vector sequences;

[0037] Calculate the attention from the natural language statement to the candidate rule, and the attention from the candidate rule to the natural language statement;

[0038] Residual connections are made between the attention and the original representation, and layer normalization is performed.

[0039] The refined statement focuses on the words most relevant to the rule, while suppressing irrelevant words;

[0040] The refined rule representation incorporates instance-level semantic information from the current statement;

[0041] Based on the pooled vectors of the refined statement and rule representations, a similarity score is calculated as the matching score between the statement and the rule, and a matching label is obtained.

[0042] Preferably, as a preferred embodiment of the rule-based intelligent annotation generation method based on task semantic parsing described in this invention, wherein:

[0043] Based on the rule knowledge graph, starting from the seed rule set node, each node carries its label information and confidence score;

[0044] The algorithm performs label-aware graph propagation based on similarity scores, specifically including:

[0045] Along the implication relation edge: propagate label information from the source rule to the target rule;

[0046] Along parallel relationship edges: bidirectional propagation of label information;

[0047] When encountering a conflicting relationship: block the propagation, do not assign a propagation label, and mark the target rule node as a potential conflict;

[0048] Unrelated edge: does not participate in the spread;

[0049] For each node in the propagation of the label information, a weighted voting fusion is performed to obtain the predicted label and confidence level for the propagation stage.

[0050] Preferably, as a preferred embodiment of the rule-based intelligent annotation generation method based on task semantic parsing described in this invention, wherein:

[0051] The same rule used to compare the predicted label with the matched label specifically includes:

[0052] If both are consistent and the confidence level is higher than the threshold, then the rule and its label are officially added to the annotation rule base, and the label information and confidence level of the node in the rule knowledge graph are updated.

[0053] If the two are inconsistent, or if the confidence level of either one is lower than the threshold, then the rule is marked as a rule to be verified.

[0054] Based on an active learning strategy, this rule is preferentially added to the manual verification queue. After manual verification is completed, the results are verified, including:

[0055] If the verification is successful, update the rule tag and add it to the rule base.

[0056] If the verification fails, mark the node and its associated edges in the knowledge graph;

[0057] If a contradictory relationship blocks the propagation process and no propagation label is obtained, the rule will be automatically marked as pending verification and submitted for manual confirmation first.

[0058] Preferably, as a preferred embodiment of the rule-based intelligent annotation generation method based on task semantic parsing described in this invention, wherein:

[0059] Verify the updated rule knowledge graph based on the results;

[0060] Repeat the iteration until a preset termination condition is met, and output the final annotation rule set. The preset termination condition includes:

[0061] The rule base has reached its preset size target.

[0062] In multiple iterations, the inconsistency rate of newly added rules is less than 5%.

[0063] On the other hand, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements the steps of the rule-based intelligent annotation generation method based on task semantic parsing as described above.

[0064] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements the steps of the rule-based intelligent annotation generation method based on task semantic parsing as described above.

[0065] The technical effects and advantages provided by the present invention in the above technical solution are as follows:

[0066] (1) Establish an active suppression mechanism for semantic drift. By constructing a rule knowledge graph with rules as nodes and multi-dimensional semantic associations as edges, and combining it with a label-aware propagation algorithm, the system achieves the blocking of incorrect matches and the priority propagation of trustworthy rules. When the system tends to incorrectly match a statement to label B, the candidate rule it generates will inevitably have a contradictory relationship with the seed rule (label A), thus being blocked and marked as pending verification during the propagation stage, effectively avoiding a vicious cycle.

[0067] (2) By replacing the traditional fixed vector matching method with a cross-attention mechanism, the interactive refinement of sentence semantics and rule semantics can be achieved. It can dynamically adapt to different rules for different points of attention of the same sentence. For the rule "set seat massage", it focuses on the keywords "massage", "intensity" and "mode" in the sentence, while ignoring irrelevant information such as "heating" and "ventilation", which greatly reduces the mismatch rate caused by the inclusion of irrelevant words in the sentence.

[0068] (3) High-quality initial rule sets are automatically constructed through multi-template consistency screening, thereby eliminating the dependence on manual seed rules or predefined semantic protocols.

[0069] (4) Establish a mutual verification mechanism between rule generation and rule matching. By comparing the consistency between the "propagation label" and the "matching label", accurately identify the rules that are most likely to be wrong or the most ambiguous, and submit them for manual verification first. Attached Figure Description

[0070] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0071] Figure 1 This is a flowchart of the rule-based intelligent annotation generation method based on task semantic parsing of the present invention. Detailed Implementation

[0072] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.

[0073] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a rule-based intelligent annotation generation method based on task semantic parsing, specifically including:

[0074] A zero-sample rule cold start is performed, and a confidence score is calculated by combining the frequency of occurrence, semantic reasonableness score, and domain-general prior knowledge to select a seed rule set;

[0075] Perform a zero-sample rule cold start and select a seed rule set, specifically including:

[0076] Construct multiple different prompt templates, and guide the large language model to output candidate entity types, rule patterns, and label spaces from domain-general knowledge through each template;

[0077] The multiple templates include, but are not limited to:

[0078] Entity extraction template: "Please list the common entity types in the [target domain]";

[0079] Rule pattern template: "Please provide common If-Then rule patterns in the [target domain]";

[0080] Tag space template: "Please list the tag categories that may be needed in the [target domain] intent recognition task";

[0081] The multiple templates are input into the large language model to obtain multiple sets of candidate outputs;

[0082] The candidate output includes the set of candidate entities, the set of candidate rule patterns, and the set of candidate labels identified by the template.

[0083] Cross-validate the candidate outputs from different templates and retain at least two candidate entities, rule patterns, and tags that are consistently recognized by both templates.

[0084] Based on the candidate set after consistent filtering, candidate entities and candidate rule patterns are combined to construct the initial rule body, and candidate tags are mapped to the initial rule head;

[0085] The confidence score is calculated by comprehensively considering the frequency of occurrence of the rule in multiple templates, semantic reasonableness score, and general prior knowledge of the domain.

[0086] Rules with a confidence level higher than a preset threshold are selected as the seed rule set.

[0087] Obtain the seed rule set and construct a rule knowledge graph based on multidimensional semantic relationships;

[0088] Obtain the seed rule set;

[0089] A rule knowledge graph is constructed based on the multidimensional semantic relationships between seed rules.

[0090] The rule knowledge graph uses rules as nodes and semantic relationships between rules as edges.

[0091] The semantic relationships include, but are not limited to: implication, contradiction, parallelism, and irrelevance.

[0092] Obtain the natural language statement to be labeled, refine the statement semantics and rule semantics of the natural language statement in both directions through a cross-attention mechanism, and calculate the matching score;

[0093] Obtain the natural language statement to be labeled;

[0094] The natural language statement is bidirectionally refined using a cross-attention mechanism, considering both the semantics of the statement and the semantics of the rules. The matching score between the natural language statement and each candidate rule is then calculated. Specifically, this includes:

[0095] The natural language statement and the candidate rule are respectively encoded into vector sequences;

[0096] Calculate the attention from the natural language statement to the candidate rule, and the attention from the candidate rule to the natural language statement;

[0097] Residual connections are made between the attention and the original representation, and layer normalization is performed.

[0098] The refined statement focuses on the words most relevant to the rule, while suppressing irrelevant words;

[0099] The refined rule representation incorporates instance-level semantic information from the current statement;

[0100] Based on the pooled vectors of the refined statement and rule representations, a similarity score is calculated as the matching score between the statement and the rule, and a matching label is obtained.

[0101] On the rule knowledge graph, label information is propagated from seed rules to candidate rules through an attention mechanism;

[0102] Based on the rule knowledge graph, starting from the seed rule set node, each node carries its label information and confidence score;

[0103] The algorithm performs label-aware graph propagation based on similarity scores, specifically including:

[0104] Along the implication relation edge: propagate label information from the source rule to the target rule;

[0105] Along parallel relationship edges: bidirectional propagation of label information;

[0106] When encountering a conflicting relationship: block the propagation, do not assign a propagation label, and mark the target rule node as a potential conflict;

[0107] Unrelated edge: does not participate in the spread;

[0108] For each node in the propagation of the label information, a weighted voting fusion is performed to obtain the predicted label and confidence level for the propagation stage.

[0109] By comparing propagation tags with matching tags, inconsistent rules are identified, marked, and submitted for verification first.

[0110] The same rule used to compare the predicted label with the matched label specifically includes:

[0111] If both are consistent and the confidence level is higher than the threshold, then the rule and its label are officially added to the annotation rule base, and the label information and confidence level of the node in the rule knowledge graph are updated.

[0112] If the two are inconsistent, or if the confidence level of either one is lower than the threshold, then the rule is marked as a rule to be verified.

[0113] Based on an active learning strategy, this rule is preferentially added to the manual verification queue. After manual verification is completed, the results are verified, including:

[0114] If the verification is successful, update the rule tag and add it to the rule base.

[0115] If the verification fails, mark the node and its associated edges in the knowledge graph;

[0116] If a contradictory relationship blocks the propagation process and no propagation label is obtained, the rule will be automatically marked as pending verification and submitted for manual confirmation first.

[0117] The rule knowledge graph is updated based on the verification results, and the final labeled rule set is generated iteratively.

[0118] Verify the updated rule knowledge graph based on the results;

[0119] Repeat the iteration until a preset termination condition is met, and output the final annotation rule set. The preset termination condition includes:

[0120] The rule base has reached its preset size target.

[0121] In multiple iterations, the inconsistency rate of newly added rules is less than 5%.

[0122] Example 2

[0123] Taking the "seat massage setting" in an in-vehicle voice assistant as an example, this embodiment will describe in detail the specific implementation process of the method of the present invention, which specifically includes:

[0124] Assume there are only two seed rules initially:

[0125] Rule R1: The rule body is "Increase massage intensity", the rule header is "Seat massage settings", and the label is Intent A;

[0126] Rule R2: The rule body is "Turn on seat heating", the rule header is "Seat heating settings", and the label is Intent B.

[0127] Based on semantic encoding, it is determined that R1 and R2 are contradictory, and the same user command cannot trigger both "massage settings" and "heating settings" at the same time.

[0128] The structure of a rule-based knowledge graph includes:

[0129] Nodes: including R1, R2, and new rules generated in subsequent iterations;

[0130] Edge type:

[0131] Implication relation: If the semantics of rule A contain rule B, then establish a directed edge from A to B;

[0132] Conflicting relationship: If rule A and rule B have semantic conflicts, then an undirected edge is established to block propagation;

[0133] Parallel relationship: If rule A and rule B are frequently triggered simultaneously, then an undirected edge is established for bidirectional propagation;

[0134] Irrelevant relationship: Default edge type, does not participate in propagation.

[0135] Get the user's statement S: "Increase the massage intensity of the passenger seat to the maximum."

[0136] Input statement S and existing rules R1 and R2 into the cross-attention layer, and perform the following operations:

[0137] The vector sequence of statement S is focused on the words "massage", "intensity", and "co-pilot" through a cross-attention mechanism;

[0138] Attention weighting for words related to "heating" was suppressed;

[0139] Based on the pooled vectors of the refined statement representation and rule representation, the cosine similarity is calculated as the matching score:

[0140] Match score between S and R1: 0.85

[0141] Match score between S and R2: 0.25

[0142] Simultaneously obtain the matching tag: "Intent A" corresponding to R1;

[0143] Based on the slot information extracted from statement S (position = "passenger", attribute = "force", action = "adjustment"), and combined with the high matching score with R1, the system automatically generates a new candidate rule R3, which specifically includes:

[0144] Rule: "Passenger seat position + massage intensity adjustment";

[0145] Rule header: Pending.

[0146] On the rule knowledge graph, starting from seed rule nodes (each node carries label information and confidence score), a label-aware graph propagation algorithm is executed, specifically including:

[0147] Along the implication relation edge: propagate label information from the source rule to the target rule;

[0148] Along parallel relationship edges: bidirectional propagation of label information;

[0149] When encountering a conflicting relationship: block the propagation, do not assign a propagation label, and mark the target rule node as a "potential conflict";

[0150] Irrelevant side: does not participate in the dissemination.

[0151] Starting from R1, propagate the label along the implication edge to the candidate new rule R3, and calculate the propagation weight:

[0152] Source rule R1 confidence: 0.92;

[0153] The semantic similarity coefficient between R3 and R1 is 0.82.

[0154] Propagation weight = 0.92 × 0.82 = 0.754;

[0155] For nodes that receive labels from multiple sources, a weighted voting fusion process is performed.

[0156] In this embodiment, R3 receives the propagation label from only one path, R1, and the weighted voting fusion result is the propagation result of that path: the predicted label is intention A, with a confidence level of 0.75.

[0157] In more complex scenarios, if a candidate rule receives different labels from multiple seed rules, a weighted voting fusion will be performed based on the propagation weight of each path, and the label with the highest confidence will be used as the propagation prediction label.

[0158] Compare the results of the same rule in the propagation phase and the matching phase:

[0159] Propagation phase: The predicted label is intent A, with a confidence level of 0.75;

[0160] Matching phase: The matched label is intent A, with a confidence level of 0.85;

[0161] According to the present invention, the prediction label and the matching label are compared using the same rule. If they are consistent and both have a confidence level higher than the preset threshold (0.7), it belongs to case one.

[0162] The rule R3 and its label (intent A) are officially added to the annotation rule base;

[0163] Update the label information and confidence level of node R3 in the rule knowledge graph (take the higher of the two-stage values, 0.85);

[0164] Node R3 can serve as a seed node for subsequent iterations.

[0165] R3 data is automatically entered into the database without the need for manual verification.

[0166] If the ambiguous statement "heat the seat a little for the passenger" appears, it contains both "heat" (which may refer to the heating function) and "passenger seat" (location information).

[0167] Traditional systems may mismatch statements to the intent of "heating" due to the word "heat adjustment".

[0168] After generating new rules based on incorrect matching, more statements containing "hot" may be incorrectly classified, forming a vicious cycle of "incorrect matching → incorrect rules → semantic drift".

[0169] The processing flow of the method of this invention:

[0170] First, the cross-attention matching stage: the statement scores 0.35 for matching R1 (massage) and 0.60 for matching R2 (heating), and the matching label tends to be "heating" (intent B).

[0171] Second, the label-aware propagation stage: In the rule knowledge graph, there is a clear conflicting relationship between R1 and R2. When the propagation algorithm attempts to propagate the label of R2 to the candidate rule associated with that statement, the propagation is blocked due to the conflicting relationship between R2 and R1. The candidate rule does not receive a propagation label and is marked as "potential conflict".

[0172] Third, inconsistency detection stage: The matching label is intention B, and the propagation label is missing due to contradiction blocking, which belongs to case three (if the propagation stage encounters contradiction blocking and no propagation label is obtained, the rule will be automatically marked as pending verification and submitted for manual confirmation first).

[0173] Fourth, proactive learning and verification: The system automatically marks the candidate rule as a "rule to be verified," giving it higher priority than ordinary inconsistent rules, and submits it for manual confirmation first. After manual confirmation, if the verification is incorrect (i.e., the statement should not generate a new rule or should be classified into other intentions), the node is marked in the knowledge graph, and the weight of the contradictory relationship between R1 and R2 is strengthened.

[0174] Results: This invention successfully prevents erroneous rules from being added to the database through a contradiction-based blocking mechanism, actively suppressing the propagation path of semantic drift at the graph structure level. Repeating steps two, three, and four above, the inconsistency rate of newly added rules in each iteration is calculated—that is, the proportion of rules marked as "to be verified" to the total number of newly added rules in that iteration.

[0175] Termination condition determination:

[0176] When the inconsistency rate of newly added rules is less than 5% in three consecutive iterations, the rule quality is considered to have converged.

[0177] The iteration may terminate when the rule base reaches a size that covers all expected slot combinations.

[0178] Final output:

[0179] This embodiment, after multiple iterations, ultimately generates a complete set of annotation rules covering the following dimensions:

[0180] Positional dimensions: driver's seat, front passenger seat, rear seats;

[0181] Operational aspects: intensity adjustment, mode switching, and on / off control;

[0182] Attribute dimensions: Levels (1 to 5), Modes (Wave, Pulse, Soothing).

[0183] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0184] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the rule-based intelligent annotation generation method based on task semantic parsing as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0185] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A rule-based intelligent annotation generation method based on task semantic parsing, characterized in that, Specifically, it includes: A zero-sample rule cold start is performed, and a confidence score is calculated by combining the frequency of occurrence, semantic reasonableness score, and domain-general prior knowledge to select a seed rule set; Obtain the seed rule set and construct a rule knowledge graph based on multidimensional semantic relationships; Obtain the natural language statement to be labeled, refine the statement semantics and rule semantics of the natural language statement in both directions through a cross-attention mechanism, and calculate the matching score; On the rule knowledge graph, label information is propagated from seed rules to candidate rules through an attention mechanism; By comparing propagation tags with matching tags, inconsistent rules are identified, marked, and submitted for verification first. The rule knowledge graph is updated based on the verification results, and the final labeled rule set is generated iteratively.

2. The rule intelligent annotation generation method based on task semantic parsing according to claim 1, characterized in that: Perform a zero-sample rule cold start and select a seed rule set, specifically including: Construct multiple different prompt templates, and guide the large language model to output candidate entity types, rule patterns, and label spaces from domain-general knowledge through each template; The multiple templates are input into the large language model to obtain multiple sets of candidate outputs; Cross-validate the candidate outputs from different templates and retain at least two candidate entities, rule patterns, and tags that are consistently recognized by both templates. Based on the candidate set after consistent filtering, candidate entities and candidate rule patterns are combined to construct the initial rule body, and candidate tags are mapped to the initial rule head; The confidence score is calculated by comprehensively considering the frequency of occurrence of the rule in multiple templates, semantic reasonableness score, and general prior knowledge of the domain. Rules with a confidence level higher than a preset threshold are selected as the seed rule set.

3. The rule intelligent annotation generation method based on task semantic parsing according to claim 1, characterized in that: Obtain the natural language statement to be labeled; The natural language statement is bidirectionally refined using a cross-attention mechanism, considering both the semantics of the statement and the semantics of the rules. The matching score between the natural language statement and each candidate rule is then calculated. Specifically, this includes: The natural language statement and the candidate rule are respectively encoded into vector sequences; Calculate the attention from the natural language statement to the candidate rule, and the attention from the candidate rule to the natural language statement; Residual connections are made between the attention and the original representation, and layer normalization is performed. The refined statement focuses on the words most relevant to the rule, while suppressing irrelevant words; The refined rule representation incorporates instance-level semantic information from the current statement; Based on the pooled vectors of the refined statement and rule representations, a similarity score is calculated as the matching score between the statement and the rule, and a matching label is obtained.

4. The rule intelligent annotation generation method based on task semantic parsing according to claim 1, characterized in that: Based on the rule knowledge graph, starting from the seed rule set node, each node carries its label information and confidence score; The algorithm performs label-aware graph propagation based on similarity scores, specifically including: Along the implication relation edge: propagate label information from the source rule to the target rule; Along parallel relationship edges: bidirectional propagation of label information; When encountering a conflicting relationship: block the propagation, do not assign a propagation label, and mark the target rule node as a potential conflict; Unrelated edge: does not participate in the spread; For each node in the propagation of the label information, a weighted voting fusion is performed to obtain the predicted label and confidence level for the propagation stage.

5. The rule intelligent annotation generation method based on task semantic parsing according to claim 1, characterized in that: The same rule used to compare the predicted label with the matched label specifically includes: If both are consistent and the confidence level is higher than the threshold, then the rule and its label are officially added to the annotation rule base, and the label information and confidence level of the node in the rule knowledge graph are updated. If the two are inconsistent, or if the confidence level of either one is lower than the threshold, then the rule is marked as a rule to be verified. Based on an active learning strategy, this rule is preferentially added to the manual verification queue. After manual verification is completed, the results are verified, including: If the verification is successful, update the rule tag and add it to the rule base. If the verification fails, mark the node and its associated edges in the knowledge graph; If a contradictory relationship blocks the propagation process and no propagation label is obtained, the rule will be automatically marked as pending verification and submitted for manual confirmation first.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the rule intelligent annotation generation method based on task semantic parsing as described in any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the rule intelligent annotation generation method based on task semantic parsing as described in any one of claims 1 to 5.