Text quality evaluation method and device, equipment, storage medium and program product
By scoring the hidden danger elements, logical associate words and consequences of the hazard identification text, combined with grammatical analysis and classification models, the problem of text quality assessment is solved, the accuracy of the assessment is improved and improvement suggestions are provided, and the problems caused by the differences in the abilities of safety inspection personnel are solved. Inaccurate risk analysis issues.
Patent Information
- Application Number
- CN202410542481.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-04-30
AI Technical Summary
Due to the differences in capabilities of different safety inspection personnel, the recorded hazard identification text contains missing hazard elements, errors in logical relationships and errors in reasoning, resulting in inaccurate risk analysis and difficulty in assessing the quality of the text.
By obtaining the hidden danger elements, logical associate words and hidden danger consequences in the hazard identification text, the completeness, logical relationship and accuracy are scored. Combined with the grammatical analysis and classification model, the quality assessment results and explanation text are generated, and the scores and evaluation indicators are displayed.
It realizes multi-dimensional assessment of the quality of hazard identification text, improves the accuracy of assessment, relieves the pressure of manual troubleshooting, and provides explainable improvement suggestions.
Smart Images

Figure CN118569243A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment, storage medium and program product for text quality assessment. Background Art
[0002] In industrial environments, safety inspectors are usually required to observe the on-site environment, identify and infer possible hidden dangers, and fill in the on-site hidden danger information and hidden danger consequences into the hazard identification text. Then, by analyzing, counting and warning the hazard identification text, risk control for the on-site environment can be carried out.
[0003] Due to differences in the capabilities of different safety inspectors, the corresponding hazard identification texts contain problems such as missing hidden danger elements, logical relationship errors, and reasoning errors, which in turn lead to inaccurate subsequent risk analysis.
[0004] Therefore, how to evaluate the text quality of hazard identification texts is a problem that needs to be solved. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method, apparatus, device, storage medium and program product for text quality assessment, so as to solve the problem of how to assess the text quality of hazard identification text.
[0006] On the one hand, a method for text quality assessment is provided in an embodiment of the present application, the method comprising: obtaining a hazard identification text to be evaluated; obtaining an integrity score, a logical relationship score, and an accuracy score of the hazard identification text based on the hidden danger elements, logical conjunctions, and hidden danger consequences recorded in the hazard identification text; wherein the integrity score indicates whether the element categories of the hidden danger elements in the hazard identification text are complete, the logical relationship score indicates whether the logical relationship of the hazard identification text is correct, and the accuracy score indicates whether the hidden danger consequences of the hazard identification text are accurate; based on the integrity score, the logical relationship score, and the accuracy score, a quality assessment result of the hazard identification text is obtained.
[0007] In one embodiment, based on the hazard elements, logical conjunctions and hazard consequences recorded in the hazard identification text, the integrity score, logical relationship score and accuracy score of the hazard identification text are obtained, including: based on the hazard elements in the hazard identification text, the integrity of the hazard identification text is evaluated to obtain an integrity score; based on the logical conjunctions and hazard elements in the hazard identification text, the logical relationship of the hazard identification text is evaluated to obtain a logical relationship score; based on the hazard consequences in the hazard identification text, the accuracy of the hazard identification text is evaluated to obtain an accuracy score.
[0008] In one implementation, the hazard identification text is evaluated for integrity based on the hidden danger elements in the hazard identification text to obtain an integrity score, including: parsing each grammatical component in the hazard identification text to obtain a grammatical analysis tree; extracting the hidden danger elements in the hazard identification text based on the element extraction rules corresponding to each element category and the grammatical analysis tree; the element extraction rules are set based on the grammatical characteristics of the hidden danger elements corresponding to the element category; and obtaining the integrity score based on the element score corresponding to the element category of the hidden danger element.
[0009] In one embodiment, the logical relationship of the hazard identification text is evaluated based on the logical associations and hidden danger elements in the hazard identification text to obtain a logical relationship score, including: extracting the logical associations contained in the hazard identification text; determining the text position of the logical associations in the hazard identification text; determining the logical relationship between different hidden danger elements based on the logical associations and the text position; obtaining the set logical relationship between element categories corresponding to different hidden danger elements; and obtaining a logical relationship score based on the matching degree between the logical relationship and the set logical relationship.
[0010] In one implementation, the accuracy of the hazard identification text is evaluated based on the hidden danger consequences in the hazard identification text to obtain an accuracy score, including: inputting the hazard identification text into a classification model to obtain predicted consequences; extracting the hidden danger consequences contained in the hazard identification text; and obtaining an accuracy score based on the degree of match between the predicted consequences and the hidden danger consequences.
[0011] In one embodiment, the hidden danger consequences include consequence types and severity levels; the predicted consequences include predicted consequence types and predicted severity levels; and an accuracy score is obtained based on the degree of match between the predicted consequences and the hidden danger consequences, including: determining a first degree of match between the consequence type and the predicted consequence type; determining a second degree of match between the severity level and the predicted severity level; and performing weighted summation of the first degree of match and the second degree of match to obtain an accuracy score.
[0012] In one embodiment, the quality assessment result includes a quality score and a quality assessment explanation text; based on the integrity score, logical relationship score and accuracy score, the quality assessment result of the hazard identification text is obtained, including: weighted summing the integrity score, logical relationship score and accuracy score to obtain the quality score; generating a quality assessment explanation text for the hazard identification text.
[0013] In one embodiment, the method further includes: displaying the quality score and the quality assessment explanation text.
[0014] In one embodiment, the quality assessment interpretation text includes at least one of the following: missing element categories in the hazard identification text, unmatched logical relationships in the hazard identification text, and unmatched hidden danger consequences in the hazard identification text.
[0015] In one embodiment, the method further includes: obtaining quality assessment results of multiple hazard identification texts and their corresponding actual scores; and obtaining quality assessment indicator information based on the quality assessment results of each hazard identification text and its corresponding actual score.
[0016] On the one hand, an embodiment of the present application provides a device for text quality assessment, including: an acquisition unit, used to acquire a hazard identification text to be evaluated; an assessment unit, used to obtain an integrity score, a logical relationship score, and an accuracy score of the hazard identification text based on the hazard elements, logical conjunctions, and hazard consequences recorded in the hazard identification text; wherein the integrity score indicates whether the element categories of the hazard elements in the hazard identification text are complete, the logical relationship score indicates whether the logical relationships of the hazard identification text are correct, and the accuracy score indicates whether the hazard consequences of the hazard identification text are accurate; the acquisition unit is used to obtain a quality assessment result of the hazard identification text based on the integrity score, the logical relationship score, and the accuracy score.
[0017] In one embodiment, the evaluation unit is used to: perform integrity evaluation on the hazard identification text based on the hidden danger elements in the hazard identification text to obtain an integrity score; perform logical relationship evaluation on the hazard identification text based on the logical conjunctions and hidden danger elements in the hazard identification text to obtain a logical relationship score; perform accuracy evaluation on the hazard identification text based on the hidden danger consequences in the hazard identification text to obtain an accuracy score.
[0018] In one embodiment, the evaluation unit is used to: parse each grammatical component in the hazard identification text to obtain a grammatical analysis tree; extract hidden danger elements in the hazard identification text according to the element extraction rules corresponding to each element category and the grammatical analysis tree; the element extraction rules are set according to the grammatical characteristics of the hidden danger elements corresponding to the element category; and obtain an integrity score according to the element score corresponding to the element category of the hidden danger element.
[0019] In one embodiment, the evaluation unit is used to: extract logical associations contained in the hazard identification text; determine the text position of the logical associations in the hazard identification text; determine the logical relationship between different hidden danger elements based on the logical associations and the text position; obtain the set logical relationship between element categories corresponding to different hidden danger elements; and obtain a logical relationship score based on the matching degree between the logical relationship and the set logical relationship.
[0020] In one embodiment, the evaluation unit is used to: input the hazard identification text into the classification model to obtain predicted consequences; extract the hidden danger consequences contained in the hazard identification text; and obtain an accuracy score based on the match between the predicted consequences and the hidden danger consequences.
[0021] In one embodiment, the hidden danger consequences include consequence types and severity levels; the predicted consequences include predicted consequence types and predicted severity levels; the evaluation unit is used to: determine a first degree of match between the consequence type and the predicted consequence type; determine a second degree of match between the severity level and the predicted severity level; and perform weighted summation of the first degree of match and the second degree of match to obtain an accuracy score.
[0022] In one embodiment, the quality assessment result includes a quality score and a quality assessment explanation text; the obtaining unit is used to: perform weighted summation of the integrity score, the logical relationship score, and the accuracy score to obtain the quality score; and generate a quality assessment explanation text for the hazard identification text.
[0023] In one implementation, the obtaining unit is further configured to: display the quality score and the quality assessment explanation text.
[0024] In one embodiment, the quality assessment interpretation text includes at least one of the following: missing element categories in the hazard identification text, unmatched logical relationships in the hazard identification text, and unmatched hidden danger consequences in the hazard identification text.
[0025] In one embodiment, the obtaining unit is further used to: obtain quality assessment results of multiple hazard identification texts and their corresponding actual scores; and obtain quality assessment indicator information based on the quality assessment results of each hazard identification text and its corresponding actual score.
[0026] On the one hand, an embodiment of the present application provides an electronic device, including: a processor; and a memory storing computer instructions, the computer instructions being used to enable the processor to execute the steps of a method provided in any of the various optional implementations of any of the above-mentioned text quality assessments.
[0027] On the one hand, an embodiment of the present application provides a computer-readable storage medium storing computer instructions, which are used to enable a computer to execute the steps of the method provided in any of the various optional implementations of text quality assessment described above.
[0028] On the one hand, a computer program product is provided in an embodiment of the present application, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the steps of the method provided in any of the various optional implementations of any of the above-mentioned social interactions.
[0029] The method for text quality assessment in the embodiment of the present application includes obtaining a hazard identification text to be evaluated; obtaining the integrity score, logical relationship score and accuracy score of the hazard identification text according to the hazard elements, logical associated words and hazard consequences recorded in the hazard identification text; wherein the integrity score indicates whether the element categories of the hazard elements in the hazard identification text are complete, the logical relationship score indicates whether the logical relationship of the hazard identification text is correct, and the accuracy score indicates whether the hazard consequences of the hazard identification text are accurate; according to the integrity score, the logical relationship score and the accuracy score, the quality assessment result of the hazard identification text is obtained. In this way, the text quality of the hazard identification text can be evaluated in combination with multiple dimensions to obtain a more accurate quality assessment result. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flowchart of a method for text quality assessment in an embodiment of the present application.
[0031] Figure 2 It is an example diagram of a logical relationship concept in an embodiment of the present application.
[0032] Figure 3 This is an example diagram of a logical relationship in an embodiment of the present application.
[0033] Figure 4 It is a schematic diagram of a framework of a text quality assessment process in an embodiment of the present application.
[0034] Figure 5 This is an example of a quality assessment result display interface in the embodiment of the present application. Figure 1 .
[0035] Figure 6 This is an example of a quality assessment result display interface in the embodiment of the present application. Figure 2 .
[0036] Figure 7 This is an example diagram of a ROC curve in an embodiment of the present application.
[0037] Figure 8 It is a flow chart of a hidden danger report evaluation method in an embodiment of the present application.
[0038] Fig. 9 It is a structural block diagram of a device for text quality assessment in an embodiment of the present application.
[0039] Fig.10 It is a structural schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In industrial environments, safety inspectors are usually required to observe the on-site environment, identify and infer possible hidden dangers, and fill in the on-site hidden danger information and hidden danger consequences into the hazard identification text. In this way, by analyzing, counting and warning the hazard identification text, risk control for the on-site environment can be carried out. However, due to differences in the capabilities of different safety inspectors, the recorded hazard identification text may have problems such as missing hidden danger elements, logical relationship errors and reasoning errors, which may lead to inaccurate subsequent risk analysis. Therefore, how to evaluate the text quality of the hazard identification text is a problem that needs to be solved.
[0041] Based on the defects of the above-mentioned related technologies, the embodiments of the present application provide a method, device, equipment, storage medium and program product for text quality assessment, aiming to solve the problem of how to assess the text quality of hazard identification text.
[0042] A method for text quality assessment is provided in an embodiment of the present application. The method can be applied to electronic devices. The present application does not limit the type of electronic device. It can be any type of device suitable for implementation, such as a terminal device and a server, etc. The present application will not go into details about this.
[0043] See also Figure 1 As shown, it is a flow chart of a method for text quality assessment in an embodiment of the present application. Figure 1 As shown, the method may include steps 101 to 103.
[0044] Step 101: Obtain the hazard identification text to be evaluated.
[0045] In one implementation, the safety inspector observes and infers hidden dangers on site of the inspection environment, fills in and submits the observation information and inference results, and obtains a hazard identification text.
[0046] In an industrial environment, the management of hidden dangers of production safety accidents is crucial to the sustainable development of enterprises. The inspection of hidden dangers of production safety accidents in enterprises usually includes various forms such as daily inspection, regular inspection and special inspection, so as to realize the timely discovery, evaluation and rectification of hidden dangers and achieve the purpose of risk control. The discovery of hidden dangers requires safety inspection personnel to have certain hidden danger identification and hidden danger consequence assessment capabilities. Specifically, after identifying the hidden danger information in the environment by observing the on-site environment and logically inferring the possible hidden danger consequences, the safety inspection personnel can organize the hidden danger information and hidden danger consequences in the environment and fill them into the hidden danger inspection report (i.e. hazard identification text) for subsequent risk analysis and rectification.
[0047] Due to the differences in the levels of different safety inspectors, the hazard identification text may have problems such as missing hidden danger elements, logical errors, and reasoning errors. Therefore, in the subsequent steps, it is necessary to evaluate the quality of the hazard identification text filled in by the safety inspectors.
[0048] Step 102: Obtain the integrity score, logical relationship score, and accuracy score of the hazard identification text based on the hazard elements, logical associated words, and hazard consequences recorded in the hazard identification text.
[0049] Among them, the completeness score indicates whether the element categories of the hidden danger elements in the hazard identification text are complete, the logical relationship score indicates whether the logical relationship of the hazard identification text is correct, and the accuracy score indicates whether the hidden danger consequences of the hazard identification text are accurate.
[0050] In one embodiment, when executing step 102, the following steps may be specifically included: S1021: Based on the hidden danger elements in the hazard identification text, the integrity of the hazard identification text is evaluated to obtain an integrity score. S1022: Based on the logical associations and hidden danger elements in the hazard identification text, the logical relationship of the hazard identification text is evaluated to obtain a logical relationship score. S1023: Based on the hidden danger consequences in the hazard identification text, the accuracy of the hazard identification text is evaluated to obtain an accuracy score.
[0051] In one implementation, when S1021 is executed, the following steps S1021-1, S1021-2 and S1021-3 may be specifically included.
[0052] In S1021-1: parse each grammatical component in the hazard identification text to obtain a grammatical analysis tree.
[0053] In one implementation, each grammatical component in the hazard identification text is parsed by an analysis tool based on vector transformation to obtain a grammatical analysis tree.
[0054] Among them, grammatical components may include: subject, predicate, object, attributive, adverbial and complement.
[0055] Specifically, each grammatical component in the hazard identification text may be identified, and each node of a grammatical analysis tree may be generated according to the grammatical component identification result, and each node may be connected to obtain a grammatical analysis tree.
[0056] S1021-2: Extract hidden danger elements in the hazard identification text according to the element extraction rules corresponding to each element category and the syntax analysis tree.
[0057] Among them, the element categories may include: hazard factors, victims, triggering events and consequences, and may also include emergency measures.
[0058] In one implementation, element extraction rules are set in advance according to the grammatical characteristics of the hidden danger elements.
[0059] The feature extraction rules are set according to the grammatical features of the hidden danger elements corresponding to the feature categories. The grammatical features may be keywords contained in the hidden danger elements, as well as the grammatical components or text positions of the hidden danger elements.
[0060] In practical applications, feature categories and feature extraction rules can be set according to actual application scenarios and are not restricted here.
[0061] In one implementation, each potential danger element may be divided into an entity type element and an event type element according to the grammatical characteristics of each potential danger element.
[0062] Among them, the grammatical components of the event type element are verb phrases, such as hazard factors, emergency measures, and consequences. The event type element corresponds to a main clause or a subordinate clause, which belongs to a subtree of the grammar analysis tree, and its root node is the core word of the main clause or the subordinate clause. Specifically, by traversing the grammar analysis tree, the subject, object, and subordinate clause can be identified, and these subordinate clauses can be split into independent subtrees, and the independent subtrees can be used as candidate hidden danger elements to further determine the element type.
[0063] The grammatical component of the entity type element is a subject or an object, for example, a victim. For the entity type element of the victim type, it can be a subject in the consequence subtree determined according to the meaning of the consequence.
[0064] For example, hazard identification text is a dataset describing hazards generated in industrial production. The length of the text can be a short text of 100 words. As an example, the hazard identification text is: "The distribution box has no protective door, the wires in the distribution box are aged after being exposed to wind and rain, and the electrician did not wear insulating gloves and insulating shoes during the operation, causing electric shock to personnel."
[0065] The following is an example of the hidden danger elements of the above hazard identification text in conjunction with Table 1.
[0066] Table 1: Example table of hazard factor description
[0067]
[0068] In Table 1, the element categories include hazard factors, triggering events, emergency measures, and consequences. Taking hazard factors as an example, the grammatical characteristics of hazard factors (i.e., element categories) are: they are abnormal attributes of causal events or subjects, and usually include at least one of the following keywords: "none, no, too large, too little". Specifically, in the above hazard identification text, the hidden danger elements corresponding to the hazard factors are: the distribution box has no protective door, the wires are aged after being exposed to wind and rain, and insulating gloves and insulating shoes are not worn.
[0069] In one implementation, for each element category, the following steps are performed:
[0070] Method 1: Extract the matching hidden danger elements in the grammatical analysis tree according to the keywords corresponding to the element categories. If there is a node matching the keyword in the grammatical analysis tree, the node can be determined as a hidden danger element. For example, in Table 1, the keywords corresponding to the hazard factors include at least one of the following keywords: "none, no, too large, too small".
[0071] Optionally, keywords may be extracted by automatic extraction and / or manual extraction.
[0072] Method 2: According to the grammatical components corresponding to the element categories, the hidden danger elements that meet the grammatical features in the grammatical analysis tree are extracted. Among them, the keywords and grammatical features are determined according to the grammatical characteristics. The grammatical features can be grammatical components and text positions, etc.
[0073] Method 3: Extract hidden danger elements in the grammatical analysis tree based on the keywords and grammatical features corresponding to the element categories.
[0074] In this way, hidden danger elements can be extracted when there is less labeled data. Furthermore, the research field and field data source can be determined first, and then the type of entity (i.e. hidden danger element) (i.e. element category) can be determined, hidden danger element specifications can be formulated, and then element extraction rules can be determined. Hidden danger element extraction can also be carried out in any of the following ways: statistical machine learning-based methods, deep learning-based methods, and deep learning methods based on multi-party fusion.
[0075] S1021-3: Obtain an integrity score based on the element score corresponding to the element category of the hidden danger element.
[0076] In one implementation, the element score corresponding to the element category of each extracted hidden danger element is obtained respectively, and the element scores corresponding to each element category are weighted and summed to obtain the integrity score.
[0077] There may be one or more hidden danger elements. The weight corresponding to each element category can be set according to the actual application scenario and is not limited here.
[0078] In one implementation, the following formula may be used to determine the integrity score:
[0079]
[0080] Among them, S integrity is the integrity score, Dev is the hazard factor, Cons is the consequence, Victim is the victim, and otherpoints is the emergency measures. The bool() function indicates that if it exists, it is 1, otherwise it is 0.
[0081] In one implementation, when S1022 is executed, it may include S1022-1 to S1022-5.
[0082] S1022-1: Extract logically associated words contained in the hazard identification text.
[0083] In one implementation, a set of associated words is preset, and logical associated words matching the associated words in the set of associated words are extracted from the hazard identification text.
[0084] As an example, if a word in the hazard identification text is the same as an associated word in the associated word set, it is determined that the two match, and the word is determined to be a logical associated word.
[0085] The associated words in the associated word set are words used to determine logical relationships, and the logical relationships may include at least one of the following: cause and effect, sequence, transition, and condition, etc. The associated words in the associated word set may be summarized from common logical relationships and unique expressions in hazard identification texts. The associated word set may be set according to actual application scenarios, and is not limited here.
[0086] S1022-2: Determine the text position of logically associated words in the hazard identification text.
[0087] In one implementation, the text position of the logically associated words in each hazard element is determined.
[0088] S1022-3: Determine the logical relationship between different hidden danger elements based on logical associations and text positions.
[0089] In one implementation, the causal scope is determined through the text position grammar analysis tree of the logical conjunction, and then each hidden danger element is divided to obtain at least one pair of hidden danger elements, and the logical relationship of each pair of hidden danger elements is determined respectively. Furthermore, a logical relationship diagram of the hazard identification text can be generated according to the logical relationship between each pair of hidden danger elements. As an example, the logical relationship can be a causal relationship.
[0090] Combine the following Figure 2 A conceptual diagram of logical relationships is described. Figure 2 This is an example diagram of a logical relationship concept. Figure 2 In the logical relationship diagram, there are three types of nodes: environmental conditions, triggering conditions, and hidden danger consequences. Environmental conditions are hazard factors, and triggering conditions are triggering events. Nodes for environmental conditions are marked with G, such as location, material, and deviation. Nodes for triggering conditions are marked with W, such as process. Nodes corresponding to hidden danger consequences are marked with T, such as possible events and consequences.
[0091] Combine the following Figure 3 Provide examples of logical relationship diagrams. Figure 3 This is an example diagram of a logical relationship. Figure 3 In the figure, it can be seen from various types of nodes that due to the lack of protective doors in the distribution box, ..., personnel were triggered to die.
[0092] In this way, the logical relationship can be determined based on the semantic characteristics of the logical relationship and the logical relationship judgment rules. The logical relationship can be determined without the need for high-quality labeled data, and the evolution process of the hidden danger event can be modeled as a logical relationship diagram by pointing the arrow from the cause to the result.
[0093] It should be noted that logical relationships include explicit logical relationships and implicit logical relationships. Considering the simple format and concise logic of hazard identification text descriptions, when determining logical relationships, at least one of the following methods can be used: a method based on machine learning and a method based on deep learning. In this way, the workload of manual rule formulation can be reduced.
[0094] S1022-4: Obtain the set logical relationship between element categories corresponding to different hidden danger elements.
[0095] The logical relationships between different element categories are pre-configured. For example, hazard factors and triggering events are the "causes" in the causal relationship, and consequences are the "results" in the causal relationship.
[0096] S1022-5: Obtain a logical relationship score based on the logical relationship and the matching degree between the set logical relationships.
[0097] As an example, if the causal relationship and the set logical relationship corresponding to a pair of safety hazard factors are the same, then the two are determined to match, otherwise, the two are determined to be mismatched. For example, the logical relationship may have a problem of causal inversion of safety hazard factors, such as "hazard factor" as the "result" in the "causal relationship" and "consequence factor" as the "cause" in the "causal relationship".
[0098] In one implementation, if there is an unmatched logical relationship, the logical relationship score is 0, otherwise, it is 1.
[0099] In one implementation, when S1023 is executed, it may include S1023-1 to S1023-3.
[0100] S1023-1: Input the hazard identification text into the classification model to obtain the predicted consequences.
[0101] The predicted consequence includes the predicted consequence type and the predicted severity level. The predicted consequence type indicates the consequence type of the hidden danger predicted by the model, and the predicted severity level indicates the hidden danger consequence and severity level predicted by the model.
[0102] Furthermore, before executing S1023-1, a pre-training method may be used to obtain a pre-training model, and sample data may be labeled to obtain labeled data, and a supervised fine-tuning method may be used to fine-tune the pre-training model through the labeled data to obtain a trained classification model. The classification model is used to classify the hazard identification text to obtain the predicted consequence type and predicted severity level of the hazard identification text.
[0103] The pre-trained model is fine-tuned based on the Transformer model. It models the dependency between words in the input text sequence through the self-attention mechanism, captures the long-range relationship between words, and helps to understand the semantics of the text content when scoring the text. The pre-trained model allows downstream tasks of natural language processing to be completed by fine-tuning the parameters of the pre-trained model.
[0104] In the embodiment of the present application, the classification model is classified using text classification technology. Text classification technology mainly classifies from the text semantic level, such as text content, theme, emotion, etc., and can usually be used in scenarios such as news classification, spam classification, public opinion analysis, etc., and can also be classified using traditional machine learning methods and deep learning methods.
[0105] As an example, the corresponding consequence types and severity levels can be annotated on sample data based on the experience of experts (such as domain safety experts) to determine whether the consequence types and severity levels filled in by the user are consistent with the predicted consequence types and predicted severity levels output by the model.
[0106] Furthermore, the classification model can also be tested using a test data set (eg, a large amount of hazard identification texts generated in an industrial production environment) to obtain a classification model that meets the test requirements.
[0107] Furthermore, in the pre-training stage, corresponding weights in the loss function may be set according to the data proportion of each consequence type and / or severity level to obtain a non-balanced loss function.
[0108] For example, the 4760 data items annotated by experts cover four types of consequences, of which the largest type of consequences accounts for more than 80%. The weight (i.e., attention) of small categories (i.e., annotated data of a certain type of consequence with a small proportion of data) is increased in the loss function.
[0109] In an embodiment of the present application, in view of the cost of expert labeling data, the imbalance of labeled data types and limited coverage of scenarios, when sampling the data to be labeled, the number of small categories is increased to improve the balance of the labeled data. Training can also be carried out on unbalanced data during the training process, including strategies such as oversampling, undersampling and the use of unbalanced loss functions to optimize the training results, thereby reducing the imbalanced proportion of consequence types and / or severity levels in the data preprocessing stage, and using a weighted loss function to increase attention to consequence types and / or severity levels that account for a smaller proportion.
[0110] The following is an example of the prediction accuracy of the consequence type in conjunction with Table 2.
[0111] Table 2: Examples of consequence type predictions
[0112] Type of consequence Personal injury Property damage Social Impact Environmental pollution Prediction Accuracy 0.9845 0.7308 0.2500 0.6667
[0113] The following is an example of the prediction accuracy of the severity level in conjunction with Table 3.
[0114] Table 3: Examples of severity level predictions
[0115]
[0116] As can be seen from Tables 2 and 3, the classification model has a high prediction accuracy for “personnel injury” (i.e., consequence type) and “S3” (i.e., severity level).
[0117] S1023-2: Extract the consequences of hidden dangers contained in the hazard identification text.
[0118] Among them, the hidden danger consequences include consequence types and / or severity levels.
[0119] S1023-3: Obtain an accuracy score based on the match between the predicted consequences and the hidden danger consequences.
[0120] In one implementation, when executing S1023-3, the following steps may be adopted:
[0121] S1023-31: Determine a first degree of match between the consequence type and the predicted consequence type.
[0122] S1023-32: Determine a second degree of match between the severity level and the predicted severity level.
[0123] S1023-33: Perform a weighted sum of the first matching degree and the second matching degree to obtain an accuracy score.
[0124] As an example, if the consequence type is the same as the predicted consequence type, and the severity level is the same as the predicted severity level, then the accuracy score is 1.
[0125] In the embodiment of the present application, the predicted consequence is regarded as the correct information. If the hidden danger consequence is consistent with the predicted consequence, the hidden danger consequence is determined to be accurate; otherwise, the hidden danger consequence is determined to be inaccurate.
[0126] Furthermore, the accuracy score can be determined in combination with the probability of harm, which is to check whether the overall frequency of occurrence from the initial hazard factor to the final consequence is consistent with experience.
[0127] Step 103: Obtain the quality assessment result of the hazard identification text according to the completeness score, the logical relationship score and the accuracy score.
[0128] Among them, the quality assessment results include quality scores and quality assessment explanation texts.
[0129] In one implementation, the integrity score, the logical relationship score, and the accuracy score are weighted and summed to obtain a quality score; and a quality assessment explanation text of the hazard identification text is generated.
[0130] As an example, when determining the quality score, the following formula can be used:
[0131] Score = S integrity +S relation +S accuracy ;
[0132] Among them, Score is the quality score, S integrity S is the completeness score. relation Score the logical relationship, S accuracy Rate accuracy.
[0133] In this way, the quality of the hazard identification text can be evaluated from three aspects: completeness, correctness (i.e. logical correctness), and accuracy.
[0134] Furthermore, quality assessment can be performed in combination with readability and / or authenticity.
[0135] Among them, readability may include at least one of the following: correct spelling, complete syntactic structure, and concise sentences. Correct spelling refers to checking whether there are typos in the hazard identification text. Complete syntactic structure refers to checking whether there are nouns or verbs in the sentence and whether the sentence structure is complete. Concise sentences refer to checking whether there are more than 3 modifiers for the same word in a single sentence, and whether there are more than 2 subjects in the sentence predicate. Authenticity refers to context relevance, which means checking whether the hazard identification text is relevant to the context of the submitted picture content, and then judging whether it corresponds to the actual production scenario.
[0136] Among them, readability and completeness are general text quality assessment dimensions, and accuracy, correctness, and authenticity are requirements in industrial scenarios. Accuracy and correctness ensure the self-consistency of the hazard identification text content, and authenticity ensures that the hazard identification text expresses the hazards in real scenarios based on the needs of hidden danger investigation and rectification. Use entity recognition technology to evaluate completeness, use logical relationship recognition technology to evaluate logical correctness, and use text classification technology to evaluate accuracy.
[0137] Furthermore, the quality assessment explanation text includes at least the reasons for the quality assessment deduction; the quality assessment explanation text includes at least one of the following: missing element categories in the hazard identification text, unmatched logical relationships in the hazard identification text, and unmatched hidden danger consequences in the hazard identification text. Furthermore, the quality assessment explanation text may also include at least one of the following: hidden danger elements, logical relationships, predicted consequences, and grammatical components.
[0138] Furthermore, the quality assessment results and quality assessment explanation text can also be displayed.
[0139] In one implementation, determining the reasons for deducting points from the quality assessment may include at least one of the following:
[0140] Method 1: If the completeness score does not reach the first score threshold, the missing element categories in the hazard identification text are determined.
[0141] Method 2: If the logical relationship score does not reach the second score threshold, then determine the unmatched logical relationship in the hazard identification text.
[0142] Method 3: If the accuracy score does not reach the third score threshold, the consequences of the hidden dangers that do not match in the hazard identification text are determined.
[0143] In practical applications, the first scoring threshold, the second scoring threshold, and the third scoring threshold can all be set according to actual application scenarios and are not limited here.
[0144] Combine the following Figure 4 The framework of the text quality assessment process is schematically illustrated. Figure 4The figure is a framework diagram of a text quality assessment process. Specifically, the hidden danger elements in the hazard identification text are identified, and the integrity of the hazard identification text is judged according to the element category of the hidden danger elements to obtain an integrity score; further, the logical relationship of the hazard identification text can be analyzed to obtain a logical relationship diagram with a clear structure and logical evolution, and the correctness of the logic of the hazard identification text can be judged according to the logical relationship diagram to obtain a logical relationship score; and the accuracy of the hazard identification text can be judged according to the predicted consequences of the classification model and the hidden danger consequences in the hazard identification text to obtain an accuracy score. Furthermore, the quality of the hazard identification text can be assessed from the three dimensions of integrity, logical correctness and accuracy to obtain a quality assessment result.
[0145] Combine the following Figure 5 Pair and Figure 6 The following is an example of the display interface of the quality assessment results. Figure 5 An example of a quality assessment result display interface Figure 1 . Figure 6 An example of a quality assessment result display interface Figure 2 . Figure 5 In the hazard identification text input, the text includes: hidden danger description, potential consequences, consequence category (i.e. accident category) and severity (i.e. severity level). The output quality assessment result is 5, and the assessment recommendation, i.e. predicted consequence, is also output. Figure 6 In the code, various hidden danger elements, logical relationships and grammatical components are displayed.
[0146] Furthermore, the capability of the quality assessment result may also be assessed. In one implementation, the following steps may be used:
[0147] The quality assessment results and actual scores of multiple hazard identification texts are obtained; and the quality assessment indicator information is obtained according to the quality assessment results and actual scores of each hazard identification text.
[0148] The quality assessment indicator information includes a quadratic weighted Kappa (QWK) and an assessment score. The assessment score is used to indicate the accuracy of the quality score. The quality assessment indicator information may also include precision and recall.
[0149] In one implementation, the consistency between the quality score and the expert score is evaluated to obtain a consistency score.
[0150] In a test scenario of quality assessment indicator information, the quality score is divided into five quality levels. The quality of multiple hazard identification texts is evaluated by experts to obtain the actual score, and then the corresponding quality level is obtained, and finally 1800 expert scoring data are obtained. The precision and recall rates are determined by the quality levels corresponding to the actual scores and quality scores, and the evaluation score is 0.3934 through the precision and recall rates. The following is an example explanation in conjunction with Table 4.
[0151] Table 4: Example of quality assessment indicator information
[0152] Quality Grade Accuracy Recall Assessment score total 1 0.0769 0.1053 0.0889 19 2 0.3165 0.1852 0.2336 135 3 0.1466 0.1830 0.1628 153 4 0.4901 0.6289 0.5509 908 5 0.3521 0.2198 0.2707 655 Weighted Average 0.3969 0.4118 0.3934 1870
[0153] The following is an explanation of the meaning of the QWK indicator in conjunction with Table 5.
[0154] Table 5: Examples of the meaning of the QWK indicator
[0155] QWK Value <0.20 0.21-0.40 0.41-0.60 0.61-0.80 0.81-1.00 Consistency Strength Poor generally medium Strong powerful
[0156] Furthermore, the quality assessment results can be divided into two quality levels, namely qualified and unqualified. QWK = 0.235 is obtained, which has a general consistency strength with the expert evaluation. The receiver operating characteristic curve (ROC) is as follows Figure 7 shown. Figure 7 This is an example of a ROC curve. Figure 7 The area under the ROC curve (AUC) is 0.64. When the predicted severity level = 4 and above is considered "qualified", the false positive rate is 0.61 and the true positive rate is 0.86.
[0157] Combine the following Figure 8 Explain how to submit hazard identification text. Figure 8 The following is a flowchart of a hidden danger report assessment method. The specific steps of the method are as follows:
[0158] Step 801: Display the employee login system interface according to the employee login instruction.
[0159] Among them, the employees are safety inspectors.
[0160] Step 802: Display the hidden danger report browsing interface according to the employee's browsing instruction.
[0161] Among them, the hidden danger report is the hazard identification text.
[0162] Step 803: Determine whether to report the hidden danger. If so, execute step 804; otherwise, execute step 810.
[0163] Step 804: Fill out a hidden danger report according to the employee's input instructions.
[0164] Step 805: Determine whether to assess the quality of the report, if so, execute step 806, otherwise, execute step 808.
[0165] Step 806: Display the text quality assessment result.
[0166] Step 807: Determine whether to modify the text quality assessment result, if so, execute step 804, otherwise, execute step 808.
[0167] Step 808: Determine whether to save the text quality assessment result, if so, execute step 809, otherwise, execute step 810.
[0168] Step 809, saving the text quality assessment result.
[0169] For example, an employee clicks the Add button to save the text quality assessment results.
[0170] Step 810: The process ends.
[0171] In this way, users can check whether the information is filled out correctly based on the text quality assessment results. They can also modify the hazard identification text based on the text quality assessment results, thereby improving the professionalism of employees' work.
[0172] In the embodiment of the present application, the hidden danger elements in the hazard identification text can be identified, and the integrity of the hazard identification text can be judged according to the element category of the hidden danger elements to obtain an integrity score; further, the logical relationship of the hazard identification text can be parsed to obtain a logical relationship diagram with a clear structure and logical evolution, and the correctness of the logic of the hazard identification text can be judged according to the logical relationship diagram to obtain a logical relationship score; and the accuracy of the hazard identification text can be judged according to the predicted consequences of the classification model and the hidden danger consequences in the hazard identification text to obtain an accuracy score. Further, the quality of the hazard identification text can be evaluated from the three dimensions of integrity, logical correctness and accuracy, which solves the problem that the quality of the hazard identification text is difficult to evaluate and effectively alleviates the pressure of manually checking the hazard identification text. Furthermore, the evaluation basis of integrity, logical correctness and accuracy can be determined, and the reason for the deduction of points when the quality evaluation result is determined, providing an interpretable analysis text to help the user's subsequent improvements. Furthermore, the effect of the above-mentioned quality evaluation can also be verified through the quality evaluation results of experts to verify its effectiveness, and it can be optimized according to the verification results.
[0173] Based on the same inventive concept, a device for text quality assessment is also provided in the embodiment of the present application. Since the principle of solving the problem by the above device and equipment is similar to that of a method for text quality assessment, the implementation of the above device can refer to the implementation of the method, and the repeated parts will not be repeated. The device can be applied to electronic devices. The present application does not limit the type of electronic devices. It can be any type of device suitable for implementation, such as terminal devices and servers, etc., and the present application will not repeat them.
[0174] See also Fig. 9 , which is a structural block diagram of a device for text quality assessment in an embodiment of the present application. In some implementations, the device for text quality assessment in the example of the present application includes:
[0175] An acquisition unit 901 is used to acquire a hazard identification text to be evaluated;
[0176] The evaluation unit 902 is used to obtain the integrity score, logical relationship score and accuracy score of the hazard identification text according to the hazard elements, logical associated words and hazard consequences recorded in the hazard identification text; wherein the integrity score indicates whether the element categories of the hazard elements in the hazard identification text are complete, the logical relationship score indicates whether the logical relationship of the hazard identification text is correct, and the accuracy score indicates whether the hazard consequences of the hazard identification text are accurate;
[0177] The obtaining unit 903 is used to obtain the quality assessment result of the hazard identification text according to the integrity score, the logical relationship score and the accuracy score.
[0178] In one embodiment, the evaluation unit 902 is used to: perform integrity evaluation on the hazard identification text based on the hidden danger elements in the hazard identification text to obtain an integrity score; evaluate the logical relationship of the hazard identification text based on the logical conjunctions and hidden danger elements in the hazard identification text to obtain a logical relationship score; evaluate the accuracy of the hazard identification text based on the hidden danger consequences in the hazard identification text to obtain an accuracy score.
[0179] In one implementation, the evaluation unit 902 is used to:
[0180] Parse each grammatical component in the hazard identification text to obtain a grammatical analysis tree;
[0181] According to the element extraction rules corresponding to each element category and the grammatical analysis tree, the hidden danger elements in the hazard identification text are extracted; the element extraction rules are set according to the grammatical characteristics of the hidden danger elements corresponding to the element category;
[0182] An integrity score is obtained based on the element score corresponding to the element category of the hidden danger element.
[0183] In one implementation, the evaluation unit 902 is used to:
[0184] Extracting logically related words contained in the hazard identification text;
[0185] Determine the text position of logically related words in the hazard identification text;
[0186] Determine the logical relationship between different hidden danger elements based on logical associations and text positions;
[0187] Obtain the set logical relationship between the element categories corresponding to different hidden danger elements;
[0188] A logical relationship score is obtained based on the logical relationship and the matching degree between the set logical relationships.
[0189] In one implementation, the evaluation unit 902 is used to:
[0190] Input the hazard identification text into the classification model to obtain the predicted consequences;
[0191] Extract the hidden danger consequences contained in the hazard identification text;
[0192] An accuracy score is obtained based on the match between the predicted consequences and the hidden danger consequences.
[0193] In one implementation, the hidden danger consequence includes a consequence type and a severity level; the predicted consequence includes a predicted consequence type and a predicted severity level;
[0194] The evaluation unit 902 is used to:
[0195] determining a first degree of match between the consequence type and the predicted consequence type;
[0196] determining a second degree of match between the severity level and the predicted severity level;
[0197] The first matching degree and the second matching degree are weightedly summed to obtain an accuracy score.
[0198] In one implementation, the quality assessment result includes a quality score and a quality assessment explanation text;
[0199] The obtaining unit 903 is used for:
[0200] The completeness score, logical relationship score, and accuracy score are weighted and summed to obtain the quality score;
[0201] Generate quality assessment explanation text for hazard identification text.
[0202] In one implementation, the obtaining unit 903 is further configured to:
[0203] Displays quality ratings along with text explaining the quality assessment.
[0204] In one implementation, the quality assessment explanation text includes at least one of the following:
[0205] Missing element categories in the hazard identification text, unmatched logical relationships in the hazard identification text, and unmatched hidden danger consequences in the hazard identification text.
[0206] In one implementation, the obtaining unit 903 is further configured to:
[0207] Obtain quality assessment results of multiple hazard identification texts and their corresponding actual scores;
[0208] Quality assessment index information is obtained based on the quality assessment results of each hazard identification text and its corresponding actual score.
[0209] The method for text quality assessment in the embodiment of the present application includes obtaining a hazard identification text to be evaluated; obtaining the integrity score, logical relationship score and accuracy score of the hazard identification text according to the hazard elements, logical associated words and hazard consequences recorded in the hazard identification text; wherein the integrity score indicates whether the element categories of the hazard elements in the hazard identification text are complete, the logical relationship score indicates whether the logical relationship of the hazard identification text is correct, and the accuracy score indicates whether the hazard consequences of the hazard identification text are accurate; according to the integrity score, the logical relationship score and the accuracy score, the quality assessment result of the hazard identification text is obtained. In this way, the text quality of the hazard identification text can be evaluated in combination with multiple dimensions to obtain a more accurate quality assessment result.
[0210] In an embodiment of the present application, an electronic device is provided, including:
[0211] Processor; and
[0212] The memory stores computer instructions, where the computer instructions are used to enable the processor to execute the method of any of the above embodiments.
[0213] In an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a computer to execute a method in any of the above-mentioned embodiments.
[0214] An embodiment of the present application also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device implements any of the above-mentioned methods.
[0215] Fig.10 A schematic diagram of the structure of an electronic device is shown. Fig.10As shown, the electronic device 10000 includes: a processor 10010 and a memory 10020 , and optionally, may also include a power supply 10030 , a display unit 10040 , and an input unit 10050 .
[0216] Processor 10010 is the control center of electronic device 10000. It connects various components using various interfaces and lines, and performs various functions of electronic device 10000 by running or executing software programs and / or data stored in memory 10020, thereby monitoring electronic device 10000 as a whole.
[0217] In the embodiment of the present application, the processor 10010 executes the various steps in the above embodiment when calling the computer program stored in the memory 10020.
[0218] Optionally, the processor 10010 may include one or more processing units; preferably, the processor 10010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 10010. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips.
[0219] The memory 10020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, various applications, etc.; the data storage area may store data created according to the use of the electronic device 10000, etc. In addition, the memory 10020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices, etc.
[0220] The electronic device 10000 also includes a power source 10030 (such as a battery) for supplying power to various components. The power source can be logically connected to the processor 10010 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.
[0221] The display unit 10040 may be used to display information input by the user or information provided to the user and various menus of the electronic device 10000, and in the embodiment of the present application, is mainly used to display the display interface of each application in the electronic device 10000 and objects such as text and pictures displayed in the display interface. The display unit 10040 may include a display panel 10041. The display panel 10041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0222] The input unit 10050 may be used to receive information such as numbers or characters input by the user. The input unit 10050 may include a touch panel 10051 and other input devices 10052. The touch panel 10051, also known as a touch screen, may collect touch operations performed by the user on or near it (e.g., operations performed by the user using a finger, a stylus, or any other suitable object or accessory on or near the touch panel 10051).
[0223] Specifically, the touch panel 10051 can detect the user's touch operation, detect the signal brought by the touch operation, convert these signals into touch point coordinates, send them to the processor 10010, and receive and execute the command sent by the processor 10010. In addition, the touch panel 10051 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. Other input devices 10052 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.
[0224] Of course, the touch panel 10051 can cover the display panel 10041. When the touch panel 10051 detects a touch operation on or near it, it is transmitted to the processor 10010 to determine the type of touch event. Then the processor 10010 provides corresponding visual output on the display panel 10041 according to the type of touch event. Fig.10 In the embodiment, the touch panel 10051 and the display panel 10041 are two independent components to realize the input and output functions of the electronic device 10000, but in some embodiments, the touch panel 10051 and the display panel 10041 can be integrated to realize the input and output functions of the electronic device 10000.
[0225] The electronic device 10000 may also include one or more sensors, such as a pressure sensor, a gravity acceleration sensor, a proximity light sensor, etc. Of course, according to the needs of specific applications, the electronic device 10000 may also include other components such as a camera. Since these components are not the key components used in the embodiments of the present application, Fig.10 It is not shown and will not be described in detail.
[0226] Those skilled in the art will understand that Fig.10 The electronic device is merely an example and does not limit the electronic device, and may include more or less components than those shown in the figure, or may combine certain components, or may include different components.
[0227] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
Claims
1. A method for text quality assessment, characterized in that: The method comprises: Obtain the hazard identification text to be evaluated; According to the hazard elements, logical associated words and hazard consequences recorded in the hazard identification text, the integrity score, logical relationship score and accuracy score of the hazard identification text are obtained; wherein the integrity score indicates whether the element categories of the hazard elements in the hazard identification text are complete, the logical relationship score indicates whether the logical relationship of the hazard identification text is correct, and the accuracy score indicates whether the hazard consequences of the hazard identification text are accurate; A quality assessment result of the hazard identification text is obtained based on the completeness score, the logical relationship score, and the accuracy score.
2. The method according to claim 1, characterized in that The step of obtaining the integrity score, logical relationship score and accuracy score of the hazard identification text according to the hazard elements, logical associated words and hazard consequences recorded in the hazard identification text includes: According to the hidden danger elements in the hazard identification text, the integrity assessment is performed on the hazard identification text to obtain the integrity score; According to the logical associated words and hidden danger elements in the hazard identification text, the logical relationship of the hazard identification text is evaluated to obtain the logical relationship score; The accuracy of the hazard identification text is evaluated based on the hidden danger consequences in the hazard identification text to obtain the accuracy score.
3. The method according to claim 2, characterized in that The step of performing integrity assessment on the hazard identification text according to the hidden danger elements in the hazard identification text to obtain the integrity score includes: Parsing each grammatical component in the hazard identification text to obtain a grammatical analysis tree; Extracting hidden danger elements in the hazard identification text according to the element extraction rules corresponding to each element category and the grammatical analysis tree; the element extraction rules are set according to the grammatical characteristics of the hidden danger elements corresponding to the element category; The integrity score is obtained according to the element score corresponding to the element category of the hidden danger element.
4. The method according to claim 2, characterized in that: The step of evaluating the logical relationship of the hazard identification text according to the logical associated words and hidden danger elements in the hazard identification text to obtain the logical relationship score includes: Extracting logically associated words contained in the hazard identification text; Determining the text position of the logically associated words in the hazard identification text; Determining the logical relationship between different hidden danger elements according to the logical associated words and the text positions; Obtain the set logical relationship between the element categories corresponding to different hidden danger elements; The logical relationship score is obtained according to the matching degree between the logical relationship and the set logical relationship.
5. The method according to claim 2, characterized in that: The step of evaluating the accuracy of the hazard identification text according to the hidden danger consequences in the hazard identification text to obtain the accuracy score includes: Inputting the hazard identification text into a classification model to obtain predicted consequences; Extracting the hidden danger consequences contained in the hazard identification text; The accuracy score is obtained according to the matching degree between the predicted consequence and the hidden danger consequence.
6. The method according to claim 5, characterized in that The hidden danger consequence includes the consequence type and severity level; the predicted consequence includes the predicted consequence type and predicted severity level; The obtaining the accuracy score according to the matching degree between the predicted consequence and the hidden danger consequence includes: determining a first degree of match between the consequence type and the predicted consequence type; determining a second degree of match between the severity level and the predicted severity level; The first matching degree and the second matching degree are weightedly summed to obtain the accuracy score.
7. The method according to any one of claims 1 to 6, characterized in that: The quality assessment results include a quality score and a quality assessment explanation text; The obtaining of the quality assessment result of the hazard identification text according to the integrity score, the logical relationship score and the accuracy score includes: Performing a weighted summation on the integrity score, the logical relationship score, and the accuracy score to obtain a quality score; A quality assessment interpretation text of the hazard identification text is generated.
8. The method according to claim 7, characterized in that The method further comprises: The quality score and the quality assessment explanation text are displayed.
9. The method according to claim 7, characterized in that: The quality assessment explanation text includes at least one of the following: The missing element categories in the hazard identification text, the unmatched logical relationships in the hazard identification text, and the unmatched hidden danger consequences in the hazard identification text.
10. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Obtain quality assessment results of multiple hazard identification texts and their corresponding actual scores; Quality assessment index information is obtained based on the quality assessment results of each hazard identification text and its corresponding actual score.
11. A device for evaluating text quality, characterized in that: The device comprises: An acquisition unit, used for acquiring a hazard identification text to be evaluated; An evaluation unit, configured to obtain a completeness score, a logical relationship score, and an accuracy score of the hazard identification text according to the hazard elements, logical associated words, and hazard consequences recorded in the hazard identification text; wherein the completeness score indicates whether the element categories of the hazard elements in the hazard identification text are complete, the logical relationship score indicates whether the logical relationship of the hazard identification text is correct, and the accuracy score indicates whether the hazard consequences of the hazard identification text are accurate; An obtaining unit is used to obtain a quality assessment result of the hazard identification text according to the integrity score, the logical relationship score and the accuracy score.
12. An electronic device, characterized in that: include: processor; as well as A memory storing computer instructions, wherein the computer instructions are used to enable the processor to execute the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: Computer instructions are stored, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The invention comprises a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code is executed in a processor of an electronic device, the processor in the electronic device performs the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Data quality analysis evaluation model facing electric power big data
CN107545349A
Annotation data quality evaluation method and device, computer device and storage medium
CN110826494A
Method and device for automatically generating electric power anti-misoperation logic formula
CN115310921A
Method, device and equipment for adjusting data quality evaluation model and medium
CN117093571A
Text quality detection method and device, electronic equipment and storage medium
CN117592456A
