A tree-structured text information data annotation system based on context path
By constructing a text data annotation system with a tree structure and a decomposition path, and using the tree structure and contextual relationships for annotation, the problems of low efficiency and high cost of text data annotation in the existing technology are solved, and high-quality annotation effects are achieved.
Patent Information
- Application Number
- CN202210297458.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-24
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-03-24
AI Technical Summary
Existing text data annotation methods cannot effectively utilize the tree structure relationship of text data, resulting in low annotation efficiency, high cost, and low corpus quality, especially for a large amount of contextual comment data, forum data, and chat data.
A tree structure text information data annotation system based on context paths is adopted. The tree structure is built through the data processing module. The path decomposition module decomposes the paths. The path distribution module distributes the paths to the user annotation terminal. The tree structure and contextual relationships are used for annotation, providing multiple A path distribution method to improve annotation efficiency and quality.
It effectively improves the annotation efficiency and quality of tree-structured text information data, reduces annotation costs, enables non-professionals to perform high-quality annotation, and is suitable for data collection in the fields of machine learning and artificial intelligence.
Smart Images

Figure CN114610890B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text data annotation, and in particular to a tree-structured text information data annotation system based on context path. Background Art
[0002] With the rapid development of big data applications and artificial intelligence technology, the demand for labeled data is increasing. Data labeling is a basic task in the field of artificial intelligence and machine learning. Labeling tasks are divided into text data labeling, image data labeling, voice data labeling, and other types of professional data labeling, such as medical imaging data labeling and geographic information data labeling.
[0003] In text data annotation, existing annotation methods mainly annotate a single text with categories, emotions, and opinions. Yang Xinyu et al. proposed a data annotation method based on data mining and crowdsourcing. This method uses crowdsourcing distribution to let annotators annotate. However, the annotation method only annotates the data discretely, the data display method is simple, and the annotation quality depends largely on the professionalism of the annotator. However, a large amount of text data such as comment data, forum data, and chat data have obvious contextual relationships and constitute a tree-structured text information. The existing annotation methods do not improve the annotation methods based on the structural relationships presented by the data, resulting in problems such as low reading efficiency, high cost, and limited corpus for manual annotation of such data, and low corpus quality.
[0004] Therefore, how to provide a tree-structured text information data annotation system based on context path to reduce the annotation cost of tree-structured text information data and improve the efficiency and quality of annotation is a technical problem that urgently needs to be solved in this technical field. Summary of the invention
[0005] The purpose of the present invention is to provide a tree-structured text information data annotation system based on context path to solve the technical problems existing in the prior art, which can effectively improve the annotation efficiency and quality of tree-structured text information data and reduce the annotation cost.
[0006] To achieve the above object, the present invention provides the following solution: The present invention provides a tree-structured text information data annotation system based on context path, comprising:
[0007] A data processing module is used to pre-process the tree structure text information data to be annotated to obtain tree structure data information;
[0008] A data storage module, connected to the data processing module, and used to store the tree structure data information;
[0009] A path decomposition module, connected to the data storage module, for performing path decomposition on the tree structure data information to obtain a path set;
[0010] A path distribution module, connected to the path decomposition module, for distributing the paths in the path set;
[0011] A user annotation terminal, connected to the path distribution module and the data storage module respectively, for annotating text information corresponding to each node in the distribution path;
[0012] The annotation integration output module is connected to the user annotation terminal and is used to integrate the annotation information of the user annotation terminal and output the obtained annotation result.
[0013] Preferably, the data processing module includes a data import unit, a node construction unit, and a tree structure construction unit;
[0014] The data import unit is used to obtain the tree structure text information data;
[0015] The node construction unit is used to construct the data node of the tree structure text information data and initialize the hierarchy of the node; the node includes a root node and a child node;
[0016] The tree structure construction unit is used to connect the nodes according to the hierarchy and contextual relationship of the nodes, obtain the tree structure corresponding to the root node, and update the hierarchy of the child nodes according to the connection relationship of each node in the tree structure.
[0017] Preferably, in the tree structure, each child node has a corresponding parent node, and the data storage module stores the tree structure obtained by the data processing module in the form of child nodes, parent nodes, and text information corresponding to each node.
[0018] Preferably, the path decomposition module includes a path corresponding unit and a path generating unit;
[0019] The path corresponding unit is used to start from the root node and traverse the tree structure corresponding to the root node using a depth-first search DFS method;
[0020] The path generation unit is used to adopt pre-order traversal to add the child nodes into the path according to the hierarchical relationship, and obtain a path set from the root node to all leaf nodes of the tree structure.
[0021] Preferably, the path distribution module includes a root node distribution unit and a path distribution unit;
[0022] The root node distribution unit is used to select the root node to be distributed according to the annotation request information sent by the user annotation terminal;
[0023] The path distribution unit is used to select a path from the path set according to the selected root node, and distribute the path to the corresponding user annotation terminal.
[0024] Preferably, the distribution method of the root node distribution unit includes one or more of random selection, selection based on historical records, and selection based on content preference settings of the user marking terminal.
[0025] Preferably, the distribution method of the path distribution unit includes one or more of long path priority, information volume priority, random selection, and path distribution according to the marking operation of the user marking terminal.
[0026] Preferably, the user annotation terminal includes an annotation unit, an annotation modification unit, an annotation submission unit, and an annotation request unit;
[0027] The labeling unit is used to label the text information corresponding to each node in the path based on the acquired path;
[0028] The annotation modification unit is used to perform annotation statistics and modify the annotation results of the annotated nodes;
[0029] The annotation submission unit is used to submit the annotation results of the annotation unit and the annotation modification unit, and the submitted content includes the annotation results and user annotation terminal information;
[0030] The annotation request unit is used to send annotation request information to the path distribution module, and is also used to set content preferences.
[0031] Preferably, the annotation integration output module includes an annotation review unit and an annotation result output unit;
[0032] The marking review unit is used to review whether the marking of the path is completed according to the marking result of the user marking terminal;
[0033] The labeling result output unit is used to classify and export all the labeling results that have passed the review.
[0034] Preferably, the annotation review unit is used to construct an annotation opinion set corresponding to the path according to the annotation result of the user annotation terminal, and judge whether the path is marked according to whether the size of the annotation opinion set is greater than or equal to a preset threshold.
[0035] The present invention discloses the following technical effects:
[0036] (1) The present invention constructs the text information data to be annotated into nodes, constructs the text information data to be annotated into a tree structure according to the hierarchy and contextual relationship of each node, and decomposes the tree structure into paths according to the traversal order of the tree structure, distributes it to the user annotation terminal for text annotation, utilizes the tree structure characteristics of the data and combines the context for annotation, effectively improves the annotation efficiency and annotation quality; at the same time, a complete contextual relationship is formed based on the path, even non-professionals can perform annotation, reduces the professional requirements for the user annotation terminal, and reduces the annotation cost. The present invention is applicable to the technical field of machine learning and artificial intelligence, facilitates the model to collect annotated data, and facilitates the collection of high-quality data required for model training, providing a basis for better conducting the next step of scientific research.
[0037] (2) The present invention provides multiple path distribution methods, thereby improving the richness of the annotation content of the user annotation terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0039] Figure 1 It is a structural schematic diagram of the tree-structured text information data annotation system based on context path of the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] Reference Figure 1As shown, this embodiment provides a tree-structured text information data annotation system based on context path, which is used to annotate news text data that conforms to the tree structure, including: a data processing module, a data storage module, a path decomposition module, a path distribution module, a plurality of user annotation terminals, and an annotation integration output module; the data processing module, the data storage module, the path decomposition module, the path distribution module, the user annotation terminal, and the annotation integration output module are connected in sequence, and the user annotation terminal is connected to the data storage module.
[0043] The data processing module is used to pre-process the tree-structured text information data to be annotated to obtain a tree structure; in this embodiment, the tree-structured text information data adopts news text data;
[0044] The data processing module includes a data import unit, a node construction unit, and a tree structure construction unit;
[0045] The data import unit is used to obtain tree-structured text information data; in this embodiment, the news text data includes the original news and the comment data and reply data corresponding to the news;
[0046] The node construction unit is used to construct each data in the tree structure text information data into a node, and initialize the hierarchy of each node; wherein the node includes a root node and a child node; in this embodiment, the original news text is taken as the root node n, and the comment data and reply data corresponding to the original news text are taken as child nodes n1, n2, ..., n k , where k is the total number of comment data and reply data corresponding to the news; the node level corresponding to the original news is initialized to level = 0, and the node level corresponding to the comment data is level = -1;
[0047] The tree structure construction unit is used to connect each node according to the hierarchy and contextual relationship of each node (for example, the reply relationship of a comment) to obtain a tree structure with the root node n as the root, and update the hierarchy of each child node according to the connection relationship of each node in the tree structure; except for the root node and the leaf node, each node has a unique parent node representing its direct previous context, and has a number of child nodes representing its direct following context;
[0048] In this embodiment, first, the node corresponding to the comment data of level = -1 is obtained; then, according to the parent node information of the node, it is traced back layer by layer to the root node n, that is, according to the parent node information of the node corresponding to the comment data, the nodes corresponding to the original news text, the comment data, and the nodes corresponding to the reply data are connected to obtain the tree structure T constructed with the root node n, and the level corresponding to each child node is updated according to the tree structure.
[0049] The data storage module is used to store the tree structure obtained by the data processing module; specifically, the tree structure obtained by the data processing module is stored in the form of child nodes, parent nodes, and text information corresponding to each node;
[0050] The path decomposition module is used to perform path decomposition on the tree structure obtained by the tree structure construction unit to obtain a path set of tree structure text information data to be annotated;
[0051] The specific method for the path decomposition module to obtain the path set of the tree-structured text information data to be annotated includes: starting from the root node n, using the DFS (DepthFirstSearch, depth-first search) method to traverse the subtrees T1, T2, ..., T k , the number of subtrees of the root node n is the total number of nodes with level = 2, that is, the number of nodes directly connected to the root node n, such as the number of first-level comments; using pre-order traversal, add each child node to the path according to the hierarchical relationship, and obtain a set of m paths from the root node n to all leaf nodes P = P1∪P2∪…∪P m , m is the number of leaf nodes, P i is the traversal sequence to reach leaf node i, i∈[1,m].
[0052] The path distribution module distributes the paths in the path set obtained by the path decomposition module to a plurality of the user marking terminals through a path-based distribution method; the path-based distribution method includes:
[0053] Root node distribution: According to the annotation request information sent by the user annotation terminal, the root node n for annotation is selected, which can be selected by, but not limited to, random selection, selection based on historical records, and selection based on content preference; the specific process of random selection is: randomly select n=Random(N) from the stored root node set, where N is the number of root nodes in the root node set. The specific process of selecting based on historical records is: based on the historical annotation nodes of the user annotation terminal, obtain the root node information marked by the user annotation terminal in the most recent time. The specific process of selecting based on content preference is: distribute the root nodes of the corresponding content to the corresponding user annotation terminal according to the content preference set by the user annotation terminal.
[0054] Path distribution: According to the selected root node, a path is selected from the path set decomposed by the path decomposition module and distributed to the corresponding user annotation terminal. Under the same root node n, the distribution method for different paths is but not limited to: long path priority, path length PL = ∑ i l i , where l i From root node n to leaf node n ilength; information volume is prioritized, path text information volume where i ni is a leaf node n i The amount of text information contained; randomly select, randomly obtain the path obtained by decomposing the current tree, p = Random (P); distribute the paths according to the annotation operation of the user's annotation terminal.
[0055] The process of distributing paths based on the longest path first is as follows: use DFS to traverse the tree structure corresponding to the current root node, obtain the traversal sequence of the path, sort the traversal sequence in descending order according to the set size, obtain the path length sorting result, and distribute the path with the longest path length first. The process of distributing paths based on the information amount first is as follows: use DFS to traverse the tree structure corresponding to the current root node, and calculate the leaf node n i The amount of text information contained i ni , after the traversal is completed, the text information of the path is obtained Arrange all paths in descending order according to the size of the corresponding text information volume to obtain the path information volume sorting result, and distribute the paths with more text information volume first. The process of path distribution based on random selection is: according to the path set P obtained by the path decomposition module, randomly obtain a path p = Random(P). The process of path distribution according to the marking operation of the user marking terminal is: if the current path is not expired, that is, the path distributed to the user marking terminal has a marking operation within the specified time, or the relevant path has not been marked, then use the above-mentioned distribution method to obtain the next relevant path of the tree structure corresponding to the current root node or obtain the path of the tree structure composed of a new root node; if the current path is expired, that is, f(P)>t, f is the marking operation, t is the preset expiration threshold, or the current path has been marked, then use the above-mentioned distribution method and path distribution algorithm to obtain the path of the tree structure composed of a new root node.
[0056] The user annotation terminal uses a path-based display mode to annotate the text information corresponding to each node in the acquired path; wherein the path-based display mode is to expand the nodes according to the hierarchical relationship and annotate according to the contextual relationship formed by each node, for example, news->comment->level 1 reply->level 2 reply; each of the user annotation terminals includes an annotation unit, an annotation modification unit, an annotation submission unit, and an annotation request unit;
[0057] The annotation unit annotates the text information corresponding to each node in the path based on the acquired path, specifically including: after acquiring the path, expanding the path according to the hierarchical relationship of each node in the path, from the root node to the leaf node, to form a complete contextual relationship, each node represents a text (for example: a reply or a comment), that is, a complete display of the original news text-comment, comment-reply, each node has a label set corresponding to itself, and the annotation unit selects different labels for annotation based on the complete contextual relationship formed by it; wherein the label set is obtained from a network database according to the subject of the data to be annotated, for example, there is an opinion label in the news label database marking Huawei, and the opinion labels include: positive, neutral, negative, and irrelevant.
[0058] The annotation modification unit is used to perform annotation statistics and modify the annotation results of the annotated nodes; the annotation modification unit performs annotation statistics in the following way: during the annotation process, the total number of nodes, the total number of unfinished nodes, the total number of completed nodes and the number that can be annotated are counted;
[0059] The method for the annotation modification unit to modify the annotation results of the annotated nodes is: modify the annotation results of the annotated nodes according to the new annotation content; since a repeated node set will be obtained when obtaining the path, at this time, the user annotation terminal can view the annotation results of the annotated nodes and can modify the previous annotations; for example, when annotating a news item, previously annotated comments may be obtained, and the user can view the previous annotation results, and if there are new annotation opinions, they can be modified directly.
[0060] The annotation submission unit is used to submit the annotation results of the annotation unit and the annotation modification unit, and the submitted content includes the annotation results and user annotation terminal information.
[0061] The annotation request unit is used to send annotation request information to the path distribution module, and is also used to set content preferences.
[0062] The annotation integration output module is used to integrate and output the annotation results of several user annotation terminals; the annotation integration output module includes an annotation review unit and an annotation result output unit;
[0063] The annotation review unit reviews whether the path is marked according to the marking results of the plurality of user marking terminals. The specific review method includes: the annotation review unit constructs a corresponding path annotation opinion set C according to the marking results of the plurality of user marking terminals. <C1,C2,…,C m>, according to whether the size of the annotated opinion set cardC is greater than or equal to the preset threshold, it is judged whether the path is marked; that is, when the number of people who have annotated the same node reaches the preset number, the node is marked. Specifically: cardC≧λ, the marking is completed, λ is the preset threshold; the preset threshold is related to the number of annotated opinion labels, the more labels there are, the higher the threshold.
[0064] The annotation result output unit is used to classify and export all the annotation results that have passed the review; wherein, the classification export includes exporting by subject and exporting by section; exporting by section, for example, exporting by news section, forum section and other data sections with obvious contextual relationships.
[0065] The present invention constructs the text information data to be annotated into nodes, constructs the text information data to be annotated into a tree structure according to the hierarchy and contextual relationship of each node, and decomposes the tree structure into paths according to the traversal order of the tree structure, distributes it to the user annotation terminal for text annotation, utilizes the tree structure characteristics of the data and combines the context for annotation, effectively improves the annotation efficiency and annotation quality; at the same time, a complete contextual relationship is formed based on the path, even non-professionals can perform annotation, reduces the requirements for the professionalism of the user annotation terminal, and reduces the annotation cost. The data annotation system of the present invention is not limited to the annotation of news and commentary text data, but is also applicable to other data annotations that conform to the tree structure in the technical field of machine learning and artificial intelligence, which facilitates the model to collect annotated data and collects high-quality data required for model training, providing a basis for better conducting the next step of scientific research.
[0066] The embodiments described above are only descriptions of the preferred modes of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A tree-structured text information data annotation system based on context path, characterized in that: include: A data processing module is used to pre-process the tree structure text information data to be annotated to obtain tree structure data information; A data storage module, connected to the data processing module, and used to store the tree structure data information; A path decomposition module, connected to the data storage module, for performing path decomposition on the tree structure data information to obtain a path set; A path distribution module, connected to the path decomposition module, for distributing the paths in the path set; A user annotation terminal, connected to the path distribution module and the data storage module respectively, for annotating text information corresponding to each node in the distribution path; The annotation integration output module is connected to the user annotation terminal and is used to integrate the annotation information of the user annotation terminal and output the obtained annotation result.
2. The context path-based tree-structured text information data annotation system according to claim 1, characterized in that: The data processing module includes a data import unit, a node construction unit, and a tree structure construction unit; The data import unit is used to obtain the tree structure text information data; The node construction unit is used to construct the data nodes of the tree structure text information data and initialize the hierarchy of the nodes; The nodes include a root node and child nodes; The tree structure construction unit is used to connect the nodes according to the hierarchy and contextual relationship of the nodes, obtain the tree structure corresponding to the root node, and update the hierarchy of the child nodes according to the connection relationship of each node in the tree structure.
3. The context path-based tree-structured text information data annotation system according to claim 2, characterized in that: In the tree structure, each of the child nodes has a corresponding parent node, and the data storage module stores the tree structure obtained by the data processing module in the form of child nodes, parent nodes, and text information corresponding to each node.
4. The context path-based tree-structured text information data annotation system according to claim 2, characterized in that: The path decomposition module includes a path corresponding unit and a path generating unit; The path corresponding unit is used to start from the root node and traverse the tree structure corresponding to the root node using a depth-first search DFS method; The path generation unit is used to adopt pre-order traversal to add the child nodes into the path according to the hierarchical relationship, and obtain a path set from the root node to all leaf nodes of the tree structure.
5. The context path-based tree-structured text information data annotation system according to claim 1, characterized in that: The path distribution module includes a root node distribution unit and a path distribution unit; The root node distribution unit is used to select the root node to be distributed according to the annotation request information sent by the user annotation terminal; The path distribution unit is used to select a path from the path set according to the selected root node, and distribute the path to the corresponding user annotation terminal.
6. The context path-based tree-structured text information data annotation system according to claim 5, characterized in that: The distribution method of the root node distribution unit includes one or more of random selection, selection based on historical records, and selection based on content preference set by the user marking terminal.
7. The context path-based tree-structured text information data annotation system according to claim 5, characterized in that: The distribution method of the path distribution unit includes one or more of long path priority, information volume priority, random selection, and path distribution according to the marking operation of the user marking terminal.
8. The context path-based tree-structured text information data annotation system according to claim 1, characterized in that: The user annotation terminal includes an annotation unit, an annotation modification unit, an annotation submission unit, and an annotation request unit; The labeling unit is used to label the text information corresponding to each node in the path based on the acquired path; The annotation modification unit is used to perform annotation statistics and modify the annotation results of the annotated nodes; The annotation submission unit is used to submit the annotation results of the annotation unit and the annotation modification unit, and the submitted content includes the annotation results and user annotation terminal information; The annotation request unit is used to send annotation request information to the path distribution module, and is also used to set content preferences.
9. The context path-based tree-structured text information data annotation system according to claim 1, characterized in that: The annotation integration output module includes an annotation review unit and an annotation result output unit; The marking review unit is used to review whether the marking of the path is completed according to the marking result of the user marking terminal; The labeling result output unit is used to classify and export all the labeling results that have passed the review.
10. The context path-based tree-structured text information data annotation system according to claim 9, characterized in that: The annotation review unit is used to construct an annotation opinion set of the corresponding path according to the annotation result of the user annotation terminal, and judge whether the path is marked according to whether the size of the annotation opinion set is greater than or equal to a preset threshold.
