Pumped storage equipment data entry method and device, computer equipment, storage medium and computer program product
By automatically identifying and processing the operation record documents of pumped storage equipment and generating input documents, the problem of low data entry efficiency in the prior art is solved, and fast and efficient data entry is achieved.
Patent Information
- Application Number
- CN202510039486.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the data entry efficiency of pumped storage equipment is low, and it requires a lot of time and manpower to enter manually.
By obtaining the document images of the operation record documents of the pumping storage equipment, identifying the data table number and handwritten fonts, performing pre-processing and data identification processing, generating a numerical matrix and input documents, and realizing automated data entry.
It improves the efficiency of data entry of pumped storage equipment, reduces manual intervention, and avoids cumbersome and inefficient problems in the data entry process.
Smart Images

Figure CN119810860A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power grid technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for data entry of pumped storage equipment. Background Art
[0002] In the power system, in order to ensure real-time monitoring of equipment status, it is crucial to quickly enter data on pumped storage equipment.
[0003] In traditional technology, manual data entry is generally used in the process of pumped storage equipment data entry; however, this manual data entry method is cumbersome and requires a lot of time and manpower, resulting in low efficiency in pumped storage equipment data entry. Summary of the invention
[0004] Based on this, it is necessary to provide a pumped-storage equipment data entry method, device, computer equipment, computer-readable storage medium and computer program product that can improve the data entry efficiency of pumped-storage equipment in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for entering data of a pumped storage device, comprising:
[0006] Acquire a document image of an operation record document of a pumped-storage equipment; the operation record document includes a data table number and handwritten fonts corresponding to multiple groups of operation record data of the pumped-storage equipment;
[0007] Identifying the data table number from the document image, and determining the data table structure information corresponding to the document image according to the data table number;
[0008] Preprocessing the document image to obtain a preprocessed document image;
[0009] Performing data recognition processing on the preprocessed document image to obtain each of the handwritten fonts in the preprocessed document image, and text information and position information corresponding to each of the handwritten fonts;
[0010] Determining a numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts;
[0011] An input document of the operation record document is obtained according to the data table structure information and the numerical matrix.
[0012] In one embodiment, before determining the numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts, the method further includes:
[0013] Inputting each of the handwritten fonts into a trained credibility prediction model to obtain a prediction credibility corresponding to each of the handwritten fonts;
[0014] From the handwritten fonts, select the handwritten font whose prediction credibility is less than the preset credibility as the handwritten font to be processed;
[0015] Correcting the handwritten font to be processed to obtain a corrected handwritten font;
[0016] The handwritten font whose predicted credibility is greater than or equal to the preset credibility, and the corrected handwritten font are both used as target handwritten fonts;
[0017] The step of determining the numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts includes:
[0018] The numerical matrix corresponding to the document image is determined according to the text information and position information corresponding to the target handwritten font.
[0019] In one embodiment, the step of correcting the handwritten font to be processed to obtain a corrected handwritten font includes:
[0020] Get multiple preset handwriting fonts;
[0021] Performing feature extraction processing on the handwritten font to be processed and each preset handwritten font respectively to obtain a first feature vector corresponding to the handwritten font to be processed and a second feature vector corresponding to each preset handwritten font;
[0022] Determining the similarity between each of the preset handwritten fonts and the handwritten font to be processed according to the first feature vector and the second feature vector;
[0023] From each of the preset handwriting fonts, a preset handwriting font with a similarity greater than a preset similarity is selected as the corrected handwriting font.
[0024] In one embodiment, the trained credibility prediction model is trained in the following manner:
[0025] Get a sample document image;
[0026] Preprocessing the sample document image to obtain a preprocessed sample document image;
[0027] Performing data recognition processing on the preprocessed sample document image to obtain each sample handwritten font in the preprocessed sample document image;
[0028] Inputting each of the sample handwritten fonts into a credibility prediction model to be trained to obtain a prediction credibility corresponding to each of the sample handwritten fonts;
[0029] The actual credibility corresponding to each of the sample handwritten fonts is obtained, and according to the difference between the predicted credibility and the actual credibility corresponding to each of the sample handwritten fonts, the credibility prediction model to be trained is iteratively trained to obtain the trained credibility prediction model.
[0030] In one embodiment, preprocessing the document image to obtain a preprocessed document image includes:
[0031] Extracting connected domains in the document image;
[0032] Determine the minimum circumscribed rectangle corresponding to the connected domain;
[0033] Determining an image tilt angle corresponding to the document image according to the minimum circumscribed rectangle;
[0034] When the image tilt angle does not meet the preset tilt angle range, rotation correction processing is performed on the document image to obtain the pre-processed document image.
[0035] In one embodiment, the preprocessing the document image to obtain a preprocessed document image further includes:
[0036] Identifying noise in the document image and a target noise type corresponding to the noise;
[0037] According to the target noise type, query the correspondence between the noise type and the noise reduction processing method, and obtain the noise reduction processing method corresponding to the target noise type as the noise reduction processing method corresponding to the document image;
[0038] According to the noise reduction processing method, the document image is subjected to noise reduction processing to obtain a noise-reduced document image;
[0039] Performing image enhancement processing on the denoised document image to obtain the preprocessed document image.
[0040] In a second aspect, the present application also provides a pumped storage equipment data entry device, comprising:
[0041] An image acquisition module, used to acquire a document image of an operation record document of a pumped-storage equipment; the operation record document includes a data table number and handwriting fonts corresponding to multiple groups of operation record data of the pumped-storage equipment;
[0042] An information determination module, used to identify the data table number from the document image, and determine the data table structure information corresponding to the document image according to the data table number;
[0043] An image processing module, used for preprocessing the document image to obtain a preprocessed document image;
[0044] A data recognition module, used for performing data recognition processing on the preprocessed document image to obtain each of the handwritten fonts in the preprocessed document image, and text information and position information corresponding to each of the handwritten fonts;
[0045] A matrix determination module, used to determine the numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts;
[0046] The document entry module is used to obtain the entry document of the operation record document according to the data table structure information and the numerical matrix.
[0047] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0048] Acquire a document image of an operation record document of a pumped-storage equipment; the operation record document includes a data table number and handwritten fonts corresponding to multiple groups of operation record data of the pumped-storage equipment;
[0049] Identifying the data table number from the document image, and determining the data table structure information corresponding to the document image according to the data table number;
[0050] Preprocessing the document image to obtain a preprocessed document image;
[0051] Performing data recognition processing on the preprocessed document image to obtain each of the handwritten fonts in the preprocessed document image, and text information and position information corresponding to each of the handwritten fonts;
[0052] Determining a numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts;
[0053] An input document of the operation record document is obtained according to the data table structure information and the numerical matrix.
[0054] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0055] Acquire a document image of an operation record document of a pumped-storage equipment; the operation record document includes a data table number and handwritten fonts corresponding to multiple groups of operation record data of the pumped-storage equipment;
[0056] Identifying the data table number from the document image, and determining the data table structure information corresponding to the document image according to the data table number;
[0057] Preprocessing the document image to obtain a preprocessed document image;
[0058] Performing data recognition processing on the preprocessed document image to obtain each of the handwritten fonts in the preprocessed document image, and text information and position information corresponding to each of the handwritten fonts;
[0059] Determining a numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts;
[0060] An input document of the operation record document is obtained according to the data table structure information and the numerical matrix.
[0061] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0062] Acquire a document image of an operation record document of a pumped-storage equipment; the operation record document includes a data table number and handwritten fonts corresponding to multiple groups of operation record data of the pumped-storage equipment;
[0063] Identifying the data table number from the document image, and determining the data table structure information corresponding to the document image according to the data table number;
[0064] Preprocessing the document image to obtain a preprocessed document image;
[0065] Performing data recognition processing on the preprocessed document image to obtain each of the handwritten fonts in the preprocessed document image, and text information and position information corresponding to each of the handwritten fonts;
[0066] Determining a numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts;
[0067] An input document of the operation record document is obtained according to the data table structure information and the numerical matrix.
[0068] The above-mentioned pumped-storage equipment data entry method, device, computer equipment, storage medium and computer program product first obtain the document image of the operation record document of the pumped-storage equipment, then identify the data table number from the document image, and determine the data table structure information corresponding to the document image based on the data table number. Next, the document image is preprocessed to obtain a preprocessed document image, and the preprocessed document image is subjected to data recognition processing to obtain each handwritten font in the preprocessed document image, as well as the text information and position information corresponding to each handwritten font. Then, based on the text information and position information corresponding to each handwritten font, the numerical matrix corresponding to the document image is determined. Finally, based on the data table structure information and the numerical matrix, the entry document of the operation record document is obtained. In this way, in the process of entering data for pumped-storage equipment, after obtaining the document image of the operation record document of the pumped-storage equipment, the data table number and each handwritten font can be quickly identified from the document image, so that the data table structure information and the numerical matrix corresponding to the document image of the operation record document can be quickly obtained, and then the entry document of the operation record document can be quickly obtained, which is conducive to improving the entry efficiency of the pumped-storage equipment data; moreover, the entire process does not require manual intervention, avoiding the cumbersome manual entry method, which requires a lot of time and manpower, resulting in the defect of low entry efficiency of the pumped-storage equipment data, thereby improving the entry efficiency of the pumped-storage equipment data. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 A schematic flow chart of a method for entering data into a pumped storage device in one embodiment;
[0071] Figure 2 A schematic flow chart of a method for entering data into a pumped storage device in another embodiment;
[0072] Figure 3 A schematic diagram of a flow chart of an intelligent data entry method in one embodiment;
[0073] Figure 4 It is a structural block diagram of a data entry device for pumped storage equipment in one embodiment;
[0074] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0076] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0077] In an exemplary embodiment, Figure 1 As shown, a method for data entry of pumped storage equipment is provided. This embodiment takes the method applied to a server as an example for illustration; it can be understood that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be but is not limited to various personal computers, laptops, smart phones and tablet computers; the server can be implemented as an independent server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:
[0078] Step S101, obtaining a document image of an operation record document of the pumped-storage equipment; the operation record document includes a data table number and handwritten fonts corresponding to multiple groups of operation record data of the pumped-storage equipment.
[0079] Among them, pumped storage equipment refers to the equipment in pumped storage power stations, such as generator motors.
[0080] The job record document is used to represent the pdf document of the job record uploaded by the user.
[0081] The document image is used to represent the image information corresponding to the job record document.
[0082] The data table number refers to the number information corresponding to the data table in the job record document, such as 01.
[0083] The operation record data is used to represent the record data related to the operation of the pumped storage equipment, such as the data of the guide vane.
[0084] Among them, handwritten fonts are used to represent text symbols formed by manual writing on paper.
[0085] Exemplarily, the server obtains the document name corresponding to the operation record document in response to the document entry instruction for the operation record document; then, the server obtains the document image of the operation record document of the pumped-storage equipment from the database according to the document name.
[0086] Step S102, identifying a data table number from the document image, and determining data table structure information corresponding to the document image according to the data table number.
[0087] The data table structure information is used to represent the template information related to data entry.
[0088] Exemplarily, the server determines the position of the data table number in the document image by utilizing OCR (Optical Character Recognition) recognition technology, and extracts character features of the text image at that position to obtain the data table number; then, the server queries the correspondence between the data table number and the data table structure information based on the data table number to obtain the data table structure information corresponding to the document image.
[0089] Step S103, preprocessing the document image to obtain a preprocessed document image.
[0090] Among them, preprocessing includes image correction processing and noise filtering processing.
[0091] The preprocessed document image refers to a document image that has been preprocessed.
[0092] Exemplarily, the server performs image correction processing and noise filtering processing on the document image to obtain a preprocessed document image as the preprocessed document image.
[0093] Step S104, performing data recognition processing on the preprocessed document image to obtain each handwritten font in the preprocessed document image, and text information and position information corresponding to each handwritten font.
[0094] The text information is used to represent the text content represented by the handwritten font.
[0095] The position information is used to represent the coordinate value of the handwritten font in the pre-processed document image.
[0096] Exemplarily, the server uses OCR recognition technology to perform data recognition processing on the preprocessed document image to obtain each handwritten font in the preprocessed document image, and the text information corresponding to each handwritten font; then, the server uses a target detection algorithm to perform data recognition processing on the preprocessed document image to obtain each handwritten font in the preprocessed document image, and the position information corresponding to each handwritten font.
[0097] Step S105: determining a numerical matrix corresponding to the document image according to the text information and position information corresponding to each handwritten font.
[0098] The numerical matrix is used to represent the matrix information set corresponding to each handwritten font.
[0099] Exemplarily, the server combines the text information and position information corresponding to each handwritten font to obtain the combination information corresponding to each handwritten font; then, the server determines the numerical matrix corresponding to the document image according to the combination information corresponding to each handwritten font.
[0100] Step S106, obtaining an input document of the operation record document according to the data table structure information and the value matrix.
[0101] The input document is used to indicate the data input result corresponding to the job record document.
[0102] Exemplarily, the server performs matching processing on the data table structure information and the numerical matrix to obtain a matched data entry result, and uses the data entry result as an entry document of the job record document.
[0103] In the above-mentioned data entry method for pumped-storage equipment, the document image of the operation record document of the pumped-storage equipment is first obtained, and then the data table number is identified from the document image, and the data table structure information corresponding to the document image is determined according to the data table number. Next, the document image is preprocessed to obtain a preprocessed document image, and the preprocessed document image is subjected to data recognition processing to obtain each handwritten font in the preprocessed document image, as well as the text information and position information corresponding to each handwritten font. Then, according to the text information and position information corresponding to each handwritten font, the numerical matrix corresponding to the document image is determined. Finally, according to the data table structure information and the numerical matrix, the entry document of the operation record document is obtained. In this way, in the process of entering data for pumped-storage equipment, after obtaining the document image of the operation record document of the pumped-storage equipment, the data table number and each handwritten font can be quickly identified from the document image, so that the data table structure information and the numerical matrix corresponding to the document image of the operation record document can be quickly obtained, and then the entry document of the operation record document can be quickly obtained, which is conducive to improving the entry efficiency of the pumped-storage equipment data; moreover, the entire process does not require manual intervention, avoiding the cumbersome manual entry method, which requires a lot of time and manpower, resulting in the defect of low entry efficiency of the pumped-storage equipment data, thereby improving the entry efficiency of the pumped-storage equipment data.
[0104] In an exemplary embodiment, the above-mentioned step S105, before determining the numerical matrix corresponding to the document image based on the text information and position information corresponding to each handwritten font, specifically includes the following contents: inputting each handwritten font into a trained credibility prediction model to obtain the predicted credibility corresponding to each handwritten font; screening out handwritten fonts whose predicted credibility is less than a preset credibility from each handwritten font as handwritten fonts to be processed; correcting the handwritten fonts to be processed to obtain corrected handwritten fonts; and taking handwritten fonts whose predicted credibility is greater than or equal to the preset credibility, as well as the corrected handwritten fonts, as target handwritten fonts.
[0105] Then, according to the text information and position information corresponding to each handwritten font, the numerical matrix corresponding to the document image is determined, which specifically includes the following contents: according to the text information and position information corresponding to the target handwritten font, the numerical matrix corresponding to the document image is determined.
[0106] Among them, the credibility prediction model refers to a network model that can use each handwritten font to obtain the predicted credibility corresponding to each handwritten font, such as a convolutional neural network model, a recurrent neural network model, etc.
[0107] The predicted credibility corresponding to each handwritten font refers to the predicted value of the credibility corresponding to each handwritten font.
[0108] The preset credibility refers to a preset credibility threshold value, which is used to judge the prediction credibility corresponding to each handwritten font. It should be noted that the preset credibility depends on the situation.
[0109] The handwritten font to be processed refers to a handwritten font whose prediction reliability is less than a preset reliability.
[0110] The corrected handwritten font refers to the handwritten font to be processed after correction processing.
[0111] The target handwritten fonts include handwritten fonts whose predicted credibility is greater than or equal to a preset credibility, and corrected handwritten fonts.
[0112] Exemplarily, the server inputs each handwritten font into a trained credibility prediction model, and obtains the predicted credibility corresponding to each handwritten font through the trained credibility prediction model; then, the server selects handwritten fonts whose predicted credibility is less than a preset credibility from each handwritten font, and uses these handwritten fonts as handwritten fonts to be processed; then, the server corrects the handwritten fonts to be processed to obtain corrected handwritten fonts; then, the server uses the handwritten fonts whose predicted credibility is greater than or equal to the preset credibility, as well as the corrected handwritten fonts, as target handwritten fonts; then, the server combines the text information and position information corresponding to the target handwritten font for the target handwritten font, and obtains the combination information corresponding to the target handwritten font; then, the server determines the numerical matrix corresponding to the document image based on the combination information corresponding to the target handwritten font.
[0113] In this embodiment, by inputting each handwritten font into a trained credibility prediction model, the credibility of each handwritten font can be judged more accurately using the model, avoiding the reduction of overall data accuracy caused by directly using these unreliable handwritten font data; moreover, correcting the handwritten font to be processed is conducive to improving data quality and providing a data basis for subsequent processing processes.
[0114] In an exemplary embodiment, a handwritten font to be processed is corrected to obtain a corrected handwritten font, which specifically includes the following contents: obtaining a plurality of preset handwritten fonts; performing feature extraction processing on the handwritten font to be processed and each preset handwritten font respectively to obtain a first feature vector corresponding to the handwritten font to be processed and a second feature vector corresponding to each preset handwritten font; determining the similarity between each preset handwritten font and the handwritten font to be processed based on the first feature vector and the second feature vector; and selecting, from each preset handwritten font, a preset handwritten font having a similarity greater than a preset similarity as the corrected handwritten font.
[0115] The preset handwriting font refers to a sample handwriting font.
[0116] The first feature vector refers to the feature vector corresponding to the handwritten font to be processed.
[0117] The second feature vector refers to a feature vector corresponding to a preset handwriting font.
[0118] Herein, the similarity may refer to cosine similarity.
[0119] The preset similarity refers to a preset similarity threshold value, which is used to judge the similarity between each preset handwritten font and the handwritten font to be processed. It should be noted that the preset similarity depends on the situation.
[0120] Exemplarily, the server obtains multiple preset handwriting fonts from a database; then, the server inputs the handwriting font to be processed and each preset handwriting font into the feature extraction model respectively, and performs feature extraction processing on the handwriting font to be processed and each preset handwriting font respectively through the feature extraction model to obtain a first feature vector corresponding to the handwriting font to be processed, and a second feature vector corresponding to each preset handwriting font; then, the server determines the cosine similarity between each preset handwriting font and the handwriting font to be processed based on the first feature vector and the second feature vector, as the similarity between each preset handwriting font and the handwriting font to be processed; then, the server selects the preset handwriting fonts whose similarity is greater than the preset similarity from each preset handwriting font, and uses these preset handwriting fonts as corrected handwriting fonts.
[0121] In this embodiment, by respectively extracting the feature vectors of the handwritten font to be processed and the preset handwritten font, the key features of the handwritten font can be quantified, and based on this, the preset handwritten font with a similarity greater than the preset similarity is screened out as the corrected handwritten font, so that the correction process has a reliable data basis, which is conducive to improving the accuracy of the correction of the handwritten font to be processed.
[0122] In an exemplary embodiment, the data entry method for pumped-storage equipment provided in the present application also includes a training step for a trained credibility prediction model, which specifically includes the following contents: obtaining a sample document image; preprocessing the sample document image to obtain a preprocessed sample document image; performing data recognition processing on the preprocessed sample document image to obtain each sample handwritten font in the preprocessed sample document image; inputting each sample handwritten font into the credibility prediction model to be trained to obtain the predicted credibility corresponding to each sample handwritten font; obtaining the actual credibility corresponding to each sample handwritten font, and iteratively training the credibility prediction model to be trained based on the difference between the predicted credibility and the actual credibility corresponding to each sample handwritten font to obtain a trained credibility prediction model.
[0123] The sample document image refers to a document image used to train the credibility prediction model to be trained.
[0124] The preprocessed sample document image refers to the sample document image after preprocessing.
[0125] The sample handwritten font refers to the handwritten font in the sample document image after preprocessing.
[0126] The predicted credibility corresponding to each sample handwritten font refers to the predicted value of the credibility corresponding to each sample handwritten font.
[0127] The actual credibility corresponding to each sample handwritten font refers to the actual value of the credibility corresponding to each sample handwritten font.
[0128] Exemplarily, in response to a model training instruction for a credibility prediction model to be trained, the server obtains a sample document image from a database; then, the server preprocesses the sample document image to obtain a preprocessed sample document image; then, the server performs data recognition processing on the preprocessed sample document image to obtain each sample handwritten font in the preprocessed sample document image; then, the server inputs each sample handwritten font into the credibility prediction model to be trained to obtain a predicted credibility corresponding to each sample handwritten font; then, the server obtains the actual credibility corresponding to each sample handwritten font, and obtains a loss value based on the difference between the predicted credibility and the actual credibility corresponding to each sample handwritten font; then, the server adjusts the model parameters of the credibility prediction model to be trained based on the loss value; then, the server retrains the credibility prediction model after the model parameters are adjusted until the loss value obtained by the trained credibility prediction model is less than the loss value threshold, then stops the training, and uses the trained credibility prediction model as the trained credibility prediction model.
[0129] In this embodiment, by pre-training the credibility prediction model, it is convenient to predict the predicted credibility corresponding to each handwritten font after obtaining each handwritten font in actual application; moreover, the credibility prediction model receives new data in each round of iteration, and performs internal improvements and optimizations on the model, so as to make predictions more effectively, which is beneficial to improving the prediction accuracy of the credibility prediction model.
[0130] In an exemplary embodiment, the above step S103 pre-processes the document image to obtain a pre-processed document image, which specifically includes the following contents: extracting a connected domain in the document image; determining the minimum enclosing rectangle corresponding to the connected domain; determining the image tilt angle corresponding to the document image based on the minimum enclosing rectangle; when the image tilt angle does not meet the preset tilt angle range, performing rotation correction processing on the document image to obtain a pre-processed document image.
[0131] The connected domain refers to the area in the image that consists of pixels with the same pixel value and adjacent positions.
[0132] The minimum enclosing rectangle refers to the smallest rectangle that can completely contain the connected domain.
[0133] The image tilt angle refers to the angle at which the document image deviates from a reference direction (such as a vertical direction).
[0134] The preset tilt angle range refers to a preset tilt angle range, such as an image tilt angle within ±5°. It should be noted that the preset tilt angle range depends on the situation.
[0135] Exemplarily, the server uses the YOLO (You Only Look Once, a target detection algorithm) algorithm to extract the connected domain in the document image; then, the server obtains the coordinate information corresponding to the connected domain, and determines the minimum enclosing rectangle corresponding to the connected domain based on the coordinate information corresponding to the connected domain; then, the server calculates the angle between the long side of the minimum enclosing rectangle and the horizontal direction as the image tilt angle corresponding to the document image, and judges the image tilt angle; when the image tilt angle does not meet the preset tilt angle range, the server performs rotation correction processing on the document image to obtain the pre-processed document image.
[0136] In this embodiment, by extracting the connected domain in the document image and determining its minimum circumscribed rectangle, the image tilt angle of the document image can be accurately determined, and rotation correction processing is performed when the image tilt angle does not meet the preset range, thereby effectively solving the tilt problem of the document image caused by various reasons, thereby improving the accuracy of the data in subsequent operations.
[0137] In an exemplary embodiment, the above step S103 preprocesses the document image to obtain a preprocessed document image, which specifically includes the following contents: identifying the noise in the document image and the target noise type corresponding to the noise; according to the target noise type, querying the correspondence between the noise type and the noise reduction processing method, obtaining the noise reduction processing method corresponding to the target noise type as the noise reduction processing method corresponding to the document image; performing noise reduction processing on the document image according to the noise reduction processing method to obtain a noise-reduced document image; performing image enhancement processing on the noise-reduced document image to obtain a preprocessed document image.
[0138] Among them, noise refers to the changes or fluctuations in pixels that interfere with the original information of the image.
[0139] The target noise type refers to the type of noise in the document image, such as salt and pepper noise, Gaussian noise, etc.
[0140] The correspondence between the noise type and the noise reduction processing method is used to indicate the association information between the noise type and the noise reduction processing method. For example, noise type A corresponds to noise reduction processing method a, noise type B corresponds to noise reduction processing method b, and noise type C corresponds to noise reduction processing method c.
[0141] The noise reduction processing method refers to a specific processing method for performing noise reduction on a document image, such as mean filtering, median filtering, etc.
[0142] Exemplarily, the server inputs the document image into the noise prediction model, and obtains the noise in the document image and the target noise type corresponding to the noise through the noise prediction model; then, the server queries the correspondence between the noise type and the noise reduction processing method according to the target noise type, and obtains the noise reduction processing method corresponding to the target noise type as the noise reduction processing method corresponding to the document image; then, the server performs noise reduction processing on the document image according to the noise reduction processing method, and obtains the document image after noise reduction processing as the noise reduced document image; then, the server performs image enhancement processing on the noise reduced document image, and obtains the noise reduced document image after image enhancement processing as the pre-processed document image.
[0143] In this embodiment, by first identifying the noise in the document image and the corresponding target noise type, and then adopting a targeted noise reduction processing method, various types of noise interference in the document image can be effectively removed, thereby improving the integrity of the document image and providing a high-quality data foundation for subsequent processing processes.
[0144] In an exemplary embodiment, Figure 2 As shown, another method for entering data of pumped storage equipment is provided, which is described by taking the method applied to a server as an example, and includes the following steps:
[0145] Step S201, obtaining a document image of an operation record document of the pumped-storage equipment; the operation record document includes a data table number and handwritten fonts corresponding to multiple groups of operation record data of the pumped-storage equipment.
[0146] Step S202: identifying a data table number from the document image, and determining data table structure information corresponding to the document image according to the data table number.
[0147] Step S203, extracting a connected domain in the document image; determining a minimum bounding rectangle corresponding to the connected domain; and determining an image tilt angle corresponding to the document image based on the minimum bounding rectangle.
[0148] Step S204: When the image tilt angle does not meet the preset tilt angle range, rotation correction processing is performed on the document image to obtain a pre-processed document image.
[0149] Step S205, identifying the noise in the document image and the target noise type corresponding to the noise; according to the target noise type, querying the correspondence between the noise type and the noise reduction processing method, obtaining the noise reduction processing method corresponding to the target noise type as the noise reduction processing method corresponding to the document image.
[0150] Step S206, performing noise reduction processing on the document image according to the noise reduction processing method to obtain a noise-reduced document image; performing image enhancement processing on the noise-reduced document image to obtain a pre-processed document image.
[0151] Step S207, performing data recognition processing on the preprocessed document image to obtain each handwritten font in the preprocessed document image, and text information and position information corresponding to each handwritten font.
[0152] Step S208, input each handwritten font into the trained credibility prediction model to obtain the prediction credibility corresponding to each handwritten font; from each handwritten font, select the handwritten font whose prediction credibility is less than the preset credibility as the handwritten font to be processed.
[0153] Step S209, obtaining a plurality of preset handwriting fonts; performing feature extraction processing on the handwriting font to be processed and each preset handwriting font respectively, to obtain a first feature vector corresponding to the handwriting font to be processed and a second feature vector corresponding to each preset handwriting font.
[0154] Step S210, determining the similarity between each preset handwriting font and the handwriting font to be processed according to the first feature vector and the second feature vector; and selecting a preset handwriting font with a similarity greater than a preset similarity from each preset handwriting font as a corrected handwriting font.
[0155] Step S211 , taking the handwritten fonts whose prediction credibility is greater than or equal to the preset credibility and the corrected handwritten fonts as target handwritten fonts.
[0156] Step S212: determining a numerical matrix corresponding to the document image according to the text information and position information corresponding to the target handwritten font.
[0157] Step S213, obtaining an input document of the operation record document according to the data table structure information and the value matrix.
[0158] In the above-mentioned method for entering data into pumped-storage equipment, during the process of entering data into the pumped-storage equipment, after obtaining the document image of the operation record document of the pumped-storage equipment, the data table number and each handwritten font can be quickly identified from the document image, so that the data table structure information and the numerical matrix corresponding to the document image of the operation record document can be quickly obtained, and then the entry document of the operation record document can be quickly obtained, which is conducive to improving the efficiency of entering data into the pumped-storage equipment; moreover, the entire process does not require manual intervention, avoiding the defect of low efficiency of pumped-storage equipment data entry due to the cumbersome manual entry method, which requires a lot of time and manpower, thereby improving the efficiency of entering data into the pumped-storage equipment.
[0159] In an exemplary embodiment, in order to more clearly illustrate the pumped storage equipment data entry method provided in the embodiment of the present application, the pumped storage equipment data entry method is specifically described below with a specific embodiment. In one embodiment, Figure 3 As shown, the present application also provides a method for intelligent data entry. In the process of data entry of pumped storage equipment, the document image of the operation record document of the pumped storage equipment is first obtained, and then the data table number is identified from the document image, and the data table structure information corresponding to the document image is determined according to the data table number. Then, the document image is preprocessed to obtain a preprocessed document image, and the preprocessed document image is subjected to data recognition processing to obtain each handwritten font in the preprocessed document image, as well as the text information and position information corresponding to each handwritten font. Then, according to the text information and position information corresponding to each handwritten font, the numerical matrix corresponding to the document image is determined. Finally, according to the data table structure information and the numerical matrix, the entry document of the operation record document is obtained. Specifically, it includes the following contents:
[0160] The user uploads the PDF document of the work record, and the system automatically completes the analysis and data entry functions. The main process is as follows:
[0161] 1. Identify data number: Identify data table number through OCR.
[0162] 2. According to the identified data number, index the maintenance test data entry configuration to obtain the corresponding data table structure information.
[0163] 3. Using a series of visual analysis algorithms (including preprocessing stage, recognition stage, enhancement stage, and sorting stage), the handwritten font data is written into a numerical matrix.
[0164] In the preprocessing stage:
[0165] (1) Image correction: Use visual algorithms (such as YOLO) to identify the position of the table image and rotate the image angle to prevent inaccurate recognition results caused by image correction during document scanning.
[0166] (2) Noise filtering: filtering the noise of the background image, increasing the contrast of the font image, and filtering out severely smeared handwriting or irregular ink marks.
[0167] During the identification phase:
[0168] (3) Target detection: Use the target detection algorithm to identify the location of each data and locate the position index of its data coordinates in its table.
[0169] (4) Font detection: using OCR and other technologies to identify handwritten fonts into informationized text data.
[0170] During the reinforcement phase:
[0171] (5) Trusted computing: identifying the credibility of handwritten fonts and marking fonts with low credibility to facilitate manual inspection and adjustment by users.
[0172] (6) Handwriting matching: For fonts with lower credibility, if there is a handwritten (digital) font sample of the person filling in the data, the result can be corrected by matching similar features through ResNet (Residual Network) and YOLO algorithm.
[0173] During the finishing phase:
[0174] (7) Organize the data to form a numerical matrix.
[0175] 4. Match the results of steps 2 and 3 to obtain the correct data entry results.
[0176] 5. After manual correction and review, the metadata model service is used to store the data in a time-series manner in the database corresponding to the big data platform.
[0177] In the above-mentioned embodiment, during the process of entering data for the pumped-storage equipment, after obtaining the document image of the operation record document of the pumped-storage equipment, the data table number and each handwritten font can be quickly identified from the document image, so that the data table structure information and the numerical matrix corresponding to the document image of the operation record document can be quickly obtained, and then the entry document of the operation record document can be quickly obtained, which is conducive to improving the efficiency of entering data for the pumped-storage equipment; moreover, the whole process does not require manual intervention, avoiding the defect of low efficiency of pumped-storage equipment data entry due to the cumbersome manual entry method, which requires a lot of time and manpower, and thus improves the efficiency of entering data for the pumped-storage equipment.
[0178] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0179] Based on the same inventive concept, the embodiment of the present application also provides a pumped-storage equipment data entry device for implementing the above-mentioned pumped-storage equipment data entry method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the pumped-storage equipment data entry device provided below can refer to the limitations of the pumped-storage equipment data entry method above, and will not be repeated here.
[0180] In an exemplary embodiment, Figure 4 As shown, a pumped storage equipment data entry device is provided, comprising: an image acquisition module 401, an information determination module 402, an image processing module 403, a data identification module 404, a matrix determination module 405 and a document entry module 406, wherein:
[0181] The image acquisition module 401 is used to acquire the document image of the operation record document of the pumped-storage equipment; the operation record document includes the data table number and the handwriting fonts corresponding to the multiple groups of operation record data of the pumped-storage equipment.
[0182] The information determination module 402 is used to identify the data table number from the document image, and determine the data table structure information corresponding to the document image according to the data table number.
[0183] The image processing module 403 is used to pre-process the document image to obtain a pre-processed document image.
[0184] The data recognition module 404 is used to perform data recognition processing on the pre-processed document image to obtain each handwritten font in the pre-processed document image, and the text information and position information corresponding to each handwritten font.
[0185] The matrix determination module 405 is used to determine the numerical matrix corresponding to the document image according to the text information and position information corresponding to each handwritten font.
[0186] The document input module 406 is used to obtain an input document of the operation record document according to the data table structure information and the value matrix.
[0187] In an exemplary embodiment, the pumped-storage equipment data entry device also includes a font processing module, which is used to input each handwritten font into a trained credibility prediction model to obtain the predicted credibility corresponding to each handwritten font; from each handwritten font, screen out the handwritten fonts whose predicted credibility is less than the preset credibility as the handwritten fonts to be processed; perform correction processing on the handwritten fonts to be processed to obtain the corrected handwritten fonts; use the handwritten fonts whose predicted credibility is greater than or equal to the preset credibility, and the corrected handwritten fonts, as target handwritten fonts; the matrix determination module 405 is also used to determine the numerical matrix corresponding to the document image according to the text information and position information corresponding to the target handwritten font.
[0188] In an exemplary embodiment, the font processing module is also used to obtain multiple preset handwriting fonts; perform feature extraction processing on the handwriting font to be processed and each preset handwriting font respectively to obtain a first feature vector corresponding to the handwriting font to be processed and a second feature vector corresponding to each preset handwriting font; determine the similarity between each preset handwriting font and the handwriting font to be processed based on the first feature vector and the second feature vector; and from each preset handwriting font, select a preset handwriting font whose similarity is greater than the preset similarity as a corrected handwriting font.
[0189] In an exemplary embodiment, the pumped-storage equipment data entry device also includes a model training module, which is used to obtain sample document images; preprocess the sample document images to obtain preprocessed sample document images; perform data recognition processing on the preprocessed sample document images to obtain each sample handwritten font in the preprocessed sample document image; input each sample handwritten font into the credibility prediction model to be trained to obtain the predicted credibility corresponding to each sample handwritten font; obtain the actual credibility corresponding to each sample handwritten font, and iteratively train the credibility prediction model to be trained based on the difference between the predicted credibility and the actual credibility corresponding to each sample handwritten font to obtain a trained credibility prediction model.
[0190] In an exemplary embodiment, the image processing module 403 is also used to extract connected domains in the document image; determine the minimum enclosing rectangle corresponding to the connected domain; determine the image tilt angle corresponding to the document image based on the minimum enclosing rectangle; when the image tilt angle does not meet the preset tilt angle range, perform rotation correction processing on the document image to obtain a pre-processed document image.
[0191] In an exemplary embodiment, the image processing module 403 is also used to identify the noise in the document image and the target noise type corresponding to the noise; according to the target noise type, query the correspondence between the noise type and the noise reduction processing method, obtain the noise reduction processing method corresponding to the target noise type, and use it as the noise reduction processing method corresponding to the document image; perform noise reduction processing on the document image according to the noise reduction processing method to obtain a noise-reduced document image; perform image enhancement processing on the noise-reduced document image to obtain a pre-processed document image.
[0192] Each module in the above-mentioned pumped storage equipment data entry device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0193] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as document images, data table numbers, handwritten fonts, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for entering data into a pumped storage device is implemented.
[0194] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0195] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0196] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0197] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0198] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0199] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0200] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for entering data of a pumped storage equipment, characterized in that: The method comprises: Acquire a document image of an operation record document of a pumped-storage equipment; the operation record document includes a data table number and handwritten fonts corresponding to multiple groups of operation record data of the pumped-storage equipment; Identifying the data table number from the document image, and determining the data table structure information corresponding to the document image according to the data table number; Preprocessing the document image to obtain a preprocessed document image; Performing data recognition processing on the preprocessed document image to obtain each of the handwritten fonts in the preprocessed document image, and text information and position information corresponding to each of the handwritten fonts; Determining a numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts; An input document of the operation record document is obtained according to the data table structure information and the numerical matrix.
2. The method according to claim 1, characterized in that: Before determining the numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts, the method further includes: Inputting each of the handwritten fonts into a trained credibility prediction model to obtain a prediction credibility corresponding to each of the handwritten fonts; From the handwritten fonts, select the handwritten font whose prediction credibility is less than the preset credibility as the handwritten font to be processed; Correcting the handwritten font to be processed to obtain a corrected handwritten font; The handwritten font whose predicted credibility is greater than or equal to the preset credibility, and the corrected handwritten font are both used as target handwritten fonts; The step of determining the numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts includes: The numerical matrix corresponding to the document image is determined according to the text information and position information corresponding to the target handwritten font.
3. The method according to claim 2, characterized in that The step of correcting the handwritten font to be processed to obtain a corrected handwritten font includes: Get multiple preset handwriting fonts; Performing feature extraction processing on the handwritten font to be processed and each preset handwritten font respectively to obtain a first feature vector corresponding to the handwritten font to be processed and a second feature vector corresponding to each preset handwritten font; Determining the similarity between each of the preset handwritten fonts and the handwritten font to be processed according to the first feature vector and the second feature vector; From each of the preset handwriting fonts, a preset handwriting font with a similarity greater than a preset similarity is selected as the corrected handwriting font.
4. The method according to claim 2, characterized in that: The trained credibility prediction model is obtained by training in the following way: Get a sample document image; Preprocessing the sample document image to obtain a preprocessed sample document image; Performing data recognition processing on the preprocessed sample document image to obtain each sample handwritten font in the preprocessed sample document image; Inputting each of the sample handwritten fonts into a credibility prediction model to be trained to obtain a prediction credibility corresponding to each of the sample handwritten fonts; The actual credibility corresponding to each of the sample handwritten fonts is obtained, and according to the difference between the predicted credibility and the actual credibility corresponding to each of the sample handwritten fonts, the credibility prediction model to be trained is iteratively trained to obtain the trained credibility prediction model.
5. The method according to any one of claims 1 to 4, characterized in that: The preprocessing of the document image to obtain a preprocessed document image includes: Extracting connected domains in the document image; Determine the minimum circumscribed rectangle corresponding to the connected domain; Determining an image tilt angle corresponding to the document image according to the minimum circumscribed rectangle; When the image tilt angle does not meet the preset tilt angle range, rotation correction processing is performed on the document image to obtain the pre-processed document image.
6. The method according to any one of claims 1 to 4, characterized in that: The preprocessing of the document image to obtain a preprocessed document image further includes: Identifying noise in the document image and a target noise type corresponding to the noise; According to the target noise type, query the correspondence between the noise type and the noise reduction processing method, and obtain the noise reduction processing method corresponding to the target noise type as the noise reduction processing method corresponding to the document image; According to the noise reduction processing method, the document image is subjected to noise reduction processing to obtain a noise-reduced document image; Performing image enhancement processing on the denoised document image to obtain the preprocessed document image.
7. A pumped storage equipment data entry device, characterized in that: The device comprises: An image acquisition module, used to acquire a document image of an operation record document of a pumped-storage equipment; the operation record document includes a data table number and handwriting fonts corresponding to multiple groups of operation record data of the pumped-storage equipment; An information determination module, used to identify the data table number from the document image, and determine the data table structure information corresponding to the document image according to the data table number; An image processing module, used for preprocessing the document image to obtain a preprocessed document image; A data recognition module, used for performing data recognition processing on the preprocessed document image to obtain each of the handwritten fonts in the preprocessed document image, and text information and position information corresponding to each of the handwritten fonts; A matrix determination module, used to determine the numerical matrix corresponding to the document image according to the text information and position information corresponding to each of the handwritten fonts; The document entry module is used to obtain the entry document of the operation record document according to the data table structure information and the numerical matrix.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Newspaper complex format structured identification method and system based on multi-modal large model
CN121366424A