A method to improve text formatting accuracy
By constructing a feature column matrix and a feedback matrix to automatically identify and modify text format differences, the problem of excessive workload for staff in text format verification is solved, achieving fast and accurate text format standardization and improving work efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID JIANGSU ELECTRIC POWER CO LIANYUNGANG POWER SUPPLY CO
- Filing Date
- 2022-12-14
- Publication Date
- 2026-06-30
Smart Images

Figure CN116167334B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a technology for standardizing large volumes of text to be received, specifically a method for improving the text format standardization rate. Background Technology
[0002] Currently, whether in various work meetings or in various journals, it is necessary to collect text materials from different departments and contributors. Proofreading the format of massive amounts of text materials requires a significant amount of time and effort from organizers and editors. Traditional standardization methods focus on comparing key fields and other textual content, which is not suitable for text formatting and cannot provide differentiated suggestions based on the specific text materials. Summary of the Invention
[0003] The purpose of this invention is to provide a method for improving the standardization rate of text formatting, which can quickly identify the differences between the received text and the standard text in terms of formatting, automatically provide differentiated modification suggestions, reduce the workload of staff, and improve the standardization of the received text formatting.
[0004] The technical solution to achieve the purpose of this invention is as follows:
[0005] A method for improving text formatting accuracy includes the following steps:
[0006] S1. Based on the relevant requirements of the standard text format, extract the feature values of the standard text, and perform value assignment and quantization to obtain the target feature column matrix A(0);
[0007] S2. For the text to be received, extract the feature items that correspond to the format requirements of the standard text in step S1, and use the same assignment and quantization rules as the standard text in step S1 to obtain the feature column matrix A(i) of the text to be received, where i represents the current comparison number of the text to be received, the initial value is equal to 1, and the value of i is increased by 1 for each comparison of the text to be received.
[0008] S3. Subtract the target feature column matrix A(i) from the text feature column matrix A(0) to obtain the text feature difference column matrix detaA(i);
[0009] S4. Determine the feature difference matrix detaA(i) of the text to be received. If the feature difference matrix detaA(i) is equal to zero, the text to be received conforms to the standard, no modification is needed, and the text is selected for reception. The method ends. If detaA(i) is not equal to zero, the text does not conform to the standard, and proceed to S5.
[0010] S5. Determine the feedback matrix KI(i) and calculate its modulus. The feedback matrix KI(i) is the result of considering the importance of the feature terms, the modification status each time, and the number of comparisons. Determine whether to accept the text based on the modulus. If the text is rejected, the method ends. Otherwise, modify the text to be received based on the non-zero terms of detaA(i). For the modified text to be received, i+1, repeat steps S2-S5 until the text to be received conforms to the specifications.
[0011] Furthermore, determining the feedback matrix KI(i) specifically includes:
[0012] S5-1. Multiply the difference coefficient matrix KP by the feature difference column matrix detaA(i) of the text to be received to obtain the basic feedback matrix K(i) and the difference coefficient matrix. Among them, KP j Values are assigned based on the importance of the feature terms in the text to be received, and
[0013] S5-2. The genetic column matrix H(i-1) is obtained by adding the feature difference column matrix detaA(i) to the text to be received, where H(0) is the zero matrix.
[0014] S5-3. Multiply the genetic coefficient matrix KI by the genetic column matrix H(i) to obtain the feedback genetic matrix I(i), and the genetic coefficient matrix... Among them, KI j Values are assigned based on the historical response speed of the feature items of the text to be received.
[0015] S5-4. The feedback matrix KI(i) is obtained by adding the feedback basic matrix K(i) to the feedback genetic matrix I(i).
[0016] Calculate the modulus of the feedback matrix KI(i). Different levels of feedback can be given according to the magnitude of the modulus. Taking three levels of feedback as an example for further explanation, when the modulus of KI(i) is less than or equal to one-third of the modulus of the target feature column matrix A(0), a "general concern" feedback is given. When the modulus of KI(i) is greater than one-third of the modulus of the target feature column matrix A(0) but less than or equal to two-thirds, a "significant concern" feedback is given. When the modulus of KI(i) is greater than two-thirds of the modulus of the target feature column matrix A(0), a "major concern" feedback is given (if the feedback is major concern, it is necessary to determine whether to accept the text). And based on the non-zero terms of detaA(i), the text to be received is prompted to modify. For the modified text to be received, repeat steps S2 to S9 until the text to be received meets the specifications.
[0017] Based on feedback and the modulus of the feedback matrix KI(i), it can be determined whether to accept text based on the modulus, including two methods:
[0018] (1) Compare the modulus with the set threshold. If it is greater than the set threshold, the text will be rejected directly.
[0019] (2) Feedback is given based on the modulus value, and the acceptance of the text is determined manually based on the feedback: Taking three levels of feedback as an example for further explanation, when the modulus value of KI(i) is less than or equal to one-third of the modulus value of the target feature column matrix A(0), the feedback is given as "general concern". When the modulus value of KI(i) is greater than one-third of the modulus value of the target feature column matrix A(0) and less than or equal to two-thirds of it, the feedback is given as "significant concern". When the modulus value of KI(i) is greater than two-thirds of the modulus value of the target feature column matrix A(0), the feedback is given as "major concern". If the feedback is major concern, it is necessary to determine whether to accept the text.
[0020] The method for improving the standardization rate of text format is not limited to the field of text material format standardization, but can be extended to various fields related to improving standardization.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] 1) This invention can quickly identify non-compliant parts of the received file, effectively solving the problem of staff having to perform a large amount of tedious format checking when receiving multiple texts, thus improving work efficiency;
[0023] 2) This invention can automatically provide differentiated modification suggestions based on the feedback matrix. The modification suggestions are the result of multiple indicators, including the importance of feature items, the situation of each comparison, and the number of comparisons. The feedback matrix can be used to determine whether to accept the text. Based on repeated iterations, the results are more accurate.
[0024] 3) This invention can be fully automated and does not require human intervention. Attached Figure Description
[0025] Figure 1 This is a schematic diagram illustrating the implementation process of the present invention to improve the text format standardization rate. Detailed Implementation
[0026] The technical solution of the present invention will be further described below with reference to specific embodiments and accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0027] like Figure 1 As shown, a method for improving text formatting accuracy includes the following steps:
[0028] S1. Based on the relevant requirements of standardized text format, such as line spacing of the main text, heading font, body text font, and font size, this example only uses three features for illustration to better understand the case. Taking a standardized text with 28.5-point line spacing, a size 4 body text font, and a size 2 first-level heading font as an example, we extract the feature values of the standardized text, assign and quantify them, and construct a target feature column matrix.
[0029] S2. For the text to be received, extract the feature items corresponding to the requirements of the standard text format. The line spacing of the text to be received is 28 points, the body text font is size 4, and the first-level heading font is size 3. Assign values and quantify the feature items of the text to be received to construct the feature column matrix of the text to be received.
[0030] S3. Subtract the target feature column matrix A(1) from the target feature column matrix A(0) to obtain the feature difference column matrix of the target text.
[0031] S4. Judge the feature difference column matrix detaA(1) of the received text. If detaA(1) is not equal to the zero matrix, the text does not conform to the standard, and proceed to S5.
[0032] S5. Assign values to the difference coefficient matrix KP. For simplicity and clarity in understanding the example, and to facilitate calculation, assume that all feature terms have equal importance. We can then obtain... Multiplying by the feature difference column matrix detaA(1) of the text to be received yields the basic feedback matrix.
[0033] S6. The genetic column matrix is obtained by adding the genetic column matrix H(0) to the feature difference column matrix detaA(1) of the text to be received.
[0034] S7. Assign values to the genetic coefficient matrix KI. For simplicity and clarity in understanding the example, and to facilitate calculation, based on the historical response speeds of the feature terms of the text to be received, assume a speed ratio of 1:2:2, and obtain... Multiplying by the genetic column matrix H(1) yields the feedback genetic matrix.
[0035] S8. The feedback matrix is obtained by adding the feedback genetic matrix I(1) to the feedback basis matrix K(1).
[0036] S9. Calculate the modulus of the feedback matrix KI(1) equal to... If the condition is met that the value is greater than one-third and less than or equal to two-thirds of the modulus of the target feature column matrix A(0), a feedback opinion of "greater concern" is given, and based on the non-zero terms of detaA(1), a modification prompt of "line spacing 28.5 pt" and "first-level heading font size 3" is given to the text to be received.
[0037] S10. Taking the example of modifying the incomplete line spacing of the text to be received to "28.5 points" and the completed font size of the first-level heading to "size 3", we will proceed to step S2 to obtain the feature column matrix of the text to be received. Perform step S3 to obtain the feature difference column matrix of the text to be received. Perform step S4, detaA(2) becomes a non-zero matrix; perform step S5, and obtain the basic feedback matrix. Proceed to step S6 to obtain the genetic column matrix. Proceed to step S7 to obtain the feedback genetic matrix. Proceed to step S8 to obtain the feedback matrix. As the number of modifications increases, the magnitude of the feedback matrix KI will gradually increase;
[0038] S11, the modulus of the feedback matrix KI(2) is equal to If the condition is met that the modulus of the target feature column matrix A(0) is greater than two-thirds, a "major concern" feedback is given, and based on the non-zero terms of detaA(2), a "line spacing of 28.5 points" modification prompt is given to the text to be received. At this time, the decision on whether to accept the text can be made based on the prompt. If the modulus of the feedback matrix KI(2) is greater than the set threshold, the text can be rejected.
[0039] S12. Taking the modification of the line spacing of the text to be received to 28.5 points as an example, we will further explain by proceeding with step S2 to obtain the feature column matrix of the text to be received. Perform step S3 to obtain the feature difference column matrix of the text to be received. Proceed to step S4, where detaA(3) is a zero matrix, indicating that the text to be received conforms to the specifications.
[0040] It should be noted that any comparison of text format features falls within the scope of this patent; the difference coefficient KP of matrix KP. j Heredity coefficient KI of matrix KI j All can be manually adjusted according to the importance of the features in the standard text; the difference coefficient KP of matrix KP j Heredity coefficient KI of matrix KI j Both can be manually adjusted based on the importance of the features in the standard text; the process can be terminated manually based on the feature difference matrix or the modulus of the feedback matrix.
[0041] This invention effectively solves the problem of staff having to perform a large amount of tedious format checking when receiving multiple texts, improves work efficiency, and can automatically provide different levels of feedback based on the current text to be received and previous modifications, ensuring that the final received files all meet the specifications. It has good application prospects in the field of text collection.
[0042] The above examples are merely illustrative examples of the present invention. The selection of feature terms, assignment of matrix KP coefficients, assignment of matrix KI coefficients, etc., are all for the convenience of calculation to illustrate the present invention and are not intended to limit the present invention. Any modifications, substitutions, improvements, etc., made within the scope of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for improving the accuracy of text formatting, characterized in that, Includes the following steps: S1. Based on the standardized text format requirements, extract the feature values of the standardized text, and perform value assignment and quantization to obtain the target feature column matrix. ; S2. Extract the feature terms corresponding to the text to be received and the text format requirements specified in step S1, and perform assignment and quantization as in step S1 to obtain the feature column matrix of the text to be received. ,in, This indicates the current comparison count of the text to be received. The initial value is 1. Each time the text to be received is compared, Add 1 to the value; S3. Target Feature Column Matrix Subtract the feature column matrix of the text to be received The feature difference column matrix of the text to be received is obtained. ; S4. Feature difference column matrix of the text to be received Make a judgment if the feature difference column matrix of the text to be received is... If the matrix equals zero, the text to be received conforms to the specifications, no modification is needed, and the text is received; the method ends here. If the matrix is not equal to zero, the text does not conform to the specification, and S5 is performed; S5. Determine the feedback matrix and calculate its magnitude. Based on the magnitude, determine whether text needs to be received. If text is rejected, the method ends; otherwise, provide modification suggestions. For the modified text to be received... i +1, and repeat steps S2-S5; The determination of the feedback matrix specifically includes: S5-1. Multiply the set difference coefficient matrix KP by the feature difference matrix of the text to be received. The basic feedback matrix is obtained. ; S5-2. Feature difference matrix of the text to be received Add genetic column matrix Obtain the genetic column matrix Where H(0) is the zero matrix; S5-3. Set the genetic coefficient matrix Multiply by the genetic column matrix The feedback genetic matrix is obtained. ; S5-4. Basic Feedback Matrix Add feedback genetic matrix Obtain the feedback matrix ; The difference coefficient matrix ,in, Values are assigned based on the importance of the feature terms in the text to be received, and ; The genetic coefficient matrix ,in, Values are assigned based on the historical response speed of the feature items of the text to be received, and .
2. The method for improving text format standardization rate according to claim 1, characterized in that, The method for determining whether to receive text based on the modulus value includes two approaches: (1) Compare the modulus with the set threshold. If it is greater than the set threshold, then reject the text. (2) Provide feedback based on the modulus value, and manually determine whether to accept the text based on the feedback.
3. The method for improving text format standardization rate according to claim 2, characterized in that, The feedback is categorized into three situations: when The modulus value is less than or equal to the target feature column matrix. When the modulus is one-third, provide general feedback. The modulus is greater than the target feature column matrix When the modulus is one-third and less than or equal to two-thirds, a significant amount of feedback is given. The modulus is greater than the target feature column matrix When the modulus reaches two-thirds, feedback indicating significant concern is given. If the feedback indicates significant concern, it is necessary to determine whether to accept the text.
4. A processing device for improving the accuracy of text formatting, characterized in that, include: A memory, a processor, and a computer program stored on the memory, wherein the processor, when executing the computer program, implements the steps of the method for improving text format standardization rate as described in any one of claims 1-3.
5. A computer storage medium, characterized in that, The computer storage medium stores an executable program, which is executed by a processor to implement the steps of the method for improving text format standardization rate according to any one of claims 1-3.