Report preparation error prevention processing method, device, electronic device and storage medium
By using an error-proof classification model based on Text CNN, the types of preparation errors in the report chapter text are identified and reminders are generated, which solves the problem of different quality of report preparation and improves the quality and efficiency of report preparation.
Patent Information
- Application Number
- CN202510051793.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-14
AI Technical Summary
The existing report preparation methods are greatly affected by human factors, resulting in different quality of report preparation and the inability to form unified standards and high-quality report results.
A text classification model (Text CNN) based on a convolutional neural network is used to obtain the report chapter text to be reviewed, and input it into the pre-trained error-proof classification model. The target error type to which the report chapter text belongs is output, and an error-proof reminder information is generated.
Help compilers quickly become familiar with and prepare reports, help reviewers quickly discover problems in the report chapter text, and reduce the recurrence of routine, common sense and normative errors in the report.
Smart Images

Figure CN119474381B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of report compilation, and in particular to a report compilation error prevention processing method, device, electronic equipment and storage medium. Background Art
[0002] At present, the preparation of various complex reports, such as corporate work reports, ESG reports, annual reports, audit reports, bidding documents, project proposals, feasibility study reports, etc., is generally done manually by referring to similar professional technical reports, papers, historical reports, and combining basic data. As the text content of report preparation becomes more and more complex, the requirements for the quality and efficiency of report preparation are also getting higher and higher.
[0003] The above-mentioned report preparation methods are greatly influenced by human factors. Different levels, experiences and report writing habits of different preparers often lead to different report writing quality and fail to form standard unified and high-quality report results. With the rapid development of information technology, the text classification model based on convolutional neural network (Text CNN) has become more mature and has been widely used in the writing of news and literary creation. However, the use of text classification models to assist in improving the quality of professional technical reports and preventing report writing errors is still rarely used. Therefore, it is urgent to establish a report preparation error prevention method based on Text CNN technology to improve the quality and efficiency of report preparation. Summary of the invention
[0004] The purpose of the present invention is to provide a report preparation error prevention processing method, device, electronic device and storage medium, which can help compilers quickly become familiar with and prepare reports, help compilers and auditors quickly discover existing problems, and reduce the recurrence of routine, common sense and normative errors in reports.
[0005] In a first aspect, the present application provides a report preparation error prevention method, comprising:
[0006] Get the text of the report chapter to be reviewed;
[0007] The report chapter text is input into a pre-trained error prevention classification model, and the target compilation error type to which the report chapter text belongs is output; the error prevention classification model is used to output at one time whether the report chapter text belongs to the following four types of compilation errors: audit problem errors, compilation focus errors, compilation guide errors, and compilation specification errors;
[0008] According to the target compilation error type to which the report chapter text belongs, error prevention reminder information is generated and output.
[0009] Optionally, the process of training the error prevention classification model includes: obtaining report chapter text samples that have been labeled with compilation error types, wherein the same report chapter text sample is allowed to be labeled with at least one of the following compilation error types at the same time: audit problem errors, compilation focus errors, compilation guide errors and compilation specification errors; constructing an error prevention classification model to be trained, the error prevention classification model including a word embedding layer, a feature extraction layer and a fully connected layer; inputting the report chapter text sample into the word embedding layer to obtain a text vector, inputting the text vector into the feature extraction layer for feature extraction to obtain text features, and inputting the text features into the fully connected layer to obtain the compilation error type to which the report chapter text sample belongs; constructing a loss function based on the predicted compilation error type to which the report chapter text sample belongs and the labeled compilation error type of the report chapter text sample, and training the error prevention classification model to be trained based on the loss function to obtain the pre-trained error prevention classification model.
[0010] Optionally, the feature extraction layer includes an audit question branch network, a compilation focus branch network, a compilation guide branch network, and a compilation specification branch network; the fully connected layer includes four independent fully connected networks;
[0011] Inputting the text vector into the feature extraction layer to extract features to obtain text features includes:
[0012] Inputting the text vector into the audit question branch network and the compilation concern point branch network respectively, so as to obtain audit question error features and compilation concern point error features respectively;
[0013] The audit question error features and the compilation focus error features are merged and inputted into the compilation guide branch network and the compilation specification branch network respectively, so as to obtain the compilation guide error features and the compilation specification error features respectively;
[0014] Inputting text features into the fully connected layer to obtain the compilation error type to which the report chapter text sample belongs, including:
[0015] The audit question error features, the compilation focus error features, the compilation guide error features and the compilation specification error features are respectively input into the fully connected network to respectively predict whether the report chapter text sample belongs to the four types of compilation errors.
[0016] Optionally, constructing a loss function based on the predicted compilation error type of the report chapter text sample and the annotation compilation error type of the report chapter text sample includes:
[0017] Construct the loss function:
[0018] in, L is the loss value; y c Sample report chapter text for c The tag value of the compilation error type, Sample report chapter text for c The probability of predicting the type of compilation error, C A set of types for compiling error types, a c For the c The weight coefficient of each compilation error type.
[0019] Optionally, the error prevention classification model to be trained is trained based on the loss function to obtain the pre-trained error prevention classification model, including: each time the network parameters of the error prevention classification model to be trained are trained based on the loss function, the feature branch network and the fully connected network corresponding to the annotation compilation error type corresponding to the report chapter text sample at that time are used as training networks, and other networks are used as non-training networks; the non-training network is kept unchanged, and the network parameters of the training network are adjusted using the loss value to complete this network parameter training.
[0020] Optionally, according to the target compilation error type to which the report chapter text belongs, error prevention reminder information is generated and output, including: according to the target compilation error type to which the report chapter text belongs, the report chapter text is matched with an error example text in a compilation error example library corresponding to the target compilation error type, to obtain a first error text in the report chapter text corresponding to the target compilation error type;
[0021] A first correction text corresponding to the first error text is generated based on a preset correction text library, and the first error text and the first correction text are output as reminder information.
[0022] Optionally, after outputting the first error text and the first correction text as reminder information, the method further includes: receiving a second correction text formed by the report compiler correcting the report chapter text according to the reminder information, and storing the first error text as an error example text in a compilation error example library corresponding to the target compilation error type, and storing the second correction text in the correction text library.
[0023] In a second aspect, the present application also provides a report compilation error prevention processing device, comprising:
[0024] The acquisition module is used to obtain the report chapter text to be reviewed;
[0025] A prediction module is used to input the report chapter text into a pre-trained error prevention classification model, and output a target compilation error type to which the report chapter text belongs; the error prevention classification model is used to output at one time whether the report chapter text belongs to the following four types of compilation errors: audit problem errors, compilation focus errors, compilation guide errors, and compilation specification errors;
[0026] The reminder module is used to generate and output error prevention reminder information according to the target compilation error type to which the report chapter text belongs.
[0027] In a third aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the report preparation error prevention processing method as described in the first aspect is implemented.
[0028] In a fourth aspect, the present application further provides a storage medium storing a computer program, and when the storage medium is executed by one or more processors, the report preparation error prevention processing method as described in the first aspect is implemented.
[0029] The report compilation error prevention processing method, device, electronic device and storage medium provided by the present application obtain the report chapter text to be reviewed; input the report chapter text into the pre-trained error prevention classification model, and output the target compilation error type to which the report chapter text belongs; the error prevention classification model can be used to output at one time whether the report chapter text belongs to the following four types of compilation errors: audit problem errors, compilation focus errors, compilation guide errors and compilation specification errors; according to the target compilation error type to which the report chapter text belongs, error prevention reminder information is generated and output. This solution can help compilers quickly familiarize themselves with and compile reports, help auditors quickly discover problems in report chapter texts, and reduce the recurrence of routine, common sense, and normative errors in reports. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0031] Figure 1 A flowchart of a report preparation error prevention method provided in an embodiment of the present application;
[0032] Figure 2 A schematic diagram of a process for training an error-proof classification model provided in an embodiment of the present application;
[0033] Figure 3 A schematic diagram of the structure of an error-proof classification model provided in an embodiment of the present application;
[0034] Figure 4 A schematic diagram of the structure of a report compilation error prevention processing device provided by an embodiment of the present invention;
[0035] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be limited in any way. The various embodiments can be combined and referenced to each other without contradiction.
[0037] The purpose of the embodiments of the present application is to identify and predict potential compilation errors in the report chapter text to be reviewed through an error-proofing classification model such as that constructed by TextCNN, based on the relatively stable management characteristics of the chapter structures and compilation contents of various types of reports, and to generate and output error-proofing reminder information based on the identified compilation error types, so as to provide targeted reminders for potential compilation errors, thereby effectively preventing the probability of compilation errors and improving the quality of report compilation.
[0038] It should be noted that the defects in the solutions in the above prior art are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present invention for the above problems below should all be the contributions made by the inventor to the present invention in the process of the present invention. Below, the report preparation error prevention processing method, system, storage medium and electronic device provided by the embodiments of the present invention are described in detail.
[0039] Embodiment 1:
[0040] This embodiment provides a report compilation error prevention method. Figure 1 A flowchart of a report preparation error prevention processing method provided in an embodiment of the present application is provided. It should be noted that the report preparation error prevention processing method provided in the embodiment of the present application is not based on Figure 1 The specific order below is not limited, and it should be understood that in other embodiments, the order of some steps in the report compilation error prevention processing method provided by the embodiment of the present invention can be interchanged according to actual needs, or some steps can be omitted or deleted. Figure 1The specific processes involved are described, such as Figure 1 As shown, the method includes:
[0041] Step S110: Obtain the report chapter text to be reviewed.
[0042] Among them, the report chapter texts to be reviewed may be chapter texts in various complex reports that are in the writing stage, such as corporate work reports, ESG reports, annual reports, audit reports, bidding documents, tender documents, project proposals, feasibility study reports, etc.
[0043] Specifically, during the report preparation process, the writer can extract the preliminarily written report chapter text as the report chapter text to be reviewed, or directly obtain the report chapter text to be reviewed from the original text source. After obtaining the original report chapter text to be reviewed, the report chapter text can be preprocessed, cleaned and normalized. For example, remove punctuation marks, special characters, numbers and other elements in the report chapter text that may interfere with keyword extraction. In addition, the text can be classified according to the content of the report chapter text, and then invalid data can be filtered out according to the text category, outliers in the report text can be removed, missing values can be processed, and the report text can be standardized and normalized into a more useful feature information text.
[0044] Step S120: Input the report chapter text into the pre-trained error prevention classification model, and output the target compilation error type to which the report chapter text belongs; the error prevention classification model is used to output at one time whether the report chapter text belongs to the following four types of compilation errors: audit problem errors, compilation focus errors, compilation guide errors and compilation specification errors.
[0045] Among them, the role of the error prevention classification model is to identify the input report chapter text and determine whether the report chapter text contains the following four types of compilation errors.
[0046] Audit problem errors refer to the more typical, common and easy-to-occur errors summarized by historical auditors during the review of historical report chapter texts, such as the logical cross-checking of data before and after the report, the time range of report data provided, the unified name of the subject described in the report, and the consistency of expression logic and content.
[0047] Compilation focus errors refer to errors that are easy to occur when compiling report chapter texts under specific field categories or specific chapter titles and that require the auditor's special attention. For example, all modifications and annotations made by auditors during the compilation process should be recorded to form a collection of focus errors.
[0048] Preparation guideline errors refer to errors that do not comply with the preparation guidelines (such as an instruction manual) when the report chapter text being prepared has a supporting preparation guide (such as an instruction manual), such as an incomplete overview or content that is inconsistent with the requirements of the guidelines.
[0049] Compilation specification errors refer to errors that do not comply with compilation specifications (such as specification requirements) when the compiled report chapter text has supporting compilation specifications (such as specification requirements), such as title level fonts, text format, and common word proofreading.
[0050] It is important to understand that the difference between compilation focus errors and compilation guide errors lies in that compilation focus errors are mostly errors caused by the addition of new content by the upper-level review and approval personnel, which highlights the defects in the original report chapter text; compilation guide errors refer to errors caused by the fact that the content clearly required to be filled in the report guidance instructions is not reflected in the report chapter text, which highlights the defects in the original report chapter text.
[0051] Different from conventional classification models, the error-proofing classification model in this embodiment can output at least one of the four types of compilation errors that are potentially present in the input report chapter text at one time (there is no one-to-one relationship between the types of compilation errors). In other words, when a certain type of compilation error is identified in the report chapter text, this type of compilation error can be used as a target compilation error type to which the report chapter text belongs, and the error-proofing classification model can output multiple types of compilation errors that are potentially present in the report chapter text at one time.
[0052] The error-proof classification model in this embodiment can be obtained by training a text classification model (TextCNN) based on a convolutional neural network. In this embodiment, the network structure and training process of the adopted text classification model (TextCNN) are not limited.
[0053] Step S130: Generate and output error prevention reminder information according to the target compilation error type to which the report chapter text belongs.
[0054] Specifically, after the report chapter text is input into the error prevention classification model, at least one target compilation error type that the report chapter text potentially has can be output at one time. In order to better help the writer complete the report, the corresponding error prevention reminder information can be generated for the target compilation errors that the current report chapter text potentially has, so as to remind the writer of the compilation errors that have occurred, thereby achieving the purpose of reminding error prevention.
[0055] The report compilation error prevention processing method provided by this application obtains the report chapter text to be reviewed; inputs the report chapter text into the pre-trained error prevention classification model, and outputs the target compilation error type to which the report chapter text belongs; the error prevention classification model can be used to output at one time whether the report chapter text belongs to the following four types of compilation errors: audit problem errors, compilation focus errors, compilation guide errors, and compilation specification errors; according to the target compilation error type to which the report chapter text belongs, error prevention reminder information is generated and output. This solution can help compilers quickly familiarize themselves with and compile reports, help auditors quickly discover problems in report chapter texts, and reduce the recurrence of routine, common sense, and normative errors in reports.
[0056] Embodiment 2
[0057] In some embodiments, Figure 2 As shown, the process of training an error-proof classification model may include the following steps.
[0058] Step 210: Obtain a report chapter text sample with annotated compilation error types, wherein the same report chapter text sample is allowed to be simultaneously annotated with at least one of the following compilation error types: audit question errors, compilation focus errors, compilation guide errors, and compilation specification errors.
[0059] Specifically, in the process of report preparation and report review, the compilation error information appearing in the report chapter text is marked, such as the review revision information, the key information that needs to be paid attention to in the compilation process, and the relevant information of the compilation guidelines and compilation specifications that do not conform to the supporting settings, and these information are stored in the compilation error example library according to the compilation error type to which they belong. At the same time, the marked compilation error information is set for the report chapter text according to the compilation error type to which it corresponds. The label value of each compilation error type. For example, a positive and negative label value is set for each compilation error type. When the report chapter text belongs to a certain compilation error type, the label value corresponding to the compilation error type is a positive label value (the label value is 1), and when the report chapter text does not belong to a certain compilation error type, the label value corresponding to the compilation error type is a negative label value (the label value is 0). In this way, a report chapter text can be marked with multiple compilation error types at the same time. In this embodiment, the compilation error type marked by default has a positive label value in the compilation error type, and the compilation error type that is not marked has a negative label value in the compilation error type.
[0060] After obtaining the original report chapter text, the obtained text data can be preprocessed, cleaned and normalized to obtain the report chapter text sample. For example, punctuation marks, special characters, numbers and other elements that may interfere with keyword extraction in the original report chapter text can be removed. Invalid data in the text can be filtered out according to the classification of the text content, outliers can be removed, missing values can be processed, and the text data can be standardized and normalized into more useful feature information.
[0061] Step 220: construct an error-proofing classification model to be trained, the error-proofing classification model includes a word embedding layer, a feature extraction layer and a fully connected layer.
[0062] Specifically, this embodiment is to build an error-proof classification model to be trained based on a text classification model of a convolutional neural network (TextCNN). The error-proof classification model mainly includes a word embedding layer, a feature extraction layer, and a fully connected layer.
[0063] Word Embedding: It is used to map words into vectors in a high-dimensional space. These vectors can capture the semantic information of words.
[0064] The feature extraction layer is mainly composed of a convolutional layer and a pooling layer.
[0065] The convolution layer is used to capture local features of different lengths by sliding convolution kernels of different sizes over the text. Each convolution kernel corresponds to a feature map that can capture n-gram features of different sizes.
[0066] Pooling layer: usually used to reduce the dimension of the feature map and extract the most important features using max pooling.
[0067] Fully Connected Layer: Connects the outputs of the convolutional layer and the pooling layer to form the final classification result.
[0068] In addition, the error-proof classification model also involves nonlinear activation functions: nonlinear activation functions such as ReLU are used in convolutional layers and fully connected layers to increase the expressive power of the model.
[0069] Optimizer and loss function: The cross entropy loss function and some optimization algorithms (such as SGD, Adam, etc.) are usually used to train the model.
[0070] Step 230: Input the report chapter text sample into the word embedding layer to obtain a text vector, input the text vector into the feature extraction layer for feature extraction to obtain text features, and input the text features into the fully connected layer to obtain the compilation error type to which the report chapter text sample belongs.
[0071] Specifically, the word embedding layer is used to convert the input text (report chapter text sample) into a text vector. For example, if the input text is (X), after word embedding transformation, we get (E):
[0072] [ E = Embedding(X) ];
[0073] The text vector is then fed into the feature extraction layer to process the embedded text vector ( E ) through multiple convolution and pooling operations (ConvPool) to obtain a high-level feature representation ( F ):
[0074] [ F = ConvPool(E) ];
[0075] Finally, the fully connected layer (FC) is used to classify and obtain the output (Y), which is used to indicate whether the text belongs to the above four types of compilation errors:
[0076] [ Y = FC(F) ].
[0077] In some embodiments, Figure 3 As shown, the feature extraction layer may include an audit problem branch network, a compilation concern branch network, a compilation guide branch network, and a compilation specification branch network; at the same time, the fully connected layer may also include four independent fully connected networks. Among them, the audit problem branch network, the compilation concern branch network, the compilation guide branch network, and the compilation specification branch network are used to extract the audit error features, compilation concern error features, compilation guide error features, and compilation specification error features in the text vector respectively. The four independent fully connected networks can perform binary classification for each type of error feature, and obtain the prediction result of whether the text vector belongs to the compilation error type.
[0078] On this basis, the step of inputting the text vector into the feature extraction layer for feature extraction to obtain text features may include:
[0079] Step a: Input the text vector into the audit question branch network and the compilation concern branch network respectively to obtain the audit question error features and the compilation concern error features respectively.
[0080] Specifically, Figure 3As shown, in this embodiment, the above four branch networks for extracting error features do not process the text vector in parallel, but first input the text vector into the audit problem branch network and the compilation concern branch network respectively, so as to obtain the audit problem error features and the compilation concern error features. The reason for this treatment is that considering that these two types of error features are relatively conventional and basic error types commonly found in various field reports, it is possible to preferentially extract the error features of these two error types in the text vector, and the extracted features can be used to directly perform binary classification judgments on the corresponding compilation error types, or can be used as basic features for extracting other specific types of error features, thereby ensuring that the specific error features extracted later also cover the conventional error features, making the feature extraction results more inclusive.
[0081] Step b: After fusing the error features of audit issues and the error features of compilation focus points, they are input into the compilation guide branch network and the compilation specification branch network respectively to obtain the compilation guide error features and the compilation specification error features respectively.
[0082] Specifically, after obtaining the audit problem error features and the compilation concern point error features through the audit problem branch network and the compilation concern point branch network respectively, the two features can be fused. The fusion method can be the element-by-item fusion of the feature vector, or the element-by-element splicing of the error features of the two error types. In short, the fusion method of the two error features is not limited in this embodiment. After obtaining the fused features, the fused features can be further input into the compilation guide branch network and the compilation specification branch network respectively to obtain the compilation guide error features and the compilation specification error features respectively. The reason for this treatment is to take into account that the compilation guide error features and the compilation specification error features are specific error features that the report chapter text may have in its specific field. Extracting these two specific error features on the basis of conventional error features can better reflect the special expression of errors in the report chapter text in a specific field. The parallel feature extraction between different types of specific error features can better highlight the integrity of each specific error feature.
[0083] Correspondingly, the step of inputting the text features into the fully connected layer to obtain the compilation error type to which the report chapter text sample belongs may include the following steps:
[0084] Step c: Input the audit question error features, compilation focus error features, compilation guide error features and compilation specification error features into a fully connected network respectively to predict whether the report chapter text sample belongs to the four types of compilation errors.
[0085] Specifically, Figure 3As shown, considering the relative independence of the judgment results corresponding to each compilation error type when the error features of each error type are judged whether there is a compilation error of the corresponding error type, the fully connected layer can be set to four independent fully connected networks, and then the audit problem error features, compilation focus error features, compilation guide error features and compilation specification error features extracted by the above feature extraction networks are respectively input into a fully connected network, and these fully connected networks use a two-class classification method to respectively predict whether the error features of the corresponding error types have the current type of compilation error. If so, it is predicted that the above report chapter text sample belongs to the current type of compilation error, otherwise it does not belong to the current type of compilation error. Through four independent fully connected networks, it can be predicted whether the current report chapter text sample belongs to these four types of compilation errors. Therefore, the final prediction result can be that the current report chapter text sample belongs to at least one of the four types of compilation errors, or it is possible that none of these four types of errors belong to them.
[0086] Step 240: Based on the compilation error type to which the report chapter text sample belongs and the annotated compilation error type of the report chapter text sample, a loss function is constructed, and the error prevention classification model to be trained is trained based on the loss function to obtain a pre-trained error prevention classification model.
[0087] Among them, based on the loss between the predicted compilation error type and the pre-labeled compilation error type, the cross entropy loss function and some optimization algorithms (such as SGD, Adam, etc.) can be used as the loss function for training the error-proof classification model.
[0088] In some embodiments, constructing a loss function based on the predicted compilation error type of the report section text sample and the annotation compilation error type of the report section text sample may include:
[0089] Construct the loss function:
[0090] in, L is the loss value; y c Sample report chapter text for c The tag value of the compilation error type, Sample report chapter text for c The probability of predicting the type of compilation error, C A set of types for compiling error types, a c For the c The weight coefficient of each compilation error type.
[0091] This embodiment constructs a loss function that can collaboratively consider the local losses of the branch network corresponding to the feature extraction of various types of error features to ensure the optimization of the overall model performance; during the model training process, the model loss value is calculated by inputting the preprocessed sample data into the model, and the model parameters are continuously adjusted based on the loss value to minimize the loss function, and finally a pre-trained error-proof classification model is obtained. After the model training is initially completed, the performance of the model can also be evaluated using the test set data, focusing on key indicators such as accuracy, recall rate and F1 value, so as to continuously optimize the error-proof classification model. The optimization process includes adjusting model hyperparameters, such as the number and size of convolution kernels and the learning rate. At the same time, data enhancement, regularization technology and other means can also be introduced to prevent the trained model from overfitting, and further enhance the error-proof reminder effect of the model in the text compilation process.
[0092] In some embodiments, considering that the error-proofing classification model has the above-mentioned four types of error feature extraction branch networks, in order to enhance the ability of each branch network to extract specific error features, during the model training process, the error-proofing classification model to be trained is trained based on the loss function to obtain the pre-trained error-proofing classification model, which may include:
[0093] Step d: Each time the network parameters of the error prevention classification model to be trained are trained based on the loss function, the feature branch network and the fully connected network corresponding to the annotation compilation error type corresponding to the text sample of the current report chapter are used as training networks, and other networks are used as non-training networks.
[0094] Specifically, when the network parameters of the error-proof classification model to be trained are adjusted based on the loss function, the network parameters of all networks are not adjusted synchronously. Instead, the type of annotation compilation error corresponding to the report chapter text sample corresponding to the current calculated loss value is first determined, and then the feature branch network and the fully connected network corresponding to the annotation compilation error type are used as training networks, and other networks are used as non-training networks. For example, when the annotation compilation error type corresponding to the report chapter text sample corresponding to the current calculated loss value is an audit problem error type, the audit problem branch network corresponding to the error feature of the audit problem error type and the fully connected network connected to the audit problem branch network can be extracted as training networks, and other networks in the model are used as non-training networks.
[0095] Step e: Keep the non-training network unchanged and use the loss value to adjust the network parameters of the training network to complete this network parameter training.
[0096] Specifically, after determining the training network and non-training network corresponding to the current training, the non-training network can be kept unchanged (network parameters remain unchanged), and the network parameters of the training network can be adjusted using the loss value, thereby completing this network parameter training.
[0097] It should be noted that, although the network parameters of the non-training network were not adjusted at that time, the loss value used to adjust the specific training network was also based on the error characteristics of other error types output by the non-training network and other training networks. This also indirectly makes the various network models both interrelated and divided into primary and secondary ones, making the prediction results of the error-proof classification model obtained by the final training more convincing.
[0098] Embodiment 3
[0099] In some embodiments, generating and outputting error prevention reminder information according to the target compilation error type to which the report chapter text belongs may specifically include the following steps.
[0100] Step f: According to the target compilation error type to which the report chapter text belongs, match the report chapter text with the error example text in the compilation error example library corresponding to the target compilation error type to obtain the first error text in the report chapter text corresponding to the target compilation error type.
[0101] Specifically, in order to achieve a better error prevention reminder effect, the compilation error sample texts corresponding to various compilation error types can be collected in advance, and then stored in the compilation error sample library according to the compilation error type, so as to be displayed as a reminder with error examples. In this way, after the target compilation error type to which the current report chapter text to be reviewed belongs is identified through the error prevention classification model, the compilation error sample texts corresponding to the target compilation error type can be extracted from the compilation error sample library, and then the current report chapter text to be reviewed is compared with these compilation error sample texts at a relative speed, so as to determine the first error text containing the compilation error part in the report chapter text.
[0102] Step g: Generate a first correction text corresponding to the first error text based on a preset correction text library, and output the first error text and the first correction text as reminder information.
[0103] Specifically, in order to achieve a better error correction reminder effect, after obtaining the first error text containing the compilation error part in the report chapter text through the previous step, you can further search for a correction text for correcting the error part in the first error text in the preset correction text library. These correction texts can guide the writer to correct the errors in the first error text. Of course, after extracting the correction text from the correction text library, you can further make adaptive adjustments to the correction text according to the specific error content in the first error text, so as to obtain a first correction text for correction guidance for the first error text.
[0104] Finally, the first error text and the first correction text are output synchronously as reminders, so that the report writer can quickly and intuitively understand the type of compilation error corresponding to the report chapter text currently being reviewed, and further compare the first error text and the first correction text to quickly lock in similar compilation error content in the report chapter text, so as to make timely modifications.
[0105] Furthermore, after outputting the first error text and the first correction text as reminder information, the method may further include the following steps.
[0106] Step h: Receive the second corrected text formed after the report compiler corrects the report chapter text according to the reminder information, and store the first error text as an error example text in the compilation error example library corresponding to the target compilation error type, and store the second corrected text in the correction text library.
[0107] Specifically, the report compiler compares the first error text and the first correction text in the output reminder, extracts the position of the first error text corresponding to the target compilation error type from the text of the report chapter that has just been reviewed, and makes corrections based on the first correction text to obtain the second correction text. The second correction text is then uploaded to the report compilation error prevention processing device, and the first error text can be stored as an error example text in the compilation error example library corresponding to the target compilation error type through the processing device to enrich the compilation error example samples in the library, and the second correction text is stored in the correction text library to enrich the correction text in the library.
[0108] Embodiment 4
[0109] This embodiment provides a report compilation error prevention processing device, which can be used to execute the steps in the above method embodiment, such as Figure 4 As shown, the report preparation error prevention processing device includes: an acquisition module 310, a prediction module 320 and a reminder module 330.
[0110] An acquisition module 310 is used to acquire the text of the report section to be reviewed;
[0111] The prediction module 320 is used to input the report chapter text into the pre-trained error prevention classification model, and output the target compilation error type to which the report chapter text belongs; the error prevention classification model is used to output at one time whether the report chapter text belongs to the following four types of compilation errors: audit problem errors, compilation focus errors, compilation guide errors, and compilation specification errors;
[0112] The reminder module 330 is used to generate and output error prevention reminder information according to the target compilation error type to which the report chapter text belongs.
[0113] In one embodiment, the report compilation error prevention processing device further includes a model training module, which specifically includes:
[0114] An acquisition unit is used to acquire a report chapter text sample that has been marked with a compilation error type, wherein the same report chapter text sample is allowed to be marked with at least one of the following compilation error types: audit question errors, compilation focus errors, compilation guide errors, and compilation specification errors;
[0115] A construction unit, used to construct an error-proofing classification model to be trained, wherein the error-proofing classification model includes a word embedding layer, a feature extraction layer, and a fully connected layer;
[0116] A prediction unit, used for inputting the report chapter text sample into the word embedding layer to obtain a text vector, inputting the text vector into the feature extraction layer to extract features to obtain text features, and inputting the text features into the fully connected layer to obtain the compilation error type to which the report chapter text sample belongs;
[0117] The training unit is used to construct a loss function based on the predicted compilation error type of the report chapter text sample and the annotated compilation error type of the report chapter text sample, and train the error prevention classification model to be trained based on the loss function to obtain the pre-trained error prevention classification model.
[0118] In one embodiment, the feature extraction layer includes an audit question branch network, a compilation focus branch network, a compilation guide branch network, and a compilation specification branch network; the fully connected layer includes four independent fully connected networks;
[0119] The prediction unit is used to:
[0120] Inputting the text vector into the audit question branch network and the compilation concern point branch network respectively, so as to obtain audit question error features and compilation concern point error features respectively;
[0121] The audit question error features and the compilation focus error features are merged and inputted into the compilation guide branch network and the compilation specification branch network respectively, so as to obtain the compilation guide error features and the compilation specification error features respectively;
[0122] The audit question error features, the compilation focus error features, the compilation guide error features and the compilation specification error features are respectively input into the fully connected network to respectively predict whether the report chapter text sample belongs to the four types of compilation errors.
[0123] In one embodiment, the training unit is used to:
[0124] Construct the loss function:
[0125] in, L is the loss value; y c Sample report chapter text for c The tag value of the compilation error type, Sample report chapter text for c The probability of predicting the type of compilation error, C A set of types for compiling error types, a c For the c The weight coefficient of each compilation error type.
[0126] In one embodiment, the training unit is used to:
[0127] Each time when the network parameters of the error prevention classification model to be trained are trained based on the loss function, the feature branch network and the fully connected network corresponding to the annotation compilation error type corresponding to the report chapter text sample at that time are used as training networks, and other networks are used as non-training networks;
[0128] The non-training network is kept unchanged, and the network parameters of the training network are adjusted using the loss value to complete the current network parameter training.
[0129] In one implementation, the reminder module 330 is used to:
[0130] According to the target compilation error type to which the report chapter text belongs, the report chapter text is matched with the error example text in the compilation error example library corresponding to the target compilation error type to obtain the first error text in the report chapter text corresponding to the target compilation error type;
[0131] A first correction text corresponding to the first error text is generated based on a preset correction text library, and the first error text and the first correction text are output as reminder information.
[0132] In one embodiment, the report preparation error prevention processing device also includes: an adding module, which is used to receive a second corrected text formed by the report preparer correcting the report chapter text according to the reminder information after the reminder module 330 inputs the first error text and the first correction text as reminder information, and stores the first error text as an error example text in a preparation error example library corresponding to the target preparation error type, and stores the second correction text in the correction text library.
[0133] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0134] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the above-mentioned module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0135] Embodiment five:
[0136] Another embodiment of the present application relates to an electronic device, such as Figure 5 As shown, it includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the above method steps.
[0137] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0138] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0139] The processor may include, but is not limited to, one or more processors or microprocessors, etc. Each processor may be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components to execute the methods in the above embodiments.
[0140] Embodiment 6
[0141] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method steps when executed by a processor.
[0142] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.
[0143] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A report preparation error prevention method, characterized in that: include: Get the text of the report chapter to be reviewed; The report chapter text is input into a pre-trained error prevention classification model, and the target compilation error type to which the report chapter text belongs is output; the error prevention classification model is used to output at one time whether the report chapter text belongs to the following four types of compilation errors: audit problem errors, compilation focus errors, compilation guide errors, and compilation specification errors; Generate and output error prevention reminder information according to the target compilation error type to which the report chapter text belongs; The process of training the error-proofing classification model comprises: Obtain a report chapter text sample with annotated compilation error types, wherein the same report chapter text sample is allowed to be annotated with at least one of the following compilation error types: audit question errors, compilation focus errors, compilation guide errors, and compilation specification errors; Constructing an error-proofing classification model to be trained, wherein the error-proofing classification model includes a word embedding layer, a feature extraction layer, and a fully connected layer; Input the report chapter text sample into the word embedding layer to obtain a text vector, input the text vector into the feature extraction layer to extract features to obtain text features, and input the text features into the fully connected layer to obtain the compilation error type to which the report chapter text sample belongs; Based on the predicted compilation error type of the report chapter text sample and the annotation compilation error type of the report chapter text sample, a loss function is constructed, and the error prevention classification model to be trained is trained based on the loss function to obtain the pre-trained error prevention classification model; The feature extraction layer includes an audit question branch network, a compilation focus branch network, a compilation guide branch network, and a compilation specification branch network; the fully connected layer includes four independent fully connected networks; Inputting the text vector into the feature extraction layer to extract features to obtain text features includes: Inputting the text vector into the audit question branch network and the compilation concern point branch network respectively, so as to obtain audit question error features and compilation concern point error features respectively; The audit question error features and the compilation focus error features are merged and inputted into the compilation guide branch network and the compilation specification branch network respectively, so as to obtain the compilation guide error features and the compilation specification error features respectively; Inputting text features into the fully connected layer to obtain the compilation error type to which the report chapter text sample belongs, including: The audit question error features, the compilation focus error features, the compilation guide error features and the compilation specification error features are respectively input into the fully connected network to respectively predict whether the report chapter text sample belongs to the four types of compilation errors.
2. The report preparation error prevention method according to claim 1, characterized in that: The loss function is constructed based on the predicted compilation error type of the report chapter text sample and the annotation compilation error type of the report chapter text sample, including: Construct the loss function: in, L is the loss value; y c Sample report chapter text for c The tag value of the compilation error type, Sample report chapter text for c The probability of predicting the type of compilation error, C A set of types for compiling error types, a c For the c The weight coefficient of each compilation error type.
3. The report preparation error prevention method according to claim 2, characterized in that: The step of training the error-prevention classification model to be trained based on the loss function to obtain the pre-trained error-prevention classification model includes: Each time when the network parameters of the error prevention classification model to be trained are trained based on the loss function, the feature branch network and the fully connected network corresponding to the annotation compilation error type corresponding to the report chapter text sample at that time are used as training networks, and other networks are used as non-training networks; The non-training network is kept unchanged, and the network parameters of the training network are adjusted using the loss value to complete the current network parameter training.
4. The report preparation error prevention method according to claim 1, characterized in that: Generate and output error prevention reminder information according to the target compilation error type to which the report chapter text belongs, including: According to the target compilation error type to which the report chapter text belongs, the report chapter text is matched with the error example text in the compilation error example library corresponding to the target compilation error type to obtain the first error text in the report chapter text corresponding to the target compilation error type; A first correction text corresponding to the first error text is generated based on a preset correction text library, and the first error text and the first correction text are output as reminder information.
5. The report preparation error prevention method according to claim 4, characterized in that: After outputting the first error text and the first correction text as reminder information, the method further includes: Receive a second corrected text formed after the report compiler corrects the report chapter text according to the reminder information, and store the first error text as an error example text in the compilation error example library corresponding to the target compilation error type, and store the second corrected text in the correction text library.
6. A report compilation error prevention processing device, characterized in that: include: The acquisition module is used to obtain the report chapter text to be reviewed; A prediction module is used to input the report chapter text into a pre-trained error prevention classification model, and output a target compilation error type to which the report chapter text belongs; the error prevention classification model is used to output at one time whether the report chapter text belongs to the following four types of compilation errors: audit problem errors, compilation focus errors, compilation guide errors, and compilation specification errors; A reminder module, used for generating and outputting error prevention reminder information according to the target compilation error type to which the report chapter text belongs; Model training module, including: An acquisition unit is used to acquire a report chapter text sample that has been marked with a compilation error type, wherein the same report chapter text sample is allowed to be marked with at least one of the following compilation error types: audit question errors, compilation focus errors, compilation guide errors, and compilation specification errors; A construction unit, used to construct an error-proofing classification model to be trained, wherein the error-proofing classification model includes a word embedding layer, a feature extraction layer, and a fully connected layer; A prediction unit, used for inputting the report chapter text sample into the word embedding layer to obtain a text vector, inputting the text vector into the feature extraction layer to extract features to obtain text features, and inputting the text features into the fully connected layer to obtain the compilation error type to which the report chapter text sample belongs; A training unit, configured to construct a loss function based on the predicted compilation error type of the report chapter text sample and the annotation compilation error type of the report chapter text sample, and train the error prevention classification model to be trained based on the loss function to obtain the pre-trained error prevention classification model; The feature extraction layer includes an audit question branch network, a compilation focus branch network, a compilation guide branch network, and a compilation specification branch network; the fully connected layer includes four independent fully connected networks; The prediction unit is used to: Inputting the text vector into the audit question branch network and the compilation concern point branch network respectively, so as to obtain audit question error features and compilation concern point error features respectively; The audit question error features and the compilation focus error features are merged and inputted into the compilation guide branch network and the compilation specification branch network respectively, so as to obtain the compilation guide error features and the compilation specification error features respectively; The audit question error features, the compilation focus error features, the compilation guide error features and the compilation specification error features are respectively input into the fully connected network to respectively predict whether the report chapter text sample belongs to the four types of compilation errors.
7. A storage medium, characterized in that: The storage medium stores a computer program, and when the storage medium is executed by one or more processors, the report preparation error prevention processing method as described in any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: It comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the report preparation error prevention processing method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Dangerous and large project special construction scheme intelligent examination system and implementation method
CN114781997A