CN113011164A - Data quality detection method, device, electronic equipment and medium - Google Patents

Data quality detection method, device, electronic equipment and medium Download PDF

Info

Publication number
CN113011164A
CN113011164A CN202110283424.3A CN202110283424A CN113011164A CN 113011164 A CN113011164 A CN 113011164A CN 202110283424 A CN202110283424 A CN 202110283424A CN 113011164 A CN113011164 A CN 113011164A
Authority
CN
China
Prior art keywords
data set
original data
value
fluency
confusion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110283424.3A
Other languages
Chinese (zh)
Other versions
CN113011164B (en
Inventor
李鹏宇
郑毅
李剑锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202110283424.3A priority Critical patent/CN113011164B/en
Publication of CN113011164A publication Critical patent/CN113011164A/en
Application granted granted Critical
Publication of CN113011164B publication Critical patent/CN113011164B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06395Quality analysis or management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Educational Administration (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Operations Research (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Quality & Reliability (AREA)
  • Marketing (AREA)
  • Probability & Statistics with Applications (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Game Theory and Decision Science (AREA)
  • Biomedical Technology (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)

Abstract

The invention relates to a data processing technology, and discloses a data quality detection method, which comprises the following steps: acquiring an original data set, performing fluency processing on the original data set by using a pre-constructed fluency analysis model to obtain a fluency value, performing confusion analysis on the original data set by using a pre-constructed language model to obtain a confusion value, performing accuracy detection processing on the original data set by using a pre-constructed grammar detection model to obtain a correctness value, and performing matching degree detection on dialogue data in the original data set by using a pre-constructed supervision model to obtain a matching degree value; and analyzing to obtain the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value. The invention also relates to blockchain techniques, and the raw data set quality scores may be stored in blockchain link points. The invention also discloses a data quality detection device, an electronic device and a storage medium. The invention can improve the accuracy of data quality detection.

Description

Data quality detection method, device, electronic equipment and medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a data quality detection method and apparatus, an electronic device, and a computer-readable storage medium.
Background
At present, the main ways of evaluating the conversation data sets in academic and industrial fields include manual evaluation and automatic evaluation based on a machine learning model, the mode of manual evaluation has strong subjectivity and requires a data quality inspector to have higher concentration degree and service background knowledge level, and in addition, the cost of the manual evaluation mode is higher in consideration of factors such as labor cost, time and the like. In the automatic evaluation of the statistical or machine learning model, the quality of the data set is often underestimated by the evaluation result considering the difference between the dialogue data and the general corpus distribution. In general, the existing dialogue data set quality evaluation scheme has fewer considered dimensions, which results in low accuracy of data quality detection.
Disclosure of Invention
The invention provides a data quality detection method, a data quality detection device, electronic equipment and a computer readable storage medium, and mainly aims to solve the problem of few consideration dimensions in the quality evaluation of a session data set.
In order to achieve the above object, the present invention provides a data quality detection method, including:
obtaining an original data set, wherein the original data set comprises dialogue data;
randomly extracting a preset number of sentences from the original data set by using a preset sampling method, grading the fluency of the sentences, and obtaining a fluency value of the original data set according to the fluency grade;
performing confusion analysis on the original data set by using a pre-constructed language model with an attention adding mechanism to obtain a confusion value of the original data set;
dividing the text in the original data set into N sentences, detecting the N sentences by using a pre-constructed grammar detection model, counting to obtain M sentences without grammar errors, and calculating to obtain a correctness value of the original data set;
training a classifier containing positive and negative examples to obtain a supervision model, and performing matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set;
and analyzing to obtain the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value.
Optionally, the randomly extracting a preset number of sentences from the original data set by using a preset sampling method, scoring fluency of the sentences, and obtaining the fluency value of the original data set according to the fluency score includes:
randomly extracting a preset number of sentences from the original data set by using a preset sampling method to obtain a sentence subset;
outputting the sentence set to a user, prompting the user to score each sentence in the sentence set based on subjective feeling during reading, and obtaining a scoring set according to the score of the user;
carrying out mean value processing on the scoring set to obtain a mean value of the scoring set;
and performing per-unit processing on the mean value to obtain the fluency value of the original data set.
Optionally, the performing per-unit processing on the mean value to obtain the fluency value of the original data set includes:
presetting a per unit value;
and equally dividing the mean value according to the per unit value to obtain the fluency value of the original data set.
Optionally, before performing the confusion analysis on the original data set by using the pre-constructed language model with the added attention mechanism to obtain the confusion value of the original data set, the method further includes:
constructing an original BERT model;
adding an attention mechanism in the original BERT model to obtain a primary BERT model;
and connecting the primary BERT model by using a pre-constructed classification function to obtain the language model.
Optionally, the performing a confusion analysis on the original data set by using a pre-constructed language model to obtain a confusion value of the original data set includes:
computing a distributed representation of text in the raw dataset using the primary BERT model, and computing a probability distribution p (token) over time of words or words in the text using the classification functiont);
Calculating a confusion value of the original data set using a first preset formula.
Optionally, the calculating the confusion value of the original data set by using a first preset formula includes:
calculating the confusion value using a first preset formula:
Figure BDA0002979444440000031
wherein T is the total number of all words or phrases in the text.
Optionally, the training a classifier including positive and negative examples to obtain a supervision model, and performing matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set includes:
constructing a classifier training data set containing positive and negative examples by using dialogue data of a preset field;
training a classifier by using the training data set to obtain a supervision model;
acquiring each pair of dialogue data in the original data set, and calculating the matching degree of the dialogue data by using the supervision model;
and calculating the matching degree value of the original data set by using a second preset formula.
In order to solve the above problem, the present invention also provides a data quality detection apparatus, including:
the device comprises an original data set acquisition module, a conversion module and a conversion module, wherein the original data set acquisition module is used for acquiring an original data set, and the original data set comprises conversation data;
the fluency analyzing module is used for randomly extracting a preset number of sentences from the original data set by using a preset sampling method, grading fluency of the sentences, and obtaining a fluency value of the original data set according to the fluency grade;
the confusion analysis module is used for carrying out confusion analysis on the original data set by utilizing a pre-constructed language model with an attention adding mechanism to obtain a confusion value of the original data set;
the accuracy analysis module is used for dividing the text in the original data set into N sentences, detecting the N sentences by using a pre-constructed grammar detection model, counting to obtain M sentences without grammar errors, and calculating to obtain a correctness value of the original data set;
the matching degree analysis module is used for training a classifier containing positive and negative examples to obtain a supervision model, and performing matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set;
and the quality score calculation module is used for analyzing and obtaining the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores computer program instructions executable by the at least one processor to cause the at least one processor to perform the data quality detection method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the data quality detection method described above.
The method comprises the steps of carrying out fluency processing on the original data set to obtain a fluency value; performing confusion analysis on the original data set to obtain a confusion value; carrying out accuracy detection processing on the original data set to obtain an accuracy value; carrying out matching degree detection on the dialogue data in the original data set to obtain a matching degree value; and analyzing to obtain the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value. The embodiment of the invention analyzes and calculates the dialogue data from four dimensions of fluency, confusion, accuracy and matching degree of the dialogue data to obtain the quality score of the dialogue data. Therefore, the data quality detection method, the data quality detection device and the computer readable storage medium can improve the accuracy of the data quality detection method.
Drawings
Fig. 1 is a schematic flow chart of a data quality detection method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of one of the steps in the data quality detection method shown in FIG. 1;
fig. 3 is a block diagram of a data quality detection apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an internal structure of an electronic device implementing a data quality detection method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a data quality detection method. The execution subject of the data quality detection method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiments of the present application. In other words, the data quality detection method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Fig. 1 is a schematic flow chart of a data quality detection method according to an embodiment of the present invention. In this embodiment, the data quality detection method includes:
s1, obtaining an original data set, wherein the original data set comprises dialogue data.
In the embodiment of the invention, the original data set comprises dialogue data, and the dialogue data is data generated in the human communication process in a service scene and is important data for training a human-computer interaction system.
Preferably, the embodiment of the invention can utilize a python statement with a data grabbing function to grab data from the internet containing various data to obtain an original data set.
S2, randomly extracting a preset number of sentences from the original data set by using a preset sampling method, grading fluency of the sentences, and obtaining a fluency value of the original data set according to the fluency grade.
In an embodiment of the present invention, referring to fig. 2, the randomly extracting a preset number of sentences from the original data set by using a preset sampling method, performing fluency scoring on the sentences, and obtaining a fluency value of the original data set according to the fluency scoring includes:
s21, randomly extracting a predetermined number of sentences from the original data set by using a predetermined sampling method, and obtaining a sentence set S ═ S (S)1,…,sK) And K is the number of the extracted sentences.
S22, outputting the sentence subset to a user, prompting the user to score each sentence in the sentence set based on subjective feeling during reading, and obtaining a score set F ═ F (F) according to the score of the user1,…,fK);
S23, carrying out mean value processing on the scoring set to obtain a mean value of the scoring set;
and S24, performing per unit processing on the mean value to obtain the fluency value of the original data set.
Preferably, the embodiment of the present invention performs a mean processing on the score set by using the following mean formula:
Figure BDA0002979444440000051
wherein the content of the first and second substances,
Figure BDA0002979444440000052
is an average value, K is the number of sentences, fkIs the score for the kth sentence.
In detail, in the embodiment of the present invention, a preset value is used as a per-unit value, and per-unit processing is performed on the mean value:
presetting a per unit value;
and equally dividing the mean value according to the per unit value to obtain the fluency value of the original data set.
Preferably, the per unit value in the embodiment of the present invention may be 5.
In detail, the mean value is subjected to per unit processing to avoid the influence of dimension and ensure the accuracy of subsequent data calculation.
And S3, performing confusion analysis on the original data set by using a pre-constructed language model with an attention adding mechanism to obtain a confusion value of the original data set.
In another embodiment of the present invention, before performing the confusion analysis on the original data set by using the pre-constructed language model with the added attention mechanism to obtain the confusion value of the original data set, the method further includes:
step A: constructing an original BERT (bidirectional EncoderRepresentationfrom Transformer) model;
and B: adding an attention mechanism in the original BERT model to obtain a primary BERT model;
and C: and connecting the primary BERT model by using a pre-constructed classification function to obtain the language model.
The BERT model is a language characterization model.
The Attention mechanism (Attention) is a data processing method in machine learning, and is widely applied to various different types of machine learning tasks such as natural language processing, image recognition, speech recognition, and the like.
Specifically, the adding of the attention mechanism in the original BERT model is to add the attention mechanism to a hidden layer in the original BERT model to better extract key information.
Preferably, the classification function may be a softmax function.
Wherein the language model is trained and tested by classifying the raw data set using the softmax classifier, thereby enabling confusion analysis.
Specifically, the performing a confusion analysis on the original data set by using a pre-constructed language model with an attention-adding mechanism to obtain a confusion value of the original data set includes:
computing a distributed representation of text in the raw dataset using the primary BERT model, and computing a probability distribution p (token) over time of words or words in the text using the classification functiont) (ii) a And calculating the confusion value PP(s) of the original data set by using the following first preset formula:
Figure BDA0002979444440000071
wherein T is the total number of all words or phrases in the text.
S4, dividing the text in the original data set into N sentences, detecting the N sentences by using a pre-constructed grammar detection model, counting to obtain M sentences without grammar errors, and calculating to obtain the correctness value of the original data set.
In the embodiment of the invention, the text in the original data set is divided into N sentences, the N sentences are detected by utilizing a pre-constructed grammar detection model, M sentences without grammar errors are obtained through statistics, the correctness value of the original data set is obtained through calculation,
calculating a correctness value for the raw data set using the following correctness calculation formula:
Figure BDA0002979444440000072
where precision is accuracy, M is the number of sentences without syntax error, and N is the number of sentence subsets.
And S5, obtaining a supervision model by training a classifier containing positive and negative examples, and carrying out matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set.
In an embodiment of the present invention, the training of a classifier including positive and negative examples to obtain a supervision model, and performing matching degree detection on dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set includes:
constructing a classifier training data set containing positive and negative examples by using dialogue data of a preset field;
training a classifier by using the training data set to obtain a supervision model;
acquiring each pair of dialogue data(s) in the original data setn-1sn) Calculating said dialogue data(s) using said supervised modeln-1sn) Degree of matching(s)nmatchsn-1);
Calculating the matching degree value of the original data set by using a second preset formula as follows:
Figure BDA0002979444440000073
wherein, matchScore is the matching degree, N is the total number in the original data set, and snAnd sn-1For any two sentences in the original data set.
And S6, analyzing to obtain the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value.
In an embodiment of the present invention, the analyzing the original data set quality score according to the fluency value, the confusion value, the correctness value, and the matching value includes:
score=α1*fluency+α2*perplexity+α3*precision+α4*matchScore
wherein score is the quality score, fluency is the fluency, perplexity is the confusion, precision is the accuracy, matchScore is the matching, alpha1、α2、α3And alpha4Are all preset parameters.
According to the embodiment of the invention, the data quality is judged according to the quality score of the original data set, when the quality score of the original data set is greater than a preset score threshold value, the data quality level of the original data set is high, and if the quality score of the original data set is less than or equal to the preset score threshold value, the data quality level of the original data set is low.
In one embodiment of the present invention, the raw data set quality scores may be stored in block link points.
The method comprises the steps of carrying out fluency processing on the original data set to obtain a fluency value; performing confusion analysis on the original data set to obtain a confusion value; carrying out accuracy detection processing on the original data set to obtain an accuracy value; carrying out matching degree detection on the dialogue data in the original data set to obtain a matching degree value; and analyzing to obtain the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value. The embodiment of the invention analyzes and calculates the dialogue data from four dimensions of fluency, confusion, accuracy and matching degree of the dialogue data to obtain the quality score of the dialogue data. Therefore, the invention can improve the accuracy of the data quality detection method.
Fig. 3 is a schematic block diagram of the data quality detection apparatus according to the present invention.
The data quality detection apparatus 100 according to the present invention may be installed in an electronic device. According to the realized functions, the data quality detection device 100 can include a raw data set acquisition module 101, a fluency analysis module 102, a confusion analysis module 103, a correctness analysis module 104, a matching degree analysis module 105, and a quality score calculation module 106. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the original data set obtaining module 101 is configured to obtain an original data set, where the original data set includes session data;
the fluency analyzing module 102 is configured to randomly extract a preset number of sentences from the original data set by using a preset sampling method, score fluency of the sentences, and obtain a fluency value of the original data set according to the fluency score;
the confusion analysis module 103 is configured to perform confusion analysis on the original data set by using a pre-constructed language model with an attention-adding mechanism to obtain a confusion value of the original data set;
the accuracy analysis module 104 is configured to divide the text in the original data set into N sentences, detect the N sentences by using a pre-constructed grammar detection model, count M sentences without grammar errors, and calculate a correctness value of the original data set;
the matching degree analysis module 105 is configured to obtain a supervision model by training a classifier including positive and negative examples, and perform matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set;
and the quality score calculating module 106 is configured to analyze the original data set quality score according to the fluency value, the confusion value, the correctness value, and the matching value.
In detail, when executed by a processor of an electronic device, each module in the data quality detection apparatus 100 may implement a data quality detection method including:
step one, the original data set obtaining module 101 obtains an original data set, wherein the original data set includes session data.
In the embodiment of the invention, the original data set comprises dialogue data, and the dialogue data is data generated in the human communication process in a service scene and is important data for training a human-computer interaction system.
Preferably, the embodiment of the present invention may capture an original data set from the internet containing a plurality of data by using a python statement having a data capture function.
And step two, the fluency analysis module 102 randomly extracts a preset number of sentences from the original data set by using a preset sampling method, scores the fluency of the sentences, and obtains the fluency value of the original data set according to the fluency score.
In the embodiment of the present invention, the fluency analyzing module 102 performs fluency processing on the original data set by the following operations:
step a: randomly extracting a preset number of sentences from the original data set by using a preset sampling method to obtain a sentence set S ═ S (S)1,…,sK) And K is the number of the extracted sentences.
Step b: outputting the sentence subset to a user, prompting the user to perform scoring on each sentence in the sentence set based on subjective feeling during reading, and obtaining a scoring set F ═ (F ═ according to the scoring of the user1,…,fK);
Step c: carrying out mean value processing on the scoring set to obtain a mean value of the scoring set;
step d: and performing per-unit processing on the mean value to obtain the fluency value of the original data set.
Preferably, the embodiment of the present invention performs a mean processing on the score set by using the following mean formula:
Figure BDA0002979444440000101
wherein the content of the first and second substances,
Figure BDA0002979444440000102
is an average value, K is the number of sentences, fkIs the score for the kth sentence.
In detail, in the embodiment of the present invention, a preset value is used as a per-unit value, and per-unit processing is performed on the mean value:
presetting a per unit value;
and equally dividing the mean value according to the per unit value to obtain the fluency value of the original data set.
Preferably, the per unit value in the embodiment of the present invention may be 5.
In detail, the mean value is subjected to per unit processing to avoid the influence of dimension and ensure the accuracy of subsequent data calculation.
And step three, the confusion analyzing module 103 performs confusion analysis on the original data set by using a pre-constructed language model added with an attention mechanism to obtain a confusion value of the original data set.
In another embodiment of the present invention, the confusion analysis module 103 is further configured to:
constructing an original BERT (bidirectional EncoderRepresentationfrom Transformer) model; adding an attention mechanism in the original BERT model to obtain a primary BERT model; and connecting the primary BERT model by utilizing a pre-constructed classification function to obtain the language model. In the embodiment of the invention, the BERT model is a language representation model.
The Attention mechanism (Attention) is a data processing method in machine learning, and is widely applied to various different types of machine learning tasks such as natural language processing, image recognition, speech recognition, and the like.
Specifically, the adding of the attention mechanism in the original BERT model is to add the attention mechanism to a hidden layer in the original BERT model to better extract key information.
Further, the classification function may be a softmax function.
Wherein the language model is trained and tested by classifying the raw data set using the softmax classifier, thereby enabling confusion analysis.
Specifically, the confusion analysis module 103 performs the confusion analysis on the original data set by using the following operations to obtain the confusion value of the original data set:
computing a distributed representation of text in the raw dataset using the primary BERT model, and computing a probability distribution p (token) over time of words or words in the text using the classification functiont) (ii) a And calculating the confusion value PP(s) of the original data set by using the following first preset formula:
Figure BDA0002979444440000111
wherein T is the total number of all words or phrases in the text.
And fourthly, the accuracy analysis module 104 divides the text in the original data set into N sentences, detects the N sentences by using a pre-constructed grammar detection model, counts the M sentences without grammar errors, and calculates to obtain the accuracy value of the original data set.
In this embodiment of the present invention, the accuracy analysis module 104 performs accuracy detection processing on the original data set through the following operations to obtain an accuracy value of the original data set:
segmenting the text in the original data set into N sentences;
detecting the N sentences by utilizing a pre-constructed grammar error detection model, and counting to obtain M sentences without grammar errors;
calculating a correctness value for the raw data set using the following correctness calculation formula:
Figure BDA0002979444440000112
where precision is accuracy, M is the number of sentences without syntax error, and N is the number of sentence subsets.
And step five, the matching degree analysis module 105 obtains a supervision model by training a classifier containing positive and negative examples, and performs matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set.
In this embodiment of the present invention, the matching degree analyzing module 105 performs matching degree detection on the dialogue data in the original data set through the following operations to obtain a matching degree value of the original data set:
constructing a classifier training data set containing positive and negative examples by using dialogue data of a preset field;
training a classifier by using the training data set to obtain a supervision model;
acquiring each pair of dialogue data(s) in the original data setn-1sn) Computing the institute using the supervised modelThe dialogue data(s)n-1sn) Degree of matching(s)nmatchsn-1);
Calculating the matching degree value of the original data set by using a second preset formula as follows:
Figure BDA0002979444440000121
wherein, matchScore is the matching degree, N is the total number in the original data set, and snAnd sn-1For any two sentences in the original data set.
And step six, the quality score calculation module 106 analyzes and obtains the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value.
In this embodiment of the present invention, the quality score calculating module 106 calculates the quality score of the original data set by using the following formula:
score=α1*fluency+α2*perplexity+α3*precision+α4*matchScore
wherein, Score is the quality Score, fluency is the fluency, perplexity is the confusion, precision is the accuracy, matchScore is the matching degree, alpha1、α2、α3And alpha4Are all preset parameters.
According to the embodiment of the invention, the data quality is judged according to the quality score of the original data set, when the quality score of the original data set is greater than a preset score threshold value, the data quality level of the original data set is high, and if the quality score of the original data set is less than or equal to the preset score threshold value, the data quality level of the original data set is low.
Fig. 4 is a schematic structural diagram of an electronic device implementing the data quality detection method according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a data quality detection program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the data quality detection program 12, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (for example, executing a data quality detection program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 4 only shows an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The memory 11 in the electronic device 1 stores a data quality detection program 12 that is a combination of instructions that, when executed in the processor 10, enable:
obtaining an original data set, wherein the original data set comprises dialogue data;
randomly extracting a preset number of sentences from the original data set by using a preset sampling method, grading the fluency of the sentences, and obtaining a fluency value of the original data set according to the fluency grade;
performing confusion analysis on the original data set by using a pre-constructed language model with an attention adding mechanism to obtain a confusion value of the original data set;
dividing the text in the original data set into N sentences, detecting the N sentences by using a pre-constructed grammar detection model, counting to obtain M sentences without grammar errors, and calculating to obtain a correctness value of the original data set;
training a classifier containing positive and negative examples to obtain a supervision model, and performing matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set;
and analyzing to obtain the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any accompanying claims should not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for data quality detection, the method comprising:
obtaining an original data set, wherein the original data set comprises dialogue data;
randomly extracting a preset number of sentences from the original data set by using a preset sampling method, grading the fluency of the sentences, and obtaining a fluency value of the original data set according to the fluency grade;
performing confusion analysis on the original data set by using a pre-constructed language model with an attention adding mechanism to obtain a confusion value of the original data set;
dividing the text in the original data set into N sentences, detecting the N sentences by using a pre-constructed grammar detection model, counting to obtain M sentences without grammar errors, and calculating to obtain a correctness value of the original data set;
training a classifier containing positive and negative examples to obtain a supervision model, and performing matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set;
and analyzing to obtain the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value.
2. The data quality detection method of claim 1, wherein the randomly extracting a preset number of sentences from the original data set by using a preset sampling method, scoring fluency of the sentences, and obtaining the fluency value of the original data set according to the fluency score comprises:
randomly extracting a preset number of sentences from the original data set by using a preset sampling method to obtain a sentence subset;
outputting the sentence set to a user, prompting the user to score each sentence in the sentence set based on subjective feeling during reading, and obtaining a scoring set according to the score of the user;
carrying out mean value processing on the scoring set to obtain a mean value of the scoring set;
and performing per-unit processing on the mean value to obtain the fluency value of the original data set.
3. The data quality detection method according to claim 2, wherein the obtaining the fluency value of the original data set by performing per-unit processing on the mean value comprises:
presetting a per unit value;
and dividing the mean value equally according to the per unit value to obtain the fluency value of the original data set.
4. The data quality detection method of claim 1, wherein before performing the confusion analysis on the original data set by using the pre-constructed language model with the added attention mechanism to obtain the confusion value of the original data set, the method further comprises:
constructing an original BERT model;
adding an attention mechanism in the original BERT model to obtain a primary BERT model;
and connecting the primary BERT model by using a pre-constructed classification function to obtain the language model.
5. The data quality detection method of claim 4, wherein performing a confusion analysis on the original data set using a pre-constructed language model with an added attention mechanism to obtain a confusion value of the original data set comprises:
computing a distributed representation of text in the raw dataset using the primary BERT model, and computing a probability distribution p (token) over time of words or words in the text using the classification functiont);
Calculating a confusion value of the original data set using a first preset formula.
6. The data quality detection method of claim 5, wherein the calculating the confusion value of the original data set using the first predetermined formula comprises:
calculating the confusion value using a first preset formula:
Figure FDA0002979444430000021
wherein T is the total number of all words or phrases in the text.
7. The data quality detection method of claim 1, wherein the obtaining of the matching degree value of the original data set by training a classifier including positive and negative examples to obtain a supervision model and performing matching degree detection on the dialogue data in the original data set by using the supervision model comprises:
constructing a classifier training data set containing positive and negative examples by using dialogue data of a preset field;
training a classifier by using the training data set to obtain a supervision model;
acquiring each pair of dialogue data in the original data set, and calculating the matching degree of the dialogue data by using the supervision model;
and calculating the matching degree value of the original data set by using a second preset formula.
8. An apparatus for data quality detection, the apparatus comprising:
the device comprises an original data set acquisition module, a conversion module and a conversion module, wherein the original data set acquisition module is used for acquiring an original data set, and the original data set comprises conversation data;
the fluency analyzing module is used for randomly extracting a preset number of sentences from the original data set by using a preset sampling method, grading fluency of the sentences, and obtaining a fluency value of the original data set according to the fluency grade;
the confusion analysis module is used for carrying out confusion analysis on the original data set by utilizing a pre-constructed language model with an attention adding mechanism to obtain a confusion value of the original data set;
the accuracy analysis module is used for dividing the text in the original data set into N sentences, detecting the N sentences by using a pre-constructed grammar detection model, counting to obtain M sentences without grammar errors, and calculating to obtain a correctness value of the original data set;
the matching degree analysis module is used for training a classifier containing positive and negative examples to obtain a supervision model, and performing matching degree detection on the dialogue data in the original data set by using the supervision model to obtain a matching degree value of the original data set;
and the quality score calculation module is used for analyzing and obtaining the quality score of the original data set according to the fluency value, the confusion value, the correctness value and the matching value.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores computer program instructions executable by the at least one processor to enable the at least one processor to perform the data quality detection method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a data quality detection method according to any one of claims 1 to 7.
CN202110283424.3A 2021-03-17 2021-03-17 Data quality detection method, device, electronic equipment and medium Active CN113011164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110283424.3A CN113011164B (en) 2021-03-17 2021-03-17 Data quality detection method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110283424.3A CN113011164B (en) 2021-03-17 2021-03-17 Data quality detection method, device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN113011164A true CN113011164A (en) 2021-06-22
CN113011164B CN113011164B (en) 2023-10-20

Family

ID=76408728

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110283424.3A Active CN113011164B (en) 2021-03-17 2021-03-17 Data quality detection method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113011164B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114330556A (en) * 2021-12-29 2022-04-12 绍兴兰红智能科技有限公司 BERT model scoring method based on attention and validity degree
CN116227894A (en) * 2023-05-06 2023-06-06 苏州市世为科技有限公司 Man-machine interaction operation quality supervision system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070100636A1 (en) * 2005-11-02 2007-05-03 Makoto Hirota Speech recognition apparatus
US20090234847A1 (en) * 2008-03-11 2009-09-17 Xanavi Informatics Comporation Information retrieval apparatus, informatin retrieval system, and information retrieval method
US20200175961A1 (en) * 2018-12-04 2020-06-04 Sorenson Ip Holdings, Llc Training of speech recognition systems
CN111832278A (en) * 2020-06-15 2020-10-27 北京百度网讯科技有限公司 Document fluency detection method and device, electronic equipment and medium
CN112380845A (en) * 2021-01-15 2021-02-19 鹏城实验室 Sentence noise design method, equipment and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070100636A1 (en) * 2005-11-02 2007-05-03 Makoto Hirota Speech recognition apparatus
US20090234847A1 (en) * 2008-03-11 2009-09-17 Xanavi Informatics Comporation Information retrieval apparatus, informatin retrieval system, and information retrieval method
US20200175961A1 (en) * 2018-12-04 2020-06-04 Sorenson Ip Holdings, Llc Training of speech recognition systems
CN111832278A (en) * 2020-06-15 2020-10-27 北京百度网讯科技有限公司 Document fluency detection method and device, electronic equipment and medium
CN112380845A (en) * 2021-01-15 2021-02-19 鹏城实验室 Sentence noise design method, equipment and computer storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114330556A (en) * 2021-12-29 2022-04-12 绍兴兰红智能科技有限公司 BERT model scoring method based on attention and validity degree
CN116227894A (en) * 2023-05-06 2023-06-06 苏州市世为科技有限公司 Man-machine interaction operation quality supervision system

Also Published As

Publication number Publication date
CN113011164B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN112016304A (en) Text error correction method and device, electronic equipment and storage medium
WO2022160449A1 (en) Text classification method and apparatus, electronic device, and storage medium
CN112185348A (en) Multilingual voice recognition method and device and electronic equipment
CN113378970B (en) Sentence similarity detection method and device, electronic equipment and storage medium
CN112380343A (en) Problem analysis method, problem analysis device, electronic device and storage medium
CN113011164B (en) Data quality detection method, device, electronic equipment and medium
CN113268615A (en) Resource label generation method and device, electronic equipment and storage medium
CN111753089A (en) Topic clustering method and device, electronic equipment and storage medium
CN112507663A (en) Text-based judgment question generation method and device, electronic equipment and storage medium
CN112528013A (en) Text abstract extraction method and device, electronic equipment and storage medium
CN113064994A (en) Conference quality evaluation method, device, equipment and storage medium
CN113504935A (en) Software development quality evaluation method and device, electronic equipment and readable storage medium
CN113065607A (en) Image detection method, image detection device, electronic device, and medium
CN112883730A (en) Similar text matching method and device, electronic equipment and storage medium
CN113887930A (en) Question-answering robot health degree evaluation method, device, equipment and storage medium
CN113869456A (en) Sampling monitoring method and device, electronic equipment and storage medium
CN113628043A (en) Complaint validity judgment method, device, equipment and medium based on data classification
CN113808616A (en) Voice compliance detection method, device, equipment and storage medium
CN111460293B (en) Information pushing method and device and computer readable storage medium
CN113254814A (en) Network course video labeling method and device, electronic equipment and medium
CN112632260A (en) Intelligent question and answer method and device, electronic equipment and computer readable storage medium
CN112579781A (en) Text classification method and device, electronic equipment and medium
CN116739001A (en) Text relation extraction method, device, equipment and medium based on contrast learning
CN116468025A (en) Electronic medical record structuring method and device, electronic equipment and storage medium
WO2022141838A1 (en) Model confidence analysis method and apparatus, electronic device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant