Electric power business work order information intelligent identification method based on OCR technology
By performing image enhancement and geometric correction processing on the work order images of power business, combined with OCR technology and deep learning natural language processing technology, intelligent verification and correction are used to use large language models to perform intelligent verification and correction, solving the problems of traditional work order information entry errors and inaccurate OCR recognition, and achieving efficient and accurate work order information recognition and verification.
Patent Information
- Application Number
- CN202510200941.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-20
AI Technical Summary
Information entry of traditional power business work orders relies on manual labor, which is time-consuming and labor-intensive, and is prone to information entry errors or omissions. It is difficult for OCR technology to accurately identify work order images that are interfered with by lighting, noise, tilt, etc.
By performing image enhancement and geometric correction processing on the scanned images of power business work orders, the readability and recognition accuracy of the image are improved, text information is recognized in combination with OCR technology, and natural language processing technology based on deep learning is used to perform word granular semantic analysis and context semantic transmission perception, and finally, intelligent checksum correction is carried out with the help of large language models.
It has achieved in-depth understanding and accurate identification of the content information of the power business work order, and reduced the efficiency and quality problems of power service caused by information entry errors or omissions.
Smart Images

Figure CN120182979A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of power information processing, and more specifically, to an intelligent recognition method for power service work order information based on OCR technology. Background Art
[0002] In the power industry, service work orders, as the core documents for daily operation, maintenance, and management, carry a large amount of key information, including fault reports, repair requests, equipment status records, etc. Traditionally, these work orders exist in paper form and require manual information entry and processing. This process is not only time-consuming and laborious but also prone to information entry errors or omissions due to human factors, seriously affecting the efficiency and quality of power services.
[0003] With the rapid development of information technology, especially the increasing maturity of optical character recognition (OCR) technology, the possibility of automating the processing of paper document information has been realized. OCR technology can convert the text in images into an editable text format, greatly improving the efficiency and accuracy of information processing. However, directly applying OCR technology to scanned images of power service work orders still faces many challenges. On the one hand, due to the interference of factors such as light, noise, and tilt during the image acquisition process of work order documents, the image quality may decline, directly affecting the OCR recognition effect. On the other hand, due to problems such as blurred handwriting, stains, folds, and fading that may occur during the printing, filling, and storage of work order documents, OCR technology may encounter problems such as character adhesion, breakage, and misrecognition during recognition. Moreover, OCR technology can only complete surface-level text recognition and does not have the ability to understand and verify the recognition results, resulting in the possibility of containing incorrect or inaccurate information in the recognition results.
[0004] Therefore, there is an expectation for an intelligent recognition method for power service work order information based on OCR technology that can intelligently recognize and verify and correct power service work order information. Summary of the Invention
[0005] To solve the above technical problems, the present application is proposed. An embodiment of the present application provides an intelligent recognition method for power service work order information based on OCR technology. It enhances the readability and recognition accuracy by performing image enhancement and geometric correction on the scanned image of the power service work order. Subsequently, it uses OCR technology to recognize the text information of the power service work order in the image, and introduces natural language processing technology based on deep learning to perform word-level semantic parsing and context semantic transfer perception on the OCR output result to achieve a deep understanding of the content information of the power service work order. Furthermore, with the help of a large language model, it performs intelligent verification and correction on the power service work order based on the context semantic information. In this way, by using the context semantic environment of the power service work order for information verification, it helps to correctly interpret the information with fuzzy or non-standard expressions in the work order, thereby reducing the problems of power service efficiency and quality caused by information entry errors or omissions.
[0006] Correspondingly, according to one aspect of the present application, there is provided an intelligent recognition method for power service work order information based on OCR technology, which includes:
[0007] Obtain a scanned image of a power service work order;
[0008] Perform image enhancement on the scanned image of the power service work order to obtain an enhanced scanned image of the power service work order;
[0009] Use a geometric transformation algorithm to perform tilt or distortion correction on the enhanced scanned image of the power service work order to obtain a corrected scanned image of the power service work order;
[0010] Use an OCR engine to perform text recognition on the corrected scanned image of the power service work order to obtain an OCR output result;
[0011] Input the OCR output result into a work order information post-processor based on a large language model to obtain a recognition result of the power service work order information.
[0012] In the above intelligent recognition method for power service work order information based on OCR technology, inputting the OCR output result into a work order information post-processor based on a large language model to obtain a recognition result of the power service work order information includes: performing word-level semantic embedding encoding on the OCR output result to obtain a sequence distribution of OCR recognition word semantic embedding encoding vectors; performing context semantic association encoding based on semantic jump degree on the sequence distribution of the OCR recognition word semantic embedding encoding vectors to obtain an OCR output result context semantic encoding vector; after adding a prompt word to the tail of the OCR output result context semantic encoding vector, inputting it into the work order information post-processor based on the large language model to obtain the recognition result of the power service work order information.
[0013] Compared with the prior art, the intelligent recognition method of power service work order information based on OCR technology provided by this application enhances its readability and recognition accuracy by performing image enhancement and geometric correction on the scanned image of the power service work order, and then uses OCR technology to recognize the text information of the power service work order in the image, and introduces natural language processing technology based on deep learning to perform word-level semantic parsing and context semantic transfer perception on the OCR output result to achieve a deep understanding of the content information of the power service work order. Furthermore, with the help of a large language model, it performs intelligent verification and correction based on the context semantic information of the power service work order. In this way, by using the context semantic environment of the power service work order for information verification, it helps to correctly interpret the information with fuzzy or non-standard expressions in the work order, thereby reducing the problems of power service efficiency and quality caused by information entry errors or omissions. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] By describing the embodiments of this application in more detail with reference to the accompanying drawings, the above and other objects, features, and advantages of this application will become more apparent. The drawings are used to provide a further understanding of the embodiments of this application and constitute a part of the specification. Together with the embodiments of this application, they are used to explain this application and do not constitute a limitation to this application. In the drawings, the same reference numerals generally represent the same components or steps.
[0015] Figure 1 It is a flowchart of the intelligent recognition method of power service work order information based on OCR technology according to an embodiment of this application.
[0016] Figure 2 It is a flowchart of step S5 in the intelligent recognition method of power service work order information based on OCR technology according to an embodiment of this application.
[0017] Figure 3 It is a schematic diagram of data flow of step S5 in the intelligent recognition method of power service work order information based on OCR technology according to an embodiment of this application.
[0018] Figure 4 It is a flowchart of step S51 in the intelligent recognition method of power service work order information based on OCR technology according to an embodiment of this application.
[0019] Figure 5 It is a flowchart of step S52 in the intelligent recognition method of power service work order information based on OCR technology according to an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] Next, exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. It should be understood that the present application is not limited by the exemplary embodiments described herein.
[0021] Figure 1 FIG. is a flowchart of an intelligent recognition method for power service work order information based on OCR technology according to an embodiment of the present application. As Figure 1 shown, the intelligent recognition method for power service work order information based on OCR technology according to an embodiment of the present application includes the steps of: S1, obtaining a scanned image of a power service work order; S2, performing image enhancement on the scanned image of the power service work order to obtain an enhanced scanned image of the power service work order; S3, using a geometric transformation algorithm to perform tilt or distortion correction on the enhanced scanned image of the power service work order to obtain a corrected scanned image of the power service work order; S4, using an OCR engine to perform text recognition on the corrected scanned image of the power service work order to obtain an OCR output result; S5, inputting the OCR output result into a work order information post-processor based on a large language model to obtain a recognition result of the power service work order information.
[0022] In the above intelligent recognition method for power service work order information based on OCR technology, in step S1, a scanned image of a power service work order is obtained. It should be understood that as an important carrier for recording power service-related information, power service work orders exist in large quantities in paper form in actual work, which is not conducive to the rapid input of information and computer processing. Therefore, in the present application, by using a document scanner to convert a paper power service work order into a digital image, a more effective data format can be provided for subsequent information processing.
[0023] Specifically, in the process of obtaining the scanned image of the power business work order, the type of scanner needs to be determined first. Taking the Fujitsu fi-7160 scanner as an example, its optical resolution is as high as 600 dpi, which enables it to accurately capture the text details on the power business work order. Even extremely small text or complex table lines can be clearly imaged. If faced with the scanning task of a large number of work orders, the scanner with an automatic document feeder (ADF) has obvious advantages. For example, the ADF unit of the Canon imageFORMULA DR-C225 can accommodate up to 50 A4 sheets. The staff only needs to neatly place a stack of sorted work orders in the feeder and then start continuous scanning operations, without the need to place each page manually, greatly saving time and labor costs. When encountering power business work orders with irregular sizes or almost strict requirements for scanning quality, a flatbed scanner becomes the ideal choice. The Epson Perfection V600 Photo flatbed scanner has a large scanning area and can adapt to different size work orders including A3 and below. Moreover, the professional imaging technology it adopts can achieve excellent color reproduction and detail presentation. For work orders with special elements such as seals and color charts, it can perform accurate scanning to ensure the integrity and clarity of image information in all aspects.
[0024] At the same time, the reasonable setting of scanning parameters plays a key role in obtaining high-quality scanned images. Resolution is one of the core parameters that affect image quality. For power business work orders, it is usually recommended to set it in the range of 300dpi-600dpi. The resolution of 300dpi is sufficient to clearly identify the text information on most regular work orders, and the size of the generated image file is relatively moderate, which is convenient for subsequent storage and processing. However, when there are small fonts, unclear handwriting, or complex graphics, tables, etc. on the work order, increasing the resolution to 600dpi can significantly enhance the clarity and detail expression of the image. However, it should be noted that too high a resolution will cause a significant increase in file size, which may have an adverse effect on storage and transmission efficiency. The choice of color mode should not be ignored. Given that power business work orders are mainly composed of text and black and white lines, black and white or grayscale mode can usually meet actual needs. In black and white mode, the scanner presents all pixels in the image in pure black or pure white, which is suitable for work orders with clear text and no color information requirements, and the generated file size is the smallest. Grayscale mode can retain a certain grayscale level. For some work orders with shadows or slight color changes, it can better show the image details. At the same time, the file size is much smaller than that of color mode. Only when the work order contains important color information such as color stamps and circuit diagrams, should you consider choosing color mode for scanning. In terms of file formats, common ones include JPEG, PNG, TIFF, etc. With its high compression ratio, the JPEG format can greatly reduce the file size while ensuring a certain image quality. It is suitable for scenes that do not require extremely strict image quality and focus on saving storage space or facilitating network transmission. The PNG format is characterized by lossless compression. It can completely retain all the details of the image and support transparent background. It is suitable for situations where the original quality of the image is high and the file size is acceptable. The TIFF format is often used in professional fields with extremely high requirements for image quality. It supports multiple image modes and compression algorithms, and can maximize the retention of the original information of the scanned image, but its file size is relatively large. In the process of scanning power business work orders, it is necessary to carefully select the appropriate file format based on actual needs and storage conditions.
[0025] In addition, before scanning, the work order needs to be comprehensively sorted out to ensure that the surface of the work order is flat, without wrinkles, stains or damages. For work orders with metal objects such as staples and paper clips attached, they should be removed in advance to prevent damage to the scanner during the scanning process. At the same time, carefully check whether the connection of the scanner is stable, whether the power supply is properly connected, and whether the scanning software has been correctly installed and successfully started. If a flatbed scanner is used, place the work order face down and flat in the designated area of the scanning platform, ensuring that the edges of the work order are precisely aligned with the edges of the scanning area. For scanners equipped with positioning marks, make sure that the corresponding positions of the work order are exactly aligned with the positioning marks to ensure the accurate position of the scanned image. If a document scanner with an automatic document feeder function is used, place the sorted work orders neatly in the paper feed tray of the ADF unit, taking care not to exceed the maximum capacity limit of the tray. At the same time, precisely adjust the baffles on both sides of the tray so that they closely fit the edges of the work order on both sides, effectively preventing the work order from skewing during the paper feeding process. In the scanning software, make detailed settings according to the previously determined scanning parameters, including resolution, color mode, file format, etc. After setting, click the "Scan" button, and the scanner will then start working. During the scanning process, the operator needs to closely monitor the running status of the scanner to ensure the normal paper feeding of the work order and prevent abnormal situations such as paper jams and missed scans. For work orders scanned in batches, the preview effect of the scanned images can be viewed in real time, and carefully check the clarity, integrity of the images and whether there are problems such as skewing. Once a problem is found, immediately pause the scanning, make corresponding adjustments to the work order or scanning parameters, and then continue the scanning operation.
[0026] In actual operation, when encountering work orders with yellowed, brittle or severely stained paper, it may have a negative impact on the scanning effect. For yellowed or brittle paper, extra care is needed during placement and scanning to avoid paper damage. The scanning speed can be appropriately reduced to reduce the damage to the paper caused by mechanical movement. For work orders with stains, if the stains are light, they can be processed later with image editing software after scanning; if the stains seriously affect text recognition, try to clean the work order first, but pay attention to choosing a suitable cleaning method to prevent damage to the paper. For multi-page work orders bound into a volume, if the binding cannot be removed, the paging scanning method can be adopted. First, scan the cover and back cover of the work order separately, and then scan the content in the middle page by page. During the scanning process, always keep the position and orientation of each page of the work order consistent so that they can be accurately spliced into a complete document later. After scanning, a special document splicing software can be used to merge the multi-page images into a complete file.
[0027] In the above intelligent recognition method of power service work order information based on OCR technology, in step S2, the scanned image of the power service work order is enhanced to obtain an enhanced scanned image of the power service work order. That is, although a paper document can be converted into a digital image through a document scanner, in the actual scanning process, due to the influence of various factors, there are often many problems in the original scanned image. For example, the lighting conditions in different scanning environments vary greatly, which may cause uneven lighting in the image, with some areas being too bright or too dark, resulting in low image contrast, blurred text, and seriously affecting the accurate recognition of the image text. Therefore, in this application, the scanned image of the power service work order is further processed through image enhancement technology to improve the image quality and enhance the clarity and recognition rate of the text. In the embodiment of this application, the adaptive histogram equalization technology is adopted. By performing histogram equalization on local regions of the image, the brightness and contrast of the scanned image of the power service work order are adjusted to reduce the influence of uneven lighting. Compared with global histogram equalization, adaptive histogram equalization can better preserve the details of the image while avoiding noise amplification caused by over-enhancing certain areas. In the enhancement process of the scanned image of the power service work order, the adaptive histogram equalization technology can automatically adjust the histogram of each region according to the brightness distribution of different regions in the image, making the brightness distribution more uniform and significantly enhancing the contrast, thereby obtaining an enhanced scanned image of the power service work order, providing a more reliable image basis for subsequent text recognition.
[0028] In the above intelligent recognition method of power service work order information based on OCR technology, in step S3, a geometric transformation algorithm is used to correct the tilt or distortion of the enhanced scanned image of the power service work order to obtain a corrected scanned image of the power service work order. Here, considering that in the actual scanning process, it is difficult to ensure complete horizontal and vertical placement of the work order manually, or the paper is deformed under the action of mechanical force during scanning, resulting in the scanned image being tilted or distorted. For a tilted image, the arrangement direction of the text is no longer horizontal or vertical, which will cause errors in character segmentation and recognition. For a distorted image, the shape of the text changes, and the spacing and relative position relationship between characters are also disrupted, further increasing the difficulty of text recognition and seriously affecting the accuracy and efficiency of recognition. Therefore, the enhanced scanned image of the power service work order is corrected for tilt or distortion through a geometric transformation algorithm to restore the image to a normal regular state, thereby obtaining a corrected scanned image of the power service work order.
[0029] Specifically, the skew correction mainly uses the Hough Transform to detect straight lines in the image. The basic idea of the Hough Transform is to map the straight lines in the image space to the parameter space, and determine the parameters of the straight lines in the image (such as slope and intercept) by finding the peaks in the parameter space. For a skewed image, the edges of the text will form a series of straight lines. After detecting the straight lines by the Hough Transform, calculate the average skew angle of the series of straight lines, which is the angle by which the image needs to be rotated. Then, use the rotation transformation formula to perform a rotation operation on the image to restore the text in the image to the horizontal or vertical direction.
[0030] The distortion correction is mainly based on the principle of perspective transformation. Perspective transformation is a linear transformation between two-dimensional coordinates, which can transform a quadrilateral on one plane into a quadrilateral on another plane. For a distorted power service work order image, by finding the four vertices in the image (usually the four corners of the work order paper) or other representative feature points, and according to the corresponding relationship of these points in the original image and the target image (i.e., the corrected regular rectangular image), calculate the perspective transformation matrix. The perspective transformation matrix contains transformation information such as translation, rotation, scaling, and distortion of the image. Finally, use the perspective transformation matrix to transform the entire image to correct the distorted image into a regular rectangle.
[0031] After skew and distortion correction, the text in the corrected scanned image of the power service work order is neatly arranged, the direction is restored to the horizontal or vertical state, and the shape of the paper is also restored to a regular rectangle. This enables subsequent text recognition to be processed according to normal character segmentation and recognition rules, thereby improving the accuracy and efficiency of text recognition and reducing recognition errors caused by geometric deformation of the image.
[0032] In the above intelligent recognition method for power service work order information based on OCR technology, in step S4, use an OCR engine to perform text recognition on the corrected scanned image of the power service work order to obtain an OCR output result. It should be understood that OCR technology is the key technology to realize the conversion from image to text, which can convert the text symbols in the corrected scanned image of the power service work order into a text format that can be edited and processed by a computer, so as to facilitate the in-depth analysis and understanding of the work order content using natural language processing technology, and meet the requirements of digitization and intelligence of work order information in power business processing.
[0033] In the above intelligent recognition method of power service work order information based on OCR technology, in step S5, the OCR output result is input into a work order information post-processor based on a large language model to obtain the recognition result of the power service work order information. It should be understood that considering that the OCR technology can only complete the text recognition at the surface level, when facing some complex or special text information, recognition errors or omissions may occur. For example, for professional terms, abbreviations or handwritten fonts in the power service work order, the OCR technology may not be able to accurately recognize them, resulting in misunderstandings or omissions of information. Therefore, this application introduces natural language processing technology based on deep learning. By inputting the OCR output result into a work order information post-processor based on a large language model for semantic parsing and context awareness, the OCR output result is intelligently verified and corrected to generate an optimized recognition result of the power service work order information, thereby further improving the accuracy and integrity of the recognition of the power service work order information.
[0034] Figure 2 FIG. is a flowchart of step S5 in the intelligent recognition method of power service work order information based on OCR technology according to an embodiment of the present application. Figure 3 FIG. is a schematic diagram of data flow in step S5 in the intelligent recognition method of power service work order information based on OCR technology according to an embodiment of the present application. As Figure 2 and Figure 3 shown, step S5 includes: S51, performing word-level semantic embedding encoding on the OCR output result to obtain a sequence distribution of OCR recognition word semantic embedding encoding vectors; S52, performing context semantic association encoding based on semantic jump degree on the sequence distribution of the OCR recognition word semantic embedding encoding vectors to obtain an OCR output result context semantic encoding vector; S53, after adding a prompt word to the tail of the OCR output result context semantic encoding vector, inputting it into the work order information post-processor based on the large language model to obtain the recognition result of the power service work order information.
[0035] Specifically, in step S51, the OCR output result is subjected to word-level semantic embedding encoding to obtain a sequence distribution of OCR recognition word semantic embedding encoding vectors. Among them, Figure 4 FIG. is a flowchart of step S51 in the intelligent recognition method of power service work order information based on OCR technology according to an embodiment of the present application. As Figure 4 shown, step S51 includes: S511, performing word segmentation on the OCR output result to obtain a sequence distribution of OCR recognition words; S512, performing semantic embedding encoding on each OCR recognition word in the sequence distribution of the OCR recognition words to obtain the sequence distribution of the OCR recognition word semantic embedding encoding vectors.
[0036] Specifically, in step S511, word segmentation is performed on the OCR output result to obtain the sequence distribution of OCR recognition words. It should be understood that considering that the OCR output result is continuous text data, words, as the basic semantic units of text data, are the basis for text semantic parsing. Therefore, in order to understand the semantic information of the OCR output result in more detail, in this application, word segmentation is first performed on the OCR output result to split the continuous text data into independent words, forming the sequence distribution of OCR recognition words, so as to provide a finer-grained semantic analysis unit for subsequent semantic parsing.
[0037] Specifically, in step S512, semantic embedding encoding is performed on each OCR recognition word in the sequence distribution of OCR recognition words to obtain the sequence distribution of OCR recognition word semantic embedding encoding vectors. It should be understood that semantic embedding encoding maps words from the original lexical space to a high-dimensional continuous semantic feature space. In the semantic feature space, each word unit is represented as a high-dimensional dense vector, and the direction and distance between vectors reflect the semantic similarity and relevance between words. Therefore, by performing semantic embedding encoding on each OCR recognition word in the sequence distribution of OCR recognition words, each OCR recognition word can be transformed into a vector representation with rich semantic information, thus providing a strong semantic representation basis for subsequent semantic parsing and context awareness. In a specific example of this application, each OCR recognition word in the sequence distribution of OCR recognition words is input into a semantic embedding encoder based on the Bert model to obtain the sequence distribution of OCR recognition word semantic embedding encoding vectors. Those of ordinary skill in the art should know that the Bert model (Bidirectional Encoder Representations from Transformers) is a pre-trained language representation model based on the Transformer structure. By performing unsupervised learning on a large-scale corpus, it can learn rich language knowledge and has strong semantic understanding and representation capabilities. Therefore, in this application, the Bert model is used as the semantic embedding encoder, and the pre-trained knowledge of the Bert model can be used to perform efficient and accurate semantic embedding encoding on each OCR recognition word, so as to obtain the sequence distribution of OCR recognition word semantic embedding encoding vectors.
[0038] Specifically, in step S52, context semantic association encoding based on semantic jump degree is performed on the sequence distribution of the OCR recognition word semantic embedding coding vectors to obtain the OCR output result context semantic coding vectors. It should be understood that since there is context association in the text information of the power service work order, that is, the meanings of some words or sentences depend on the surrounding text content. Therefore, in order to more comprehensively and accurately understand the context semantic information of the OCR output result, it is necessary to further perform context association encoding on the sequence distribution of the OCR recognition word semantic embedding coding vectors. In particular, considering that there may be semantic jump phenomena in the text information of the power service work order, that is, some words may be semantically closely related to the words before and after them, while some are not directly related to the surrounding text content. Therefore, in order to more accurately capture such semantic close associations and jump phenomena, this application proposes a context semantic association encoding method based on semantic jump degree, which calculates the semantic importance of each OCR recognition word semantic embedding coding vector by analyzing the semantic similarity and relevance between each OCR recognition word semantic embedding coding vector and the position relationship of each word in the entire text, and accordingly performs semantic transfer aggregation on the sequence distribution of the OCR recognition word semantic embedding coding vectors, so as to obtain the global context semantic feature representation of the OCR output result, that is, the OCR output result context semantic coding vector.
[0039] Figure 5 It is a flowchart of step S52 in the intelligent recognition method for power service work order information based on OCR technology according to an embodiment of the present application. As Figure 5 shown, step S52 includes: S521, performing semantic transfer significance measurement on each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vectors based on the context semantic change of the sequence distribution of the OCR recognition word semantic embedding coding vectors to obtain the sequence distribution of the OCR recognition word semantic transfer significant factors; S522, performing feature modulation transfer aggregation encoding on the sequence distribution of the OCR recognition word semantic embedding coding vectors based on the sequence distribution of the OCR recognition word semantic transfer significant factors to obtain the OCR output result context semantic coding vectors.
[0040] In a specific example of the present application, step S521 includes: First, calculating the semantic jump degree of each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vectors to obtain the sequence distribution of the OCR recognition word semantic jump degree, which is expressed by the formula:
[0041] J = {v1, v2,..., v i ,..., v n}
[0042]
[0043] Among them, J represents the sequence distribution of the semantic embedding coding vectors of the OCR recognition words, and v1, v2, v i and v n respectively represent the 1st, 2nd, ith, and nth OCR recognition word semantic embedding coding vectors in the sequence distribution of the OCR recognition word semantic embedding coding vectors. n is the number of vectors in the sequence distribution of the OCR recognition word semantic embedding coding vectors. represents the eigenvalue at the jth position in the ith OCR recognition word semantic embedding coding vector, L is the feature scale value of the ith OCR recognition word semantic embedding coding vector, u i is the semantic intensity factor of the ith OCR recognition word semantic embedding coding vector, u i+1 represents the semantic intensity factor of the (i + 1)th OCR recognition word semantic embedding coding vector, and t i represents the semantic jump degree of the ith OCR recognition word semantic embedding coding vector.
[0044] Here, considering that the semantic changes of OCR recognition words may not be stable, therefore, in order to keenly capture the semantic association fluctuations in the OCR output results, this application first calculates the semantic jump degrees of each OCR recognition word semantic embedding coding vector to measure the severity of its semantic changes relative to adjacent OCR recognition words. It should be understood that during the context information transfer encoding process of the sequence distribution of the OCR recognition word semantic embedding coding vectors, each OCR recognition word semantic embedding coding vector performs information transfer in sequence according to its position order in the text. If the semantic jump degree between an OCR recognition word at a certain position and an adjacent OCR recognition word is large, that is, the semantic change is relatively severe, at this time, it can be considered that this OCR recognition word plays an important semantic association role in the OCR output results and needs to be given higher semantic attention.
[0045] Next, calculate the semantic transfer space spans of each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vectors to obtain the sequence distribution of the OCR recognition word semantic transfer space spans, which is expressed by the formula:
[0046] s i =Count(v i →v n )
[0047] Among them, s i represents the semantic transfer space span of the ith OCR recognition word semantic embedding coding vector, and Count(v i →vn ) represents the number of feature vectors separated between the said v i and the said v n
[0048] That is, considering that the text positions of each OCR recognition word in the OCR output result also have a certain influence on its semantic importance. For example, words located at the end of a sentence often carry more important information, while words located at the beginning or in the middle of a sentence may play more roles in connection or modification. Therefore, the present application further reveals the text positions of each OCR recognition word in the OCR output result by calculating the semantic transmission space span of the semantic embedding coding vectors of each OCR recognition word, so as to further evaluate its contribution degree in the global context semantic feature representation of the OCR output result.
[0049] Then, based on the semantic jump degree and the semantic transmission space span of each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vectors, calculate the semantic transmission significant factor of each OCR recognition word semantic embedding coding vector to obtain the sequence distribution of the OCR recognition word semantic transmission significant factor, which is expressed by the formula:
[0050]
[0051] where α and β are preset weight parameters for balancing the influence of the semantic jump degree and the semantic transmission space span, and e i represents the semantic transmission significant factor of the i-th OCR recognition word semantic embedding coding vector.
[0052] Here, in order to comprehensively consider the two important factors of the semantic jump degree and the semantic transmission space span and more accurately measure the importance of each OCR recognition word semantic embedding coding vector in the context semantic transmission process, the present application further calculates its semantic transmission significant factor based on the semantic jump degree and the semantic transmission space span of each OCR recognition word semantic embedding coding vector, so as to be more focused on important OCR recognition words in the subsequent semantic transmission process, avoid the interference of irrelevant or secondary information, and thus improve the accuracy and efficiency of the power service work order information recognition.
[0053] In a specific example of the present application, the step S522 includes: inputting the sequence distribution of the OCR recognition word semantic transmission significant factor into a gated transmission unit to obtain the sequence distribution of the OCR recognition word semantic transmission significant weight; based on the sequence distribution of the OCR recognition word semantic transmission significant weight, calculating the position-weighted sum of the sequence distribution of the OCR recognition word semantic embedding coding vector to obtain the OCR output result context semantic coding vector, which is expressed by the formula:
[0054]
[0055] Among them, softmax(·) is the normalized exponential function, mask[·] is the gating mask function, τ is the gating threshold, and w i is the significant weight of semantic transmission of the OCR recognition word for the said v i , and V represents the context semantic encoding vector of the OCR output result.
[0056] That is, by further introducing a gating mechanism, the significant factors of semantic transmission of each OCR recognition word semantic embedding encoding vector are gated and screened to generate the sequence distribution of the significant weights of semantic transmission of the OCR recognition words, and based on this, the sequence distribution of the original OCR recognition word semantic embedding encoding vector is weighted and aggregated, so as to selectively strengthen the important OCR recognition word features, while suppressing those features with less influence or irrelevance, and generate the context semantic encoding vector of the OCR output result. In this way, the transitional changes between the semantic features of each OCR recognition word can be fully considered, and the overall context semantic relationship of the power business work order information can be comprehensively grasped, providing a more accurate and reliable semantic basis for the subsequent verification and correction of the power business work order information.
[0057] Specifically, in step S53, after adding a prompt word to the tail of the context semantic encoding vector of the OCR output result, it is input into the work order information post-processor based on the large language model to obtain the recognition result of the power business work order information. Among them, the prompt word is: "Verify and correct the power business work order information based on the semantic information of the OCR output result". That is, with the help of the powerful language understanding and generation ability of the large language model, the context semantic encoding vector of the OCR output result is deeply analyzed and semantically inferred. Specifically, in order to guide the large language model to accurately verify and correct the power business work order information, this application provides clear prompt information through the added prompt word, informing the large language model of the background of the current input data and the expected processing tasks, so that the large language model can better utilize its pre-trained knowledge and capabilities, and according to the guidance of the prompt word, identify and correct the possible errors or ambiguities in the OCR output result, and at the same time, make reasonable inferences and supplements for the missing or ambiguous information according to the context semantic relationship, so as to generate an accurate, complete and power business specification-compliant work order information recognition result.
[0058] In a preferred example, after adding a prompt word to the tail of the context semantic encoding vector of the OCR output result, inputting it into the work order information post-processor based on the large language model to obtain the recognition result of the power business work order information includes:
[0059] Determine the mean eigenvalue μ and the standard deviation of eigenvalues σ corresponding to the context semantic encoding vector of the OCR output result;
[0060] Obtain the first OCR output result context semantic encoding fairness target vector by dot - subtracting the context semantic encoding vector of the OCR output result from the mean eigenvalue vector and multiplying by the standard deviation of eigenvalues:
[0061]
[0062] where V represents the context semantic encoding vector of the OCR output result, V1 represents the first OCR output result context semantic encoding fairness target vector, ⊙ represents dot - multiplication, represents dot - subtraction;
[0063] Obtain the second OCR output result context semantic encoding fairness target vector by dot - subtracting the context semantic encoding vector of the OCR output result from the standard deviation of eigenvalues vector and multiplying by the mean eigenvalue:
[0064]
[0065] where V2 represents the second OCR output result context semantic encoding fairness target vector;
[0066] After multiplying the element - by - element reciprocal of the second OCR output result context semantic encoding fairness target vector with the first OCR output result context semantic encoding fairness target vector, take the element - by - element base - 2 logarithm to obtain the OCR output result context semantic encoding information correction vector:
[0067] V in =log2(V2 ⊙-1 ⊙V1)
[0068] where V in represents the OCR output result context semantic encoding information correction vector, (·) ⊙-1 represents calculating the reciprocal of each element in the vector, log2(·) represents the base - 2 logarithmic function;
[0069] Multiply the square root of the quotient of the mean eigenvalue μ divided by the standard deviation of eigenvalues σ by the weight hyperparameter, and then perform dot - addition with the OCR output result context semantic encoding information correction vector to obtain the optimized OCR output result context semantic encoding vector:
[0070]
[0071] where γ represents the weight hyperparameter, ⊕ represents dot - addition, and V' represents the optimized OCR output result context semantic encoding vector;
[0072] After adding the prompt word at the end of the optimized OCR output result context semantic coding vector, it is input into the work order information post-processor based on the large language model to obtain the power business work order information recognition result.
[0073] Here, since each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vector respectively represents the semantic embedding coding features based on the Bert model of each OCR recognizer in the OCR output result, the semantic feature population attributes expressed by different source domain word texts will have fairness differences in the semantic jump level measurement, thereby affecting the interactive inclusiveness of the feature distribution of the context semantic coding vector of the OCR output result, and reducing the text quality of the power business work order information recognition result obtained by inputting the work order information post-processor based on the large language model.
[0074] Therefore, taking into account the attribute level fairness differences of the data population corresponding to the fusion features of the OCR output result context semantic coding vector, in order to improve the interactive inclusiveness under the feature distribution diversity of the OCR output result context semantic coding vector, the crossover probability value constraint based on the OCR output result context semantic coding vector is used as the interactive fairness target representation to correct the group feature information interactive propagation of the OCR output result context semantic coding vector, and the unified statistical feature response interaction based on the OCR output result context semantic coding vector is used as the feature distribution multi-level fairness target bias to achieve a robust distribution fairness unified representation of the OCR output result context semantic coding vector, form a fair collaboration paradigm under the feature distribution framework of the OCR output result context semantic coding vector, and improve the text quality of the power business work order information recognition result obtained by inputting the work order information post-processor based on the large language model.
[0075] In summary, according to the embodiment of the present application, the intelligent recognition method of power business work order information based on OCR technology is explained, which performs image enhancement and geometric correction processing on the scanned image of the power business work order to enhance its readability and recognition accuracy, and then uses OCR technology to identify the text information of the power business work order in the image, and introduces natural language processing technology based on deep learning to perform word granularity semantic analysis and contextual semantic transmission perception on the OCR output results, so as to achieve a deep understanding of the content information of the power business work order, and then with the help of a large language model, it is intelligently verified and corrected based on the contextual semantic information of the power business work order. In this way, by using the contextual semantic environment of the power business work order to perform information verification, it is helpful to correctly interpret the information that is vague or non-standardly expressed in the business work order, thereby reducing the efficiency and quality problems of power services caused by information entry errors or omissions.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for intelligent recognition of power business work order information based on OCR technology, characterized in that: include: Obtain scanned images of power business work orders; Performing image enhancement on the power business work order scanned image to obtain an enhanced power business work order scanned image; Using a geometric transformation algorithm to perform tilt or distortion correction on the enhanced power business work order scan image to obtain a corrected power business work order scan image; Using an OCR engine to perform text recognition on the corrected power business work order scanned image to obtain an OCR output result; The OCR output result is input into a work order information post-processor based on a large language model to obtain a power business work order information recognition result.
2. The method for intelligent identification of power business work order information based on OCR technology according to claim 1 is characterized in that: The OCR output result is input into a work order information post-processor based on a large language model to obtain a power business work order information recognition result, including: Performing word-granularity semantic embedding coding on the OCR output result to obtain a sequence distribution of semantic embedding coding vectors of OCR recognized words; Performing contextual semantic association encoding based on semantic jump degree on the sequence distribution of the semantic embedding encoding vector of the OCR recognition word to obtain the contextual semantic encoding vector of the OCR output result; After adding a prompt word to the end of the context semantic coding vector of the OCR output result, it is input into the work order information post-processor based on the large language model to obtain the power business work order information recognition result.
3. The method for intelligent identification of power business work order information based on OCR technology according to claim 2 is characterized in that: The OCR output result is subjected to word-granular semantic embedding encoding to obtain a sequence distribution of OCR-recognized word semantic embedding encoding vectors, including: Performing word segmentation processing on the OCR output result to obtain a sequence distribution of OCR recognized words; Semantic embedding coding is performed on each OCR recognized word in the sequence distribution of the OCR recognized words to obtain a sequence distribution of the semantic embedding coding vector of the OCR recognized words.
4. The method for intelligently identifying power business work order information based on OCR technology according to claim 3 is characterized in that: Performing semantic embedding coding on each OCR recognized word in the sequence distribution of the OCR recognized words to obtain a sequence distribution of the semantic embedding coding vector of the OCR recognized words, including: Each OCR recognized word in the sequence distribution of the OCR recognized words is input into a semantic embedding encoder based on the Bert model to obtain a sequence distribution of the semantic embedding encoding vector of the OCR recognized words.
5. The method for intelligently identifying power business work order information based on OCR technology according to claim 4 is characterized in that: The sequence distribution of the semantic embedding coding vector of the OCR recognition word is subjected to contextual semantic association coding based on semantic jump degree to obtain the contextual semantic coding vector of the OCR output result, including: Based on the contextual semantic changes of the sequence distribution of the OCR recognition word semantic embedding coding vector, performing semantic transfer significance measurement on each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vector to obtain the sequence distribution of the OCR recognition word semantic transfer significance factor; Based on the sequence distribution of the semantic transfer significance factor of the OCR recognized word, feature modulation transfer aggregation coding is performed on the sequence distribution of the OCR recognized word semantic embedding coding vector to obtain the OCR output result context semantic coding vector.
6. The method for intelligently identifying power business work order information based on OCR technology according to claim 5 is characterized in that: Based on the contextual semantic changes of the sequence distribution of the OCR recognition word semantic embedding coding vector, a semantic transfer significance measurement is performed on each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vector to obtain a sequence distribution of the OCR recognition word semantic transfer significance factor, including: Calculating the semantic jump degree of each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vector to obtain the sequence distribution of the OCR recognition word semantic jump degree; Calculating the semantic transfer space span of each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vector to obtain the sequence distribution of the OCR recognition word semantic transfer space span; Based on the semantic jump degree and semantic transfer space span of each OCR recognition word semantic embedding coding vector in the sequence distribution of the OCR recognition word semantic embedding coding vector, the semantic transfer significance factor of each OCR recognition word semantic embedding coding vector is calculated to obtain the sequence distribution of the OCR recognition word semantic transfer significance factor.
7. The method for intelligently identifying power business work order information based on OCR technology according to claim 6 is characterized in that: Based on the sequence distribution of the semantic transfer saliency factor of the OCR recognized word, feature modulation transfer aggregation coding is performed on the sequence distribution of the OCR recognized word semantic embedding coding vector to obtain the OCR output result context semantic coding vector, including: Inputting the sequence distribution of the semantic transfer significance factor of the OCR recognition word into the gated transfer unit to obtain the sequence distribution of the semantic transfer significance weight of the OCR recognition word; Based on the sequence distribution of the significant weights of the semantic transfer of the OCR recognized words, the position-weighted sum of the sequence distribution of the OCR recognized word semantic embedding coding vector is calculated to obtain the OCR output result context semantic coding vector.
8. The method for intelligently identifying power business work order information based on OCR technology according to claim 7 is characterized in that: The prompt word is: "Verify and correct the power business work order information based on the semantic information of the OCR output result."