Power customer digital archive classification method and device, electronic equipment and storage medium
By introducing a multi-template matching method of field matching and image matching, combined with three-level confidence calculation, the problem of recognition errors caused by unstable keyword features in the classification of digital archives of power customers was solved, and high-accuracy and automated archive classification was achieved.
Patent Information
- Application Number
- CN202510901756.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-17
Smart Images

Figure CN120808361A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of file classification, and is a power customer digital file classification method and device, electronic equipment and a storage medium. BACKGROUND
[0002] In the digital era, files are converted from traditional paper versions into electronic versions, and most current files are stored in a cloud storage mode to form electronic files stored in a database, so as to guarantee the convenience, flexibility and comprehensiveness of file resource retrieval. The classification of digital files is the core of digital file management, and appropriate and accurate classification plays an important role in the retrieval, borrowing and analysis of digital files.
[0003] The existing digital file classification is performed in the following manner, and the specific process is as follows:
[0004] The files are classified and stored according to the types of the files by using an artificial method, and this method is low in efficiency, error-prone and high in artificial intervention cost;
[0005] An intelligent classification technology based on deep learning is used, such as a single-mode RNN classification model, but lacks targeted training and has weak generalization, and the processing capacity for existing mixed-type power customer files is limited, and the key words in the power industry cannot be identified.
[0006] An optical character recognition (OCR) technology is used to recognize the text in a single-layer PDF file or an image file, or a format conversion technology is used to convert a double-layer PDF or an OFD file into a pure text file, and then a full-text retrieval technology is used to realize key word filtering of the text file, so as to realize classification. This method is prone to classification and recognition errors when the key word features are unstable. SUMMARY
[0007] The application provides a power customer digital file classification method, device, electronic equipment and storage medium, which overcomes the shortcomings of the prior art and effectively solves the problem that the existing power customer digital file classification method is prone to classification and recognition errors when the key word features are unstable.
[0008] One of the technical solutions of the application is realized by the following measures: a power customer digital file classification method, comprising:
[0009] Extracting classification features of the to-be-classified picture, wherein the classification features include the text box position, size and text information of the to-be-classified picture;
[0010] Inputting the classification features of the to-be-classified picture into a classifier set to obtain corresponding classification results and labels in combination with a classification rule;
[0011] The classifier set is used to output a field matching confidence and an image matching confidence between the classification feature and the plurality of standard templates;
[0012] The classification rule comprises:
[0013] It is determined whether |C1-C2| is less than a set threshold T, wherein C1 and C2 are two maximum field matching confidences;
[0014] If not, the standard template corresponding to the maximum field matching confidence is selected as the final classification result;
[0015] If yes, a final confidence between the standard templates corresponding to the two maximum field matching confidences and the classification feature is obtained, and the standard template corresponding to the maximum final confidence is selected as the final classification result, wherein the final confidence is calculated as follows:
[0016] S i = αC i +(1-α)I i
[0017] wherein C i is a field matching confidence between the standard template i and the classification feature; I i is an image matching confidence between the standard template i and the classification feature; and α is a weight coefficient.
[0018] The following is a further optimization or / and improvement of the above technical solutions:
[0019] The classifier set comprises a field matching classifier, an image matching classification model, and a plurality of standard templates.
[0020] The field matching classifier matches the text information of the classification feature with the keywords of the standard templates to obtain the corresponding field matching confidences.
[0021]
[0022] wherein C i is a field matching confidence between the standard template i and the text information of the classification feature; K i is a keyword set of the standard template i; w k is a weight of the keyword k; f k is a number of occurrences of the keyword k in the text information of the classification feature; and F is a total number of all single occurrences in the text information of the classification feature.
[0023] The image matching classification model is obtained through machine learning of a plurality of samples, and the image matching confidence between the classification result and the standard template corresponding to the classification result is obtained according to the text box position and size of the classification feature.
[0024] The construction of the image matching classification model comprises:
[0025] A plurality of samples are obtained and divided into a training sample set and a test sample set, wherein each sample comprises a text box position, size and corresponding classification result of a classified picture and an image matching confidence degree of being classified into each standard template;
[0026] A loss function is introduced, and a transfer learning network is used to iteratively train the training sample set to obtain an image matching classification model, wherein the transfer learning network comprises a ResNe network and a classification network;
[0027] The trained image matching classification model is tested by using the test sample set, the model parameters of the image matching classification model are optimized, and the image matching classification model meeting the test evaluation requirements is output.
[0028] The extraction of the classification features of the classified picture comprises:
[0029] An electronic file to be classified is obtained and converted into a classified image in a standard image format;
[0030] The classified image is preprocessed, wherein the preprocessing comprises denoising, binarization and contrast enhancement;
[0031] The classification features in the classified image are extracted by using an OCR recognition technology, wherein the classification features comprise a text box position, size and text information of the classified picture.
[0032] The construction of the standard template comprises:
[0033] A template picture with clear handwriting and correct placement is obtained and named;
[0034] The template picture is subjected to reference field framing based on a preset framing rule, and the corresponding standard template is obtained after framing.
[0035] The second technical solution of the present application is realized by the following measures: a power customer digital archive classification device, comprising:
[0036] A classification data acquisition unit extracts classification features of a classified picture, wherein the classification features comprise a text box position, size and text information of the classified picture;
[0037] A classification unit inputs the classification features of the classified picture into a classifier set, and obtains a corresponding classification result and label in combination with a classification rule;
[0038] The classifier set is used to output a field matching confidence degree and an image matching confidence degree between the classification features and a plurality of standard templates;
[0039] The classification rule comprises:
[0040] determining whether |C1-C2| is less than a set threshold T, wherein C1 and C2 are two maximum field matching confidences;
[0041] If not, a standard template corresponding to the maximum field matching confidence is selected as the final classification result;
[0042] If yes, a final confidence between the standard template corresponding to the two maximum field matching confidences and the classification feature is obtained, and a standard template corresponding to the maximum final confidence is selected as the final classification result, wherein the final confidence is calculated as follows:
[0043] S i = αC i +(1-α)I i
[0044] wherein C i is a field matching confidence between the standard template i and the classification feature; I i is an image matching confidence between the standard template i and the classification feature; and α is a weight coefficient.
[0045] The following is a further optimization or / and improvement of the above technical solutions:
[0046] The above further comprises a classifier set construction unit, which constructs a classifier set, comprising:
[0047] A first construction module, which constructs a field matching classifier, matches the text information of the classification feature with the keywords of the standard template to obtain the corresponding field matching confidence;
[0048]
[0049] wherein C i is a field matching confidence between the standard template i and the text information of the classification feature; K i is a keyword set of the standard template i; w k is a weight of the keyword k; f k is a number of occurrences of the keyword k in the text information of the classification feature; and F is a total number of all single times in the text information of the classification feature;
[0050] The first construction module constructs an image matching classification model, which is obtained by machine learning of a plurality of samples, and obtains the image matching confidence between the classification result and the standard template corresponding to the classification result according to the text box position and size of the classification feature, and the construction process comprises:
[0051] A plurality of samples are obtained and divided into a training sample set and a test sample set, wherein each sample includes the text box position, size and corresponding classification result of the classified picture and the image matching confidence of each standard template;
[0052] A loss function is introduced, and the transfer learning network is iteratively trained using the training sample set to obtain an image matching classification model, wherein the transfer learning network includes a ResNe network and a classification network.
[0053] The trained image matching classification model is tested using the test sample set, the model parameters of the image matching classification model are optimized, and the image matching classification model that meets the test evaluation requirements is output.
[0054] The third construction module constructs a standard template, comprising:
[0055] Obtain a template picture with clear handwriting and proper placement, and name it;
[0056] The template picture is framed based on the preset framing rule, and the corresponding standard template is obtained after framing.
[0057] The above classification data acquisition unit comprises:
[0058] The conversion module obtains the electronic file to be classified and converts it into a standard image format to be classified.
[0059] The preprocessing module pre-processes the image to be classified, wherein the preprocessing includes denoising, binarization and contrast enhancement.
[0060] The feature extraction module extracts classification features in the image to be classified using OCR recognition technology, wherein the classification features include the text box position, size and text information of the image to be classified.
[0061] The third technical solution of the present application is realized by the following measures: an electronic device comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to realize the steps of the power customer digital archive classification method.
[0062] The fourth technical solution of the present application is realized by the following measures: a storage medium, the storage medium storing a computer program readable by a computer, the computer program being set to execute the steps of the power customer digital archive classification method when running.
[0063] The application introduces field matching and image matching, sets a three-level confidence calculation classification rule, and optimizes the output of the optimal classification result, solves the problem that the existing power customer digital archive classification method is prone to classification recognition errors when the keyword feature is unstable, provides automatic power customer digital archive classification and label generation capability, reduces manual intervention, improves archive classification capability, and ensures the accuracy of archive classification. BRIEF DESCRIPTION OF DRAWINGS
[0064] FIG. 1 is a flowchart of a digital archive classification method provided by the application. Figure 1 FIG. 1 is a flowchart of a digital archive classification method provided by the application.
[0065] FIG. 2 is a flowchart of an image matching classification model construction method provided by the application. Figure 2 FIG. 2 is a flowchart of an image matching classification model construction method provided by the application.
[0066] FIG. 3 is a flowchart of a classification feature extraction method provided by the application. Figure 3 FIG. 3 is a flowchart of a classification feature extraction method provided by the application.
[0067] FIG. 4 is a schematic diagram of a digital archive classification device provided by the application. Figure 4 FIG. 4 is a schematic diagram of a digital archive classification device provided by the application.
[0068] FIG. 5 is another schematic diagram of a digital archive classification device provided by the application. Figure 5 FIG. 5 is another schematic diagram of a digital archive classification device provided by the application. DETAILED DESCRIPTION
[0069] The application is not limited by the following examples, and the specific implementation can be determined according to the technical solution of the application and the actual situation.
[0070] Those skilled in the art can understand that, unless specifically stated, the "module" or "unit" in the embodiments of the application refers to a computer program or a part of a computer program with a predetermined function, and works with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as processing circuitry or memory) or a combination thereof. Similarly, one processor (or multiple processors or memory) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of the module or unit.
[0071] In addition, "multiple" in the embodiments of the application refers to two or more, and "first" and "second" are used to distinguish the description and cannot be understood as implying relative importance.
[0072] The embodiment of the application provides a power customer digital archive classification method, device, electronic equipment and storage medium. The power customer digital archive classification method and device can be integrated in a computer device, which can be a server or a terminal or the like. The terminal and the server can also be jointly executed, and the above examples should not be understood as a limitation of the application.
[0073] The terminal can include a mobile phone, a wearable smart device, a tablet computer, a notebook computer, a personal computer (PC), and a vehicle-mounted computer, and the application does not limit the terminal. The number of terminal devices is not limited.
[0074] The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms, and the application does not limit the server.
[0075] For example, the computer device extracts classification features of the picture to be classified, wherein the classification features include the text box position, size and text information of the picture to be classified; the classification features of the picture to be classified are input into a classifier set to obtain corresponding classification results and labels in combination with a classification rule, wherein the classifier set is used to output field matching confidence and image matching confidence between the classification features and a plurality of standard templates, wherein the classification rule includes judging whether |C1-C2| is less than a set threshold T, wherein C1 and C2 are two maximum field matching confidences; if not, the standard template corresponding to the maximum field matching confidence is selected as the final classification result; if yes, the final confidence between the standard templates corresponding to the two maximum field matching confidences and the classification features is obtained, and the standard template corresponding to the maximum final confidence is selected as the final classification result.
[0076] Therefore, the technical solutions of the application will be described below in combination with several examples.
[0077] Embodiment 1: As shown in the accompanying Figure 1 The embodiment of the application discloses a power customer digital archive classification method, which comprises the following steps:
[0078] Step S110, extracting classification features of the picture to be classified, wherein the classification features include the text box position, size and text information of the picture to be classified;
[0079] Step S120, inputting the classification features of the picture to be classified into a classifier set to obtain corresponding classification results and labels in combination with a classification rule;
[0080] The classifier set is used to output a field matching confidence and an image matching confidence between the classification feature and the plurality of standard templates.
[0081] The classification rule comprises:
[0082] determining whether |C1-C2| is less than a set threshold T, wherein C1 and C2 are two maximum field matching confidences;
[0083] If not, selecting the standard template corresponding to the maximum field matching confidence as the final classification result;
[0084] If yes, obtaining a final confidence between the standard templates corresponding to the two maximum field matching confidences and the classification feature, and selecting the standard template corresponding to the maximum final confidence as the final classification result, wherein the final confidence is calculated as follows:
[0085] S i = aC i +(1-a)I i
[0086] wherein C i is a field matching confidence between the standard template i and the classification feature; I i is an image matching confidence between the standard template i and the classification feature; and a is a weight coefficient.
[0087] The above-mentioned classifier set introduces a dual matching mode of field matching and image matching, can output a field matching confidence and an image matching confidence between the classification feature and the plurality of standard templates, and increases the diversity of the classification mode.
[0088] The above-mentioned classification rule is set based on three-level confidence calculation, determines a final confidence by combining an image matching confidence when a field matching confidence is similar, and thus obtains a final classification result, effectively reduces the dependence on field matching, and can ensure the effectiveness of classification recognition when a keyword feature is unstable.
[0089] In the above-mentioned classification rule, it is determined whether |C1-C2| is less than a set threshold T, wherein C1 and C2 are two maximum field matching confidences, that is, the field matching confidences between the classification feature and each standard template are determined, all the field matching confidences are sorted, and two maximum field matching confidences are selected.
[0090] In the above classification rule, if |C1-C2| is not less than a set threshold T, it indicates that the field matching confidence is not similar, and thus the standard template corresponding to the maximum field matching confidence is selected as the final classification result; if |C1-C2| is less than the set threshold T, it indicates that the field matching confidence is similar, and thus the standard templates corresponding to the two maximum field matching confidences are determined, the image matching confidence between the classification feature and each of the two standard templates is calculated, and then two final confidences are obtained based on the final confidence calculation formula, and the standard template corresponding to the maximum final confidence is selected as the final classification result.
[0091] The embodiment of the application provides a power customer digital archive classification method, introduces field matching and image matching, sets a three-level confidence calculation classification rule, and optimally outputs an optimal classification result, solves the problem that the existing power customer digital archive classification method is prone to classification recognition errors when keyword features are unstable, provides automatic power customer digital archive classification and label generation capability, reduces manual intervention, improves archive classification capability, and ensures the accuracy of archive classification.
[0092] Embodiment 2: The embodiment of the application is a further optimization of the above-mentioned embodiment, wherein the classifier set includes a field matching classifier, an image matching classification model, and a plurality of standard templates.
[0093] The field matching classifier matches the text information of the classification feature with the keywords of the standard template to obtain the corresponding field matching confidence.
[0094]
[0095] wherein, C i is the field matching confidence between the standard template i and the text information of the classification feature; K i is the keyword set of the standard template i; w k is the weight of the keyword k; f k is the number of occurrences of the keyword k in the text information of the classification feature; and F is the total number of all single times in the text information of the classification feature.
[0096] The image matching classification model is obtained by machine learning of a plurality of samples, and the image matching confidence between the classification result and the standard template corresponding to the classification result is obtained according to the text box position and size of the classification feature.
[0097] wherein, as shown in FIG. 2, the construction of the image matching classification model includes: Figure 2
[0098] Step S210, a plurality of samples are obtained and divided into a training sample set and a test sample set, wherein each sample includes the text box position and size of a classified image, the corresponding classification result and the image matching confidence of each standard template;
[0099] The sample obtaining process includes:
[0100] The historical electronic file is obtained and converted into a classified image in a standard image format;
[0101] The classified image is preprocessed, wherein the preprocessing includes denoising, binarization and contrast enhancement;
[0102] The classification features in the classified image are extracted by using an OCR recognition technology, wherein the classification features include the text box position and size of the classified image, and the corresponding classification result and the image matching confidence of each standard template are identified.
[0103] Step S220, a loss function is introduced, and the training sample set is used to iteratively train a network to obtain an image matching classification model, wherein the network includes a ResNe network and a classification network; ResNet (Residual Network) is one of the classic architectures of CNN, which introduces residual connection to effectively solve the gradient vanishing problem of deep neural networks, and is suitable for deep network structure (ResNet-50, ResNet-101, etc.), which can improve the classification accuracy.
[0104] Step S230, the test sample set is used to test the trained image matching classification model, the model parameters of the image matching classification model are optimized, and the image matching classification model meeting the test evaluation requirements is output.
[0105] The construction of the standard template includes:
[0106] Step S310, a template image with clear handwriting and correct placement is obtained and named.
[0107] Step S320, the template image is framed based on a preset framing rule, and the corresponding standard template is obtained after framing.
[0108] The framing rule includes:
[0109] (1) Select a fixed and unchanged text area in the template image as a reference field, which is used for template matching and image correction;
[0110] (2) The number of reference fields should be no less than 4 (recommended to be more than 8), and they should be distributed as much as possible at the four corners of the image to enhance the correction effect;
[0111] (3) Reference field needs to follow:
[0112] (a) Single field cannot be across lines, to avoid affecting positioning accuracy;
[0113] (b) Recommended number of words is more than 4, to ensure extraction stability;
[0114] (c) Selected reference field will not be repeated in the context of the picture, to ensure uniqueness.
[0115] Embodiment 3: As shown in the accompanying Figure 3 , the embodiment of the application is a further optimization of the above-mentioned embodiment, wherein the classification features of the picture to be classified are extracted, including:
[0116] Step S410, obtaining an electronic file to be classified, and converting it into a standard image format of a picture to be classified; Here, the format of the electronic file includes PDF, Word, Excel, etc., and the standard image format includes JPEG, PNG, etc.
[0117] Step S420, pre-processing the picture to be classified, wherein the pre-processing includes denoising, binarization and contrast enhancement; Here, denoising is used to remove scanning noise points and improve clarity; Binarization is used to enhance the contrast of text, which is beneficial to the extraction of features by OCR recognition technology; Contrast enhancement is used to improve the readability of weak contrast images.
[0118] Step S430, extracting classification features in the picture to be classified by using OCR recognition technology, wherein the classification features include the position, size and text information of the text box of the picture to be classified.
[0119] Embodiment 4: As shown in the accompanying Figure 4 , the embodiment of the application discloses a power customer digital archive classification device, comprising:
[0120] A classification data acquisition unit extracts classification features of a picture to be classified, wherein the classification features include the position, size and text information of the text box of the picture to be classified.
[0121] A classification unit inputs the classification features of the picture to be classified into a classifier set, and obtains a corresponding classification result and label in combination with a classification rule;
[0122] Wherein, the classifier set is used to output the field matching confidence and the image matching confidence between the classification features and a plurality of standard templates;
[0123] Wherein, the classification rule includes:
[0124] Determine whether |C1-C2| is less than a set threshold T, wherein C1 and C2 are two maximum field matching confidences;
[0125] If no, the standard template corresponding to the maximum field matching confidence is selected as the final classification result;
[0126] If yes, the final confidence between the standard templates corresponding to the two maximum field matching confidences and the classification feature is obtained, and the standard template corresponding to the maximum final confidence is selected as the final classification result, wherein the final confidence is calculated as shown below:
[0127] S i = aC i + (1-a) I i
[0128] wherein C i is the field matching confidence between the standard template i and the classification feature; I i is the image matching confidence between the standard template i and the classification feature; and a is a weight coefficient.
[0129] The specific steps of each unit in this embodiment are the same as those in Embodiments 1 to 3, and will not be repeated.
[0130] The classification data acquisition unit comprises:
[0131] The conversion module converts the electronic file to be classified into a standard image format to-be-classified image.
[0132] The preprocessing module pre-processes the to-be-classified image, wherein the preprocessing includes denoising, binarization and contrast enhancement.
[0133] The feature extraction module extracts the classification feature in the to-be-classified image by using the OCR recognition technology, wherein the classification feature includes the text box position, size and text information of the to-be-classified image.
[0134] Embodiment 5: As shown in the accompanying drawings, Figure 5 The power customer digital archive classification device disclosed by the embodiment of the application comprises:
[0135] The classifier set construction unit comprises:
[0136] The first construction module constructs a field matching classifier, matches the text information of the classification feature with the keywords of the standard template, and obtains the corresponding field matching confidence.
[0137]
[0138] wherein C i is the field matching confidence between the standard template i and the text information of the classification feature; K i is the keyword set of the standard template i; w k is the weight of the keyword k; and f kis the number of times the keyword k appears in the text information of the classification feature; F is the total number of all single times in the text information of the classification feature;
[0139] a first construction module, which constructs an image matching classification model, the image matching classification model being obtained through machine learning of a plurality of samples, and the image matching classification model being used to obtain an image matching confidence between a classification result and a standard template corresponding to the classification result according to a text box position and size of the classification feature, and the construction process including:
[0140] a plurality of samples are obtained and divided into a training sample set and a test sample set, wherein each sample includes a text box position and size of a classification picture, a corresponding classification result and an image matching confidence of the sample to each standard template;
[0141] a loss function is introduced, and a transfer learning network is used to iteratively train the training sample set to obtain the image matching classification model, wherein the transfer learning network includes a ResNe network and a classification network;
[0142] the test sample set is used to test the trained image matching classification model, the model parameters of the image matching classification model are optimized, and the image matching classification model meeting the test evaluation requirements is output;
[0143] a third construction module, which constructs a standard template, including:
[0144] a template picture with clear handwriting and correct placement is obtained and named;
[0145] the template picture is subjected to field framing based on a preset framing rule, and the corresponding standard template is obtained after framing;
[0146] a classification data acquisition unit extracts classification features of a picture to be classified, wherein the classification features include a text box position, size and text information of the picture to be classified;
[0147] a classification unit inputs the classification features of the picture to be classified into a classifier set, and obtains a corresponding classification result and label in combination with a classification rule;
[0148] The classifier set is used to output a field matching confidence and an image matching confidence between the classification features and a plurality of standard templates.
[0149] The classification rule includes:
[0150] whether ∣C1-C2∣ is less than a set threshold T is judged, wherein C1 and C2 are two maximum field matching confidences;
[0151] if not, a standard template corresponding to the maximum field matching confidence is selected as a final classification result;
[0152] If yes, the final confidence between the standard template corresponding to the two maximum field matching confidences and the classification feature is obtained, and the standard template corresponding to the maximum final confidence is selected as the final classification result, wherein the final confidence is calculated as shown below:
[0153] S i =αC i +(1-α)I i
[0154] wherein C i is the field matching confidence between the standard template i and the classification feature; I i is the image matching confidence between the standard template i and the classification feature; and a is a weight coefficient.
[0155] Embodiment 6: The embodiment of the present application discloses a storage medium, wherein the storage medium stores a computer program readable by a computer, and the computer program is arranged to execute the power customer digital archive classification method when running.
[0156] The storage medium can include but is not limited to: a U disk, a read-only memory, a mobile hard disk, a magnetic disk or an optical disk, and various storage media capable of storing computer programs.
[0157] Embodiment 7: The embodiment of the present application discloses an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to realize the power customer digital archive classification method.
[0158] The processor can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can realize or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure. It can also be a combination of computing functions, such as one or more microprocessor combinations, DSP and microprocessor combinations, etc. The memory can include but is not limited to: a U disk, a read-only memory, a mobile hard disk, a magnetic disk or an optical disk, and various storage media capable of storing computer programs.
[0159] Those skilled in the art will appreciate that embodiments of the application can be readily used as a method, a system or a computer program product. Accordingly, the application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code. The program code may
[0160] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions specified in the flowchart block or blocks. Figure 1 The flowchart and / or block diagram in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each flowchart block and / or combination of flowchart blocks can represent a module, segment, or portion of code, which comprises one or more executable Figure 1 The flowchart and / or block diagram in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each flowchart block and / or combination of flowchart blocks can represent a module, segment, or portion of code, which comprises one or more executable
[0161] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions specified in the flowchart block or blocks. Figure 1 The flowchart and / or block diagram in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each flowchart block and / or combination of flowchart blocks can represent a module, segment, or portion of code, which comprises one or more executable Figure 1 The flowchart and / or block diagram in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each flowchart block and / or combination of flowchart blocks can represent a module, segment, or portion of code, which comprises one or more executable
[0162] The above description is only specific implementation of the present application, which has strong adaptability and implementation effect, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, equivalent changes made according to the claims of the present application are still covered within the scope of the present application.
Claims
1. A method for classifying digital files of power customers, characterized in that: include: Extract the classification features of the image to be classified, where Classification features include the text box position, size, and text information of the image to be classified; Input the classification features of the image to be classified into the classifier set, and combine the classification rules to obtain the corresponding classification results and labels; The classifier set is used to output the field matching confidence and image matching confidence between the classification features and multiple standard templates; The classification rules include: Determine whether |C1-C2| is less than the set threshold T, where C1 and C2 are the two maximum field matching confidences; If not, the standard template corresponding to the maximum field matching confidence is selected as the final classification result; If so, the final confidence between the standard templates and the classification features corresponding to the two maximum field matching confidences is obtained, and the standard template corresponding to the maximum final confidence is selected as the final classification result. The final confidence calculation process is as follows: S i =αC i +(1-a)I i Among them, C i is the field matching confidence between the standard template i and the classification feature; I i is the image matching confidence between the standard template i and the classification feature; α is the weight coefficient.
2. The method for classifying digital files of electric power customers according to claim 1, characterized in that: The classifier set includes a field matching classifier, an image matching classification model and a plurality of standard templates; The field matching classifier matches the text information of the classification feature with the keywords of the standard template to obtain the corresponding field matching confidence; Among them, C i K is the field matching confidence between the standard template i and the text information of the classification feature; i is the keyword set of standard template i; w k is the weight of keyword k; f k is the number of times keyword k appears in the text information of the classification feature; F is the total number of all single occurrences in the text information of the classification feature; The image matching classification model is obtained by machine learning on several samples. According to the position and size of the text box of the classification feature, the image matching confidence between the classification result and the standard template corresponding to the classification result is obtained.
3. The method for classifying digital files of electric power customers according to claim 2, characterized in that: The construction of the image matching classification model includes: Obtain several samples and divide them into a training sample set and a test sample set, where each sample includes the text box position and size of the classified image, the corresponding classification result, and the image matching confidence level assigned to each standard template; A loss function is introduced and the training sample set transfer learning network is used for iterative training to obtain an image matching classification model, where the transfer learning network includes a ResNe network and a classification network. The trained image matching classification model is tested using the test sample set, the model parameters of the image matching classification model are optimized, and an image matching classification model that meets the test evaluation requirements is output.
4. The method for classifying digital files of electric power customers according to any one of claims 1 to 3, characterized in that: The step of extracting classification features of the image to be classified includes: Acquire electronic files to be classified and convert them into images to be classified in a standard image format; Preprocess the image to be classified, including denoising, binarization and contrast enhancement; The OCR recognition technology is used to extract classification features from the image to be classified, where the classification features include the text box position, size and text information of the image to be classified.
5. The method for classifying digital files of electric power customers according to any one of claims 1 to 4, characterized in that: The construction of the standard template includes: Get a template image with clear handwriting and neat placement, and name it; Based on the preset selection rules, the template image is selected with reference to the fields, and the corresponding standard template is obtained after selection.
6. A device for classifying digital files of electric power customers using the method according to any one of claims 1 to 5, characterized in that: include: The classification data acquisition unit extracts the classification features of the image to be classified, where Classification features include the text box position, size, and text information of the image to be classified; The classification unit inputs the classification features of the image to be classified into the classifier set, and obtains the corresponding classification results and labels based on the classification rules; The classifier set is used to output the field matching confidence and image matching confidence between the classification features and multiple standard templates; The classification rules include: Determine whether |C1-C2| is less than the set threshold T, where C1 and C2 are the two maximum field matching confidences; If not, the standard template corresponding to the maximum field matching confidence is selected as the final classification result; If so, the final confidence between the standard templates and the classification features corresponding to the two maximum field matching confidences is obtained, and the standard template corresponding to the maximum final confidence is selected as the final classification result. The final confidence calculation process is as follows: S i =αC i +(1-a)I i Among them, C i is the field matching confidence between the standard template i and the classification feature; I i is the image matching confidence between the standard template i and the classification feature; α is the weight coefficient.
7. The electric power customer digital archive classification device according to claim 6, characterized in that: It also includes a classifier set building unit, which builds a classifier set, including: The first building module builds a field matching classifier to match the text information of the classification feature with the keywords of the standard template to obtain the corresponding field matching confidence; Among them, C i K is the field matching confidence between the standard template i and the text information of the classification feature; i is the keyword set of standard template i; w k is the weight of keyword k; f k is the number of times keyword k appears in the text information of the classification feature; F is the total number of all single occurrences in the text information of the classification feature; The first construction module is to build an image matching classification model. The image matching classification model is obtained by machine learning on a number of samples. Based on the position and size of the text box of the classification feature, the image matching confidence between the classification result and the standard template corresponding to the classification result is obtained. The construction process includes: Obtain several samples and divide them into a training sample set and a test sample set, where each sample includes the text box position and size of the classified image, the corresponding classification result, and the image matching confidence level assigned to each standard template; A loss function is introduced and the training sample set transfer learning network is used for iterative training to obtain an image matching classification model, where the transfer learning network includes a ResNe network and a classification network. Use the test sample set to test the trained image matching classification model, optimize the model parameters of the image matching classification model, and output an image matching classification model that meets the test evaluation requirements; The third building block is to build a standard template, including: Get a template image with clear handwriting and neat placement, and name it; Based on the preset selection rules, the template image is selected with reference to the fields, and the corresponding standard template is obtained after selection.
8. The power customer digital archive classification device according to claim 6 or 7, characterized in that: The classification data acquisition unit includes: A conversion module, which obtains the electronic file to be classified and converts it into an image to be classified in a standard image format; The preprocessing module preprocesses the image to be classified, including denoising, binarization and contrast enhancement; The feature extraction module uses OCR recognition technology to extract classification features from the image to be classified, where the classification features include the text box position, size and text information of the image to be classified.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the steps in the method according to any one of claims 1 to 5.
10. A storage medium, characterized in that: The storage medium stores a computer program that can be read by a computer, and the computer program is configured to execute the steps of the method according to any one of claims 1 to 5 when run.
Citation Information
Cited By
Architectural drawing signature character recognition and control method and device, equipment and medium
CN121963248A