Data quality inspection method, device, storage medium and electronic device
By using regular matching and entity recognition models combined with knowledge graph comparison technology in the insurance intelligent quality inspection system, the timeliness and diversity problems of quality inspection of insurance product explanation content are solved, and efficient and accurate quality inspection results are achieved.
Patent Information
- Application Number
- CN202110448549.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-25
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-04-25
AI Technical Summary
The existing insurance intelligent quality inspection system cannot effectively conduct quality inspection on the explanation content of insurance products, especially due to timeliness and diversity, which makes the existing method impractical.
By obtaining the text data to be inspected, performing regular matching or using a pre-established entity recognition model for identification, and comparing the entity attribute information with the knowledge graph to determine the correctness and compliance of the text data.
It achieves accurate quality inspection of insurance product explanation content and improves quality inspection efficiency and accuracy.
Smart Images

Figure CN113128231B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data quality inspection, and in particular to a data quality inspection method, device, storage medium and electronic equipment. Background Art
[0002] In the existing insurance intelligent quality inspection system, common quality inspection contents include: banned words, laws and regulations, illegal operations, etc. These contents can be quality inspected through rule configuration or neural network models. However, regarding the explanation content of insurance products, due to the special timeliness and diversity of insurance products, it is impossible to reuse other quality inspection methods to inspect the explanation content. For example, life insurance is time-sensitive, different life insurance products will not be put on and off the shelves in the same time period, and life insurance involves a large number of specific product attributes, such as the payment period, premium, and insured amount of life insurance.
[0003] The method of training a neural network model by accumulating corpus requires a large amount of labeled corpus in a specific time period, and as insurance products are taken off the shelves, the historical accumulated corpus will also become outdated. Therefore, it is not practical to conduct quality inspection on the explanation content of insurance products based on this method, that is, there is currently no quality inspection method for the explanation content of insurance products. Summary of the invention
[0004] In view of the above problems, the present invention provides a first aspect to overcome the above problems or at least partially solve the above problems, a data quality inspection method, comprising:
[0005] Obtain text data to be inspected;
[0006] Execute at least one of the following methods 1 and 2 on the text data to be quality inspected;
[0007] Method 1: performing regular expression matching on the text data to be inspected, thereby determining whether the text data to be inspected includes illegal words;
[0008] Method 2: Identify the text data to be inspected through a pre-established entity recognition model to obtain entities in the text data to be inspected and attribute information of the entities; query and obtain the attribute information of the entities in the pre-established knowledge graph; compare the attribute information of the entities in the knowledge graph with the attribute information obtained through the entity recognition model to determine whether the text data to be inspected is correct.
[0009] In conjunction with the first aspect, in some optional implementation methods, the method further includes:
[0010] Obtain at least one piece of text data;
[0011] Segmenting the at least one piece of text data to obtain a plurality of independent phrases;
[0012] Filtering the plurality of independent phrases for inactive independent phrases, thereby obtaining a plurality of valid independent phrases, wherein the inactive independent phrases at least include preset invalid independent phrases;
[0013] Combining the multiple valid independent phrases in pairs to obtain multiple valid combined phrases;
[0014] Inputting a plurality of preset illegal basic words, the plurality of valid independent phrases and the plurality of valid combined phrases into a pre-trained BERT model respectively, thereby obtaining a coding matrix of each illegal basic word, a coding matrix of each valid independent phrase and a coding matrix of each valid combined phrase respectively;
[0015] According to the coding matrix of each of the illegal basic words, the coding matrix of each of the valid independent phrases and the coding matrix of each of the valid combined phrases, a plurality of illegal extended words are obtained from the valid independent phrases and the valid combined phrases;
[0016] The performing regular expression matching on the text data to be inspected, thereby determining whether the text data to be inspected includes illegal words, includes:
[0017] Regular matching is performed on the text data to be inspected to determine whether the text data to be inspected includes illegal words in an illegal word library, wherein the illegal words in the illegal word library at least include the illegal basic words and the illegal extended words.
[0018] In combination with the previous embodiment, in some optional implementation methods, the step of obtaining a plurality of illegal expansion words from the valid independent phrases and the valid combined phrases according to the encoding matrix of each illegal basic word, the encoding matrix of each valid independent phrase, and the encoding matrix of each valid combined phrase comprises:
[0019] For any coding matrix, the following steps are performed: calculating the average value of each vector value of each column of any coding matrix, where each column corresponds to an average value; sorting the average values corresponding to each column according to the position of each column in any coding matrix, so as to obtain a coding vector matching any coding matrix, where the coding vector is a row vector of 1 row and N columns, where N is an integer greater than 1, and one coding vector corresponds to one coding matrix;
[0020] respectively calculating first similarities between the encoding vectors corresponding to the illegal basic words and the encoding vectors corresponding to the valid independent phrases, thereby obtaining at least one illegal extended word from the valid independent phrases according to the first similarities;
[0021] The second similarities between the encoding vectors corresponding to the illegal basic words and the encoding vectors corresponding to the valid combined phrases are respectively calculated, so as to obtain at least one illegal extended word from the valid combined phrases according to the second similarities.
[0022] In combination with the previous implementation, in some optional implementation methods, obtaining at least one of the illegal extension words from the valid independent phrases according to the first similarity includes:
[0023] Determine the valid independent phrase whose first similarity is greater than a first preset threshold or whose first similarity ranking is greater than a preset order as the illegal expansion word;
[0024] The obtaining at least one illegal extended word from the valid combined word group according to the second similarity comprises:
[0025] The valid combination phrase whose second similarity is greater than a second preset threshold or whose second similarity ranking is greater than a preset order is determined as the illegal expansion word.
[0026] In combination with the first aspect, in some optional implementation methods, comparing the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model to determine whether the text data to be inspected is correct includes:
[0027] The attribute information of the entity in the knowledge graph is compared with the attribute information obtained through the entity recognition model. If the attribute information of the entity in the knowledge graph is consistent with the attribute information obtained through the entity recognition model, the text data to be checked is correct; otherwise, it is determined that the text data to be checked is incorrect.
[0028] In conjunction with the first aspect, in some optional implementation methods, the text data to be quality-checked includes at least: consultant answer text;
[0029] The comparing the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model to determine whether the text data to be inspected is correct includes:
[0030] Comparing the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model, and obtaining a comparison result; wherein, if the attribute information of the entity in the knowledge graph includes the attribute information obtained by the entity recognition model, a first comparison result is obtained, otherwise a second comparison result is obtained;
[0031] Determine the number of negative words included in the consultant's answer text and obtain a negative word result; if the number of negative words is an odd number, obtain an odd number result, otherwise, obtain an even number result;
[0032] According to the comparison result and the negation word result, it is determined whether the text data to be quality checked is correct.
[0033] In conjunction with the first aspect, in some optional implementation methods, the method further includes:
[0034] In the case where only the first method is executed and the second method is not executed: if the text data to be inspected includes illegal words, the text data to be inspected is determined to be illegal; otherwise, the text data to be inspected is determined to be illegal;
[0035] In the case where only the second method is executed and the first method is not executed: if the text data to be inspected is incorrect, then the text data to be inspected is determined to be non-compliant; otherwise, the text data to be inspected is determined to be compliant;
[0036] When executing the method one and the method two: if the text data to be checked includes illegal words and / or it is determined that the text data to be checked is incorrect, then the text data to be checked is determined to be non-compliant; if the text data to be checked does not include illegal words and it is determined that the text data to be checked is correct, then the text data to be checked is determined to be compliant.
[0037] In a second aspect, a data quality inspection device includes: a data acquisition unit, a trigger unit, a mode 1 unit, and a mode 2 unit;
[0038] The data acquisition unit is configured to acquire the text data to be inspected;
[0039] The trigger unit is configured to trigger at least one of the mode 1 unit and the mode 2 unit;
[0040] The method 1 unit is configured to perform regular matching on the text data to be checked, so as to determine whether the text data to be checked includes a violation word;
[0041] The method two unit is configured to execute identification of the text data to be inspected through a pre-established entity recognition model, thereby obtaining entities in the text data to be inspected and attribute information of the entities; in a pre-established knowledge graph, query and obtain attribute information of the entities in the knowledge graph; compare the attribute information of the entities in the knowledge graph with the attribute information obtained through the entity recognition model, thereby determining whether the text data to be inspected is correct.
[0042] In a third aspect, a storage medium stores a program thereon, wherein the program, when executed by a processor, implements any of the above-mentioned data quality inspection methods.
[0043] In a fourth aspect, an electronic device comprises at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute any of the data quality inspection methods described above.
[0044] By means of the above technical scheme, the present invention provides a data quality inspection method, device, storage medium and electronic device, which obtains the text data to be inspected; performs at least one of the following methods 1 and 2 on the text data to be inspected; Method 1: Regular matching is performed on the text data to be inspected, so as to determine whether the text data to be inspected includes illegal words; Method 2: The text data to be inspected is identified through a pre-established entity recognition model, so as to obtain the entity in the text data to be inspected and the attribute information of the entity; in the pre-established knowledge graph, the attribute information of the entity in the knowledge graph is obtained by querying; the attribute information of the entity in the knowledge graph is compared with the attribute information obtained by the entity recognition model, so as to determine whether the text data to be inspected is correct. It can be seen from this that the present invention can accurately inspect the explanation content of insurance products, with high efficiency and accuracy.
[0045] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0047] Figure 1 A schematic diagram of a process of a data quality inspection method provided by the present invention is shown;
[0048] Figure 2 A schematic diagram of a process flow of another data quality inspection method provided by the present invention is shown;
[0049] Figure 3 A schematic diagram of a coding matrix provided by the present invention is shown;
[0050] Figure 4 A schematic diagram of a process flow of another data quality inspection method provided by the present invention is shown;
[0051] Figure 5 A schematic diagram of a process flow of another data quality inspection method provided by the present invention is shown;
[0052] Figure 6 A schematic diagram of the structure of a data quality inspection device provided by the present invention is shown;
[0053] Figure 7 A structural schematic diagram of an electronic device provided by the present invention is shown. DETAILED DESCRIPTION
[0054] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0055] like Figure 1 As shown, the present invention provides a data quality inspection method, comprising:
[0056] S100, obtaining text data to be inspected;
[0057] Optionally, the text data to be quality inspected mentioned in this article may be pre-processed and determined to be text data corresponding to the explanation content about insurance products between insurance consultants and customers. For example, because the conversation between insurance consultants and customers may involve different aspects, including asking customers about their age, occupation, etc. Therefore, it is necessary to first identify the chat content between the insurance consultant and the customer, and then determine whether the current chat content is about the explanation content of the insurance product. For example, based on a binary classification model (such as a fasttext model), each sentence communicated between the insurance consultant and the customer can be identified to determine the text data corresponding to the explanation content about insurance products between the insurance consultant and the customer. That is, the text data corresponding to the explanation content about insurance products between the insurance consultant and the customer can be determined through a binary classification model, and the text data can be used as the text data to be quality inspected mentioned in this article, and the present invention is not limited to this.
[0058] For example, the communication between a client and an insurance advisor might look like this:
[0059] 1. Customer: “Is that so?”
[0060] 2. Customer: "How long is the waiting period for the Darwin III serious illness insurance?"
[0061] 3. Insurance consultant: "You want to consult about the Darwin III product, right?"
[0062] 4. Insurance consultant: "The waiting period for this product is 180 days, and most critical illness products are 180 days."
[0063] 5. Customer: “Yeah, OK.”
[0064] For the communication content between the above-mentioned customer and the insurance consultant, the binary classification model can determine that the content corresponding to 1 and 5 is not the explanation content of the insurance product, while the content corresponding to 2, 3 and 4 is the explanation content of the insurance product. That is, the content corresponding to 2, 3 and 4 can be used as the text data to be inspected mentioned in this article, and the present invention does not limit this.
[0065] Optionally, further, the text data to be inspected mentioned in this article may only include the insurance consultant's explanation of the insurance product, or may also include the communication content between the insurance consultant and the customer regarding the insurance product, and the present invention is not limited to this.
[0066] Optionally, the text data to be inspected mentioned herein may be obtained by converting voice data of communication between the insurance consultant and the customer, or may be directly obtained from chat records between the insurance consultant and the customer, such as WeChat records, QQ records, SMS records, and chat records of other social software, which are not limited in the present invention.
[0067] S110, executing at least one of the following methods 1 and 2 on the text data to be checked; Method 1: performing regular matching on the text data to be checked, so as to determine whether the text data to be checked includes illegal words; Method 2: identifying the text data to be checked through a pre-established entity recognition model, so as to obtain entities in the text data to be checked and attribute information of the entities; in a pre-established knowledge graph, querying to obtain attribute information of the entities in the knowledge graph; comparing the attribute information of the entity in the knowledge graph with the attribute information obtained through the entity recognition model, so as to determine whether the text data to be checked is correct.
[0068] Optionally, method 1 and method 2 are to perform quality inspection on the text to be inspected from different perspectives. Method 1 can check whether there are any illegal words restricted for use in the industry in the text to be inspected. If there are any illegal words in the text to be inspected, it means that the text data to be inspected may be non-compliant.
[0069] Optionally, for method 1, only the content said by the insurance consultant in the quality inspection text can be quality inspected to determine whether the insurance consultant's speech is non-compliant. Of course, method 1 can also be used to quality inspect both the content said by the insurance consultant and the content said by the customer, and the present invention does not limit this.
[0070] Optional. Since method 1 can only perform quality inspection on the explanation content of general insurance products, the explanation content of specific product attributes mentioned by the insurance consultant needs to be quality inspected in combination with the insurance knowledge graph. For example, if the insurance consultant mentions specific product attributes such as "serious illness", "payment period" and "insured area" of a specific insurance product, method 1 cannot directly quality inspect the insurance consultant's words. It is necessary to combine the insurance knowledge graph to extract entities and obtain the attribute information of entities to quality inspect the insurance consultant's words, which is the solution of method 2.
[0071] Optionally, each illegal word is matched with the text to be inspected one by one by regular matching to determine whether the text data to be inspected includes illegal words. As for regular matching, it is a relatively conventional technical means. For details, please refer to the specification of regular matching in this field, and the present invention does not limit this.
[0072] Optionally, the present invention may perform regular expression matching on the entire text data to be inspected, or may split the text data to be inspected into several phrases, and then perform regular expression matching on the split several phrases, and the present invention does not impose any limitation on this.
[0073] Optionally, the entity recognition model mentioned in this article is an entity recognition model in the field of knowledge graphs, which can identify each entity covered in the text data to be quality checked, as well as the attribute information of each entity covered in the text data to be quality checked.
[0074] In the pre-established knowledge graph, various entity nodes in the insurance field, attribute information of each entity node, and node relationships between nodes are defined. For example, the entities defined in the knowledge graph include: product, waiting period, hesitation period, disease, payment period, insurance age, severe disease, moderate disease, mild disease, exemption clause, special label, severe disease interval, moderate disease interval, etc. And the relationship and attribute information between the above entities, such as the payment period is 3 years.
[0075] After the knowledge graph is established, each entity and the attribute information of each entity in the knowledge graph can be queried based on cypher query statements, and the present invention does not limit this.
[0076] Optionally, the knowledge graph is used as a "standard" to determine whether the entities and attribute information in the text data to be inspected all meet the "standard". If they all meet, it means that the text data to be inspected is correct. If there is entity or attribute information that does not meet the "standard", it means that the text data to be inspected is incorrect. The present invention does not limit this.
[0077] Optionally, method 1 has described how to perform regular matching, which involves splitting the text to be inspected into several phrases for regular matching. This solution will be specifically described below, and the present invention does not limit this.
[0078] like Figure 2 As shown, combined Figure 1 In some optional embodiments, the method further comprises:
[0079] S200, obtaining at least one piece of text data;
[0080] Optionally, in order to improve the comprehensiveness and accuracy of quality inspection, the number of illegal words used in the regular matching process is relatively large, and many phrases with similar meanings to a specific illegal word can be used as illegal words. Therefore, it is necessary to expand the illegal words, for example, obtain at least one text data of communication between the insurance consultant and the customer, and extract new illegal words from the text data. The text data can be historical data of communication between the insurance consultant and the customer, and the present invention does not limit this.
[0081] Optional, Figure 2 The implementation method can be applied to any text data in the insurance field, and is not limited to text data for communication between insurance consultants and customers. The more text data there is, the more conducive it is to improving the accuracy of the present invention, and the present invention does not impose any limitation on this.
[0082] Optional, Figure 2 Steps S200 to S250 of the embodiment may be performed in the execution Figure 1 The implementation method was repeated several times before, so as to build a violation word library that meets the actual needs. Figure 1 While implementing the method, Figure 2 Steps S200 to S250 of the implementation method may also be executed in parallel, so as to continuously update the illegal word library mentioned herein, and the present invention does not impose any limitation on this.
[0083] S210, segmenting the at least one text data to obtain a plurality of independent phrases;
[0084] Optionally, since it is necessary to determine which phrases in the text data can be used as illegal words in the illegal word library later, the step S210 needs to segment the text data to obtain multiple independent phrases.
[0085] Optionally, existing word segmentation tools can be used for word segmentation. For example, the open-source jieba word segmentation tool can be used for word segmentation. Of course, other word segmentation tools or methods can also be used. Any method that can split a piece of text data into multiple independent phrases falls within the protection scope of the present invention, and the present invention does not limit this.
[0086] S220. Filter the stop independent phrases from the multiple independent phrases to obtain multiple valid independent phrases, where the stop independent phrases at least include preset invalid independent phrases;
[0087] Optionally, some of the multiple independent phrases obtained by the foregoing splitting may include invalid independent phrases, such as "um", "de", "ah", etc. Any independent phrase that has nothing to do with the explanatory content of the insurance product can be understood as an invalid independent phrase. In order to improve the efficiency and accuracy of expanding the violation word library, invalid independent phrases can be filtered in step S220 to save the calculation amount in the subsequent process. The present invention does not limit this.
[0088] Optionally, the filtering method can be regular matching or other methods. Any method that can filter the stop independent phrases falls within the protection scope of the present invention.
[0089] Optionally, after filtering the stop independent phrases, the remaining independent phrases are all independent phrases related to the explanatory content of the insurance product, collectively referred to as valid independent phrases.
[0090] S230. Combine the multiple valid independent phrases in pairs to obtain multiple valid combined phrases;
[0091] Optionally, in addition to including some valid independent phrases, the violation word library can also include combined phrases formed by combining some valid independent phrases, collectively referred to as valid combined phrases. Therefore, in step S230, multiple valid independent phrases can be combined in pairs to obtain multiple valid combined phrases, so as to facilitate subsequent determination of which valid combined phrases can be used as violation words in the violation word library. The present invention does not limit this.
[0092] S240. Input the multiple preset violation basic words, the multiple valid independent phrases, and the multiple valid combined phrases into a pre-trained bert model respectively, so as to obtain the encoding matrices of the respective violation basic words, the encoding matrices of the respective valid independent phrases, and the encoding matrices of the respective valid combined phrases;
[0093] Optionally, BERT (Bidirectional Encoder Representations from Transformer) is a new language representation model. The model is represented by a bidirectional encoder of Transformer. Unlike other recent language representation models, BERT aims to pre-train deep bidirectional representations by jointly adjusting the context in all layers. Therefore, the pre-trained BERT representation can be fine-tuned through an additional output layer, suitable for the construction of state-of-the-art models for a wide range of tasks. The goal of the BERT model is to use large-scale unlabeled corpus training to obtain a representation of the text that contains rich semantic information, that is, the semantic representation of the text, and then fine-tune the semantic representation of the text in a specific NLP (Chinese full name: Natural Language Processing, English full name: Natural Language Processing) task, and finally apply it to the NLP task.
[0094] In the NLP method based on deep neural network, the characters / words in the text are usually represented by one-dimensional vectors (generally referred to as "word vectors"); on this basis, the neural network will take the one-dimensional word vectors of each character or word in the text as input, and after a series of complex transformations, output a one-dimensional word vector as the semantic representation of the text. In particular, it is usually hoped that the distance between characters / words with similar semantics in the feature vector space is also relatively close, so that the text vector converted from the character / word vector can also contain more accurate semantic information. Therefore, the main input of the BERT model is the original word vector of each character / word in the text, which can be randomly initialized or pre-trained using algorithms such as Word2Vector as the initial value; the output is the vector representation of each character / word in the text after integrating the semantic information of the whole text, which is not limited by the present invention.
[0095] For example, use the pre-trained BERT model to encode the illegal basic words and obtain the encoding matrix of the illegal basic words: in is the dimension symbol, n represents the number of characters in the offending base word, WV is the encoding matrix of the offending base word, and 768 is the hidden dimension of the BERT model. For each WV of an offending base word, each row represents the encoding vector corresponding to each character in the offending base word, and each column represents a dimension of each character in the offending base word. Of course, the above BERT model is also applicable to valid independent phrases and valid combined phrases, and the corresponding encoding matrix is obtained. For example, Figure 3 As shown in , for the term "highest value for money", inputting it into the BERT model yields the following Figure 3 The encoding matrix is shown.
[0096] S250, obtaining a plurality of illegal extended words from the valid independent phrases and the valid combined phrases according to the coding matrix of each illegal basic word, the coding matrix of each valid independent phrase and the coding matrix of each valid combined phrase;
[0097] Optionally, not all valid independent phrases or all valid combined phrases can be used as illegal expansion words. It is necessary to determine valid independent phrases and valid combined phrases close to each illegal basic word as illegal expansion words according to the encoding matrix of each illegal basic word, the encoding matrix of each valid independent phrase and the encoding matrix of each valid combined phrase, and the present invention does not limit this.
[0098] Optionally, take the coding matrix of "highest value for money" as an example. Each column represents information of one dimension of each word in "highest value for money", and averaging the columns can generate information vectors of "highest value for money" in different dimensions. Unitizing information vectors of different dimensions can generate a coding vector of "highest value for money", that is, converting the vector into a unit vector with a modulus of 1 for inner product calculation, so as to calculate the similarity between each valid independent phrase and the offending basic word, and the similarity between each valid combined phrase and the offending basic word according to the coding vector, and the present invention does not limit this.
[0099] exist Figure 2 In the implementation manner, the first method includes:
[0100] Regular matching is performed on the text data to be inspected to determine whether the text data to be inspected includes illegal words in an illegal word library, wherein the illegal words in the illegal word library at least include the illegal basic words and the illegal extended words.
[0101] Optional, Figure 2 The relevant contents of step S100 and step S110 in Figure 1 This is described in the implementation method and will not be repeated here.
[0102] Optional, such as Figure 4 As shown, combined Figure 2 In some optional embodiments, the step S250 includes:
[0103] S300, for any coding matrix, executing: calculating and obtaining the average value of each vector value of each column of any coding matrix, where each column corresponds to an average value; sorting the average values corresponding to each column according to the position of each column in any coding matrix, so as to obtain a coding vector matching any coding matrix, where the coding vector is a row vector of 1 row and N columns, wherein N is an integer greater than 1, and one coding vector corresponds to one coding matrix;
[0104] Optionally, step S300 of the present invention can be performed for the coding matrix of any illegal basic word, the coding matrix of any valid independent phrase, and the coding matrix of any valid combined phrase, so as to obtain the coding vector of each illegal basic word, the coding vector of each valid independent phrase, and the coding vector of each valid combined phrase, and the present invention does not impose any limitation on this.
[0105] 310. Calculate first similarities between the encoding vectors corresponding to the illegal basic words and the encoding vectors corresponding to the valid independent phrases, respectively, so as to obtain at least one illegal extended word from the valid independent phrases according to the first similarities;
[0106] Optionally, the similarities between the encoding vectors corresponding to the valid independent phrases and the encoding vectors corresponding to the offending basic words are collectively referred to as the first similarity herein. However, since the encoding vectors corresponding to different valid independent phrases may be different, the first similarities between the encoding vectors corresponding to different valid independent phrases and the encoding vectors corresponding to the same offending basic word may be different. The first similarities between the encoding vectors corresponding to different valid independent phrases and the encoding vectors corresponding to different offending basic words may also be different, and the present invention does not limit this.
[0107] Optionally, the first similarities between the encoding vector of a specific illegal basic word and the encoding vectors of each valid independent phrase may be sorted, and the valid independent phrase whose first similarity meets the actual needs may be selected as the illegal extended word, and the present invention does not impose any limitation on this.
[0108] For example, combined with Figure 4 In the embodiment shown, in some optional embodiments, obtaining at least one of the illegal extension words from the valid independent word group according to the first similarity in step S310 includes:
[0109] The valid independent phrase whose first similarity is greater than a first preset threshold or whose first similarity ranking is greater than a preset order is determined as the illegal expansion word.
[0110] Optionally, the present invention does not limit the first preset threshold, and any feasible manner falls within the protection scope of the present invention.
[0111] Optionally, the present invention does not limit the preset order, and any feasible manner belongs to the protection scope of the present invention. For example, valid independent phrases with a large first similarity and ranked in the top three are determined as illegal expansion words.
[0112] S320, respectively calculating the second similarities between the encoding vectors corresponding to the illegal basic words and the encoding vectors corresponding to the valid combined phrases, thereby obtaining at least one illegal extended word from the valid combined phrases according to the second similarities.
[0113] Optionally, the similarities between the coding vectors corresponding to the valid combination phrases and the coding vectors corresponding to the offending basic words are collectively referred to as the second similarity herein. However, since the coding vectors corresponding to different valid combination phrases may be different, the second similarities between the coding vectors corresponding to different valid combination phrases and the coding vectors corresponding to the same offending basic word may be different. The second similarities between the coding vectors corresponding to different valid combination phrases and the coding vectors corresponding to different offending basic words may also be different, and the present invention does not limit this.
[0114] Optionally, the second similarities between the encoding vector of a specific illegal basic word and the encoding vectors of each valid combination phrase may be sorted, and the valid combination phrase whose second similarity meets the actual needs may be selected as the illegal expansion word, and the present invention does not impose any limitation on this.
[0115] Optionally, the present invention does not limit the execution order of step S310 and step S320. Step S310 may be executed first or step S320 may be executed first. The present invention does not impose any limitation on this.
[0116] Optionally, if step S310 is performed first and then step S320, step S110 is performed after step S320; if step S320 is performed first and then step S310, step S110 is performed after step S310. The present invention does not limit this.
[0117] Optional, Figure 4 Steps S200, S210, S220, S230 and S240 in Figure 2 This is described in the implementation method and will not be repeated here.
[0118] Combination Figure 4 In the embodiment shown, in some optional embodiments, obtaining at least one illegal expansion word from the valid combination word group according to the second similarity in step S320 includes:
[0119] The valid combination phrase whose second similarity is greater than a second preset threshold or whose second similarity ranking is greater than a preset order is determined as the illegal expansion word.
[0120] Optionally, the present invention does not limit the second preset threshold, and any feasible manner falls within the protection scope of the present invention.
[0121] Optionally, the present invention does not limit the preset order, and any feasible manner belongs to the protection scope of the present invention. For example, the valid combination phrases with the largest second similarity and ranked in the top three are determined as illegal expansion words.
[0122] Optionally, the illegal words in the illegal word library mentioned herein are phrases that have been determined to be illegal words. These phrases are derived from manual settings, the above-mentioned valid independent phrases and the above-mentioned valid combined phrases. The illegal basic words mentioned herein can be illegal words included in the current illegal word library, or can be phrases that are manually set as illegal words, and the present invention does not limit this.
[0123] Optionally, if there is at least one phrase matching the illegal word in the text data to be checked, it means that the text data to be checked includes the illegal word; if there is no phrase matching the illegal word in the text data to be checked, it means that the text data to be checked does not include the illegal word, and the present invention is not limited to this.
[0124] Combination Figure 1 In the embodiment shown, in some optional embodiments, the second method of comparing the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model to determine whether the text data to be inspected is correct includes:
[0125] The attribute information of the entity in the knowledge graph is compared with the attribute information obtained through the entity recognition model. If the attribute information of the entity in the knowledge graph is consistent with the attribute information obtained through the entity recognition model, the text data to be checked is correct; otherwise, it is determined that the text data to be checked is incorrect.
[0126] Optionally, each entity established in the knowledge graph and the attribute information of each entity are used as the "standard". The entity recognition model identifies a specific entity and its attribute information from the text data to be inspected. If the attribute information of the entity in the knowledge graph is inconsistent with or significantly different from the attribute information obtained by the entity recognition model, it means that there is an error in the description of the attribute information of the entity in the text data to be inspected, that is, the text data to be inspected is incorrect, and the present invention does not limit this.
[0127] Combination Figure 1 In the illustrated embodiment, in certain optional embodiments, the text data to be inspected includes at least: consultant answer text;
[0128] The second method of comparing the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model to determine whether the text data to be inspected is correct includes: step 1, step 2 and step 3;
[0129] Step 1: Compare the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model, and obtain a comparison result; wherein, if the attribute information of the entity in the knowledge graph includes the attribute information obtained by the entity recognition model, a first comparison result is obtained, otherwise a second comparison result is obtained;
[0130] Optionally, the consultant answer text refers to: the text corresponding to the explanation content about the insurance product given by the insurance consultant in the text data to be quality inspected, and the present invention is not limited to this.
[0131] Optionally, an entity recognition model can be used to extract multiple entities (for example, product: Guardian No. 3, serious disease: stage 1 thyroid cancer loss). Then convert it into a cypher query statement to query the serious disease list of "Guardian No. 3" in the insurance knowledge graph. If the query result returns the serious disease list of Guardian No. 3 as: [malignant tumor, myocardial infarction,..., limb loss]. Since the names of normative diseases are usually not stated during the communication between insurance consultants and customers (such as the names of normative diseases in the above-mentioned list of serious diseases obtained by query). Therefore, alignment processing can be performed on the colloquial descriptions of the disease names, and common colloquial descriptions are matched with the normative disease names. If the colloquial description in the text to be inspected corresponds to the name of the normative disease in the knowledge graph, a first comparison result is obtained, otherwise a second comparison result is obtained, and the present invention is not limited to this.
[0132] Step 2: determine the number of negative words included in the consultant's answer text, and obtain negative word results; if the number of negative words is odd, obtain an odd result, otherwise, obtain an even result;
[0133] Optionally, in step one, it is only necessary to determine whether the attribute information described in the text data to be quality checked exists in the knowledge spectrum. However, considering that the text data to be quality checked comes from the communication data between the insurance consultant and the customer, it is also necessary to determine the semantics of the attribute information described in the text data to be quality checked. For example, the description of "myocardial infarction" in the text data to be quality checked can be a negative description: "Guardian No. 3's serious illness does not include myocardial infarction", or it can be a positive description: "Guardian No. 3's serious illness includes myocardial infarction". Therefore, in order to accurately determine whether the insurance consultant's description of the attribute information is correct, it is also necessary to determine the semantics of the insurance consultant when describing the attribute information based on the number of negative words included in the consultant's answer text, and the present invention does not limit this.
[0134] Step 3: Determine whether the text data to be inspected is correct based on the comparison result and the negation word result.
[0135] Optionally, if the comparison result is: if the attribute information of the entity in the knowledge graph does not include the attribute information obtained by the entity recognition model. That is, the insurance consultant's literal description of the attribute information of a specific entity cannot find the corresponding attribute information in the knowledge graph, then it means that the text data to be inspected is incorrect. That is, the insurance consultant's literal description of the attribute information of the entity is incorrect, for example, for "myocardial infarction", the insurance consultant describes it as "heart arrest", and the present invention does not limit this.
[0136] Optionally, if the comparison result is: the attribute information of the entity in the knowledge graph includes the attribute information obtained by the entity recognition model. That is, the insurance consultant's literal description of the attribute information of the entity is correct, but the semantics may be incorrect and need further identification. For example, for "myocardial infarction", the insurance consultant described it as "heart attack", but the insurance consultant described: Guardian No. 3's serious illness does not include myocardial infarction. In reality, Guardian No. 3's serious illness includes myocardial infarction, that is, what is recorded in the knowledge graph is that Guardian No. 3's serious illness includes myocardial infarction. Therefore, it is necessary to determine whether the insurance consultant's semantics when describing "heart attack" is a positive description or a negative description, which can be determined by the number of negative words used by the insurance consultant when describing "heart attack". If the number of negative words is an odd number, it means that it is a negative description, and the insurance consultant's description of "myocardial infarction" is incorrect, further indicating that the text data to be quality inspected is incorrect; if the number of negative words is an even number, it means that it is a positive description, and the insurance consultant's description of "myocardial infarction" is correct, further indicating that the text data to be quality inspected is correct, and the present invention does not limit this.
[0137] Optionally, by combining the comparison results and the negation results and referring to the knowledge graph, it can be determined whether the insurance consultant's description of the attribute information of a specific entity is correct, and the present invention is not limited to this.
[0138] Optionally, the first and second methods of the present invention are two quality inspection methods from different angles, and the two methods complement each other. That is, the present invention can implement both the first and second methods, or only one of them. The present invention does not limit this, and will be described separately below.
[0139] like Figure 5 As shown, combined Figure 1 In some optional embodiments, the method further comprises:
[0140] S400, when only the first method is executed and the second method is not executed: if the text data to be inspected includes illegal words, determining that the text data to be inspected is not compliant; otherwise, determining that the text data to be inspected is compliant;
[0141] Optionally, if only method one is executed, the quality inspection result of the text data to be inspected is only affected by the result of method one, that is, the quality inspection result of the text data to be inspected directly matches the result of method one.
[0142] For example, if the result of method 1 is: the text data to be inspected includes illegal words, it means that the explanation content about the insurance product in the text data to be inspected is wrong, that is, the text data to be inspected is not compliant. On the contrary, if the result of method 1 is: the text data to be inspected does not include illegal words, it means that the text data to be inspected is compliant, and the present invention does not limit this.
[0143] S410, when only the second method is executed and the first method is not executed: if the text data to be inspected is incorrect, determining that the text data to be inspected is not compliant; otherwise, determining that the text data to be inspected is compliant;
[0144] Optionally, if only method 2 is executed, the quality inspection result of the text data to be inspected is only affected by the result of method 2, that is, the quality inspection result of the text data to be inspected directly matches the result of method 2.
[0145] For example, if the result of the second method is: the text data to be inspected is incorrect, it means that the explanation of the insurance product in the text data to be inspected is incorrect, that is, the text data to be inspected is not compliant. On the contrary, if the result of the second method is: the text data to be inspected is correct, it means that the text data to be inspected is compliant, and the present invention does not limit this.
[0146] S420. When the method 1 and the method 2 are executed: if the text data to be checked includes illegal words and / or it is determined that the text data to be checked is incorrect, then the text data to be checked is determined to be non-compliant; if the text data to be checked does not include illegal words and it is determined that the text data to be checked is correct, then the text data to be checked is determined to be compliant.
[0147] Optionally, the words used in the present invention to describe the text data to be inspected: "compliant", "non-compliant", "correct", and "incorrect" can be understood as: "compliant" and "non-compliant" describe the final result of the text data to be inspected, and "correct" and "incorrect" describe the result of method two. The influencing factors of the final result depend on the execution of method one and method two. If only method one is executed, the final result is only affected by the result of method one, as shown in step S400; if only method two is executed, the final result is only affected by the result of method two, as shown in step S410; if both method one and method two are executed, the final result is affected by both the result of method one and the result of method two, as shown in step S420.
[0148] Optionally, when executing Method 1 and Method 2, there are two final results of the text data to be inspected, one is compliant and the other is non-compliant. Among them, the compliant situation is: the result of Method 1 is that the text data to be inspected does not include illegal words and the result of Method 2 is that the text data to be inspected is correct; there are three non-compliant situations: (1) the result of Method 1 is that the text data to be inspected includes illegal words and the result of Method 2 is that the text data to be inspected is correct; (2) the result of Method 1 is that the text data to be inspected does not include illegal words and the result of Method 2 is that the text data to be inspected is incorrect; (3) the result of Method 1 is that the text data to be inspected includes illegal words and the result of Method 2 is that the text data to be inspected is incorrect, and the present invention does not limit this.
[0149] like Figure 6 As shown, the present invention provides a data quality inspection device, including: a data acquisition unit 100, a trigger unit 200, a mode 1 unit 300 and a mode 2 unit 400;
[0150] The data acquisition unit 100 is configured to acquire text data to be inspected;
[0151] The trigger unit 200 is configured to trigger at least one of the mode 1 unit 300 and the mode 2 unit 400;
[0152] The method 1 unit 300 is configured to perform regular matching on the text data to be checked, so as to determine whether the text data to be checked includes a violation word;
[0153] The method two unit 400 is configured to execute recognition of the text data to be checked through a pre-established entity recognition model, thereby obtaining entities in the text data to be checked and attribute information of the entities; in a pre-established knowledge graph, query and obtain attribute information of the entities in the knowledge graph; compare the attribute information of the entity in the knowledge graph with the attribute information obtained through the entity recognition model, thereby determining whether the text data to be checked is correct.
[0154] Combination Figure 6 In certain optional embodiments of the embodiment, the device further comprises: a text obtaining unit, a word segmentation unit, a filtering unit, a combining unit, a coding matrix obtaining unit and a violation expansion word obtaining unit;
[0155] The text obtaining unit is configured to obtain at least one piece of text data;
[0156] The word segmentation unit is configured to perform word segmentation on the at least one text data to obtain a plurality of independent phrases;
[0157] The filtering unit is configured to perform filtering of the plurality of independent phrases to obtain a plurality of valid independent phrases, wherein the plurality of independent phrases are at least pre-set invalid independent phrases.
[0158] The combination is configured to perform pairwise combination of the plurality of valid independent phrases to obtain a plurality of valid combined phrases;
[0159] The encoding matrix obtaining unit is configured to input a plurality of preset illegal basic words, the plurality of valid independent phrases and the plurality of valid combined phrases into a pre-trained BERT model, thereby obtaining an encoding matrix of each illegal basic word, an encoding matrix of each valid independent phrase and an encoding matrix of each valid combined phrase;
[0160] The illegal extension word obtaining unit is configured to obtain a plurality of illegal extension words from the valid independent phrases and the valid combined phrases according to the encoding matrix of each illegal basic word, the encoding matrix of each valid independent phrase and the encoding matrix of each valid combined phrase;
[0161] The mode 1 unit 300 includes: a mode 1 subunit;
[0162] The method 1 subunit is configured to perform regular matching on the text data to be checked, and determine whether the text data to be checked includes illegal words in an illegal vocabulary, wherein the illegal words in the illegal vocabulary at least include the illegal basic words and the illegal extended words.
[0163] In combination with the previous embodiment, in some optional embodiments, the illegal extended word obtaining unit includes: an encoding vector obtaining subunit, a first similarity subunit, and a second similarity subunit;
[0164] The coding vector obtaining subunit is configured to perform, for any coding matrix, the following steps: calculating and obtaining the average value of each vector value of each column of any coding matrix, where each column corresponds to an average value; sorting the average values corresponding to each column according to the position of each column in any coding matrix, so as to obtain a coding vector matching any coding matrix, where the coding vector is a row vector of 1 row and N columns, where N is an integer greater than 1, and one coding vector corresponds to one coding matrix;
[0165] The first similarity subunit is configured to respectively calculate the first similarities between the encoding vectors corresponding to the illegal basic words and the encoding vectors corresponding to the valid independent phrases, thereby obtaining at least one illegal extended word from the valid independent phrases according to the first similarities;
[0166] The second similarity subunit is configured to respectively calculate the second similarities between the encoding vectors corresponding to the illegal basic words and the encoding vectors corresponding to the valid combined phrases, so as to obtain at least one illegal extended word from the valid combined phrases according to the second similarity.
[0167] In combination with the previous embodiment, in some optional embodiments, the first similarity subunit includes: a first determination subunit;
[0168] The first determination subunit is configured to determine, as the illegal expansion word, a valid independent phrase whose first similarity is greater than a first preset threshold or whose first similarity ranking is greater than a preset order;
[0169] The second similarity subunit includes: a second determination subunit;
[0170] The second determining subunit is configured to determine the valid combined word group whose second similarity is greater than a second preset threshold or whose second similarity ranking is greater than a preset order as the illegal expansion word.
[0171] Combination Figure 6 In the embodiment shown, in some optional embodiments, the second mode unit 400, when performing a comparison between the attribute information of the entity in the knowledge graph and the attribute information obtained by the entity recognition model to determine whether the text data to be inspected is correct, is specifically configured to execute:
[0172] The attribute information of the entity in the knowledge graph is compared with the attribute information obtained through the entity recognition model. If the attribute information of the entity in the knowledge graph is consistent with the attribute information obtained through the entity recognition model, the text data to be checked is correct; otherwise, it is determined that the text data to be checked is incorrect.
[0173] Combination Figure 6 In the illustrated embodiment, in certain optional embodiments, the text data to be quality-checked includes at least: consultant answer text;
[0174] The second mode unit 400, when comparing the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model, so as to determine whether the text data to be inspected is correct, includes: a comparison subunit, a first result subunit, a second result subunit, a negative word result obtaining subunit, an odd result subunit, an even result subunit and a document data determining subunit;
[0175] The comparison subunit is configured to compare the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model and obtain a comparison result; wherein, if the attribute information of the entity in the knowledge graph includes the attribute information obtained by the entity recognition model, the first result subunit is triggered, otherwise, the second result subunit is triggered;
[0176] The first result subunit is configured to execute and obtain a first comparison result;
[0177] The second result subunit is configured to execute and obtain a second comparison result;
[0178] The negative word result obtaining subunit is configured to determine the number of negative words included in the consultant's answer text and obtain the negative word result; wherein, if the number of negative words is an odd number, the odd number result subunit is triggered, otherwise the even number result subunit is triggered;
[0179] The odd result subunit is configured to execute obtaining an odd result;
[0180] The even result subunit is configured to execute obtaining an even result;
[0181] The document data determination subunit is configured to determine whether the text data to be inspected is correct based on the comparison result and the negation word result.
[0182] Combination Figure 6 In the illustrated embodiment, in certain optional embodiments, the device further comprises: a first situation subunit, a second situation subunit, and a third situation subunit;
[0183] The first situation subunit is configured to execute, in the case where only the first mode is executed and the second mode is not executed: if the text data to be inspected includes illegal words, then determine that the text data to be inspected is not compliant; otherwise, determine that the text data to be inspected is compliant;
[0184] The second situation subunit is configured to execute, when only the second mode is executed and the first mode is not executed: if the text data to be inspected is incorrect, determine that the text data to be inspected is not compliant; otherwise, determine that the text data to be inspected is compliant;
[0185] The third situation sub-unit is configured to execute in the case of execution mode one and mode two: if the text data to be checked includes illegal words and / or it is determined that the text data to be checked is incorrect, then the text data to be checked is determined to be non-compliant; if the text data to be checked does not include illegal words and it is determined that the text data to be checked is correct, then the text data to be checked is determined to be compliant.
[0186] The present invention provides a storage medium on which a program is stored. When the program is executed by a processor, any of the above-mentioned data quality inspection methods is implemented.
[0187] like Figure 7 As shown, the present invention provides an electronic device 70, which includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call the program instructions in the memory 702 to execute any of the data quality inspection methods described above.
[0188] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0189] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0190] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0191] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A data quality inspection method, It is characterized in that include: Obtain text data to be inspected; Execute at least one of the following methods 1 and 2 on the text data to be quality inspected; Method 1: obtaining at least one text data; performing word segmentation on the at least one text data to obtain a plurality of independent phrases; filtering the plurality of independent phrases for disabled independent phrases to obtain a plurality of valid independent phrases, wherein the disabled independent phrases at least include preset invalid independent phrases; combining the plurality of valid independent phrases in pairs to obtain a plurality of valid combined phrases; inputting a plurality of preset illegal basic words, the plurality of valid independent phrases and the plurality of valid combined phrases into a pre-trained BERT model respectively, thereby obtaining a coding matrix of each illegal basic word, a coding matrix of each valid independent phrase and a coding matrix of each valid combined phrase respectively; obtaining a plurality of illegal extended words from the valid independent phrases and the valid combined phrases according to the coding matrix of each illegal basic word, the coding matrix of each valid independent phrase and the coding matrix of each valid combined phrase; performing regular matching on the text data to be inspected to determine whether the text data to be inspected includes illegal words in an illegal vocabulary, wherein the illegal words in the illegal vocabulary at least include the illegal basic words and the illegal extended words; Method 2: Identify the text data to be inspected through a pre-established entity recognition model to obtain entities in the text data to be inspected and attribute information of the entities; query and obtain attribute information of the entities in the pre-established knowledge graph; compare the attribute information of the entity in the knowledge graph with the attribute information obtained through the entity recognition model to determine whether the text data to be inspected is correct; wherein, if the attribute information of the entity in the knowledge graph is consistent with the attribute information obtained through the entity recognition model, the text data to be inspected is correct.
2. The method according to claim 1, It is characterized in that The step of obtaining a plurality of illegal expansion words from the valid independent phrases and the valid combined phrases according to the coding matrix of each illegal basic word, the coding matrix of each valid independent phrase, and the coding matrix of each valid combined phrase comprises: For any coding matrix, the following steps are performed: calculating the average value of each vector value of each column of any coding matrix, where each column corresponds to an average value; sorting the average values corresponding to each column according to the position of each column in any coding matrix, so as to obtain a coding vector matching any coding matrix, where the coding vector is a row vector of 1 row and N columns, where N is an integer greater than 1, and one coding vector corresponds to one coding matrix; respectively calculating first similarities between the encoding vectors corresponding to the illegal basic words and the encoding vectors corresponding to the valid independent phrases, thereby obtaining at least one illegal extended word from the valid independent phrases according to the first similarities; The second similarities between the encoding vectors corresponding to the illegal basic words and the encoding vectors corresponding to the valid combined phrases are respectively calculated, so as to obtain at least one illegal extended word from the valid combined phrases according to the second similarities.
3. The method according to claim 2, It is characterized in that The obtaining at least one of the illegal extended words from the valid independent word group according to the first similarity comprises: Determine the valid independent phrase whose first similarity is greater than a first preset threshold or whose first similarity ranking is greater than a preset order as the illegal expansion word; The obtaining at least one illegal extended word from the valid combined word group according to the second similarity comprises: The valid combination phrase whose second similarity is greater than a second preset threshold or whose second similarity ranking is greater than a preset order is determined as the illegal expansion word.
4. The method according to claim 1, It is characterized in that The text data to be inspected at least includes: consultant answer text; The comparing the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model to determine whether the text data to be inspected is correct includes: Comparing the attribute information of the entity in the knowledge graph with the attribute information obtained by the entity recognition model, and obtaining a comparison result; wherein, if the attribute information of the entity in the knowledge graph includes the attribute information obtained by the entity recognition model, a first comparison result is obtained, otherwise a second comparison result is obtained; Determine the number of negative words included in the consultant's answer text and obtain a negative word result; if the number of negative words is an odd number, obtain an odd number result, otherwise, obtain an even number result; According to the comparison result and the negation word result, it is determined whether the text data to be quality checked is correct.
5. The method according to claim 1, It is characterized in that The method further comprises: In the case where only the first method is executed and the second method is not executed: if the text data to be inspected includes illegal words, the text data to be inspected is determined to be illegal; otherwise, the text data to be inspected is determined to be illegal; In the case where only the second method is executed and the first method is not executed: if the text data to be inspected is incorrect, then the text data to be inspected is determined to be non-compliant; otherwise, the text data to be inspected is determined to be compliant; When executing the method one and the method two: if the text data to be checked includes illegal words and / or it is determined that the text data to be checked is incorrect, then the text data to be checked is determined to be non-compliant; if the text data to be checked does not include illegal words and it is determined that the text data to be checked is correct, then the text data to be checked is determined to be compliant.
6. A data quality inspection device, It is characterized in that include: Data acquisition unit, trigger unit, text acquisition unit, word segmentation unit, filtering unit, combination unit, coding matrix acquisition unit, illegal expansion word acquisition unit, mode 1 unit and mode 2 unit; The data acquisition unit is configured to acquire the text data to be inspected; The trigger unit is configured to trigger at least one of the mode 1 unit and the mode 2 unit; The text obtaining unit is configured to obtain at least one piece of text data; The word segmentation unit is configured to perform word segmentation on the at least one text data to obtain a plurality of independent phrases; The filtering unit is configured to perform filtering of the plurality of independent phrases to obtain a plurality of valid independent phrases, wherein the plurality of independent phrases are at least pre-set invalid independent phrases. The combining unit is configured to perform pairwise combination of the plurality of valid independent phrases to obtain a plurality of valid combined phrases; The encoding matrix obtaining unit is configured to input a plurality of preset illegal basic words, the plurality of valid independent phrases and the plurality of valid combined phrases into a pre-trained BERT model, thereby obtaining an encoding matrix of each illegal basic word, an encoding matrix of each valid independent phrase and an encoding matrix of each valid combined phrase; The illegal extension word obtaining unit is configured to obtain a plurality of illegal extension words from the valid independent phrases and the valid combined phrases according to the encoding matrix of each illegal basic word, the encoding matrix of each valid independent phrase and the encoding matrix of each valid combined phrase; The method 1 unit is configured to perform regular matching on the text data to be inspected, and determine whether the text data to be inspected includes a violation word in a violation word library, wherein the violation word in the violation word library at least includes the violation basic word and the violation extended word; The method two unit is configured to execute identification of the text data to be inspected through a pre-established entity recognition model, thereby obtaining entities in the text data to be inspected and attribute information of the entities; in a pre-established knowledge graph, query and obtain attribute information of the entities in the knowledge graph; compare the attribute information of the entity in the knowledge graph with the attribute information obtained through the entity recognition model, thereby determining whether the text data to be inspected is correct; wherein, if the attribute information of the entity in the knowledge graph is consistent with the attribute information obtained through the entity recognition model, then the text data to be inspected is correct.
7. A storage medium having a program stored thereon, It is characterized in that When the program is executed by a processor, the data quality inspection method according to any one of claims 1 to 5 is implemented.
8. An electronic device, It is characterized in that The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the data quality inspection method as described in any one of claims 1 to 5.
