Label sample judgment method, device and electronic equipment
By calculating and comparing the audit pass rate and significant difference observation values of labeled samples under different audit environments, and cyclically executing multiple rounds of judgment steps, the problem of low efficiency and accuracy of sample labeling in the existing technology is solved, and an efficient and accurate method is achieved. sample judgment.
Patent Information
- Application Number
- CN202410634800.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-22
AI Technical Summary
In the field of machine learning, it is difficult for existing technologies to effectively improve the efficiency and accuracy of sample labeling. Manual labeling has low efficiency but high accuracy, while machine labeling has high efficiency but low accuracy. It is especially suitable for scenarios with large amounts of data and low labeling requirements.
By obtaining the first review pass rate and the second review pass rate of the labeled sample, calculate the average review pass rate and compare it with the threshold. If it is lower than the threshold, the significant difference observation value is calculated. If the significant difference observation value is less than the threshold, it is judged as Abnormal, otherwise multiple rounds of judgment steps are executed in a loop until the stop condition is met, and significant difference observations are calculated in combination with z-test or t-test statistics to improve judgment accuracy.
While saving the time for labeling sample judgment, it also improves the accuracy of labeling sample judgment, thereby improving the efficiency and accuracy of sample judgment.
Smart Images

Figure CN118211681B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and specifically relates to a method, device and electronic equipment for determining a labeled sample. Background Art
[0002] In the field of machine learning, learning tasks can be roughly divided into two categories based on the form of learning: supervised learning and unsupervised learning. Supervised learning requires a large amount of labeled data. Labeled data refers to data that already has a standard answer. The more such data, the better the machine learning algorithm, and the more likely it is to get the correct answer from the input data. Data labeling can be done manually or by machine. Manual labeling is highly accurate but inefficient, while machine labeling is highly efficient but has a low accuracy, making it only suitable for scenarios with large data volumes and low labeling requirements. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide a method, device and electronic device for determining a labeled sample, so as to improve the efficiency and accuracy of sample determination.
[0004] In a first aspect, an embodiment of the present application provides a method for judging a labeled sample, the method comprising: obtaining a first audit pass rate and a second audit pass rate of the labeled sample, wherein the audit pass rate is the proportion of a target audit node in all audit nodes, the target audit node is an audit node whose audit result indicates that the labeled sample is normal, and the first audit pass rate and the second audit pass rate are audit pass rates of the labeled sample under different audit environments; calculating an average audit pass rate based on the first audit pass rate and the second audit pass rate; comparing the average audit pass rate and a first threshold; if the average audit pass rate is greater than the first threshold, outputting the labeled sample as normal; if the average audit pass rate is less than or equal to the first threshold, calculating a significant difference observation value, the significant difference observation value being an indicator for judging whether there is a significant difference between the first audit pass rate and the second audit pass rate; comparing the significant difference observation value and the second threshold; if the significant difference observation value is less than the second threshold, outputting the labeled sample as abnormal; if If the significant difference observation value is greater than or equal to the second threshold, it is determined to loop and execute multiple rounds of judgment steps until the preset stop condition is met, wherein each round of judgment steps includes: obtaining the first audit pass rate and the second audit pass rate of this round, the first audit pass rate and the second audit pass rate of this round being the audit pass rates of the labeled samples under the two audit environments corresponding to this round; calculating the average audit pass rate of this round based on the first audit pass rate and the second audit pass rate of this round; comparing the average audit pass rate of this round with the first threshold; if the average audit pass rate of this round is greater than the first threshold, outputting the labeled samples as normal; if the average audit pass rate of this round is less than or equal to the first threshold, calculating the calculated significant difference observation value of this round; comparing the significant difference observation value of this round with the second threshold; if the significant difference observation value of this round is less than the second threshold, outputting the labeled samples as abnormal; if the significant difference observation value of this round is greater than or equal to the second threshold, executing the next round of judgment steps.
[0005] The above-mentioned method for judging labeled samples first makes a preliminary abnormality judgment through the average audit pass rate of two audits, and then makes a further judgment through the significant difference observation value of the two audit pass rates. The two judgments can save the time for judging labeled samples, improve the efficiency of judging labeled samples, and improve the accuracy of judging labeled samples.
[0006] In an optional embodiment of the present application, the significant difference observation value includes: a difference in test statistics, and the calculation of the significant difference observation value includes: calculating the difference in test statistics between the first audit pass rate and the second audit pass rate.
[0007] In the above embodiment, the difference of the test statistic is used as the observed value of the significant difference between the first audit pass rate and the second audit pass rate, which can accurately and fully count the difference between the two.
[0008] In an optional embodiment of the present application, the test statistic includes: a z test statistic and a t test statistic.
[0009] In an optional embodiment of the present application, when the test statistic is a z test statistic, the calculation of the significant difference observation value is performed using the following formula:
[0010]
[0011]
[0012]
[0013] in, represents the observed value of significant difference, is the first review pass rate, is the second audit pass rate, K represents the number of all audit nodes used to generate the first audit pass rate, Indicates the number of all audit nodes used to generate the second audit pass rate.
[0014] In an optional embodiment of the present application, when the test statistic is a t-test statistic, the calculation of the significant difference observed value is performed using the following formula:
[0015]
[0016]
[0017]
[0018] in, represents the observed value of significant difference, is the first review pass rate, is the second review pass rate, k is the total number of labeled samples, is the standard deviation of the audit pass rate difference.
[0019] In an optional embodiment of the present application, the value of the first threshold is 0.6 or 0.7.
[0020] In an optional embodiment of the present application, the number of audit nodes used in the audit environment corresponding to the first audit pass rate of this round is greater than the number of audit nodes used in the audit environment corresponding to the first audit pass rate of the previous round; the number of audit nodes used in the audit environment corresponding to the second audit pass rate of this round is greater than the number of audit nodes used in the audit environment corresponding to the second audit pass rate of the previous round.
[0021] In an optional embodiment of the present application, the number of audit nodes used in the audit environment corresponding to the first audit pass rate is k, where k is a preset value; the number of audit nodes used in the audit environment corresponding to the second audit pass rate is k+1.
[0022] In the above embodiment, the number of audit nodes used for the first audit pass rate is set to k, and the number of audit nodes used for the second audit pass rate is set to k+1, which can quickly and easily make the difference between the first audit pass rate and the second audit pass rate.
[0023] In a second aspect, an embodiment of the present application provides a device for judging a labeled sample, including: an acquisition module, used to acquire a first audit pass rate and a second audit pass rate of the labeled sample, wherein the audit pass rate is the proportion of the target audit node in all audit nodes, the target audit node is an audit node whose audit result indicates that the labeled sample is normal, and the first audit pass rate and the second audit pass rate are audit pass rates of the labeled sample under different audit environments; a first calculation module, used to calculate an average audit pass rate based on the first audit pass rate and the second audit pass rate; a first comparison module, used to compare the average audit pass rate and a first threshold; if the average audit pass rate is greater than the first threshold, the labeled sample is output as normal; if the average audit pass rate is less than or equal to the first threshold, the second calculation module is triggered, the second calculation module is used to calculate a significant difference observation value, and the significant difference observation value is an indicator for judging whether there is a significant difference between the first audit pass rate and the second audit pass rate; a second comparison module, used to compare the significant difference observation value and the second threshold; if the significant difference observation value is less than the second threshold, the labeled sample is output as abnormal; if the significant difference If the observed value is greater than or equal to the second threshold, the loop module is triggered; the loop module is used to loop through multiple rounds of judgment steps until a preset stop condition is met; wherein each round of judgment steps includes: triggering the acquisition module to acquire the first audit pass rate and the second audit pass rate of this round, the first audit pass rate and the second audit pass rate of this round being the audit pass rates of the labeled sample under the two audit environments corresponding to this round; triggering the first calculation module to calculate the average audit pass rate of this round according to the first audit pass rate and the second audit pass rate of this round; triggering the first comparison module to compare the average audit pass rate and the first threshold; if the average audit pass rate of this round is greater than the first threshold, outputting the labeled sample as normal; if the average audit pass rate of this round is less than or equal to the first threshold, triggering the second calculation module to calculate the calculated significant difference observation value of this round; triggering the second comparison module to compare the significant difference observation value and the second threshold; if the significant difference observation value of this round is less than the second threshold, outputting the labeled sample as abnormal; if the significant difference observation value of this round is greater than or equal to the second threshold, triggering the loop module to execute the next round of judgment steps.
[0024] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, the processor being connected to the memory; the memory being used to store programs; and the processor being used to call the programs stored in the memory to execute a method as described in any one of the first aspects.
[0025] Other features and advantages of the present application will be described in the following description. The purpose and other advantages of the present application can be realized and obtained through the structures specifically pointed out in the written description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The above and other purposes, features and advantages of the present application will be more clear as shown in the drawings.
[0027] Figure 1 A schematic diagram of a flow chart of a method for determining a labeled sample provided in an embodiment of the present application is shown;
[0028] Figure 2 A schematic block diagram of a labeled sample determination device provided in an embodiment of the present application is shown;
[0029] Figure 3 A schematic block diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] Hereinafter, embodiments of the present application are described in detail with reference to the accompanying drawings. It should be noted that although the same elements are shown in different drawings, they will be represented by the same reference numerals. In the following description, specific details such as detailed configuration and components are provided to only help fully understand the embodiments of the present application. Therefore, it should be clear to those skilled in the art that various changes and modifications to the embodiments described herein can be made without departing from the scope of the present application. In addition, for clarity and conciseness, the description of well-known functions and configurations is omitted. The terms described below are defined in consideration of the functions in the present application, and may be different according to the user, the user's intention or custom. Therefore, the definition of the term should be determined based on the content throughout this specification.
[0031] The present application may have various modifications and various embodiments, in which the embodiments are described in detail below with reference to the accompanying drawings. However, it should be understood that the present application is not limited to the embodiments, but includes all modifications, equivalents and substitutes within the scope of the present application.
[0032] The terms used herein are only used to describe various embodiments of the present application and are not intended to limit the present application. Unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In the present application, it should be understood that the term "including" or "having" indicates the presence of features, quantities, steps, operations, structural elements, parts or combinations thereof, and does not exclude the presence of one or more other features, quantities, steps, operations, structural elements, parts or combinations thereof, or the possibility of adding one or more other features, quantities, steps, operations, structural elements, parts or combinations thereof.
[0033] Unless defined differently, all terms used herein have the same meaning as understood by a person skilled in the art to which the present application belongs. Unless explicitly defined in the present application, terms (such as those defined in a general dictionary) should be interpreted as having the same meaning as the contextual meaning in the relevant art, and should not be interpreted as having an idealized or overly formal meaning.
[0034] The electronic device according to one embodiment may be one of various types of electronic devices. The electronic device may include, for example, a portable communication device (e.g., a smart phone), a computer, a portable multimedia device, a portable medical device, a camera, a wearable device, or a household appliance. According to one embodiment disclosed, the electronic device is not limited to those described above.
[0035] The terms used in this application are not intended to limit the application, but are intended to include various changes, equivalents or alternatives of corresponding embodiments. Regarding the description of the accompanying drawings, similar reference numerals may be used to represent similar elements or related elements. Unless the relevant context clearly indicates otherwise, the singular form of the noun corresponding to the item may include one or more things. As used herein, each of the phrases such as "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "at least one of A, B and C" and "at least one of A, B or C" may include all possible combinations of the items listed together in the corresponding one in the phrase. As used herein, terms such as "the 1st", "the 2nd", "the first" and "the second" may be used to distinguish the corresponding component from another component, and are not intended to limit the component in other aspects (e.g., importance or order). It is intended that if an element (e.g., a first element) is referred to as being “coupled with,” “coupled to,” “connected to,” or “connected to” another element (e.g., a second element), with or without the term “operably” or “communicatively,” it indicates that the element may be coupled with the other element directly (e.g., wired), wirelessly, or via a third element.
[0036] As used herein, the term "module" may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with other terms (e.g., "logic," "logic block," "component," and "circuit"). A module may be a single integrated component or its smallest unit or component suitable for performing one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application specific integrated circuit (ASIC).
[0037] like Figure 1 As shown, Figure 1 A schematic diagram of a flow chart of a method for determining a labeled sample provided in an embodiment of the present application is shown. Figure 1 As shown, the method includes steps S110 to S140:
[0038] Step S110, obtaining the first audit pass rate and the second audit pass rate of the labeled samples, wherein the audit pass rate is the proportion of the target audit node in all audit nodes, the target audit node is an audit result indicating that the labeled sample is a normal audit node, and the first audit pass rate and the second audit pass rate are the audit pass rates of the labeled samples under different audit environments.
[0039] The labeled samples are sent to n audit nodes respectively, and each audit node receives the same labeled samples, wherein the number of labeled samples can be one or more. A labeled sample refers to data with a label, such as examples in machine learning. For example, a labeled sample can be an image and labeled data, and the labeled data indicates all pixels in the image that belong to humans.
[0040] Each audit node returns the audit result of the node in this round, and determines the audit pass rate based on the audit results of all audit nodes. The audit pass rate is the proportion of the audit result of the target audit node in the n audit nodes in this round. For example, if the number of audit nodes with a passing audit result is a, then the audit pass rate is .
[0041] The first audit pass rate and the second audit pass rate are the audit pass rates of the marked samples under different audit environments. The audit environment refers to the audit setting conditions such as the number of audit nodes, audit methods, etc.
[0042] In one embodiment of the present application, the number of audit nodes used in the audit environment corresponding to the first audit pass rate is k, where k is a preset value; the number of audit nodes used in the audit environment corresponding to the second audit pass rate is k+1.
[0043] Copy k copies of the sample to be reviewed and randomly send them to different terminals in the review resource pool for review, and calculate the first review pass rate . Copy k+1 copies of the sample to be reviewed and randomly send them to different terminals in the review resource pool for review, and calculate the second review pass rate The number of k can be preset according to requirements.
[0044] In the above embodiment, the number of audit nodes used for the first audit pass rate is set to k, and the number of audit nodes used for the second audit pass rate is set to k+1, which can quickly and easily make the difference between the first audit pass rate and the second audit pass rate.
[0045] In some embodiments of the present application, the types of annotated samples can be diverse, and the annotated samples can be divided according to the data types of the data samples therein, such as text sample sets, image sample sets, video sample sets, audio sample sets, etc. Text annotation focuses on adding labels and descriptions to the original text, image annotation focuses on marking images with metadata, keywords, and other descriptors that can explain the relationship between images and other image descriptors, audio annotation marks and classifies audio clips according to qualities such as pronunciation, intonation, dialect, and volume, and video annotation combines multiple functions of image and audio annotation to help AI (Artificial Intelligence) evaluate the meaning of sound and visual elements in video clips.
[0046] The types of annotated samples can also be divided according to the types of business scenarios to which the annotated samples belong, such as a financial scenario sample set, a medical scenario sample set, a logistics scenario sample set, etc.
[0047] The review node is a node used to review the labeled samples. The review of the labeled samples by the review node can be manual review, machine review or other review methods. This application does not limit the review method of the review node.
[0048] For example, when the audit method of the audit node is manual audit, each audit node corresponds to an auditor and an audit terminal. When the number of audit nodes in this application is multiple, an audit resource pool can be established in advance, and the audit resource pool can include several audit nodes. When the audit is conducted, n audit nodes are determined from the audit resource pool. Furthermore, different types of audit resource pools are established according to the type of annotated samples. When the sample is audited, the corresponding audit resource pool is determined according to the type of sample set. Determine n audit nodes from the audit resource pool as the audit nodes used in this round, copy the sample to be audited n copies and randomly send them to the n audit nodes in the audit resource pool to perform the first round of annotation result audit. The value of n can be set according to demand. The server sends the same audit sample to each audit node, and the terminal of each audit node displays the audit sample and its annotation results on the screen. The auditor conducts an online audit of the sample to be audited on the terminal, thereby obtaining the audit results of each audit node.
[0049] Step S120, calculating an average audit pass rate based on the first audit pass rate and the second audit pass rate.
[0050] Based on the first audit pass rate and the second audit pass rate, the average of the two is calculated to obtain the average audit pass rate.
[0051] For example, the following formula is used to calculate the average audit pass rate: .
[0052]
[0053] Or, the average approval rate The calculation method is:
[0054]
[0055] Step S130, compare the average audit pass rate and the first threshold; if the average audit pass rate is greater than the first threshold, output the labeled sample as normal; if the average audit pass rate is less than or equal to the first threshold, calculate the significant difference observation value, and the significant difference observation value is an indicator for judging whether there is a significant difference between the first audit pass rate and the second audit pass rate.
[0056] The average approval rate Compared with the preset first threshold, threshold a can be regarded as a maximum value, which can take values such as 0.6, 0.7, etc. In specific application scenarios, the value can be adjusted according to the accuracy requirements.
[0057] like >a, then it can be directly judged that the sample labeling result is correct;
[0058] like ≤a, it is determined that the audit rule is not passed, and further judgment is performed. The further judgment step includes: calculating the significant difference observation value between the first audit pass rate and the second audit pass rate.
[0059] This application believes that two groups of adjacent observation samples can be used as units to determine whether the audit results are abnormal. In the scenario of this application, the sample annotation audit results follow the standard normal distribution, so the sample audit pass rate can be used as an observation statistic to verify the significant changes between each two adjacent groups of audit results. First, the hypothesis is proposed: Null hypothesis H_0: "There is no significant difference between the audit results of the first group of samples and the audit results of the second group of samples"; hypothesis H_1: "There is a significant difference between the audit results of the first group of samples and the audit results of the second group of samples".
[0060] The P-value or significant difference observation value is a parameter for determining the results of hypothesis testing. It can also be compared using the rejection region of the distribution according to different distributions. The P-value refers to the probability of a more extreme result than the obtained sample observation when the null hypothesis is true. If the P-value is very small, it means that the probability of the null hypothesis is very small. If it occurs, according to the principle of small probability, there is reason to reject the null hypothesis. The smaller the P-value, the more sufficient the reason for rejecting the null hypothesis. In short, the smaller the P-value, the more significant the result. However, whether the test result is "significant", "moderately significant" or "highly significant" needs to be determined according to the size of the P-value and the actual problem.
[0061] The P value is an important indicator to measure the results of hypothesis testing. If the P value is less than the significance level, the null hypothesis is rejected, that is, there is a difference between the two sample means; if the P value is greater than the significance level, the null hypothesis is accepted, that is, there is no difference between the two sample means.
[0062] Under the premise that the sample remains unchanged, if the sample is audited normally, the data distribution of the audit results should be the same / similar. Based on this premise, reverse reasoning shows that if the data distribution of the audit results is not similar, that is, there is a significant difference between the two, then it can be determined that the sample audit result is abnormal.
[0063] like ≤a, then calculate the significant difference observation value between the first review pass rate and the second review pass rate. The algorithm for calculating the significant difference observation value between the first review pass rate and the second review pass rate may be to calculate the Euclidean distance between the two, or to calculate the Manhattan distance between the two, etc. The present application does not limit the method for calculating the significant difference observation value between the first review pass rate and the second review pass rate.
[0064] In one embodiment of the present application, the significant difference observation value includes: a difference in test statistics, and the calculation of the significant difference observation value includes: calculating the difference in test statistics between the first audit pass rate and the second audit pass rate.
[0065] The test statistic is a sample statistic calculated based on the sample observations and used to make decisions on the null hypothesis and alternative hypothesis. The test statistic is selected to fully calculate the hypothesis test. Under the null hypothesis above, this statistic follows a given probability distribution, which is not the case under the other hypothesis. Therefore, if the value of the test statistic falls outside the critical value of the above distribution, it can be considered that the null hypothesis mentioned above may not be correct.
[0066] In the above embodiment, the difference of the test statistic is used as the observed value of the significant difference between the first audit pass rate and the second audit pass rate, which can accurately and fully count the difference between the two.
[0067] Preferably, the test statistic includes: a z test statistic and a t test statistic.
[0068] In one embodiment of the present application, when the test statistic is a z test statistic, the calculation of the significant difference observed value is performed using the following formula:
[0069]
[0070]
[0071]
[0072] in, represents the observed value of significant difference, is the first review pass rate, is the second audit pass rate, K represents the number of all audit nodes used to generate the first audit pass rate, Indicates the number of all audit nodes used to generate the second audit pass rate.
[0073] The z test statistic (z test) is used to compare the pass rates of two groups of audit results. It obeys the standard normal distribution N(0,1). The formula of z is as follows:
[0074]
[0075] F(x;0,1) is the calculated cumulative distribution function, which is used to calculate the cumulative distribution function of z.
[0076] The z test is a method for testing the significance of the difference between two means in large samples (sample size greater than 30). However, in actual application scenarios, it is often limited by the size of the audit resource pool, which may only include a small number of audit nodes (for example, less than 30). In this case, the use of the z test will lead to inaccurate hypothesis test results. Therefore, in scenarios with a small sample size, the t test (Student's t test) is used instead of the z test.
[0077] The t-test is further divided into single population test and double population test, as well as paired sample test. The paired sample test is used to test the difference between the data obtained by two matched groups of subjects or the data obtained by the same group of subjects under different conditions. The samples composed of these two situations are related samples. In this embodiment, two groups of audits are conducted under the premise that the audit samples remain unchanged, that is, there is a natural correlation between the sample audit results, so the paired sample t-test can be used. The t-test formula under paired samples is as follows:
[0078]
[0079]
[0080]
[0081] in, represents the observed value of significant difference, is the first review pass rate, is the second review pass rate, k is the total number of labeled samples, is the standard deviation of the audit pass rate difference.
[0082] For example, K labeled samples are copied, and the same labeled samples in the two labeled samples are a pair, which constitutes K paired samples. Two audits are conducted, one of which is audited once to obtain the first audit pass rate, and the other is audited once to obtain the second audit pass rate. Then the t-test formula under the above paired samples can be used for calculation to obtain the t-test statistic.
[0083] Step S140, compare the significant difference observation value and the second threshold; if the significant difference observation value is less than the second threshold, output the labeled sample as abnormal; if the significant difference observation value is greater than or equal to the second threshold, determine to loop and execute multiple rounds of judgment steps until a preset stop condition is met, wherein each round of judgment steps includes: obtaining the first audit pass rate and the second audit pass rate of this round, the first audit pass rate and the second audit pass rate of this round are the audit pass rates of the labeled sample under the two audit environments corresponding to this round; according to the first audit pass rate and the second audit pass rate of this round, the labeled sample is judged as abnormal. The second audit pass rate is used to calculate the average audit pass rate of this round; the average audit pass rate of this round is compared with the first threshold; if the average audit pass rate of this round is greater than the first threshold, the labeled sample is output as normal; if the average audit pass rate of this round is less than or equal to the first threshold, the calculated significant difference observation value of this round is calculated; the significant difference observation value of this round is compared with the second threshold; if the significant difference observation value of this round is less than the second threshold, the labeled sample is output as abnormal; if the significant difference observation value of this round is greater than or equal to the second threshold, the next round of judgment steps is executed.
[0084] The calculated significant difference observation value is compared with the preset threshold b to verify the null hypothesis. The significance level threshold b can be adjusted according to the accuracy requirements in specific application scenarios. For example, it can be taken as 0.05.
[0085] If the observed value of the significant difference is less than b, the null hypothesis H_0 can be rejected, and it can be determined that "there is a significant difference between the first group of sample audit results and the second group of sample audit results". Further, it can be judged that the sample audit results are abnormal. If the significant difference observed value is greater than or equal to the second threshold, further judgment will be performed, and the above method also includes: if the significant difference observed value is less than the second threshold, it is determined to loop through multiple rounds of judgment steps until a preset stop condition is met; each round of judgment steps includes: obtaining the first audit pass rate and the second audit pass rate of this round, the first audit pass rate and the second audit pass rate of this round are the audit pass rates of the labeled samples under the two audit environments corresponding to this round; the average audit pass rate of this round is calculated based on the first audit pass rate and the second audit pass rate of this round; if the average audit pass rate is greater than the first threshold, the labeled sample is determined to be normal; if the average audit pass rate of this round is less than or equal to the first threshold, the significant difference observed value of this round is judged; if the significant difference observed value of this round is less than the second threshold, the labeled sample is determined to be abnormal; if the significant difference observed value of this round is greater than or equal to the second threshold, the next round of judgment steps is executed.
[0086] If the significant difference observation value is greater than or equal to b, the loop judgment step is started. In the present application, a loop judgment step is performed when the significant difference observation value is greater than or equal to b, so that when it cannot be determined that the labeled sample is a normal sample, multiple rounds of repeated judgment will be performed until the preset stop condition is met, and the loop will end. The stop condition includes: determining that the labeled sample is a normal sample, determining that the labeled sample is an abnormal sample, and the number of loop rounds reaches a specified number.
[0087] If the sample audit result is still not determined to be abnormal after reaching the specified number of cycles and entering the final round of audit, the multiple rounds of audit will be stopped and the abnormality will be directly determined.
[0088] Alternatively, the sample judgment in this application is a step of cyclic judgment, and when the significant difference observation value is greater than or equal to b, the next round of judgment is started. The steps of each round of cyclic judgment include: obtaining the first audit pass rate and the second audit pass rate of this round, and the first audit pass rate and the second audit pass rate of this round are the audit pass rates of the labeled samples under the two audit environments corresponding to this round.
[0089] The audit environment can be diverse. For example, the number of audit nodes for the two groups of audits is set to 1 and 2 respectively to form two different audit environments. In some embodiments of the present application, the number of audit nodes for the two groups of audits in this round can be the same as the number of audit nodes for the two groups of audits in the previous round. For example, the number of audit nodes for the two groups of audits in the first round is 5 and 6 respectively. If the second round of audit is entered, the number of audit nodes for the two groups of audits is still 5 and 6. Due to machine errors or human subjective errors, the judgment results of the audit nodes in different audit rounds may be different, which will lead to fluctuations in the audit pass rate of each round. For example, the first audit pass rate of the labeled sample in the first round of audit is 1 / 5 and the second audit pass rate is 1 / 6. After entering the second round, the first audit pass rate is 3 / 5 and the second audit pass rate is 2 / 6. At this time, the average audit pass rate can be greater than the first threshold. By executing multiple rounds of judgment steps, errors can be eliminated as much as possible to achieve comprehensive detection of labeled samples.
[0090] In one embodiment of the present application, the number of audit nodes used in the audit environment corresponding to the first audit pass rate of this round is greater than the number of audit nodes used in the audit environment corresponding to the first audit pass rate of the previous round; the number of audit nodes used in the audit environment corresponding to the second audit pass rate of this round is greater than the number of audit nodes used in the audit environment corresponding to the second audit pass rate of the previous round.
[0091] For example, in the first round, the number of audit nodes for the two groups of audits is 1 and 2 respectively. If the second round of audits is entered, the number of audit nodes for the two groups of audits is 2 and 3 respectively. In order to avoid the first audit pass rate and the second audit pass rate being the same in the two rounds of audits, and to avoid two similar audits, the number of audit nodes in each round of audit can be set to be different, and the samples can be labeled as much as possible for multiple different tests.
[0092] The average audit pass rate of this round is calculated based on the first audit pass rate of this round and the second audit pass rate of this round; if the average audit pass rate of this round is less than the first threshold, the significant difference observation value of this round is judged; if the significant difference observation value of this round is less than the second threshold, the labeled sample is determined to be abnormal, and if the significant difference observation value of this round is greater than or equal to the second threshold, the next round of judgment steps is executed, thereby realizing the cycle.
[0093] The above-mentioned method for judging labeled samples first makes a preliminary abnormality judgment through the average audit pass rate of two audits, and then makes a further judgment through the significant difference observation value of the two audit pass rates. The two judgments can save the time for judging labeled samples, improve the efficiency of judging labeled samples, and improve the accuracy of judging labeled samples.
[0094] like Figure 2 As shown, Figure 2 A labeled sample determination device provided in an embodiment of the present application is shown, and the labeled sample determination device includes: an acquisition module 210, a first calculation module 220, a first comparison module 230, a second calculation module 240, a second comparison module 250 and a circulation module 260.
[0095] Acquisition module 210, used to acquire a first audit pass rate and a second audit pass rate of the annotated sample, wherein the audit pass rate is the proportion of the target audit node in all audit nodes, the target audit node is an audit node where the audit result indicates that the annotated sample is a normal audit node, and the first audit pass rate and the second audit pass rate are the audit pass rates of the annotated sample under different audit environments;
[0096] A first calculation module 220, configured to calculate an average audit pass rate according to the first audit pass rate and the second audit pass rate;
[0097] A first comparison module 230 is used to compare the average audit pass rate with a first threshold; if the average audit pass rate is greater than the first threshold, the labeled sample is output as normal; if the average audit pass rate is less than or equal to the first threshold, the second calculation module 240 is triggered;
[0098] The second calculation module 240 is used to calculate a significant difference observation value, where the significant difference observation value is an indicator for determining whether there is a difference between the first audit pass rate and the second audit pass rate;
[0099] A second comparison module 250 is used to compare the significant difference observation value with a second threshold; if the significant difference observation value is less than the second threshold, the labeled sample is output as abnormal; if the significant difference observation value is greater than or equal to the second threshold, the loop module 260 is triggered;
[0100] The loop module 260 is used to loop through multiple rounds of judgment steps until a preset stop condition is met, wherein each round of judgment steps includes: triggering the acquisition module 210 to acquire the first audit pass rate and the second audit pass rate of this round, wherein the first audit pass rate and the second audit pass rate of this round are audit pass rates of the labeled samples under the two audit environments corresponding to this round; triggering the first calculation module 220 to calculate the average audit pass rate of this round based on the first audit pass rate and the second audit pass rate of this round; triggering the first comparison module 230 to compare the average audit pass rate and The size of the first threshold; if the average review pass rate of this round is greater than the first threshold, the labeled sample is output as normal; if the average review pass rate of this round is less than or equal to the first threshold, the second calculation module 240 calculates the calculated significant difference observation value of this round; triggers the second comparison module 250 to compare the significant difference observation value and the size of the second threshold; if the significant difference observation value of this round is less than the second threshold, the labeled sample is output as abnormal; if the significant difference observation value of this round is greater than or equal to the second threshold, triggers the loop module 260 to execute the next round of judgment steps.
[0101] In an optional embodiment of the present application, the significant difference observation value includes: a difference in test statistics, and the calculation of the significant difference observation value includes: calculating the difference in test statistics between the first audit pass rate and the second audit pass rate.
[0102] In an optional embodiment of the present application, the test statistic includes: a z test statistic and a t test statistic.
[0103] In an optional embodiment of the present application, when the test statistic is a z test statistic, the calculation of the significant difference observation value is performed using the following formula:
[0104]
[0105]
[0106]
[0107] in, represents the observed value of significant difference, is the first review pass rate, is the second audit pass rate, K represents the number of all audit nodes used to generate the first audit pass rate, Indicates the number of all audit nodes used to generate the second audit pass rate.
[0108] In an optional embodiment of the present application, when the test statistic is a t-test statistic, the calculation of the significant difference observation value is performed using the following formula:
[0109]
[0110]
[0111]
[0112] in, represents the observed value of significant difference, is the first review pass rate, is the second review pass rate, k is the total number of labeled samples, is the standard deviation of the audit pass rate difference.
[0113] In an optional embodiment of the present application, the value of the first threshold is 0.6 or 0.7.
[0114] In an optional embodiment of the present application, the number of audit nodes used in the audit environment corresponding to the first audit pass rate is k, where k is a preset value; the number of audit nodes used in the audit environment corresponding to the second audit pass rate is k+1.
[0115] In an optional embodiment of the present application, the number of audit nodes used in the audit environment corresponding to the first audit pass rate of this round is greater than the number of audit nodes used in the audit environment corresponding to the first audit pass rate of the previous round; the number of audit nodes used in the audit environment corresponding to the second audit pass rate of this round is greater than the number of audit nodes used in the audit environment corresponding to the second audit pass rate of the previous round.
[0116] The implementation principle and technical effects of the labeled sample judgment device provided in the embodiment of the present application are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding contents in the aforementioned method embodiment.
[0117] like Figure 3 As shown, Figure 3FIG. 1 is a schematic block diagram of an electronic device 300 provided in an embodiment of the present application. The electronic device 300 includes: a processor 310 and a memory 320;
[0118] The processor 310, the memory 320 and each component are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The memory 320 is used to store computer programs, such as storing Figure 2 The software function module shown in the figure is the labeled sample judgment device 200. The labeled sample judgment device 200 includes at least one software function module that can be stored in the memory 320 in the form of software or firmware or fixed in the operating system (OS) of the electronic device 300. The processor 310 is used to execute the executable module stored in the memory 320, such as the software function module or computer program included in the labeled sample judgment device 200.
[0119] Among them, the memory 320 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0120] The processor 310 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a microprocessor, etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. Alternatively, the processor 310 may also be any conventional processor, etc.
[0121] The embodiment of the present application further provides a non-volatile computer-readable storage medium (hereinafter referred to as storage medium), on which a computer program is stored. When the computer program is run by a computer such as the above-mentioned electronic device 300, the above-mentioned labeled sample judgment method is executed.
[0122] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0123] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0125] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a computer-readable storage medium, including several instructions to enable a computer device (which can be a personal computer, a laptop, a server, or an electronic device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0126] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for determining labeled samples. It is characterized in that The method comprises: Obtain a first audit pass rate and a second audit pass rate of the annotated sample, wherein the audit pass rate is the proportion of the target audit node in all audit nodes, the target audit node is an audit node where the audit result indicates that the annotated sample is a normal audit node, and the first audit pass rate and the second audit pass rate are the audit pass rates of the annotated sample under different audit environments; Calculating an average audit pass rate based on the first audit pass rate and the second audit pass rate; Comparing the average audit pass rate with a first threshold; If the average review pass rate is greater than the first threshold, outputting the labeled sample as normal; If the average audit pass rate is less than or equal to the first threshold, a significant difference observation value is calculated, and the significant difference observation value is an indicator for judging whether there is a significant difference between the first audit pass rate and the second audit pass rate; Comparing the observed value of the significant difference with the second threshold value; If the significant difference observed value is less than the second threshold, outputting the labeled sample as abnormal; If the significant difference observation value is greater than or equal to the second threshold, it is determined to loop and execute multiple rounds of judgment steps until the preset stop condition is met, wherein each round of judgment steps includes: obtaining the first audit pass rate and the second audit pass rate of this round, the first audit pass rate and the second audit pass rate of this round being the audit pass rates of the labeled samples under the two audit environments corresponding to this round; calculating the average audit pass rate of this round based on the first audit pass rate and the second audit pass rate of this round; comparing the average audit pass rate of this round with the first threshold; if the average audit pass rate of this round is greater than the first threshold, outputting the labeled samples as normal; if the average audit pass rate of this round is less than or equal to the first threshold, calculating the calculated significant difference observation value of this round; comparing the significant difference observation value of this round with the second threshold; if the significant difference observation value of this round is less than the second threshold, outputting the labeled samples as abnormal; if the significant difference observation value of this round is greater than or equal to the second threshold, executing the next round of judgment steps.
2. The method according to claim 1, It is characterized in that The significant difference observed value includes: the difference of the test statistic, and the calculation of the significant difference observed value includes: The difference in the test statistic between the first audit pass rate and the second audit pass rate is calculated.
3. The method according to claim 2, It is characterized in that The test statistics include: z test statistics and t test statistics.
4. The method according to claim 3, It is characterized in that When the test statistic is a z test statistic, the calculation of the significant difference observation value is performed using the following formula: in, represents the observed value of significant difference, is the first review pass rate, is the second audit pass rate, K represents the number of all audit nodes used to generate the first audit pass rate, Indicates the number of all audit nodes used to generate the second audit pass rate.
5. The method according to claim 3, It is characterized in that When the test statistic is a t-test statistic, the calculation of the significant difference observed value is performed using the following formula: in, represents the observed value of significant difference, is the first review pass rate, is the second audit pass rate, k is the total number of labeled samples, is the standard deviation of the audit pass rate difference.
6. The method according to claim 1, It is characterized in that The value of the first threshold is 0.6 or 0.
7.
7. The method according to claim 1, It is characterized in that The number of audit nodes used in the audit environment corresponding to the first audit pass rate of the current round is greater than the number of audit nodes used in the audit environment corresponding to the first audit pass rate of the previous round; The number of audit nodes used in the audit environment corresponding to the second audit pass rate of this round is greater than the number of audit nodes used in the audit environment corresponding to the second audit pass rate of the previous round.
8. The method according to claim 1, It is characterized in that The number of audit nodes used in the audit environment corresponding to the first audit pass rate is k, where k is a preset value; The number of audit nodes used in the audit environment corresponding to the second audit pass rate is k+1.
9. A device for determining a labeled sample, It is characterized in that include: An acquisition module is used to acquire a first audit pass rate and a second audit pass rate of the labeled sample, wherein the audit pass rate is the proportion of the target audit node in all audit nodes, the target audit node is an audit node where the audit result indicates that the labeled sample is a normal audit node, and the first audit pass rate and the second audit pass rate are the audit pass rates of the labeled sample under different audit environments; A first calculation module, used for calculating an average audit pass rate according to the first audit pass rate and the second audit pass rate; A first comparison module is used to compare the average audit pass rate with a first threshold; if the average audit pass rate is greater than the first threshold, the labeled sample is output as normal; if the average audit pass rate is less than or equal to the first threshold, the second calculation module is triggered; The second calculation module is used to calculate a significant difference observation value, where the significant difference observation value is an indicator for judging whether there is a significant difference between the first audit pass rate and the second audit pass rate; A second comparison module is used to compare the significant difference observation value with a second threshold; if the significant difference observation value is less than the second threshold, the labeled sample is output as abnormal; if the significant difference observation value is greater than or equal to the second threshold, the loop module is triggered; The loop module is used to loop through multiple rounds of judgment steps until a preset stop condition is met, wherein each round of judgment steps includes: triggering the acquisition module to acquire the first audit pass rate and the second audit pass rate of this round, wherein the first audit pass rate and the second audit pass rate of this round are audit pass rates of the labeled sample under two audit environments corresponding to this round; triggering the first calculation module to calculate the average audit pass rate of this round according to the first audit pass rate and the second audit pass rate of this round; triggering the first comparison module to compare the average audit pass rate and the first threshold; if the average audit pass rate of this round is greater than the first threshold, outputting the labeled sample as normal; if the average audit pass rate of this round is less than or equal to the first threshold, triggering the second calculation module to calculate the calculated significant difference observation value of this round; triggering the second comparison module to compare the significant difference observation value and the second threshold; if the significant difference observation value of this round is less than the second threshold, outputting the labeled sample as abnormal; if the significant difference observation value of this round is greater than or equal to the second threshold, triggering the loop module to execute the next round of judgment steps.
10. An electronic device, It is characterized in that include: A memory and a processor, wherein the processor is connected to the memory; The memory is used to store programs; The processor is used to call the program stored in the memory to execute the method according to any one of claims 1-8.
