Data processing method and device, computer equipment and storage medium
Through data expansion and conflict verification of the initial annotation standards, the annotation details are adjusted to solve the problem of deviation in annotation results in data annotation, improve the consistency and efficiency of annotation, and ensure the quality of data annotation.
Patent Information
- Application Number
- CN202410102357.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2024-09-17
AI Technical Summary
In the field of pre-training language models, the consistency of data annotation directly affects the quality of the model. However, existing semi-automatic annotation methods lead to deviations in annotation results due to subjective differences between annotators, making it difficult to ensure the accuracy and efficiency of annotation results.
By obtaining the initial annotation standard for data expansion processing, more complete annotation details are obtained, and conflict verification and analysis is performed with the annotation details in the annotation details library, and the annotation details are adjusted according to the conflict analysis results to eliminate conflicts and improve the accuracy of the annotation details. Consistency and accuracy.
It has improved the quality and efficiency of data annotation, reduced the deviation of annotation results through standardized annotation details, and improved the accuracy and consistency of subsequent data annotation.
Smart Images

Figure CN118656635A
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to a data processing method, apparatus, computer equipment, and storage medium. Background Art
[0002] Data labeling refers to the process of marking or annotating data when preparing training data for machine learning and artificial intelligence models. Labels can be classification labels, bounding boxes, key points, semantic segmentation, etc., which are used to guide the model to learn and understand the data. In the field of pre-trained language models, the consistency of data labeling directly affects the quality of the trained model.
[0003] Commonly used data annotation methods include semi-automatic annotation methods that combine manual annotation and automatic annotation. Specifically, automated tools or algorithms are used to assist annotators in annotation to improve annotation efficiency and accuracy. However, different annotators have different understandings of annotation standards. Due to differences in subjective awareness among annotators, annotation errors, omissions, and repeated annotations are prone to occur, resulting in deviations in annotation results. Summary of the invention
[0004] The present application provides a data processing method, apparatus, computer device, computer-readable storage medium, and computer program product.
[0005] In a first aspect, the present application provides a data processing method. The method comprises:
[0006] Obtaining initial annotation standards;
[0007] Performing data expansion processing on the initial annotation standard to obtain the first annotation details;
[0008] Perform conflict check on the first annotation rule and the annotation rules in the annotation rule library;
[0009] When there is a conflict between the first annotation rule and the second annotation rule in the standard rule library, the first annotation rule is analyzed to obtain a conflict analysis result of the first annotation rule relative to the second annotation rule;
[0010] According to the conflict analysis results, adjust the first annotation rule or the second annotation rule.
[0011] In a second aspect, the present application also provides a data processing device method. The device comprises:
[0012] A data acquisition module, used to obtain initial annotation standards;
[0013] The data expansion module is used to perform data expansion processing on the initial annotation standard to obtain annotation details;
[0014] A data verification module is used to perform conflict verification between the annotation rules and the existing annotation rules in the annotation rule library;
[0015] A data analysis module is used to analyze the first annotation rule when there is a conflict between the first annotation rule and the second annotation rule in the standard rule library, and obtain a conflict analysis result of the first annotation rule relative to the second annotation rule;
[0016] The data adjustment module is used to adjust the first marking rule or the second marking rule according to the conflict analysis result.
[0017] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in the above-mentioned data processing method embodiments are implemented.
[0018] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above-mentioned data processing method embodiments are implemented.
[0019] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned data processing method embodiments are implemented.
[0020] It can be seen that in the embodiment of the present application, after obtaining the initial annotation standard, the initial annotation standard is subjected to data expansion processing to obtain more complete and rich annotation rules, which helps to reduce the possibility of ambiguity and ambiguity in the annotation standard and improve the quality of annotation. The first annotation rule obtained by expansion is subjected to conflict check with the existing annotation rules in the annotation rule library, so that conflicts between the annotation rules can be discovered in time. When it is detected that there is a conflict between the first annotation rule and the second annotation rule in the annotation rule library, the first annotation rule is analyzed to obtain a conflict analysis result of the first annotation rule relative to the second annotation rule, and then the first annotation rule or the second annotation rule is adjusted according to the conflict analysis result, so that conflicts can be resolved in time, conflicts between annotation rules can be reduced, and the consistency of annotation rules can be improved. In summary, the above scheme, through a series of processes such as expanding the initial annotation standard, conflict checking and rule adjustment, can obtain a set of standardized annotation rules, which is conducive to improving the quality and efficiency of annotation. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] FIG1 is an application environment diagram of a data processing method in one embodiment;
[0022] Figure 2 is a flow chart of a data processing method in one embodiment;
[0023] Figure 3 is a flow chart of a data processing method in another embodiment;
[0024] Figure 4 A schematic diagram of a flow chart of a step of determining a marking rule in a marking rule library in an embodiment;
[0025] Figure 5 A schematic diagram of a flow chart of a step of determining a marking rule in a marking rule library in another embodiment;
[0026] FIG6 is a schematic diagram of a flow chart of a conflict checking step in one embodiment;
[0027] Figure 7 A schematic diagram of a flow chart of a conflict checking step in another embodiment;
[0028] Figure 8 is a detailed flow chart of a data processing method in an embodiment;
[0029] Fig. 9 A structural block diagram of a data processing device method in an embodiment;
[0030] Fig.10 A structural block diagram of a data processing device method in an embodiment;
[0031] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] It should be noted that the data involved in this application (including but not limited to marking standards and marking details, stored marking details and data presentation results, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0034] In the field of pre-trained language models, the consistency of data annotation directly affects the quality of the trained model.
[0035] At present, commonly used data labeling methods include semi-automatic labeling methods that combine manual labeling and automatic labeling. Specifically, automated tools or algorithms are used to assist labelers in labeling to improve labeling efficiency and accuracy.
[0036] However, for the labeling standard setters and labeling acceptors, different business experts have different understandings of the labeling standards. Even the same person may have different understandings of labeling at different stages of business understanding, which affects the consistency of the labeling results. For the labelers involved in the labeling task, due to the possible subjective differences between them, labeling errors, omissions, and repeated labeling are prone to occur, resulting in deviations in the labeling results. In addition, if there is a temporary adjustment of personnel, the temporarily added labelers cannot fully grasp the labeling details and reasons, and are prone to labeling errors or omissions. Since the accuracy of the labeling results cannot be guaranteed, it will bring a greater workload to the subsequent review of the labeling results, which also affects the efficiency of data labeling.
[0037] Based on the above considerations, the present application proposes a solution that can improve the accuracy of annotation results and the efficiency of annotation work. Specifically, it can be based on the initial annotation standards formulated by business experts to provide a set of annotation rules that deeply control the annotation knowledge system. Specifically, after obtaining the initial annotation standards, the initial annotation standards can be subjected to data expansion processing to obtain richer annotation rules, and then the annotation rules can be conflict checked with the existing annotation rules in the annotation rule library. If abnormal annotation rules that conflict with the existing annotation rules are detected, a conflict analysis is performed on the abnormal annotation rules. According to the conflict analysis results, the existing annotation rules or annotation rules are adjusted to eliminate the conflict, so as to obtain a more comprehensive and complete annotation rule library, thereby providing accurate and detailed guidance for subsequent data annotation, and improving the consistency, accuracy and efficiency of data annotation.
[0038] The data processing method provided in the embodiment of the present application can be applied to the application environment shown in FIG1. The terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Specifically, the data storage system stores a labeling rule library containing existing labeling rules. The labeling personnel may upload the initial labeling standard constructed by the business expert to the server 104 through the terminal 102, and then send a data processing message to the server 104. The server 104 responds to the message, obtains the initial labeling standard, and then performs data expansion processing on the initial labeling standard to obtain a richer first labeling rule. Then, a conflict check is performed between the first labeling rule and the existing labeling rules in the labeling rule library to check whether the first labeling rule conflicts with the existing labeling rules. When there is a conflict between the first labeling rule and the second labeling rule in the standard rule library, the first labeling rule is analyzed to obtain a conflict analysis result of the first labeling rule relative to the second labeling rule, and the conflict analysis result is obtained. According to the conflict analysis result, the first labeling rule or the second labeling rule is adjusted to eliminate the conflict, and the labeling rule library is updated to obtain a comprehensive and complete labeling rule library.
[0039] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0040] In some embodiments, Figure 2 As shown, a data processing method is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps:
[0041] S100, obtaining an initial marking standard.
[0042] Annotation standards refer to a set of specifications, criteria or rules formulated for data annotation tasks, which are used to guide the operations and judgments of annotators when annotating data. Annotation standards include annotation targets, label definitions, annotation guidelines, annotation specifications, and other auxiliary resources. In this embodiment, the initial annotation standard is a simple version of the annotation standard constructed by business experts based on their own professional knowledge. The number of initial annotation standards can be multiple or single.
[0043] For example, if the labeling task is to label the user's repayment ability and determine whether the user can repay the loan on time, the labeling criteria can be as follows:
[0044] Labeling goal: This task aims to label the user's repayment ability and determine whether the user can repay the loan on time.
[0045] Tag definition: Can repay: indicates that the user has sufficient repayment ability and has a high probability of repaying the loan on time. Unable to repay: indicates that the user lacks sufficient repayment ability and has a high risk of not being able to repay the loan on time.
[0046] Labeling Guide: Comprehensively consider the user's personal information, income, expenditure, credit rating and other factors to determine their repayment ability. Refer to the user's historical repayment record, career stability, loan purpose and other factors to give a reasonable repayment forecast. In the case of a lack of clear repayment ability, you can refer to other similar cases or consult professional institutions for judgment.
[0047] Labeling specification: Use binary labels for labeling, and specify labels in samples to indicate the user's repayment ability. When labeling, it is necessary to reasonably judge and label based on sufficient user information and loan conditions. For uncertain situations, it can be marked as "pending" or other relevant signs for subsequent processing.
[0048] Auxiliary resources: Provide users’ personal information, income and expenditure records, credit ratings and other relevant data for reference.
[0049] In specific implementation, the annotator can upload the initial annotation standards constructed by the business experts to the server and send an annotation data processing message to the server. The server responds to the message and obtains the initial annotation standards. Specifically, the server can obtain multiple initial annotation standards at a time and then process the multiple annotation standards, or it can obtain one annotation standard at a time and then process the single annotation standard.
[0050] S300, performing data expansion processing on the initial annotation standard to obtain a first annotation rule.
[0051] Labeling rules are specific specifications and guidelines formulated for data labeling tasks. They provide more detailed guidance and requirements for the data obtained after further fine-grained decomposition and expansion of the labeling standards. Labeling rules may include labeling methods and processes, label definitions, scopes and interpretations, labeling limits and boundary determination methods, and labeling rules and conventions.
[0052] In specific implementation, after obtaining the initial annotation standard, the initial annotation standard can be analyzed to understand the rules, requirements and label definitions therein, and then the initial annotation standard can be expanded, including fine-grained splitting of the annotation standard according to different annotation types, different labels or different task stages, and multi-dimensional expansion of the split annotation standard, adding definitions and detailed interpretations, etc., to obtain rich and detailed first annotation details. Specifically, it can be to first fine-grained split the annotation standards involving wider dimensions, and locally enhance the definition of the annotation standards involving narrower dimensions. Then, according to actual business needs and expansion needs, data expansion is performed from multiple dimensions, for example, adding new samples, increasing the types of intent labels, increasing the subdivision of intent labels, adding annotation methods and explanations, etc., to obtain new first annotation details. It is understandable that the expanded data should cover more situations and scenarios to improve the diversity and representativeness of the annotation data.
[0053] Similarly, taking the marking standard of whether a user can repay a loan as an example, the broad user basic information dimension involved in the marking standard can be subdivided into more specific sub-dimensions. For example, the following sub-dimensions are split: Personal information dimension: including information such as the user's age, gender, and educational background. Occupational status dimension: including information such as the user's occupation type, salary income, and job stability. Loan information dimension: including information such as loan amount, loan purpose, and repayment period.
[0054] Then, for each sub-dimension, local enhanced definition processing can be performed based on the labeling standard to more accurately reflect the user's repayment ability. For example, in the personal information dimension, the following labels can be added: age between 25-35 years old, education background is undergraduate or above; in the occupational status dimension, the following labels can be added: monthly salary income exceeds 5,000 yuan, and job stability has been for one year; in the loan information dimension, the following labels can be added: loan amount exceeds 100,000 yuan, and the loan purpose is to buy a house.
[0055] Then, according to actual business needs and expansion needs, the data can be expanded from multiple dimensions, such as adding new samples: collecting more different types of user data to cover a wider range of situations. Increase the types of intent labels: According to specific business needs, other relevant repayment ability labels can be added, such as "partial repayment" or "deferred repayment". Increase the segmentation of intent labels: For each sub-dimension, the respective labels can be subdivided to more accurately judge the user's repayment ability, increase labeling methods and explanations, and provide more detailed labeling guidelines and explanations to ensure that labelers accurately understand and perform labeling tasks, and obtain new first labeling rules.
[0056] S500: Perform conflict check between the first annotation rule and the annotation rules in the annotation rule library.
[0057] In actual applications, a labeling rule library is deployed in the server, and multiple labeling rules (hereinafter referred to as existing labeling rules) are stored in the labeling rule library. It can be understood that in the initial stage, the existing labeling rules can be general labeling rules formulated based on business knowledge and experience. With the continuous execution of labeling tasks and the continuous analysis of data labeling results, the labeling rules can be gradually improved and optimized, that is, the labeling rules are in a state of dynamic update.
[0058] Continuing from the previous embodiment, after obtaining the first marking rule, a conflict check may be performed between the first marking rule and existing marking rules in the marking rule library to detect whether there is a conflict between the two.
[0059] In specific implementation, the first annotation rule may be subjected to conflict check with all the annotation rules in the annotation rule library. The conflict check may include data duplication check, annotation label consistency check, data consistency check, and logic consistency check. If any of the checks fails, it is determined that there is a conflict between the first annotation rule and the annotation rules in the annotation rule library.
[0060] Among them, data duplication check is to check whether the first annotation rule is repeated with the existing annotation rule in the annotation rule library. If repeated, it is determined that there is a conflict between the two. The annotation label consistency check is to check whether the annotation label defined in the first annotation rule is consistent with the annotation label in the existing annotation rule library, specifically including checking the consistency of the label name and meaning to avoid the same or similar labels being used for different meanings in different rules. If there is inconsistency, it is determined that there is a conflict between the two. Data consistency check: Check whether the first annotation rule is consistent with the data in the rule library. If there is inconsistency, it is determined that there is a conflict between the two. For example, if the data in the existing rule library requires that a field can only take a specific value, and the new annotation rule provides other values as options, it may cause a conflict. Logical consistency check is to check whether the annotation logic of the new rule is consistent with that of the existing rule library. If there is inconsistency, it is determined that there is a conflict between the two. For example, if a label in the existing rule library identifies a certain type of situation, and the label of this type of situation is modified or redefined in the new annotation rule, it may cause a conflict with the annotation result in the existing rule library.
[0061] In other embodiments, it is also possible to match some existing annotation details with the same label or annotation type according to the label or annotation type of the first annotation detail, and then perform conflict check on the first annotation detail and the matched partial annotation details. Specifically, the similarity between the first annotation detail and the existing annotation details can be measured by a text similarity calculation method, such as cosine similarity, and then perform conflict check.
[0062] S700: When there is a conflict between a first annotation rule and a second annotation rule in a standard rule library, the first annotation rule is analyzed to obtain a conflict analysis result of the first annotation rule with respect to the second annotation rule.
[0063] The conflict analysis results include but are not limited to the cause of the conflict, the type of conflict, the severity of the conflict, etc.
[0064] Continuing from the previous embodiment, in the process of comparing whether there is a conflict between the first annotation rule and the existing annotation rule, if according to the conflict detection method in the above embodiment, it is detected that the current first annotation rule conflicts with a certain annotation rule in the annotation rule library, that is, the annotation rule is marked as the second annotation rule, then the first annotation rule is subjected to conflict analysis to obtain the conflict analysis result. Specifically, the annotation label defined in the first annotation rule and the annotation label in the second annotation rule can be compared to check whether there is a difference or conflict in the name. The annotation definitions in the first annotation rule and the second annotation rule are compared, and the elements such as the annotation rules, conditions and premises are compared to determine whether there is a conflict. The annotation rules in the first annotation rule and the second annotation rule are compared, including specific annotation requirements, judgment conditions, algorithms, etc., to check whether there are conflicting rules or inconsistent requirements. Through the above analysis, the cause of the conflict, the type of conflict and the severity of the conflict are obtained. For example, the cause of the conflict may be that the judgment conditions in the annotation rule are inconsistent, resulting in a conflict, or the naming of the annotation tag is inconsistent, resulting in a conflict. The conflict types include name conflicts, rule conflicts or logical conflicts. The severity of the conflict can be determined based on the number of conflicts. If the number of conflicts is large, such as greater than a preset number threshold, it can be determined as a serious conflict. If the number is small, such as less than or equal to the preset number threshold, it can be determined as a minor conflict.
[0065] In practical applications, due to the large number of annotation details, the wide range of dimensions and labels involved, and the modification of annotation details may have a significant impact on the accuracy and reliability of the annotation task, the corresponding importance of the annotation details of each type of intent label can be set in advance based on the impact of the annotation details on the task results and the coverage in the data set, combined with professional opinions. For example, taking the data annotation task in the financial field as an example, based on actual experience, it is determined that the intent label "normal repayment" has a relatively wide coverage in the data set and involves more data, so the importance of the annotation details corresponding to the intent label "normal repayment" can be set to "high importance".
[0066] During specific implementation, in the process of checking whether there is a conflict between the first annotation rule and the existing annotation rules in the annotation rule library, due to the large number of annotation rules, generally, multiple second annotation rules with conflicts may be detected. At this time, the priority of the conflict analysis can be determined according to the importance of the second annotation rules, and then the conflict analysis can be performed on the conflicting first annotation rule and the second annotation rule at one time according to the priority to obtain the conflict analysis result. The specific analysis process will not be repeated here.
[0067] S900: Adjust the first marking rule or the second marking rule according to the conflict analysis result.
[0068] Continuing from the previous embodiment, after obtaining the conflict analysis result, the annotation rules can be adjusted in a targeted manner according to the conflict analysis result. Since the first annotation rule is extended, the cause of the annotation rule conflict may be that the second annotation rule that conflicts with the first annotation rule is not perfect enough, or it may be because the first standard rule itself has defects. Therefore, it is necessary to adjust the first annotation rule or the second annotation rule according to the actual situation. The adjustment process may include adjusting or deleting keywords in the annotation rules, merging annotation rules, etc. to resolve the conflict.
[0069] For example, there is already a marking rule A in the marking rule library: If repayment is not possible due to various objective reasons, it is marked as unrepayable. The newly added first marking rule B: If repayment is not possible due to unemployment, it is determined to be unemployment. In the conflict verification process between the two, since unemployment is one of the objective reasons for not being able to repay, according to the existing marking rule A, it should be determined that the label intention is "unable to repay", and according to the first marking rule B, it should be determined that the label intention is "unemployed". At this time, the server will detect that there is a conflict between marking rules A and marking rules B, and analyze that the cause of the conflict may be: unemployment is one of the objective reasons for not being able to repay. At this time, the existing marking rule A needs to be adjusted, that is, marking rule A is adjusted to: if repayment is not possible due to various objective reasons other than unemployment, it is marked as unrepayable.
[0070] In the above data processing method, after obtaining the initial annotation standard, the initial annotation standard is subjected to data expansion processing to obtain more complete and rich annotation rules, which helps to reduce the possibility of ambiguity and ambiguity in the annotation standard and improve the quality of annotation. The first annotation rule obtained by expansion is subjected to conflict check with the existing annotation rules in the annotation rule library, so that conflicts between annotation rules can be discovered in time. When it is detected that there is a conflict between the first annotation rule and the second annotation rule in the annotation rule library, the first annotation rule is analyzed to obtain the conflict analysis result of the first annotation rule relative to the second annotation rule, and then the first annotation rule or the second annotation rule is adjusted according to the conflict analysis result, so that conflicts can be resolved in time, conflicts between annotation rules can be reduced, and the consistency of annotation rules can be improved. In summary, the above scheme, through a series of processes such as expanding the initial annotation standard, conflict check and rule adjustment, can obtain a set of standardized annotation rules, which is conducive to improving the quality and efficiency of annotation.
[0071] like Figure 3 As shown, in some embodiments, after S900, the process further includes:
[0072] S920: Perform a conflict check between the adjusted first annotation rule and the annotation rules in the annotation rule library.
[0073] S922: When there is no conflict between the adjusted first annotation rule and the annotation rule in the annotation rule library, enter the adjusted first annotation rule into the annotation rule library.
[0074] Following the previous step, if the adjusted annotation rule is the first annotation rule, a conflict check is performed between the adjusted first annotation rule and the annotation rules in the annotation rule library. If there is no conflict between the first annotation rule and the annotation rules in the annotation rule library, the first annotation rule is entered into the annotation rule library to update the annotation rule library. If there is still a conflict, a conflict analysis is performed again to adjust the annotation rule until the conflict is eliminated, and the adjusted first annotation rule is entered into the annotation rule library.
[0075] like Figure 3 As shown, in some embodiments, after S900, the process further includes:
[0076] S930: Perform conflict check on the adjusted second annotation rule and the first annotation rule.
[0077] S932: When there is no conflict between the first marking rule and the adjusted second marking rule, enter the first marking rule into the marking rule library.
[0078] In this embodiment, if the adjusted annotation rule is the second annotation rule, a conflict check is performed on the adjusted second annotation rule and the first annotation rule. If there is no conflict between the two, the first annotation rule is entered into the annotation rule library to update the annotation rule library. If there is still a conflict between the two, a conflict analysis is performed again, the second annotation rule is adjusted until the conflict is eliminated, and the first annotation rule is entered into the annotation rule library.
[0079] In other embodiments, after obtaining the conflict analysis result, the conflict analysis result can be pushed to the client so that the labeling personnel can make corresponding adjustments and modifications to the first labeling rule or the second labeling rule, and then feed back the adjusted first labeling rule or the second labeling rule to the server. The server receives the adjusted first labeling rule or the second labeling rule, and again performs a conflict check on the adjusted first labeling rule with the labeling rule in the labeling rule library, or performs a conflict check on the adjusted second labeling rule with the first labeling rule. The conflict check process refers to the conflict check process described in the above embodiment, which will not be repeated here. If there is no conflict, the first labeling rule is entered into the labeling rule library.
[0080] In this embodiment, the conflict check is performed again on the adjusted first annotation rule or the second annotation rule, which can effectively resolve the conflict and improve the quality and consistency of the annotation rule library.
[0081] like Figure 4 As shown, in some embodiments, after S922 or S932, the process further includes:
[0082] S940: Label multiple first samples to be labeled according to the labeling rules in the current labeling rule library to obtain a first labeling result for each first sample to be labeled.
[0083] S960: Perform consistency evaluation on each first annotation result to obtain an evaluation result of each first annotation result.
[0084] S980: Determine the reliability of the annotation rules in the current annotation rule library according to each evaluation result.
[0085] In actual application, through the method in the above embodiment, the first annotation rules or the adjusted first annotation rules are entered into the annotation rule library. After the annotation rule library is updated, the annotation rules in the current latest annotation rule library can be used as the basis to perform data annotation on multiple first samples to be annotated, and obtain the first annotation result of each first sample to be annotated. Take the annotation task of annotating whether the sample to be annotated is "repayable" as an example for explanation:
[0086] If the first sample to be marked is: the customer clearly promised to repay on time in the loan application. The marking rules in the marking rule library are: judge whether the customer has the ability to repay based on the customer's clear promise in the loan application, or his credit report and financial status. Then the first sample to be marked is marked according to the above marking rules, and the first marking result is obtained: repayment is possible.
[0087] Then, each first annotation result is evaluated for consistency to obtain an evaluation result of each first annotation result, and then based on each evaluation result, the reliability of the annotation rules in the current annotation rule library is evaluated, and the annotation rules are further optimized and improved.
[0088] Specifically, the consistency evaluation of each first annotation result can be: using a method of multi-person annotation or expert review to evaluate the consistency of each first annotation result. For example, the sample to be annotated corresponding to the first annotation result is assigned to multiple annotators or experts for a second annotation to obtain a second annotation result, and then, based on the second annotation result and the first annotation result, a statistical method is used to evaluate the consistency of the first annotation result to obtain an evaluation result. Specifically, it can be to calculate the consistency measurement index of the first annotation result, such as the accuracy rate or the recall rate. Then, according to the consistency measurement index of each first annotation result, the reliability of the annotation rules in the annotation rule library is comprehensively evaluated, and specifically, the average value of the consistency measurement index of all first annotation results is calculated, and the average value of the consistency measurement index is determined as the reliability of the annotation rules in the annotation rule library. It can also be to assign different weights to the corresponding first annotation results according to the importance of the sample to be annotated, and then the consistency measurement index of all first annotation results is weighted and averaged, and then the weighted average value is determined as the reliability of the annotation rules in the annotation rule library.
[0089] In this embodiment, by performing consistency evaluation on the data annotation results of multiple data annotators, the consistency of the annotation results can be improved, and the quality of the annotation details can be further optimized.
[0090] like Figure 5 As shown, in some embodiments, S960 includes:
[0091] S962, annotate the first sample to be annotated corresponding to the first annotation result through multiple second simulated annotation models to obtain multiple simulated annotation results, the first annotation result is any one of the multiple first annotation results, and the multiple simulated annotation models include the first simulated annotation model of the data annotator corresponding to the first annotation result and multiple second simulated annotation models.
[0092] S964, screening out a target simulation annotation result that matches the first annotation result from the multiple simulation annotation results.
[0093] S966, determining an evaluation result of the first standard result according to the number of target simulation annotation results and the number of simulation annotation results
[0094] The simulated annotation model can be a variety of different machine learning models or deep learning models, including but not limited to logistic regression models, support vector machine models, and neural network models. In this embodiment, the first simulated annotation model is the simulated annotation model of the data annotator a corresponding to the first annotation result to be evaluated, and the second simulated annotation model is a simulated annotation model other than the first simulated annotation model, that is, a simulated annotation model of other data annotators except data annotator a.
[0095] In practical applications, the historical annotation data of each data annotator can be used to train a simulation annotation model corresponding to each data annotator in a targeted manner. Specifically, the simulation annotation model of each data annotator can be trained based on the following method: first, the historical annotation results of each data annotator are collected, and then, for the historical annotation results of each data annotator, the proportion of each intent label is counted, and according to the proportion of each intent label, the training data of each intent label is extracted to obtain the training set of each data annotator. In this embodiment, the proportion of the intent label of each data annotator can be compared to screen out the mode of the intent label (i.e., the intent label with the highest proportion), and then, for other annotation labels, according to the same or similar proportion as the label, the same distribution of annotation data is extracted from the annotation data of the data annotator to obtain the training set of the simulation annotation model of each data annotator to balance the training set. In other embodiments, the target extraction ratio can also be determined according to the mode of the intention label proportion, and for each intent label, the same proportion of annotation data is extracted according to the target extraction ratio to obtain the training set corresponding to each data annotator.
[0096] For example, if there are 10 intent labels (intent classification), it is necessary to count the proportion of each intent label in all the labeled data of each data annotator. That is, count the proportion of data labeled with intent label "a" in all the labeled data of annotator A. If the proportion of a certain intent label in the annotation results of a data annotator is particularly high, if the annotation result is directly used for model training, it will affect the model recognition result. The model will tend to identify the intent label with a higher proportion of the category. Therefore, it is necessary to extract the same distributed labeled data with the same or similar proportions. For example, if the number of labeled data of labeler A is 100, of which the number of samples with intent label "a" is 30, and the number of samples of other intent labels is less than 10, that is, the proportion of intent label "a" is too high. For each intent label, labeled data with the same or similar proportion as the intent label with the highest proportion are extracted from the labeled data of labeler A. If the number of labeled data for a certain label intent is less than the majority, all labeled data of this type of intent label are extracted, so as to obtain the training set of each simulated labeling model.
[0097] Furthermore, the pre-constructed data annotation model may be trained based on the training set of each data annotator to obtain a simulated annotation model corresponding to each data annotator.
[0098] The process of evaluating the consistency of each first annotation result may be: for each first annotation sample corresponding to the first annotation result, respectively call the simulation annotation model of other data annotators except the data annotator corresponding to the first annotation result to perform data annotation, and obtain multiple annotation simulation results, and then compare the multiple annotation simulation results with the first annotation result, and screen out the target simulation annotation result that matches the first annotation result, and the target simulation annotation result is the same or similar to the first annotation result. Then, count the number of target simulation annotation results, and determine the ratio of the number of target simulation annotation results to the number of simulation annotation results as the evaluation result of the first annotation result.
[0099] For example, for the first to-be-annotated sample b corresponding to the first annotation result of annotator A, the simulation annotation models of the other 10 annotators except annotator A are respectively called to simulate the annotation of sample b, and 10 simulation annotation results are obtained respectively. If there are 7 target simulation annotation results that are the same or similar to the results annotated by annotator A among the 10 simulation annotation results, then the annotation consistency of the first annotation result is determined to be (7 / 10)*100%=70%. In this way, the annotation consistency of the first annotation result corresponding to each data annotator can be obtained respectively.
[0100] In this embodiment, by calling multiple simulated annotation models other than the data annotator to perform annotation simulation, multiple independent annotation perspectives can be obtained, thereby more comprehensively evaluating the consistency of the first annotation result, making the evaluation result of the first annotation result more accurate.
[0101] As shown in FIG. 6 , in some embodiments, S500 includes:
[0102] S520: Determine a first sentence vector of a first annotation rule.
[0103] S522: Determine the distance between the first sentence vector and the second sentence vector of the annotation rule in the annotation rule library.
[0104] S524: When the distance between the first sentence vector and the second sentence vector of the second annotation detail is less than or equal to a preset distance threshold, determine that there is a conflict between the first annotation detail and the second annotation detail.
[0105] In this embodiment, the sentence vectors corresponding to the first annotation rule and the annotation rules in the annotation rule library may be obtained through a pre-trained language model. The sentence vectors corresponding to the annotation rules in the annotation rule library may be obtained in advance through a pre-trained language model.
[0106] Among them, the pre-trained language model refers to a type of deep learning model that is pre-trained on large-scale text data, aiming to learn the potential structure and statistical laws of the language. Pre-trained language models include but are not limited to BERT (Bidirectional Encoder Representations from Transformers), recurrent neural networks, or self-attention mechanisms. Taking the BERT model as an example of a pre-trained language model, specifically, the sentence vectors of the annotation details and the existing annotation details can be obtained by the Sentence-BERT method, and then the similarity or difference between the annotation details and the existing annotation details is obtained by calculating the distance between the first sentence vector and the second sentence vector, and then the similarity is used to determine whether the annotation details conflict with the existing annotation details.
[0107] In specific implementation, the first annotation rule and the sentence with the existing annotation rule in the annotation rule library can be represented as sentences in text format respectively, and then the first annotation rule and the existing annotation rule represented in text format are preprocessed, including word segmentation, adding special tags (such as start tags, end tags), padding, etc. The preprocessed sentences of the first annotation rule and the sentences with the existing annotation rules are input into the BERT model respectively, and the first sentence vector of the first annotation rule and the second sentence vector of the existing annotation rule are obtained respectively. In the BERT model, the output of the first special tag [CLS] is usually used as the encoding vector of the entire sentence. For each sentence, the output of the [CLS] tag is taken as the vector representation of the sentence, and this vector captures the context and semantic information of the entire sentence. According to the above method, the first sentence vector of the annotation rule and the second sentence vector of the existing annotation rule are obtained, and then the first sentence vector and the second sentence vector are normalized, and then the distance between the normalized first sentence vector and the second sentence vector is calculated. For example, the distance between the first sentence vector and the second sentence vector can be calculated by the Euclidean distance algorithm or the cosine similarity algorithm to obtain the distance between the first sentence vector and the second sentence vector. The smaller the distance value, the higher the similarity between the annotation rule and the existing annotation rule, and the more similar the sentences are in semantics; the larger the distance value, the higher the similarity between the annotation rule and the existing annotation rule, and the greater the semantic difference between the sentences. In practical applications, due to the large number of annotation rules and existing annotation rules, it can be understood that the above distance can be obtained by traversing, and for each annotation rule, the distance between the corresponding first sentence vector and the second sentence vectors of all existing annotation rules is calculated. If the distance between the first sentence vector and a second sentence vector is less than a preset distance threshold such as -0.8, it is determined that the first annotation rule and the second annotation rule corresponding to the second sentence vector conflict. It can be understood that the above distance threshold includes but is not limited to -0.8, and the setting of the distance threshold can be set according to actual needs and circumstances.
[0108] In the above embodiment, by using a pre-trained model with high versatility and applicability, the annotation details and the existing annotation details are mapped to a high-dimensional vector space, thereby capturing the semantic information of the sentence, which helps to compare and judge the similarities or differences between two sentences at the semantic level, simplifies the similarity comparison process, and can flexibly adapt to the conflict judgment needs of different fields, different types of details and different text features.
[0109] like Figure 7 As shown, in some embodiments, S500 includes:
[0110] S540: perform data annotation on the original annotation sample set according to the first annotation rule to obtain a first annotation result set.
[0111] S542, determining a second annotation result in the first annotation result set, the second annotation result does not match a third annotation result in the second annotation result set, and the second annotation result set is obtained by annotating the original annotation sample set according to the annotation rules in the annotation rule library.
[0112] S544: When the ratio of the number of the second annotation results to the total number of the first annotation result set is greater than or equal to a preset threshold, determine that there is a conflict between the first annotation rule and the second annotation rule corresponding to the third annotation result.
[0113] This embodiment is an example of another feasible way of conflict checking. The second annotation result set is an annotation result set obtained by annotating the original annotation sample set using the annotation rules in the latest annotation rule library.
[0114] In specific implementation, the original annotation sample set may be annotated with the latest annotation rule library in advance to obtain the second annotation result set. In the conflict check process, it is assumed that the first annotation rule does not violate the existing annotation rule. Then, each sample to be annotated in the original annotation sample set is annotated according to the first annotation rule to obtain the first annotation result. In this process, it is ensured that each annotated sample is accurately processed in accordance with the provisions of the first annotation rule. Then, the first annotation result set is compared with the second annotation result set respectively to identify the second annotation result in the first annotation result set that does not match the annotation result in the second annotation result set. For example, for the same sample A to be annotated, the first annotation rule B and the existing annotation rule C are used to annotate respectively, and the first annotation result B1 corresponding to the first annotation rule B and the third annotation result C corresponding to the annotation rule C are obtained. If the first annotation result B1 and the third annotation result C1 have opposite or inconsistent label meanings, it can be determined that the first annotation result does not match the third annotation result.
[0115] Specifically, the judgment on whether the label meanings are opposite or inconsistent can be: if the label is a word or a phrase, the pre-trained language model can be directly loaded to obtain the word vector of the label marked by the marking rules and the existing marking rules, or the sentence vector of the label can be obtained in the same way as the sentence vector, hereinafter referred to as the label vector (including the word vector or the sentence vector), and then the distance between the label vectors is calculated. If the distance between the label vectors is equal to -1, the label meanings are judged to be opposite. If the distance between the label vectors is greater than or equal to a preset distance threshold such as 0.6, the label meanings are judged to be inconsistent. It can be understood that the above-mentioned pre-trained language model includes but is not limited to a self-attention mechanism network, a recurrent neural network, or a BERT model. The above-mentioned distance threshold includes but is not limited to -1, and the specific value can be determined according to the actual situation.
[0116] Next, the number of second annotation results in the first annotation result set that do not match the third annotation result in the second annotation result set can be counted, and the number of second annotation results can be compared with the total number of first annotation results in the first annotation result set to obtain the proportion of second annotation results. If the proportion of second annotation results exceeds a preset proportion threshold, such as 60%, it is determined that there is a conflict between the first annotation rule and the second annotation rule corresponding to the third annotation result. Similarly, the proportion threshold can be determined based on the strictness of the judgment principle and the actual sample data.
[0117] In the above embodiment, by comparing the marking results of the first marking rule with the existing marking rule and determining the conflict, it is possible to objectively and accurately determine whether the first marking rule conflicts with the existing marking rule.
[0118] In other embodiments, conflict checking of abnormal annotation details may also be performed by taking the annotation details and existing annotation details as input and calling a trained conflict detection model for conflict checking, wherein the conflict detection model is trained based on a historical annotation detail data set carrying conflict labels.
[0119] In other embodiments, the marking details may be matched with the existing marking details based on predefined conflict rules to determine whether there is a conflict between the marking details and the existing marking details.
[0120] In some embodiments, performing data expansion processing on the initial annotation standard includes:
[0121] The second sample to be labeled is labeled according to the initial labeling standard to obtain a fourth labeling result. According to the fourth labeling result, a plurality of positive examples and negative examples are determined, and the labels in the initial labeling standard are added with the plurality of positive examples and the plurality of negative examples.
[0122] Positive examples refer to samples that meet the label requirements, and negative examples refer to samples that do not meet the label requirements. For example, taking the data labeling task in the financial field as an example, for the label "promise to repay", positive examples include: I will repay, I will repay today, I will repay today, I can repay, I will repay at 6 pm, I will repay on time, I will repay when it is due, and I will deal with it in the afternoon when I know it. Negative examples include: I will repay later, I will repay later, I will repay later, I will repay as soon as possible, I will try my best to repay, and I will repay after I am done. It is understandable that the negative example of "promise to repay" here can be regarded as a positive example of "unable to repay".
[0123] In practical applications, since the initial labeling standards contain relatively simple contents, mainly the interpretation of labeling intent, in order to improve and optimize the labeling standards, data expansion processing can be performed on them, and the simple initial labeling standards can be expanded into labeling details.
[0124] In this embodiment, data expansion of the initial labeling standard may be: manually labeling the second sample to be labeled according to the initial labeling standard to obtain a fourth labeling result. For each label, according to the fourth labeling result, samples whose labels in the labeling result are the same or similar to the label are determined as positive examples, and samples whose labels in the labeling result are different or not similar to the label are determined as negative examples. The positive examples and negative examples are added to the initial labeling standard.
[0125] In this embodiment, by adding multiple positive and negative examples to the labels of the initial annotation standard, samples of different categories and situations can be increased to improve the generalization ability of the model. In addition, by continuously adding new positive and negative examples, the initial annotation standard can be gradually improved and perfected to improve the accuracy and consistency of the annotation.
[0126] In some embodiments, data expansion processing of the initial labeling standard can be: manually labeling the second sample to be labeled according to the initial labeling standard to obtain a fourth labeling result, determining multiple positive examples and multiple negative examples based on the fourth labeling result, adding multiple positive examples and multiple negative examples to the labels in the initial labeling standard, and adjusting the definition in the initial labeling standard based on the positive examples and negative examples.
[0127] Continuing from the previous embodiment, after adding multiple positive examples and multiple negative examples to the labels in the initial labeling standard, for the multiple positive examples and negative examples of each label, their commonalities and differences are analyzed, and the definition in the initial labeling standard is modified and supplemented to more accurately describe the meaning and usage scenarios of the labels.
[0128] For example, taking the label "promise to repay" as an example, it can be: for multiple positive examples of "promise to repay", analyze their common features and difference features. Specifically, common features may include: the text in the positive example clearly expresses that the borrower is willing to fulfill the repayment obligation. The positive example may mention the specific repayment time and repayment amount. The text in the positive example may contain expressions of determination, sincerity and responsibility, indicating that the borrower takes the repayment matter seriously. Difference features may include: when expressing the commitment to repayment, the borrower may use different wording and expressions, and the expressions are diverse. The repayment amount and repayment period may be different in different samples.
[0129] Then, by comprehensively analyzing the common and different characteristics of the positive examples, the definitions in the initial annotation standards can be supplemented and adjusted. For example, the original definition of promised repayment is: considering the text in which the borrower clearly expresses the obligation to repay. The revised definition of repayment is: considering the text in which the borrower clearly expresses the obligation to repay, including but not limited to the specific time and amount promised, expressing determination and sincerity, and positive communication attitude, etc.
[0130] In this embodiment, by analyzing the commonalities and differences of multiple positive and negative examples, a more comprehensive label definition can be discovered, sample information can be fully utilized, and the effect and quality of annotation can be improved. By modifying and supplementing the definition of the annotation standard, different annotators can be more unified and consistent in the annotation process, reducing the differences in annotation results.
[0131] In other embodiments, after modifying and supplementing the definitions in the initial annotation standards on the basis of the above embodiments, the positive examples and negative examples may be expanded according to multiple positive and negative examples using vocabulary resources (such as synonym dictionaries, near-synonym dictionaries, word vector models, etc.), and synonyms, near-synonyms and similar expressions may be added to their respective standards to enrich the semantic scope of the annotation standards.
[0132] In this embodiment, through synonym expansion, near-synonym expansion and similar expression expansion, more standards for different expressions can be covered, improving the adaptability and coverage of the annotation standards. At the same time, the expansion of the standards can make the annotators more flexible in actual operations and able to identify more variants and related expressions.
[0133] In order to more clearly illustrate the data processing method provided by the present application, the following is a detailed description of the data processing method provided by the present application. Figure 8 To illustrate, this specific embodiment includes the following contents:
[0134] S100, obtaining an initial marking standard.
[0135] S300, performing data expansion processing on the initial annotation standard to obtain a first annotation rule.
[0136] In a specific implementation, the data expansion processing of the initial annotation standard can be: annotating the samples to be annotated according to the initial annotation standard to obtain the annotation results, determining multiple positive examples and negative examples based on the annotation results, adding multiple positive examples and multiple negative examples to each label in the initial annotation standard, modifying and supplementing the definition in the initial annotation standard based on the multiple positive examples and the multiple negative examples, and then performing synonym expansion, near-synonym expansion and similar expression expansion on the multiple positive examples and the multiple negative examples to obtain the first annotation details.
[0137] S520: Determine a first sentence vector of a first annotation rule.
[0138] S522: Determine the distance between the first sentence vector and the second sentence vector of the annotation rule in the annotation rule library.
[0139] S524: When the distance between the first sentence vector and the second sentence vector of the second annotation detail is less than or equal to a preset distance threshold, determine that there is a conflict between the first annotation detail and the second annotation detail.
[0140] In a specific implementation, the first annotation rule and the sentence with the existing annotation rule in the annotation rule library can be represented as sentences in text format respectively, and then the first annotation rule represented in text format and the existing annotation rule are preprocessed, including word segmentation, adding special tags (such as start tags, end tags), padding, etc. The preprocessed sentences of the first annotation rule and the sentences with the existing annotation rule are input into the BERT model respectively, and the first sentence vector of the first annotation rule and the second sentence vector of the existing annotation rule are obtained respectively. Then, the first sentence vector and the second sentence vector are normalized, and for each annotation rule, the distance between the corresponding first sentence vector and the second sentence vector is calculated by the Euclidean distance algorithm. If the distance between the first sentence vector and the second sentence vector is less than a preset distance threshold such as -0.8, it is determined that there is a conflict between the first annotation rule and the second annotation rule.
[0141] S720: Analyze the first marking rule to obtain a conflict analysis result of the first marking rule with respect to the second marking rule.
[0142] Specifically, the analysis process may be to compare the annotation label defined in the first annotation rule with the annotation label in the second annotation rule to check whether there are differences or conflicts in the names. Compare the annotation definitions in the first annotation rule with the second annotation rule, and compare the elements such as annotation rules, conditions and premises to determine whether there are conflicts. Compare the annotation rules in the first annotation rule with the second annotation rule, including specific annotation requirements, judgment conditions, algorithms, etc., to check whether there are conflicting rules or inconsistent requirements. Through the above analysis, the cause of the conflict, the type of conflict, and the severity of the conflict are obtained. For example, the cause of the conflict may be that the judgment conditions in the annotation rule are inconsistent, resulting in a conflict, or the naming of the annotation label is inconsistent, resulting in a conflict. The conflict types include name conflicts, rule conflicts, or logical conflicts. The severity of the conflict can be determined based on the number of conflicts. If the number of conflicts is large, such as greater than a preset number threshold, it can be determined as a serious conflict. If the number is small, such as less than or equal to the preset number threshold, it can be determined as a minor conflict.
[0143] S902: Adjust the first marking rule according to the conflict analysis result.
[0144] Since the first annotation rule is extended, the cause of the annotation rule conflict may be that the second annotation rule that conflicts with the first annotation rule is not perfect enough, or it may be that the first standard rule itself has defects. Therefore, it is necessary to adjust the first or second annotation rule according to the actual situation. The adjustment process may include adjusting or deleting keywords in the annotation rule, merging the annotation rules, etc. to resolve the conflict.
[0145] S924, performing a conflict check between the adjusted first marking rule and the marking rule in the marking rule library. If there is no conflict between the adjusted first marking rule and the marking rule in the marking rule library, the adjusted first marking rule is entered into the marking rule library.
[0146] After adjusting the first annotation rule, a conflict check can be performed between the adjusted first annotation rule and the annotation rule in the annotation rule library. If there is no conflict between the first annotation rule and the annotation rule in the annotation rule library, the first annotation rule is entered into the annotation rule library to update the annotation rule library. If there is still a conflict, a conflict analysis is performed again to adjust the annotation rule until the conflict is eliminated, and the adjusted first annotation rule is entered into the annotation rule library.
[0147] S942, label multiple first samples to be labeled according to the labeling rules in the current labeling rule library, obtain a first labeling result for each first sample to be labeled, perform consistency evaluation on each first labeling result, obtain an evaluation result for each first labeling result, and determine the reliability of the labeling rules in the current labeling rule library based on each evaluation result.
[0148] The data of multiple first samples to be labeled can be labeled based on the labeling rules in the latest labeling rule library to obtain the first labeling result of each first sample to be labeled. Then, the consistency of each first labeling result is evaluated to obtain the evaluation result of each first labeling result, and then the reliability of the labeling rules in the current labeling rule library is evaluated according to each evaluation result, and the labeling rules are further optimized and improved.
[0149] Specifically, the consistency evaluation of each first annotation result may be: using a method of multi-person annotation or expert review to evaluate the consistency of each first annotation result. For example, the samples to be labeled corresponding to the first annotation result are assigned to multiple labelers or experts for a second labeling to obtain a second labeling result, and then, based on the second labeling result and the first labeling result, a statistical method is used to evaluate the consistency of the first annotation result to obtain an evaluation result. Specifically, it may be to calculate a consistency measurement index of the first annotation result such as accuracy or recall. Then, based on the consistency measurement index of each first annotation result, the reliability of the annotation rules in the annotation rule library is comprehensively evaluated. Specifically, it may be to calculate the average value of the consistency measurement index of all first annotation results, and determine the average value of the consistency measurement index as the reliability of the annotation rules in the annotation rule library.
[0150] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0151] Based on the same inventive concept, the embodiment of the present application also provides a data processing device method for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data processing device method embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.
[0152] In one embodiment, Fig. 9 As shown, a data processing device method 900 is provided, including: a data acquisition module 910, a data expansion module 920, a data verification module 930, a data analysis module 940 and a data adjustment module 950, wherein:
[0153] The data acquisition module 910 is used to acquire the initial marking standard.
[0154] The data expansion module 920 is used to perform data expansion processing on the initial marking standard to obtain the first marking details.
[0155] The data verification module 930 is used to perform conflict verification between the first annotation rule and the annotation rules in the annotation rule library.
[0156] The data analysis module 940 is used to analyze the first marking rule when there is a conflict between the first marking rule and the second marking rule in the standard rule library, and obtain a conflict analysis result of the first marking rule relative to the second marking rule.
[0157] The data adjustment module 950 is used to adjust the first marking rule or the second marking rule according to the conflict analysis result.
[0158] In some embodiments, Fig.10As shown, the device also includes a data entry module 960. The data adjustment module 950 is further used to perform a conflict check between the adjusted first annotation rule and the annotation rule in the annotation rule library; the data entry module 960 is used to enter the adjusted first annotation rule into the annotation rule library when there is no conflict between the adjusted first annotation rule and the annotation rule in the annotation rule library.
[0159] In one embodiment, the data adjustment module 950 is further used to perform conflict check on the adjusted second annotation rule and the first annotation rule, and the data entry module 960 is further used to enter the first annotation rule into the annotation rule library when there is no conflict between the first annotation rule and the adjusted second annotation rule.
[0160] like Fig.10 As shown, in some embodiments, the device also includes a data evaluation module 970, which is used to label multiple first samples to be labeled according to the labeling rules in the current labeling rule library, obtain a first labeling result for each first sample to be labeled, perform consistency evaluation on each first labeling result, obtain an evaluation result for each first labeling result, and determine the reliability of the labeling rules in the current labeling rule library based on each evaluation result.
[0161] In some embodiments, the data evaluation module 970 is also used to annotate the first sample to be annotated corresponding to the first annotation result through multiple second simulated annotation models to obtain multiple simulated annotation results, where the first annotation result is any one of the multiple first annotation results, and the multiple simulated annotation models include a first simulated annotation model of the data annotator corresponding to the first annotation result and multiple second simulated annotation models, and a target simulated annotation result matching the first annotation result is screened out from the multiple simulated annotation results, and an evaluation result of the first annotation result is determined according to the number of target simulated annotation results and the number of simulated annotation results, wherein the multiple first annotation results correspond one-to-one to the multiple data annotators, and the multiple data annotators correspond one-to-one to the multiple simulated annotation models.
[0162] In some embodiments, the data verification module 930 is further used to determine a first sentence vector of a first annotation rule, determine a distance between the first sentence vector and a second sentence vector of an annotation rule in an annotation rule library, and determine that there is a conflict between the first annotation rule and the second annotation rule when the distance between the first sentence vector and the second sentence vector of the second annotation rule is less than or equal to a preset distance threshold.
[0163] In some embodiments, the data verification module 930 is also used to annotate the original annotated sample set according to the first annotation rules to obtain a first annotation result set, determine a second annotation result in the first annotation result set, and the second annotation result does not match the third annotation result in the second annotation result set; the second annotation result set is obtained by annotating the original annotated sample set according to the annotation rules in the annotation rule library, and when the ratio of the number of the second annotation results to the total number of the first annotation result set is greater than or equal to a preset threshold, it is determined that the first annotation rule and the second annotation rule corresponding to the third annotation result are in conflict.
[0164] In some embodiments, the data expansion module 920 is further configured to perform at least one of the following operations:
[0165] The first item is to label the second sample to be labeled according to the initial labeling standard to obtain a fourth labeling result, determine a plurality of positive examples and a plurality of negative examples according to the fourth labeling result, and add the plurality of positive examples and the plurality of negative examples to the label in the initial labeling standard.
[0166] The second item is to label the second sample to be labeled according to the initial labeling standard to obtain a fourth labeling result, determine a plurality of positive examples and a plurality of negative examples according to the fourth labeling result, add a plurality of positive examples and a plurality of negative examples to the label in the initial labeling standard, and adjust the definition in the initial labeling standard according to the plurality of positive examples and the plurality of negative examples.
[0167] The third item is to label the second sample to be labeled according to the initial labeling standard to obtain a fourth labeling result, determine a plurality of positive examples and a plurality of negative examples according to the fourth labeling result, add a plurality of positive examples and a plurality of negative examples to the label in the initial labeling standard, adjust the definition in the initial labeling standard according to the plurality of positive examples and the plurality of negative examples, and perform synonym expansion, near-synonym expansion and similar expression expansion on the plurality of positive examples and the plurality of negative examples.
[0168] Each module in the above data processing device method can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0169] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as initial annotation standards, existing annotation details and original data annotation results. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing method is implemented.
[0170] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0171] In some embodiments, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the above-mentioned data processing method embodiments are implemented.
[0172] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned data processing method embodiments are implemented.
[0173] In some embodiments, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned data processing method embodiments when executed by a processor.
[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0175] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0176] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining initial annotation standards; Performing data expansion processing on the initial marking standard to obtain first marking details; Performing a conflict check between the first annotation rule and the annotation rules in the annotation rule library; When there is a conflict between the first marking rule and a second marking rule in the standard rule library, analyzing the first marking rule to obtain a conflict analysis result of the first marking rule with respect to the second marking rule; According to the conflict analysis result, the first marking rule or the second marking rule is adjusted.
2. The method according to claim 1, characterized in that After adjusting the first marking rule or the second marking rule according to the conflict analysis result, the method further includes: Performing a conflict check between the adjusted first marking rule and the marking rule in the marking rule library; if there is no conflict between the adjusted first marking rule and the marking rule in the marking rule library, entering the adjusted first marking rule into the marking rule library; Alternatively, a conflict check is performed between the adjusted second labeling rule and the first labeling rule; if there is no conflict between the first labeling rule and the adjusted second labeling rule, the first labeling rule is entered into the labeling rule library.
3. The method according to claim 2, characterized in that After entering the first marking rule or the adjusted first marking rule into the marking rule library, the method further includes: Annotate a plurality of first samples to be annotated according to the annotation rules in the current annotation rule library to obtain a first annotation result for each of the first samples to be annotated; Performing consistency evaluation on each of the first annotation results to obtain an evaluation result of each of the first annotation results; According to each of the evaluation results, the reliability of the labeling rules in the current labeling rule library is determined.
4. The method according to claim 3, characterized in that The plurality of first annotation results correspond one-to-one to the plurality of data annotation parties, and the plurality of data annotation parties correspond one-to-one to the plurality of simulation annotation models; and the consistency evaluation is performed on the first annotation results to obtain the evaluation results of the first annotation results, including: Annotate the first sample to be annotated corresponding to the first annotation result by using multiple second simulated annotation models, and obtain multiple simulated annotation results, wherein the first annotation result is any one of the multiple first annotation results, and the multiple simulated annotation models include the first simulated annotation model of the data annotator corresponding to the first annotation result and the multiple second simulated annotation models; Filtering out a target simulated annotation result matching the first annotation result from the multiple simulated annotation results; An evaluation result of the first annotation result is determined according to the number of the target simulation annotation results and the number of the simulation annotation results.
5. The method according to any one of claims 1 to 4, characterized in that: The performing conflict checking between the first annotation rule and the annotation rules in the annotation rule library includes: Determine a first sentence vector of the first annotation rule; Determine the distance between the first sentence vector and the second sentence vector of the labeling rule in the labeling rule library; When the distance between the first sentence vector and the second sentence vector of the second labeling detail is less than or equal to a preset distance threshold, it is determined that there is a conflict between the first labeling detail and the second labeling detail.
6. The method according to any one of claims 1 to 4, characterized in that: The performing conflict checking between the first annotation rule and the annotation rules in the annotation rule library includes: Annotate the original annotated sample set according to the first annotation rules to obtain a first annotation result set; Determine a second annotation result in the first annotation result set, the second annotation result does not match a third annotation result in the second annotation result set; the second annotation result set is obtained by annotating the original annotation sample set according to the annotation rules in the annotation rule library; When the ratio of the number of the second annotation results to the total number of the first annotation result set is greater than or equal to a preset threshold, it is determined that there is a conflict between the first annotation detail and the second annotation detail corresponding to the third annotation result.
7. The method according to any one of claims 1 to 4, characterized in that: The data expansion processing of the initial annotation standard includes: Annotate the second sample to be annotated according to the initial annotation standard to obtain a fourth annotation result; Determine a plurality of positive examples and a plurality of negative examples according to the fourth annotation result; Perform at least one of the following data expansion processing on the initial annotation standard: Adding the plurality of positive examples and the plurality of negative examples to the labels in the initial labeling standard; According to the multiple positive examples and the multiple negative examples, a definition in the initial labeling standard is adjusted.
8. A data processing device, characterized in that: The device comprises: A data acquisition module, used to obtain initial annotation standards; A data expansion module, used for performing data expansion processing on the initial marking standard to obtain a first marking rule; A data verification module, used for performing a conflict verification between the first annotation rule and the annotation rules in the annotation rule library; a data analysis module, configured to analyze the first marking rule when there is a conflict between the first marking rule and a second marking rule in the standard rule library, and obtain a conflict analysis result of the first marking rule with respect to the second marking rule; A data adjustment module is used to adjust the first marking rule or the second marking rule according to the conflict analysis result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Automatic learning and extending evolution handling method for Chinese basic block descriptive rule
CN101021842A
Voice data automatic annotation quality evaluation method
CN112435651A
Entity relationship extraction-oriented data annotation rule discovery method and device
CN115658894A
Document labeling method and device, equipment and medium
CN117274993A
Cited By
Intelligent document auditing method and system based on multiple rule libraries
CN119399778A
Document intelligent review method and system based on multiple rule bases
CN119399778B
