Text quality inspection method, device and related equipment
By analyzing the application scenarios of the text to be tested and dynamically adjusting the quality inspection methods, the problem of low quality inspection efficiency in different application scenarios in the existing technology is solved, and more efficient and objective text quality inspection is achieved.
Patent Information
- Application Number
- CN202110875412.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-07-30
AI Technical Summary
The existing intelligent quality inspection analysis methods adopt the same quality inspection method in different application scenarios of text to be inspected, resulting in low efficiency and poor quality inspection results, and it is impossible to dynamically adjust the quality inspection method to adapt to different application scenarios.
By obtaining the text to be tested for the target, analyzing its corresponding application scenarios, calculating the quality inspection range, and building the target quality inspection processor based on the mapping relationship between the scene and the quality inspection type and intensity, performing quality inspection on the text, and obtaining the final quality inspection result .
It improves the efficiency of quality inspection, avoids useless categories of quality inspection, enhances the objectivity and fairness of quality inspection, and adapts to the needs of different application scenarios.
Smart Images

Figure CN113590825B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a text quality inspection method, device, computer equipment and medium. Background Art
[0002] Customers are the foundation of a company's survival. As customers' service quality requirements increase, companies pay more and more attention to customer service. Many companies have introduced manual quality inspection positions to review various types of business data on a large number of platforms. However, with the rapid growth of business volume, the cost of manual quality inspection is also huge, and the assessment standards of different quality inspectors are not unified, which is easily affected by subjective consciousness and cannot be objective and fair. Therefore, the existing technology introduces intelligent quality inspection and analysis methods to perform automated quality inspection and analysis on business data.
[0003] In the process of implementing the present application, the inventors discovered that the prior art has the following technical problems: when implementing intelligent quality inspection and analysis, the prior art uses the same quality inspection method for different texts to be inspected, and different texts to be inspected involve different application scenarios. If the same quality inspection method is used, it is bound to cause some useless categories of quality inspection to be carried out on the texts to be inspected in certain application scenarios, resulting in low quality inspection efficiency and poor quality inspection results.
[0004] Therefore, it is necessary to provide a text quality inspection method that can dynamically adjust the quality inspection method according to different application scenarios, thereby improving the efficiency of quality inspection. Summary of the invention
[0005] In view of the above, it is necessary to propose a text quality inspection method, a text quality inspection device, a computer device and a medium that can improve the efficiency of quality inspection.
[0006] A first aspect of an embodiment of the present application provides a text quality inspection method, the text quality inspection method comprising:
[0007] Obtain the target text to be inspected that is pre-stored in the database;
[0008] Parsing the target text to be inspected, determining a target application scenario corresponding to the target text to be inspected, and calculating a quality inspection scope of the target text to be inspected according to the target application scenario;
[0009] According to the target application scenario, the mapping relationship between the preset scenario, the quality inspection type and the quality inspection intensity is traversed to obtain the corresponding target quality inspection type and target quality inspection intensity within the quality inspection range;
[0010] Construct a target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength;
[0011] Calling the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain an initial quality inspection result;
[0012] The initial quality inspection results are combined to obtain a final quality inspection result.
[0013] Furthermore, in the above-mentioned text quality inspection method provided in the embodiment of the present application, the obtaining of the target text to be inspected pre-stored in the database includes:
[0014] Obtaining the initial text to be inspected that is pre-stored in the database;
[0015] Processing the initial text to be inspected by sentence segmentation to obtain a sentence segmentation processing result;
[0016] Using a joint word segmentation and part-of-speech tagging model constructed by integrating external knowledge to perform word segmentation processing and part-of-speech tagging on the sentence processing result, to obtain a word segmentation result with part-of-speech tagging;
[0017] Performing syntactic analysis on the word segmentation result based on a dependency syntactic analysis method to obtain grammatical components and dependency relationships between the grammatical components;
[0018] The word segmentation results are stored in a preset data format according to the dependency relationship to obtain a target text to be quality inspected.
[0019] Furthermore, in the above-mentioned text quality inspection method provided in the embodiment of the present application, the parsing of the target text to be inspected and determining the target application scenario corresponding to the target text to be inspected includes:
[0020] Extract keywords from the target text to be inspected according to a preset frequency to obtain a keyword set;
[0021] Vectorizing each keyword in the keyword set to obtain a keyword vector set;
[0022] Obtaining a pre-stored standard document set corresponding to an application scenario, and vectorizing the standard document set to obtain a standard document vector set;
[0023] Calling a preset relevance calculation model to calculate the relevance value between the keyword vector set and the standard document vector set, and selecting the standard document vector whose relevance value exceeds a preset relevance threshold;
[0024] Determine a target application scenario that has a mapping relationship with the standard document vector.
[0025] Furthermore, in the above-mentioned text quality inspection method provided in the embodiment of the present application, the calculating the quality inspection scope of the target text to be quality inspected according to the target application scenario includes:
[0026] Selecting a keyword vector corresponding to the target application scenario;
[0027] Determine a first timestamp and a second timestamp corresponding to the keyword vector;
[0028] The quality inspection scope of the target document to be quality inspected is determined according to the first timestamp and the second timestamp.
[0029] Further, in the above-mentioned text quality inspection method provided in the embodiment of the present application, the mapping relationship between the pre-set scenario and the quality inspection type and the quality inspection strength is traversed according to the target application scenario to obtain the corresponding target quality inspection type and target quality inspection strength within the quality inspection range, including:
[0030] Collect and format the quality inspection data in the blockchain according to a preset data format to obtain application scenarios and quality inspection method information, including quality inspection type and quality inspection intensity;
[0031] Establishing a fine-grained relationship matrix between the application scenarios and the quality inspection methods;
[0032] The target application scenario is obtained, and a target quality inspection method is obtained by collaborative filtering according to the relationship matrix. The target quality inspection method includes a target quality inspection type and a target quality inspection intensity.
[0033] Further, in the above-mentioned text quality inspection method provided in the embodiment of the present application, the target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength includes:
[0034] Obtaining a target quality inspection type whose quality inspection intensity is a target quality inspection intensity;
[0035] Configure a quality inspection toolkit and a quality inspection algorithm according to the target quality inspection type and the target quality inspection intensity;
[0036] An initial quality inspection processor is updated based on the quality inspection toolkit and the quality inspection algorithm to obtain a target quality inspection processor.
[0037] Further, in the above-mentioned text quality inspection method provided in the embodiment of the present application, the calling of the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain the initial quality inspection result includes:
[0038] Serializing the target text to be inspected within the inspection range to obtain a sample sequence, wherein the sample sequence includes text characters;
[0039] Traversing a preset dictionary tree to detect whether there is a target sample sequence consistent with the sample sequence in the dictionary tree;
[0040] When the detection result is that there is a target sample sequence consistent with the sample sequence in the dictionary tree, the target sample sequence is sorted to obtain a first quality inspection result.
[0041] A second aspect of the present application also provides a text quality inspection device, the text quality inspection device comprising:
[0042] A text acquisition module is used to acquire the target text to be inspected that is pre-stored in the database;
[0043] A text parsing module, used to parse the target text to be inspected, determine the target application scenario corresponding to the target text to be inspected, and calculate the quality inspection scope of the target text to be inspected according to the target application scenario;
[0044] A mapping determination module, used to traverse the mapping relationship between the preset scenarios and the quality inspection types and the quality inspection strengths according to the target application scenarios, and obtain the corresponding target quality inspection types and target quality inspection strengths within the quality inspection range;
[0045] A processor construction module, used to construct a target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength;
[0046] A processor calling module, used for calling the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain an initial quality inspection result;
[0047] The result combination module is used to combine the initial quality inspection results to obtain the final quality inspection results.
[0048] A third aspect of an embodiment of the present application further provides a computer device, the computer device comprising a processor, the processor being configured to implement any of the above-described text quality inspection methods when executing a computer program stored in a memory.
[0049] A fourth aspect of an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned text quality inspection methods is implemented.
[0050] The above-mentioned text quality inspection method, text quality inspection device, computer equipment and computer-readable storage medium provided by the embodiments of the present application, when realizing intelligent quality inspection analysis, parse the target text to be inspected, determine the target application scenario corresponding to the target text to be inspected, and calculate the quality inspection range of the target text to be inspected according to the target application scenario, and then determine the quality inspection type and quality inspection intensity corresponding to the quality inspection range, so as to set corresponding quality inspection methods for texts to be inspected with different quality inspection ranges, so that when the texts to be inspected with different quality inspection ranges involve different application scenarios, some useless categories of quality inspections are avoided for some texts to be inspected, resulting in low efficiency of quality inspection, thereby improving the efficiency of quality inspection. The present application can be applied to various functional modules of smart cities such as smart government affairs and smart transportation, such as the text quality inspection module of smart government affairs, etc., which can promote the rapid development of smart cities. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flowchart of the text quality inspection method provided in Example 1 of the present application.
[0052] Figure 2 It is a structural diagram of the text quality inspection device provided in Example 2 of the present application.
[0053] Figure 3 It is a structural diagram of the computer device provided in Example 3 of the present application.
[0054] The following specific implementation methods will further illustrate the present application in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0055] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0056] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The embodiments described are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0058] The text quality inspection method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the text quality inspection device runs in the computer device.
[0059] Figure 1 Flowchart of the text quality inspection method of the first embodiment of the present application. Figure 1 As shown, the text quality inspection method may include the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0060] S11, obtaining the target text to be inspected that is pre-stored in the database.
[0061] In at least one embodiment of the present application, the target text to be quality inspected refers to a text for text quality detection involving different business scenarios. The target text to be quality inspected is an important basis for querying sales behavior, querying important information, and confirming problem responsibility. In one embodiment, the target text to be quality inspected may refer to an explanatory document related to the financial professional field. For example, the target text to be quality inspected may be data for company policies, sales products, intelligent customer service, etc. in securities scenarios, or data for company policies, sales products, intelligent customer service, etc. in insurance scenarios, etc., without limitation. The target text to be quality inspected is pre-stored in a database. Considering the privacy and confidentiality of the data, the database may be a target node in a blockchain.
[0062] In one embodiment, the target text to be inspected refers to text data processed by natural language processing technology on the initial text to be inspected. Optionally, obtaining the target text to be inspected pre-stored in the database includes:
[0063] Obtaining the initial text to be inspected that is pre-stored in the database;
[0064] Processing the initial text to be inspected by sentence segmentation to obtain a sentence segmentation processing result;
[0065] Using a joint word segmentation and part-of-speech tagging model constructed by integrating external knowledge to perform word segmentation processing and part-of-speech tagging on the sentence processing result, to obtain a word segmentation result with part-of-speech tagging;
[0066] Performing syntactic analysis on the word segmentation result based on a dependency syntactic analysis method to obtain grammatical components and dependency relationships between the grammatical components;
[0067] The word segmentation results are stored in a preset data format according to the dependency relationship to obtain a target text to be quality inspected.
[0068] Among them, when the text to be inspected at the chapter level is processed by sentence segmentation, the initial text to be inspected is processed by sentence segmentation based on jieba library with punctuation marks, and the punctuation marks include commas, semicolons, periods, exclamation marks and / or question marks. Dependency syntactic analysis identifies the grammatical components such as "subject, predicate, object", "attributive, adverbial, complement" in the sentence, and analyzes the dependency relationship between the components. Generally, a syntactic analysis tool is used to process a section of text to be inspected by sentence segmentation, and word segmentation (Segmentor), part-of-speech tagging (Postagger), and syntactic analysis (Parser) are performed in turn to obtain the target text to be inspected. The preset data format refers to the data format of the target text to be inspected that is pre-set by the system personnel and is convenient for subsequent quality inspection analysis. By processing the initial text to be inspected with natural language processing technology, the data format of the target text to be inspected can be unified, thereby improving the efficiency of text quality inspection.
[0069] S12, parsing the target text to be quality inspected, determining a target application scenario corresponding to the target text to be quality inspected, and calculating a quality inspection scope of the target text to be quality inspected according to the target application scenario.
[0070] In at least one embodiment of the present application, the target text to be inspected may include one target application scenario or several target application scenarios. When the target text to be inspected includes several target application scenarios, a correlation value may be obtained by calculating the correlation between the target text to be inspected and the pre-stored application scenarios, and the range of the correlation value is in the interval (0,1). When the correlation value is greater than 0.5, it indicates that the target text to be inspected is related to the application scenario; when the correlation value is less than 0.5, it indicates that the target text to be inspected is not related to the application scenario.
[0071] Optionally, the parsing the target text to be inspected and determining a target application scenario corresponding to the target text to be inspected includes:
[0072] Extract keywords from the target text to be inspected according to a preset frequency to obtain a keyword set;
[0073] Vectorizing each keyword in the keyword set to obtain a keyword vector set;
[0074] Obtaining a pre-stored standard document set corresponding to an application scenario, and vectorizing the standard document set to obtain a standard document vector set;
[0075] Calling a preset relevance calculation model to calculate the relevance value between the keyword vector set and the standard document vector set, and selecting the standard document vector whose relevance value exceeds a preset relevance threshold;
[0076] Determine a target application scenario that has a mapping relationship with the standard document vector.
[0077] The preset relevance threshold refers to a threshold used to measure the degree of relevance between two text vectors. For example, the preset relevance threshold may be 0.5.
[0078] In one embodiment, the quality inspection range may be text data between a first timestamp and a second timestamp of the target text to be inspected, each text data in the target text to be inspected carries a corresponding timestamp, and the timestamp may refer to the time node when the target text to be inspected is entered into the database, which is not limited here. Optionally, the quality inspection range of the target text to be inspected is calculated according to the target application scenario, including:
[0079] Selecting a keyword vector corresponding to the target application scenario;
[0080] Determine a first timestamp and a second timestamp corresponding to the keyword vector;
[0081] The quality inspection scope of the target document to be quality inspected is determined according to the first timestamp and the second timestamp.
[0082] Among them, in the correlation detection results, there are multiple keyword vectors with high correlation with the standard document vector, and the keyword vector with the earliest time is selected as the first timestamp and the keyword vector with the latest time is selected as the second timestamp, so as to determine the quality inspection range of the target text to be inspected corresponding to the target application scenario according to the first timestamp and the second timestamp.
[0083] S13, traversing the mapping relationship between the preset scenarios, quality inspection types and quality inspection strengths according to the target application scenarios, and obtaining the corresponding target quality inspection type and target quality inspection strength within the quality inspection range.
[0084] In at least one embodiment of the present application, the quality inspection types may include various types such as terrorism-related, political-related, drug-related, pornographic-related, advertising, and verbal abuse. Corresponding quality inspection strengths are set for different quality inspection types. For example, the quality inspection strength may include P0 level, which requires strict accuracy; P1 level, which requires high accuracy; and P2 level, which requires a certain accuracy.
[0085] Optionally, there is a dynamic mapping relationship between the quality inspection strength and the quality inspection type, that is, the mapping relationship between the quality inspection strength and the quality inspection type is not fixed, and the corresponding mapping relationship can be determined according to the specific application scenario involved in the target text to be quality inspected. Exemplarily, for application scenario A, for the quality inspection types involving terrorism and politics, the corresponding quality inspection strength is P0 level; for the quality inspection types involving drugs and pornography, the corresponding quality inspection strength is P1 level; for the quality inspection types involving advertising and insults, the corresponding quality inspection strength is P2 level. For application scenario B, for the quality inspection types involving advertising and insults, the corresponding quality inspection strength is P0 level; for the quality inspection types involving drugs and pornography, the corresponding quality inspection strength is P1 level; for the quality inspection types involving terrorism and politics, the corresponding quality inspection strength is P2 level. No restrictions are made here.
[0086] The present application parses the target text to be quality inspected, determines the quality inspection type and quality inspection intensity corresponding to the target text to be quality inspected, and thereby sets corresponding quality inspection methods for different texts to be quality inspected, so that different texts to be quality inspected, when involving different application scenarios, can avoid the problem of inefficient quality inspection caused by some useless categories of quality inspection on some texts to be quality inspected, thereby improving the efficiency of quality inspection.
[0087] Optionally, traversing the mapping relationship between the preset scenario and the quality inspection type and the quality inspection strength according to the target application scenario to obtain the corresponding target quality inspection type and target quality inspection strength within the quality inspection range includes:
[0088] Collect and process the quality inspection data in the blockchain in a standardized manner according to a preset data format to obtain application scenarios and quality inspection method information, wherein the quality inspection method includes quality inspection type and quality inspection intensity;
[0089] Establishing a fine-grained relationship matrix between the application scenarios and the quality inspection methods;
[0090] The target application scenario is obtained, and a target quality inspection method is obtained by collaborative filtering according to the relationship matrix. The target quality inspection method includes a target quality inspection type and a target quality inspection intensity.
[0091] S14, constructing a target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength.
[0092] In at least one embodiment of the present application, for application scenario A, for the quality inspection types related to terrorism and politics, the corresponding quality inspection intensity is P0 level; for the quality inspection types related to drugs and pornography, the corresponding quality inspection intensity is P1 level; for the quality inspection types related to advertising and abuse, the corresponding quality inspection intensity is P2 level. In one embodiment, the quality inspection intensity can be an intensity that requires strict accuracy guarantee, that is, P0 level, and the quality inspection type corresponding to the quality inspection intensity can be a type related to politics and drugs, and the target quality inspection processor refers to a processor for performing text quality detection according to the target quality inspection intensity corresponding to the target quality inspection type.
[0093] Optionally, the target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength includes:
[0094] Obtaining a target quality inspection type whose quality inspection intensity is a target quality inspection intensity;
[0095] Configure a quality inspection toolkit and a quality inspection algorithm according to the target quality inspection type and the target quality inspection intensity;
[0096] An initial quality inspection processor is updated based on the quality inspection toolkit and the quality inspection algorithm to obtain a target quality inspection processor.
[0097] Among them, the quality inspection toolkit can be a Gensim toolkit, which is centrally installed on a server using the anaconda tool to process natural language text; the quality inspection algorithm can be a kmp matching algorithm, which uses the kmp matching algorithm to match sensitive words in text content, and the quality inspection toolkit and the quality inspection algorithm can be automatically initialized by the system.
[0098] S15, calling the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain an initial quality inspection result.
[0099] In at least one embodiment of the present application, the target quality inspection processor may be a processor including a dictionary tree matching scheme, that is, when the target quality inspection processor is called to perform quality inspection on the target quality inspection text, a dictionary tree matching-based scheme may be used to perform text quality inspection. In other embodiments, the target quality inspection processor may also include other quality inspection algorithms whose quality inspection accuracy meets the target quality inspection strength, which is not limited here.
[0100] Optionally, when the target quality inspection processor performs text quality inspection based on a dictionary tree matching method, calling the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain an initial quality inspection result includes:
[0101] Serializing the target text to be inspected within the inspection range to obtain a sample sequence, wherein the sample sequence includes text characters;
[0102] Traversing a preset dictionary tree to detect whether there is a target sample sequence consistent with the sample sequence in the dictionary tree;
[0103] When the detection result is that there is a target sample sequence consistent with the sample sequence in the dictionary tree, the target sample sequence is sorted to obtain a first quality inspection result.
[0104] Among them, the pre-set dictionary tree is formed by the distribution of nodes and the mutual relationship between nodes. The nodes in the dictionary tree include three categories: root nodes, branch nodes and leaf nodes. The root node is the only one that exists and is used to indicate the starting node of the search in the dictionary tree; the branch node is used to carry the characters in the sample subsequence, and each branch node has a unique corresponding level, and all levels constitute the depth in the dictionary tree. As the level continues to deepen, the next branch node where the branch node exists will be used to store the next character of the character carried by the current branch node in the sample subsequence, and so on to complete the sequential storage of the characters in the entire sample subsequence; the leaf node is used to record the flag bit, and the sample character position corresponding to the sample subsequence in the sample character sequence is marked by the record of the flag bit. So far, through the storage implemented in the branch node and the leaf node in the dictionary tree, the constructed dictionary tree will not correspond to an excessive depth with the length of the sample character sequence, and the accuracy of character storage and position marking is also guaranteed.
[0105] This application uses character sequences, that is, data in the form of strings, for matching, which can improve matching efficiency and thus improve the efficiency of quality detection; and because the existence of sample character sequences in the dictionary tree only occupies a small space and has high versatility, the depth of the dictionary tree is no longer limited by hardware configuration.
[0106] In at least one embodiment of the present application, the target quality inspection intensity may be an intensity that needs to ensure high accuracy, that is, the P1 level. The target quality inspection type corresponding to the target quality inspection intensity may be a terrorism-related or pornography-related type. The target quality inspection processor may also refer to a processor for performing text quality detection according to the target quality inspection intensity corresponding to the target quality inspection type.
[0107] The target quality inspection processor may also be a processor including a preset network model solution, that is, when the target quality inspection processor is called to perform text quality inspection on the target quality inspection text, a solution based on a preset network model may be used to perform text quality inspection. In other embodiments, the target quality inspection processor may also include other quality inspection algorithms whose quality inspection accuracy meets the target quality inspection strength, which is not limited here.
[0108] Optionally, the calling of the target quality inspection processor to perform quality inspection on the target to-be-inspected text within the quality inspection range to obtain an initial quality inspection result may further include:
[0109] Obtain sample data that is manually annotated with preset labels, and split the sample data into training sample data and test sample data;
[0110] Using all the data in the training sample data as input parameters and using the data with preset labels as output parameters to train the initial neural network model to obtain a text quality inspection model;
[0111] Calculating the accuracy of the text quality inspection model using the test sample data, and determining that the text quality inspection model training is completed when the accuracy exceeds a preset accuracy threshold;
[0112] The target text to be quality inspected is input into the quality inspection model to obtain a second quality inspection result.
[0113] Among them, a large amount of relevant category data is collected from the database using the constructed terrorism-related and pornography-related dictionaries for training the model, and the preset labels are used to mark the terrorism-related and pornography-related data, and the preset labels can be digital labels, letter labels or color labels. In view of the fact that the requirements for the terrorism-related and pornography-related categories are relatively higher than those for the advertising and abuse categories, and the latter have relatively more data, the FastText and Albert models are used for recognition respectively, that is, the initial neural network model can be the FastText model and the Albert model.
[0114] S16, combining the initial quality inspection results to obtain a final quality inspection result.
[0115] In at least one embodiment of the present application, when quality inspection is performed on each of the target texts to be quality inspected within the quality inspection range, an initial quality inspection result can be obtained; when the quality inspection range of the target text to be quality inspected is multiple, that is, when the target text to be quality inspected contains multiple target application scenarios, the number of the initial quality inspection results is also multiple. When the number of the initial quality inspection results is multiple, it is necessary to combine the multiple initial quality inspection results to obtain the final quality inspection result. Multiple initial quality inspection results may all contain violation results, or only one may contain violation results, or none of them may contain violation results. The present application obtains the final quality inspection result by combining several of the initial quality inspection results.
[0116] Among them, combining the initial quality inspection results can be a merging, which can be understood as performing a logical AND operation, that is, performing a logical AND operation on the first initial quality inspection result and the second initial quality inspection result. Exemplarily, for the target application scenario A, the quality inspection result of the target text to be quality inspected within the quality inspection range is A47, and for the target application scenario B, the quality inspection result of the target text to be quality inspected within the quality inspection range is B16. After the logical AND operation, the final quality inspection result is {A47, B16}; another example, for the target application scenario A, the quality inspection result of the target text to be quality inspected within the quality inspection range is A47, and for the target application scenario B, the quality inspection result of the target text to be quality inspected within the quality inspection range is empty, then after the logical AND operation, the final quality inspection result is {A47}.
[0117] The above-mentioned text quality inspection method provided by the embodiment of the present application, when realizing intelligent quality inspection analysis, parses the target text to be inspected, determines the target application scenario corresponding to the target text to be inspected, and calculates the quality inspection range of the target text to be inspected according to the target application scenario, and then determines the quality inspection type and quality inspection intensity corresponding to the quality inspection range, thereby setting corresponding multi-channel quality inspection methods for different texts to be inspected, so that when the text to be inspected involves different application scenarios, it can avoid some useless categories of quality inspection for some texts to be inspected, resulting in low efficiency of quality inspection, thereby improving the efficiency of quality inspection. The present application can be applied to various functional modules of smart cities such as smart government affairs and smart transportation, such as the text quality inspection module of smart government affairs, etc., which can promote the rapid development of smart cities.
[0118] Figure 2 It is a structural diagram of the text quality inspection device provided in Example 2 of the present application.
[0119] In some embodiments, the text quality inspection device 20 may include multiple functional modules composed of computer program segments. The computer programs of the various program segments in the text quality inspection device 20 may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Functionality for wheelchair rental processing.
[0120] In this embodiment, the text quality inspection device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a text acquisition module 201, a text parsing module 202, a mapping determination module 203, a processor construction module 204, a processor call module 205 and a result combination module 206. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0121] The text acquisition module 201 is used to acquire the target text to be inspected that is pre-stored in the database.
[0122] In at least one embodiment of the present application, the target text to be quality inspected refers to a text for text quality detection involving different business scenarios. The target text to be quality inspected is an important basis for querying sales behavior, querying important information, and confirming problem responsibility. In one embodiment, the target text to be quality inspected may refer to an explanatory document related to the financial professional field. For example, the target text to be quality inspected may be data for company policies, sales products, intelligent customer service, etc. in securities scenarios, or data for company policies, sales products, intelligent customer service, etc. in insurance scenarios, etc., without limitation. The target text to be quality inspected is pre-stored in a database. Considering the privacy and confidentiality of the data, the database may be a target node in a blockchain.
[0123] In one embodiment, the target text to be inspected refers to text data processed by natural language processing technology on the initial text to be inspected. Optionally, obtaining the target text to be inspected pre-stored in the database includes:
[0124] Obtaining the initial text to be inspected that is pre-stored in the database;
[0125] Processing the initial text to be inspected by sentence segmentation to obtain a sentence segmentation processing result;
[0126] Using a joint word segmentation and part-of-speech tagging model constructed by integrating external knowledge to perform word segmentation processing and part-of-speech tagging on the sentence processing result, to obtain a word segmentation result with part-of-speech tagging;
[0127] Performing syntactic analysis on the word segmentation result based on a dependency syntactic analysis method to obtain grammatical components and dependency relationships between the grammatical components;
[0128] The word segmentation results are stored in a preset data format according to the dependency relationship to obtain a target text to be quality inspected.
[0129] Among them, when the text to be inspected at the chapter level is processed by sentence segmentation, the initial text to be inspected is processed by sentence segmentation based on jieba library with punctuation marks, and the punctuation marks include commas, semicolons, periods, exclamation marks and / or question marks. Dependency syntactic analysis identifies the grammatical components such as "subject, predicate, object", "attributive, adverbial, complement" in the sentence, and analyzes the dependency relationship between the components. Generally, a syntactic analysis tool is used to process a section of text to be inspected by sentence segmentation, and word segmentation (Segmentor), part-of-speech tagging (Postagger), and syntactic analysis (Parser) are performed in turn to obtain the target text to be inspected. The preset data format refers to the data format of the target text to be inspected that is pre-set by the system personnel and is convenient for subsequent quality inspection analysis. By processing the initial text to be inspected with natural language processing technology, the data format of the target text to be inspected can be unified, thereby improving the efficiency of text quality inspection.
[0130] The text parsing module 202 is used to parse the target text to be inspected, determine the target application scenario corresponding to the target text to be inspected, and calculate the quality inspection scope of the target text to be inspected according to the target application scenario.
[0131] In at least one embodiment of the present application, the target text to be inspected may include one target application scenario or several target application scenarios. When the target text to be inspected includes several target application scenarios, the correlation value may be obtained by calculating the correlation between the target text to be inspected and the pre-stored application scenarios. The range of the correlation value is in the interval (0, 1). When the correlation value is greater than 0.5, it indicates that the target text to be inspected is related to the application scenario; when the correlation value is less than 0.5, it indicates that the target text to be inspected is not related to the application scenario.
[0132] Optionally, the parsing the target text to be inspected and determining a target application scenario corresponding to the target text to be inspected includes:
[0133] Extract keywords from the target text to be inspected according to a preset frequency to obtain a keyword set;
[0134] Vectorizing each keyword in the keyword set to obtain a keyword vector set;
[0135] Obtaining a pre-stored standard document set corresponding to an application scenario, and vectorizing the standard document set to obtain a standard document vector set;
[0136] Calling a preset relevance calculation model to calculate the relevance value between the keyword vector set and the standard document vector set, and selecting the standard document vector whose relevance value exceeds a preset relevance threshold;
[0137] Determine a target application scenario that has a mapping relationship with the standard document vector.
[0138] The preset relevance threshold refers to a threshold used to measure the degree of relevance between two text vectors. For example, the preset relevance threshold may be 0.5.
[0139] In one embodiment, the quality inspection range may be text data between a first timestamp and a second timestamp of the target text to be inspected, each text data in the target text to be inspected carries a corresponding timestamp, and the timestamp may refer to the time node when the target text to be inspected is entered into the database, which is not limited here. Optionally, the quality inspection range of the target text to be inspected is calculated according to the target application scenario, including:
[0140] Selecting a keyword vector corresponding to the target application scenario;
[0141] Determine a first timestamp and a second timestamp corresponding to the keyword vector;
[0142] The quality inspection scope of the target document to be quality inspected is determined according to the first timestamp and the second timestamp.
[0143] Among them, in the correlation detection results, there are multiple keyword vectors with high correlation with the standard document vector, and the keyword vector with the earliest time is selected as the first timestamp and the keyword vector with the latest time is selected as the second timestamp, so as to determine the quality inspection range of the target text to be inspected corresponding to the target application scenario according to the first timestamp and the second timestamp.
[0144] The mapping determination module 203 is used to traverse the mapping relationship between the preset scenarios and the quality inspection types and quality inspection strengths according to the target application scenarios, and obtain the corresponding target quality inspection type and target quality inspection strength within the quality inspection range.
[0145] In at least one embodiment of the present application, the quality inspection types may include various types such as terrorism-related, political-related, drug-related, pornographic-related, advertising, and verbal abuse. Corresponding quality inspection strengths are set for different quality inspection types. For example, the quality inspection strength may include P0 level, which requires strict accuracy; P1 level, which requires high accuracy; and P2 level, which requires a certain accuracy.
[0146] Optionally, there is a dynamic mapping relationship between the quality inspection strength and the quality inspection type, that is, the mapping relationship between the quality inspection strength and the quality inspection type is not fixed, and the corresponding mapping relationship can be determined according to the specific application scenario involved in the target text to be quality inspected. Exemplarily, for application scenario A, for the quality inspection types involving terrorism and politics, the corresponding quality inspection strength is P0 level; for the quality inspection types involving drugs and pornography, the corresponding quality inspection strength is P1 level; for the quality inspection types involving advertising and insults, the corresponding quality inspection strength is P2 level. For application scenario B, for the quality inspection types involving advertising and insults, the corresponding quality inspection strength is P0 level; for the quality inspection types involving drugs and pornography, the corresponding quality inspection strength is P1 level; for the quality inspection types involving terrorism and politics, the corresponding quality inspection strength is P2 level. No restrictions are made here.
[0147] The present application parses the target text to be quality inspected, determines the quality inspection type and quality inspection intensity corresponding to the target text to be quality inspected, and thereby sets corresponding quality inspection methods for different texts to be quality inspected, so that different texts to be quality inspected, when involving different application scenarios, can avoid the problem of inefficient quality inspection caused by some useless categories of quality inspection on some texts to be quality inspected, thereby improving the efficiency of quality inspection.
[0148] Optionally, traversing the mapping relationship between the preset scenario and the quality inspection type and the quality inspection strength according to the target application scenario to obtain the corresponding target quality inspection type and target quality inspection strength within the quality inspection range includes:
[0149] Collect and process the quality inspection data in the blockchain in a standardized manner according to a preset data format to obtain application scenarios and quality inspection method information, including quality inspection type and quality inspection intensity;
[0150] Establishing a fine-grained relationship matrix between the application scenarios and the quality inspection methods;
[0151] The target application scenario is obtained, and a target quality inspection method is obtained by collaborative filtering according to the relationship matrix. The target quality inspection method includes a target quality inspection type and a target quality inspection intensity.
[0152] The processor construction module 204 is used to construct a target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength.
[0153] In at least one embodiment of the present application, for application scenario A, for the quality inspection types related to terrorism and politics, the corresponding quality inspection intensity is P0 level; for the quality inspection types related to drugs and pornography, the corresponding quality inspection intensity is P1 level; for the quality inspection types related to advertising and abuse, the corresponding quality inspection intensity is P2 level. In one embodiment, the quality inspection intensity can be an intensity that requires strict accuracy guarantee, that is, P0 level, and the quality inspection type corresponding to the quality inspection intensity can be a type related to politics and drugs, and the target quality inspection processor refers to a processor for performing text quality detection according to the target quality inspection intensity corresponding to the target quality inspection type.
[0154] Optionally, the target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength includes:
[0155] Obtaining a target quality inspection type whose quality inspection intensity is a target quality inspection intensity;
[0156] Configure a quality inspection toolkit and a quality inspection algorithm according to the target quality inspection type and the target quality inspection intensity;
[0157] An initial quality inspection processor is updated based on the quality inspection toolkit and the quality inspection algorithm to obtain a target quality inspection processor.
[0158] Among them, the quality inspection toolkit can be a Gensim toolkit, which is centrally installed on a server using the anaconda tool to process natural language text; the quality inspection algorithm can be a kmp matching algorithm, which uses the kmp matching algorithm to match sensitive words in text content, and the quality inspection toolkit and the quality inspection algorithm can be automatically initialized by the system.
[0159] The processor calling module 205 is used to call the target quality inspection processor to perform quality inspection on the target text to be quality inspected within the quality inspection range to obtain an initial quality inspection result.
[0160] In at least one embodiment of the present application, the target quality inspection processor may be a processor including a dictionary tree matching scheme, that is, when the target quality inspection processor is called to perform quality inspection on the target quality inspection text, a dictionary tree matching-based scheme may be used to perform text quality inspection. In other embodiments, the target quality inspection processor may also include other quality inspection algorithms whose quality inspection accuracy meets the target quality inspection strength, which is not limited here.
[0161] Optionally, when the target quality inspection processor performs text quality inspection based on a dictionary tree matching method, calling the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain an initial quality inspection result includes:
[0162] Serializing the target text to be inspected within the inspection range to obtain a sample sequence, wherein the sample sequence includes text characters;
[0163] Traversing a preset dictionary tree to detect whether there is a target sample sequence consistent with the sample sequence in the dictionary tree;
[0164] When the detection result is that there is a target sample sequence consistent with the sample sequence in the dictionary tree, the target sample sequence is sorted to obtain a first quality inspection result.
[0165] Among them, the pre-set dictionary tree is formed by the distribution of nodes and the mutual relationship between nodes. The nodes in the dictionary tree include three categories: root nodes, branch nodes and leaf nodes. The root node is the only one that exists and is used to indicate the starting node of the search in the dictionary tree; the branch node is used to carry the characters in the sample subsequence, and each branch node has a unique corresponding level, and all levels constitute the depth in the dictionary tree. As the level continues to deepen, the next branch node where the branch node exists will be used to store the next character of the character carried by the current branch node in the sample subsequence, and so on to complete the sequential storage of the characters in the entire sample subsequence; the leaf node is used to record the flag bit, and the sample character position corresponding to the sample subsequence in the sample character sequence is marked by the record of the flag bit. So far, through the storage implemented in the branch node and the leaf node in the dictionary tree, the constructed dictionary tree will not correspond to an excessive depth with the length of the sample character sequence, and the accuracy of character storage and position marking is also guaranteed.
[0166] This application uses character sequences, that is, data in the form of strings, for matching, which can improve matching efficiency and thus improve the efficiency of quality detection; and because the existence of sample character sequences in the dictionary tree only occupies a small space and has high versatility, the depth of the dictionary tree is no longer limited by hardware configuration.
[0167] In at least one embodiment of the present application, the target quality inspection intensity may be an intensity that needs to ensure high accuracy, that is, the P1 level. The target quality inspection type corresponding to the target quality inspection intensity may be a terrorism-related or pornography-related type. The target quality inspection processor may also refer to a processor for performing text quality detection according to the target quality inspection intensity corresponding to the target quality inspection type.
[0168] The target quality inspection processor may also be a processor including a preset network model solution, that is, when the target quality inspection processor is called to perform text quality inspection on the target quality inspection text, a solution based on a preset network model may be used to perform text quality inspection. In other embodiments, the target quality inspection processor may also include other quality inspection algorithms whose quality inspection accuracy meets the target quality inspection strength, which is not limited here.
[0169] Optionally, the calling of the target quality inspection processor to perform quality inspection on the target to-be-inspected text within the quality inspection range to obtain an initial quality inspection result may further include:
[0170] Obtain sample data that is manually annotated with preset labels, and split the sample data into training sample data and test sample data;
[0171] Using all the data in the training sample data as input parameters and using the data with preset labels as output parameters to train the initial neural network model to obtain a text quality inspection model;
[0172] Calculating the accuracy of the text quality inspection model using the test sample data, and determining that the text quality inspection model training is completed when the accuracy exceeds a preset accuracy threshold;
[0173] The target text to be quality inspected is input into the quality inspection model to obtain a second quality inspection result.
[0174] Among them, a large amount of relevant category data is collected from the database using the constructed terrorism-related and pornography-related dictionaries for training the model, and the preset labels are used to mark the terrorism-related and pornography-related data, and the preset labels can be digital labels, letter labels or color labels. In view of the fact that the requirements for the terrorism-related and pornography-related categories are relatively higher than those for the advertising and abuse categories, and the latter have relatively more data, the FastText and Albert models are used for recognition respectively, that is, the initial neural network model can be the FastText model and the Albert model.
[0175] The result combination module 206 is used to combine the initial quality inspection results to obtain a final quality inspection result.
[0176] In at least one embodiment of the present application, when quality inspection is performed on each of the target texts to be quality inspected within the quality inspection range, an initial quality inspection result can be obtained; when the quality inspection range of the target text to be quality inspected is multiple, that is, when the target text to be quality inspected contains multiple target application scenarios, the number of the initial quality inspection results is also multiple. When the number of the initial quality inspection results is multiple, it is necessary to combine the multiple initial quality inspection results to obtain the final quality inspection result. Multiple initial quality inspection results may all contain violation results, or only one may contain violation results, or none of them may contain violation results. The present application obtains the final quality inspection result by combining several of the initial quality inspection results.
[0177] Among them, combining the initial quality inspection results can be a merging, which can be understood as performing a logical AND operation, that is, performing a logical AND operation on the first initial quality inspection result and the second initial quality inspection result. Exemplarily, for the target application scenario A, the quality inspection result of the target text to be quality inspected within the quality inspection range is A47, and for the target application scenario B, the quality inspection result of the target text to be quality inspected within the quality inspection range is B16. After the logical AND operation, the final quality inspection result is {A47, B16}; another example, for the target application scenario A, the quality inspection result of the target text to be quality inspected within the quality inspection range is A47, and for the target application scenario B, the quality inspection result of the target text to be quality inspected within the quality inspection range is empty, then after the logical AND operation, the final quality inspection result is {A47}.
[0178] See also Figure 3 FIG. 2 is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present application. In a preferred embodiment of the present application, the computer device 3 includes a memory 31 , at least one processor 32 , at least one communication bus 33 and a transceiver 34 .
[0179] Those skilled in the art should understand that Figure 3 The structure of the computer device shown does not constitute a limitation of the embodiments of the present application, and may be either a bus structure or a star structure. The computer device 3 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components.
[0180] In some embodiments, the computer device 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The computer device 3 may also include client devices, which include but are not limited to any electronic product that can interact with the client through a keyboard, mouse, remote control, touchpad, or voice control device, such as a personal computer, tablet computer, smart phone, digital camera, etc.
[0181] It should be noted that the computer device 3 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.
[0182] In some embodiments, the memory 31 stores a computer program, and when the computer program is executed by the at least one processor 32, all or part of the steps in the text quality inspection method as described above are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0183] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0184] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0185] In some embodiments, the at least one processor 32 is the control core (Control Unit) of the computer device 3, and uses various interfaces and lines to connect various components of the entire computer device 3, and executes various functions and processes data of the computer device 3 by running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the text quality inspection method described in the embodiment of the present application; or implements all or part of the functions of the text quality inspection device. The at least one processor 32 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.
[0186] In some embodiments, the at least one communication bus 33 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.
[0187] Although not shown, the computer device 3 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The computer device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0188] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the method described in each embodiment of the present application.
[0189] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0190] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0191] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0192] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A text quality inspection method, characterized in that: The text quality inspection method comprises: Obtain the target text to be inspected that is pre-stored in the database; Parse the target text to be inspected and determine the target application scenario corresponding to the target text to be inspected, including: extract keywords in the target text to be inspected according to a preset frequency to obtain a keyword set; vectorize each keyword in the keyword set to obtain a keyword vector set; obtain a pre-stored standard document set corresponding to the application scenario, and vectorize the standard document set to obtain a standard document vector set; call a preset relevance calculation model to calculate the relevance value between the keyword vector set and the standard document vector set, and select the standard document vector whose relevance value exceeds a preset relevance threshold; determine the target application scenario that has a mapping relationship with the standard document vector; Calculating the quality inspection scope of the target text to be inspected according to the target application scenario, including: selecting a keyword vector corresponding to the target application scenario; determining the earliest timestamp corresponding to the keyword vector as a first timestamp, and determining the latest timestamp corresponding to the keyword vector as a second timestamp; determining the quality inspection scope of the target text to be inspected according to the first timestamp and the second timestamp; According to the target application scenario, the mapping relationship between the preset scenario, the quality inspection type and the quality inspection intensity is traversed to obtain the corresponding target quality inspection type and target quality inspection intensity within the quality inspection range; Constructing a target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength, including: obtaining the target quality inspection type whose quality inspection strength is the target quality inspection strength; configuring a quality inspection toolkit and a quality inspection algorithm according to the target quality inspection type and the target quality inspection strength; updating an initial quality inspection processor based on the quality inspection toolkit and the quality inspection algorithm to obtain a target quality inspection processor; Calling the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain an initial quality inspection result; The initial quality inspection results are combined to obtain a final quality inspection result.
2. The text quality inspection method according to claim 1, characterized in that: The step of obtaining the target text to be inspected that is pre-stored in the database includes: Obtaining the initial text to be inspected that is pre-stored in the database; Processing the initial text to be inspected by sentence segmentation to obtain a sentence segmentation processing result; Using a joint word segmentation and part-of-speech tagging model constructed by integrating external knowledge to perform word segmentation processing and part-of-speech tagging on the sentence processing result, to obtain a word segmentation result with part-of-speech tagging; Performing syntactic analysis on the word segmentation result based on a dependency syntactic analysis method to obtain grammatical components and dependency relationships between the grammatical components; The word segmentation results are stored in a preset data format according to the dependency relationship to obtain a target text to be quality inspected.
3. The text quality inspection method according to claim 1, characterized in that: The traversing the mapping relationship between the preset scenario and the quality inspection type and the quality inspection strength according to the target application scenario to obtain the corresponding target quality inspection type and target quality inspection strength within the quality inspection range includes: Collect and format the quality inspection data in the blockchain according to a preset data format to obtain application scenarios and quality inspection method information, including quality inspection type and quality inspection intensity; Establishing a fine-grained relationship matrix between the application scenarios and the quality inspection methods; The target application scenario is obtained, and a target quality inspection method is obtained by collaborative filtering according to the relationship matrix. The target quality inspection method includes a target quality inspection type and a target quality inspection intensity.
4. The text quality inspection method according to claim 1, characterized in that: The calling of the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain an initial quality inspection result includes: Serializing the target text to be inspected within the inspection range to obtain a sample sequence, wherein the sample sequence includes text characters; Traversing a preset dictionary tree to detect whether there is a target sample sequence consistent with the sample sequence in the dictionary tree; When the detection result is that there is a target sample sequence consistent with the sample sequence in the dictionary tree, the target sample sequence is sorted to obtain a first quality inspection result.
5. A text quality inspection device, characterized in that: The text quality inspection device comprises: A text acquisition module is used to acquire the target text to be inspected that is pre-stored in the database; A text parsing module, used to parse the target text to be inspected, and determine the target application scenario corresponding to the target text to be inspected, including: extracting keywords in the target text to be inspected according to a preset frequency to obtain a keyword set; vectorizing each keyword in the keyword set to obtain a keyword vector set; obtaining a pre-stored standard document set corresponding to the application scenario, and vectorizing the standard document set to obtain a standard document vector set; calling a pre-set relevance calculation model to calculate the relevance value between the keyword vector set and the standard document vector set, and selecting a standard document vector whose relevance value exceeds a preset relevance threshold; determining a target application scenario that has a mapping relationship with the standard document vector; The text parsing module is also used to calculate the quality inspection scope of the target text to be inspected according to the target application scenario, including: selecting a keyword vector corresponding to the target application scenario; determining the earliest timestamp corresponding to the keyword vector as a first timestamp, and determining the latest timestamp corresponding to the keyword vector as a second timestamp; determining the quality inspection scope of the target text to be inspected according to the first timestamp and the second timestamp; A mapping determination module, used to traverse the mapping relationship between the preset scenarios and the quality inspection types and the quality inspection strengths according to the target application scenarios, and obtain the corresponding target quality inspection types and target quality inspection strengths within the quality inspection range; A processor construction module, used to construct a target quality inspection processor whose quality inspection type is the target quality inspection type and whose quality inspection strength is the target quality inspection strength, including: obtaining the target quality inspection type whose quality inspection strength is the target quality inspection strength; configuring a quality inspection toolkit and a quality inspection algorithm according to the target quality inspection type and the target quality inspection strength; updating an initial quality inspection processor based on the quality inspection toolkit and the quality inspection algorithm to obtain a target quality inspection processor; A processor calling module, used for calling the target quality inspection processor to perform quality inspection on the target text to be inspected within the quality inspection range to obtain an initial quality inspection result; The result combination module is used to combine the initial quality inspection results to obtain the final quality inspection results.
6. A computer device, characterized in that: The computer device includes a processor, and the processor is used to implement the text quality inspection method as described in any one of claims 1 to 4 when executing a computer program stored in a memory.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the text quality inspection method as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Text detection method, device and equipment
CN109447469A
Voice quality detection method and device, computer equipment and storage medium
CN112468658A