Electric power settlement data analysis method and device, electronic equipment and storage medium
By performing character recognition and attribute analysis on the power settlement statement, combined with data processing of the large language model, the analysis accuracy problem caused by the complexity of the power settlement statement is solved, and efficient and accurate data extraction and analysis are achieved.
Patent Information
- Application Number
- CN202411250383.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-27
AI Technical Summary
The complexity and diversity of power settlement statements lead to enterprises being prone to errors in verification and calculation, and it is difficult for existing technology to effectively improve the accuracy of data analysis.
By obtaining the power settlement statement, character recognition processing is performed to obtain text data, attribute analysis is performed based on text data, matching target information templates are determined, and inputting them into the pre-trained large language model for data analysis and processing, and obtaining target analysis information.
It reduces the workload of manual entry, improves the accuracy and efficiency of data analysis, reduces the possibility of human error, ensures the accuracy and standardization of information extraction, and can dig deeper information in power settlement statements.
Smart Images

Figure CN119205009A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for analyzing power settlement data. Background Art
[0002] The electricity settlement bill is a bill issued by the power trading center that records the electricity consumption and related expenses in detail. For enterprises, the electricity settlement bill is an important evaluation voucher for measuring the use of enterprise resources.
[0003] However, electricity settlement statements are diverse. The electricity settlement statements of different power trading centers are different, and the electricity settlement statements at different time points are also different. In addition to electricity settlement data, the electricity settlement statement also includes other complex data information, which increases the difficulty for enterprises to use the electricity settlement statement. In related technologies, enterprises enter information manually, but the items in the electricity settlement statement are complex and difficult to read, and errors are prone to occur in verification and calculation. Therefore, how to improve the accuracy of data analysis of electricity settlement statements has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose an electricity settlement data analysis method, device, electronic device and storage medium, aiming to improve the accuracy of data analysis on electricity settlement bills.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a method for analyzing power settlement data, the method comprising:
[0006] Get electricity bills;
[0007] Performing character recognition processing on the electricity settlement sheet to obtain settlement sheet text data;
[0008] Perform attribute analysis based on the settlement form text to obtain form attribute information;
[0009] Determine a matching target information template from a plurality of preset candidate information templates based on the form attribute information;
[0010] The target information template and the settlement form text data are input into a pre-trained large language model for data analysis and processing to obtain target analysis information.
[0011] In some embodiments, the form attribute information includes regional attribute information and energy attribute information, and the attribute analysis based on the settlement form text to obtain the form attribute information includes:
[0012] Performing regional analysis based on the settlement form text data to obtain the regional attribute information;
[0013] Performing energy type analysis based on the text data of the settlement sheet to obtain the energy attribute information;
[0014] The determining a matching target information template from a plurality of preset candidate information templates based on the form attribute information includes:
[0015] Based on the regional attribute information and the energy attribute information, a matching target information template is determined from a plurality of preset candidate information templates.
[0016] In some embodiments, before determining the matching target information template from a plurality of preset candidate information templates based on the regional attribute information and the energy attribute information, the method further includes presetting a plurality of the candidate information templates, specifically including:
[0017] Obtaining the electricity settlement bill, and obtaining the regional attribute information and the energy attribute information of the electricity settlement bill;
[0018] Based on the regional attribute information and the energy attribute information, construct corresponding noun conversion rules;
[0019] Based on the regional attribute information and the energy attribute information, construct a corresponding energy calculation rule;
[0020] The candidate information template is preset based on the noun conversion rule and the energy calculation rule.
[0021] In some embodiments, the target information template and the settlement form text data are input into a pre-trained large language model for data processing, and before obtaining the target analysis information, the pre-training of the large language model is also included, specifically including:
[0022] Acquire a training data set; wherein the training data set includes a plurality of training samples, each of the training samples corresponds to the settlement sheet text data obtained by processing the electricity settlement sheet, wherein the settlement sheet text data is configured with the corresponding target information template, and each of the training samples is configured with a corresponding data analysis result;
[0023] Inputting the training sample into the original large language model for data analysis training to obtain original analysis information;
[0024] Comparing the original analysis information corresponding to the training sample with the data analysis result to obtain comparison deviation data;
[0025] The model parameters of the large language model are updated based on the comparison deviation data, and the process of inputting the training samples into the large language model for data analysis training is returned to the large language model until the large language model meets a preset training termination condition, thereby obtaining the pre-trained large language model.
[0026] In some embodiments, after performing character recognition processing on the electricity settlement sheet to obtain the settlement sheet text data, the process further includes preprocessing the settlement sheet text data, specifically including:
[0027] Inputting the settlement form text data into the large language model for confidence screening to obtain data to be corrected;
[0028] Correcting the data to be corrected by using the large language model to obtain credible text data;
[0029] The trusted text data is subjected to data reduction processing to obtain pre-processed text data.
[0030] In some embodiments, the settlement sheet text data includes text content data and corresponding text coordinate data, and the character recognition processing of the power settlement sheet to obtain the settlement sheet text data includes:
[0031] Performing character recognition processing on the electricity settlement form to obtain the text content data and the corresponding text coordinate data;
[0032] The attribute analysis based on the settlement form text is performed to obtain form attribute information, including:
[0033] The position of the form attribute information is determined by the text coordinate data, and the corresponding text content data is determined as the form attribute information by the text coordinate data.
[0034] In some embodiments, the target information template and the settlement form text data are input into a pre-trained large language model for data processing to obtain target analysis information, specifically including:
[0035] The analysis process of obtaining the target analysis information based on the target information template and the settlement form text data is exported to obtain analysis process data;
[0036] Perform verification processing according to the analysis process data to obtain verification data;
[0037] The model parameters of the large language model are adjusted based on the verification data to obtain an adjusted large language model.
[0038] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a power settlement data analysis device, the device comprising:
[0039] A data acquisition module, used to obtain electricity settlement bills;
[0040] A character recognition module, used to perform character recognition processing on the electricity settlement sheet to obtain settlement sheet text data;
[0041] The text analysis module is used to perform attribute analysis based on the text of the settlement form to obtain form attribute information;
[0042] A template matching module, used to determine a matching target information template from a plurality of preset candidate information templates based on the form attribute information;
[0043] The data analysis module is used to input the target information template and the settlement form text data into a pre-trained large language model for data analysis and processing to obtain target analysis information.
[0044] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the electricity settlement data analysis method described in the first aspect when executing the computer program.
[0045] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the electricity settlement data analysis method described in the first aspect above is implemented.
[0046] The power settlement data analysis method, device, electronic device and storage medium proposed in the present application obtain the power settlement bill, perform character recognition processing on the power settlement bill, and obtain the text data of the settlement bill. This reduces the workload of manual entry, improves efficiency, and reduces the possibility of human error. Then, attribute analysis is performed based on the text data of the settlement bill to obtain form attribute information, and the matching target information template is determined from multiple preset candidate information templates based on the form attribute information, thereby ensuring the accuracy of information extraction in subsequent processing, and using the matching target information template can ensure the correct extraction and standardization of data. Finally, the target information template and the text data of the settlement bill are input into the pre-trained large language model for data analysis and processing to obtain target analysis information, so as to use the powerful text understanding and analysis capabilities of the large language model to accurately analyze the information in the power settlement bill and dig out deeper information in the power settlement bill. It can be seen that the present application determines the matching target information template from multiple preset candidate information templates through form attribute information, ensures the accuracy of information extraction, and performs data analysis and processing through the large language model to obtain accurate and deeper target analysis information. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flow chart of the power settlement data analysis method provided in an embodiment of the present application;
[0048] Figure 2 yes Figure 1 The flowchart after step S102 in FIG.
[0049] Figure 3 yes Figure 1 Flow chart of step S102 in FIG.
[0050] Figure 4 yes Figure 1 Flowchart of step S103 and step S104 in FIG.
[0051] Figure 5 yes Figure 4 The flowchart before step S403 in FIG.
[0052] Figure 6 yes Figure 1 The flowchart before step S105 in FIG.
[0053] Figure 7 yes Figure 1 The flowchart after step S105 in FIG.
[0054] Figure 8 It is a structural schematic diagram of the power settlement data analysis device provided in an embodiment of the present application;
[0055] Fig. 9It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0056] 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.
[0057] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0059] First, some nouns involved in this application are analyzed:
[0060] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0061] Large Language Model (LLM) refers to a deep learning model trained with a large amount of text data that can generate natural language text or understand the meaning of language text. Large language models can handle a variety of natural language tasks, such as text classification, question answering, and conversation. Currently, large language models use a Transformer architecture and pre-training objectives (such as Language Mode ling) similar to small models. Due to their scale and the amount of pre-trained data, large language models usually show strong generalization capabilities and are often able to perform zero-shot learning or few-shot learning, that is, complete new tasks without additional training, and can be directly applied to a variety of tasks without additional training.
[0062] Optical Character Recognition (OCR) is a technology used to convert printed or handwritten text in scanned documents and images into machine-encoded text. OCR technology is widely used in digital archives, book scanning, file management and other fields, greatly improving work efficiency and reducing manual input errors.
[0063] Prompt: In AI big models, the main function of prompt is to give the AI model the context of input information and parameter information of the input model. It is the initial text input provided by the user when interacting with the model, which is used to guide the model to generate the corresponding output. The design of prompt is crucial for the model to accurately understand the user's intention and give an appropriate answer.
[0064] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages (such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.
[0065] Information Extraction: A text processing technology that extracts specified types of entity, relationship, event and other factual information from natural language text and forms structured data output. Information extraction is a technology that extracts specific information from text data. Text data is composed of some specific units, such as sentences, paragraphs, and chapters. Text information is composed of some small specific units, such as characters, words, phrases, sentences, paragraphs, or a combination of these specific units. Extracting noun phrases, names, place names, etc. from text data are all text information extraction. Of course, the information extracted by text information extraction technology can be various types of information.
[0066] The embodiments of the present application provide a method, device, electronic device and storage medium for analyzing electricity settlement data, aiming to improve the accuracy of data analysis on electricity settlement bills.
[0067] The power settlement data analysis method, device, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the power settlement data analysis method in the embodiments of the present application is described.
[0068] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0069] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0070] The power settlement data analysis method provided in the embodiment of the present application relates to the field of data processing technology. The power settlement data analysis method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the power settlement data analysis method, etc., but is not limited to the above forms.
[0071] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0072] Figure 1 is an optional flow chart of the power settlement data analysis method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.
[0073] Step S101, obtaining an electricity settlement bill;
[0074] Step S102, performing character recognition processing on the electricity settlement bill to obtain text data of the settlement bill;
[0075] Step S103, performing attribute analysis based on the settlement form text to obtain form attribute information;
[0076] Step S104, determining a matching target information template from a plurality of preset candidate information templates based on the form attribute information;
[0077] Step S105, input the target information template and the settlement form text data into a pre-trained large language model for data analysis and processing to obtain target analysis information.
[0078] In the steps S101 to S105 shown in the embodiment of the present application, by obtaining the power settlement bill, character recognition processing is performed on the power settlement bill to obtain the text data of the settlement bill. This reduces the workload of manual entry, improves efficiency, and reduces the possibility of human error. Then, attribute analysis is performed based on the text data of the settlement bill to obtain form attribute information, and the matching target information template is determined from multiple preset candidate information templates based on the form attribute information, thereby ensuring the accuracy of information extraction in subsequent processing, and using the matching target information template can ensure the correct extraction and standardization of data. Finally, the target information template and the text data of the settlement bill are input into the pre-trained large language model for data analysis and processing to obtain target analysis information, so as to use the powerful text understanding and analysis capabilities of the large language model to accurately analyze the information in the power settlement bill and dig out deeper information in the power settlement bill. It can be seen that the present application determines the matching target information template from multiple preset candidate information templates through form attribute information, ensures the accuracy of information extraction, and performs data analysis and processing through the large language model to obtain accurate and deeper target analysis information.
[0079] In step S101 of some embodiments, the electricity settlement statement can be obtained in a variety of ways, such as by scanning a paper document or by downloading an electronic document issued by a power trading center through some platform.
[0080] In step S102 of some embodiments, character recognition (OCR) is performed on the electricity settlement bill to extract data in the electricity settlement bill to obtain text data of the settlement bill.
[0081] In step S103 of some embodiments, the extracted settlement form text data is analyzed to identify key information therein, such as consumer information, electricity usage information, or power trading center information, as form attribute information. The form attribute information represents characteristic information of the power settlement form, and is used to determine a matching target information template from a plurality of preset candidate information templates.
[0082] In step S104 of some embodiments, according to the obtained form attribute information, a target information template that best matches the current electricity settlement form is selected from a plurality of preset candidate information templates. The candidate information template and the target information template include prompt words for performing data analysis and processing on the information in the electricity settlement form using a large language model. By selecting the most suitable target information template from a plurality of candidate information templates, it is possible to ensure that the data in the electricity settlement form can be correctly extracted by the large language model, and the electricity settlement form can be standardized.
[0083] In step S105 of some embodiments, the target information template and the settlement form text data are input into a pre-trained large language model for data analysis and processing to obtain target analysis information. The large language model's powerful text understanding and analysis capabilities are used to organize and analyze the settlement form text data to obtain more in-depth information. On the other hand, the large language model can be used to quickly and accurately obtain target analysis information to avoid interference from invalid information. The target analysis information represents information obtained by analyzing the data in the electricity settlement form.
[0084] See also Figure 2 In some embodiments, after step S102, the process further includes preprocessing the text data of the settlement form, which may include but is not limited to steps S201 to S203:
[0085] Step S201, inputting the settlement form text data into the large language model for confidence screening to obtain the data to be corrected;
[0086] Step S202, correcting the data to be corrected by using a large language model to obtain credible text data;
[0087] Step S203, performing data reduction processing on the trusted text data to obtain pre-processed text data.
[0088] In step S201 of some embodiments, when character recognition is performed on the electricity settlement form, confidence data of the character recognition process is obtained, and the confidence data is used to indicate the credibility of the text recognition during the character recognition process. The settlement form text data and the corresponding confidence data are input into the large language model, and the text data with low credibility is filtered out by the confidence threshold and marked as data to be corrected. Among them, the confidence threshold can be set by a technician in this field, and can also be set by the large language model.
[0089] After marking the data to be corrected, it can be determined whether the data to be corrected is digital information. If the data to be corrected is digital information, character recognition processing can be performed on the electricity settlement sheet again to ensure that the obtained digital information is accurate.
[0090] In step S202 of some embodiments, the data to be corrected is corrected through the context understanding capability of the large language model. The large language model automatically corrects erroneous or ambiguous text according to the context information to generate more accurate and reliable text data, thereby obtaining reliable text data.
[0091] In some other embodiments, in step S201 to step S202, the settlement form text data can be directly input into the large language model, and the text understanding ability of the large language model can be used to mark the data to be corrected. The large language model can then be used to correct the data to be corrected to obtain credible text data.
[0092] In step S203 of some embodiments, after obtaining the corrected credible text data, data reduction processing is performed on it, that is, redundant information is removed and key content is retained, and finally the simplified pre-processed text data is obtained for subsequent analysis and processing. Information prompt words irrelevant to the form attribute information can be given, and data reduction processing can be performed using a large language model, or irrelevant data information can be removed through position information in the settlement form text data. This operation can reduce the amount of settlement form text data, thereby increasing the speed of data analysis and processing by the large language model.
[0093] Through steps S201 to S203, the settlement form text data is corrected and reduced to obtain pre-processed text data, thereby obtaining accurate and highly reliable text data, reducing irrelevant information, and retaining key content information, thereby improving the speed of subsequent processing.
[0094] See also Figure 3 In some embodiments, the settlement form text data may include text content data and corresponding text coordinate data, and step S102 may include but is not limited to step S301:
[0095] Step S301, performing character recognition processing on the electricity settlement form to obtain text content data and corresponding text coordinate data;
[0096] Step S103 may include but is not limited to step S302:
[0097] Step S302: determine the position of the form attribute information through the text coordinate data, and determine the corresponding text content data as the form attribute information through the text coordinate data.
[0098] In step S301 of some embodiments, character recognition processing is performed on the electricity settlement bill to obtain text content data and corresponding text coordinate data, where the text content data is the text data, and the text coordinate data is the location information of the electricity settlement bill where the text data is located.
[0099] In step S302 of some embodiments, specific fields on the electricity settlement form, such as the location of attribute information such as the electricity trading center, date, and consumer entity, are located by analyzing text coordinate data, and the text content data corresponding to these locations are identified as form attribute information.
[0100] In step S203, when performing data reduction processing, irrelevant data can also be removed through the text coordinate data.
[0101] Through step S301 to step S302, by utilizing character recognition processing, text content data and corresponding text coordinate data are obtained, thereby determining form attribute information, and can also be used to remove irrelevant data.
[0102] See also Figure 4 In some embodiments, the form attribute information includes regional attribute information and energy attribute information. Step S103 may include but is not limited to steps S401 to S402:
[0103] Step S401, performing regional analysis based on the settlement form text data to obtain regional attribute information;
[0104] Step S402, performing energy type analysis based on the settlement form text data to obtain energy attribute information;
[0105] Step S104 may include but is not limited to step S403:
[0106] Step S403: determining a matching target information template from a plurality of preset candidate information templates based on the regional attribute information and the energy attribute information.
[0107] In step S401 of some embodiments, the text content data in the settlement form text data is analyzed, and information about the region or area is extracted to obtain regional attribute information. The regional attribute information indicates information about the region where the power settlement form is located, and the relevant information can also be obtained through the full name of the power trading center.
[0108] In step S402 of some embodiments, the text content data in the settlement bill text data is analyzed, and the information about the energy type is extracted to obtain energy attribute information. The energy attribute information represents the usage information of different energy types recorded in the electricity settlement bill.
[0109] In step S403 of some embodiments, a matching target information template is determined from a plurality of preset candidate information templates through regional attribute information and energy attribute information. It should be noted that the power settlement bills issued by power trading centers in different regions are different, and the calculation rules for different energy types may be different. Therefore, for different regional attribute information and energy attribute information, it is necessary to match a most suitable target information template to interpret and define the text data of the settlement bill, so as to ensure the accuracy of information extraction in subsequent processing, as well as the standardization of information processing, and obtain uniformly defined data in the target analysis information.
[0110] Through steps S401 to S403, the matching target information template is determined from multiple preset candidate information templates through regional attribute information and energy attribute information, two factors that largely lead to the diversification of electricity settlement bills, thereby eliminating the differentiation caused by the difference between regional attribute information and energy attribute information, reducing the difficulty and error rate of subsequent large-scale model processing of settlement bill text data, and ensuring the accuracy of information extraction in subsequent processing and the standardization of information processing.
[0111] It should be noted that when the consumer of the electricity settlement sheet is an enterprise, the enterprise may have multiple subsidiaries, and the subsidiaries are distributed in different regions and provinces. The electricity settlement sheets of different regions and provinces are different in form and calculation. Therefore, when electricity settlement is carried out with the enterprise as the main body, difficulties will be encountered. This application determines the target information template through the two factors of regional attribute information and energy attribute information, thereby eliminating the difficulty of conducting data analysis on the electricity settlement sheet, thereby ensuring that accurate target analysis information can be obtained.
[0112] See also Figure 5 In some embodiments, before step S403, multiple candidate information targets are preset, which may include but are not limited to steps S501 to S504:
[0113] Step S501, obtaining an electricity settlement bill, and obtaining regional attribute information and energy attribute information of the electricity settlement bill;
[0114] Step S502, constructing corresponding noun conversion rules based on the regional attribute information and the energy attribute information;
[0115] Step S503, constructing corresponding energy calculation rules based on the regional attribute information and energy attribute information;
[0116] Step S504: preset candidate information templates based on noun conversion rules and energy calculation rules.
[0117] In step S501 of some embodiments, a certain number of electricity settlement bills are obtained, and the difference information of different electricity settlement bills is investigated in advance. Regional attribute information related to a specific region and energy attribute information related to energy consumption type are extracted from the electricity settlement bills.
[0118] In step S502 of some embodiments, a set of noun conversion rules for standardized naming is formulated according to different regional attribute information and energy attribute information. In different regions, the same concept may be called differently on the power settlement form. For example, in region A, it is called the power generation side assessment of electricity price difference electricity fee recovery, while in region B, it is called the power generation side medium and long-term price deviation income recovery and return. In addition, the information layout of the power settlement form may be different in different regions.
[0119] Different energy types have different fields of text data in the settlement sheet involved in data analysis. For example, the identification fields of thermal power generation include cogeneration assessment shared electricity charges, peak-valley balance electricity charges, startup compensation shared electricity charges, etc., while the identification fields of new energy power generation include: electricity clearing (photovoltaic), electricity trading (wind power), etc.
[0120] Convert region-specific terminology into a standard format so that the information can be consistently understood and applied in subsequent processing.
[0121] In step S503 of some embodiments, a series of energy calculation rules are established based on the regional attribute information and energy attribute information to accurately calculate the costs related to energy consumption. These rules include how to calculate the total cost based on the power consumption and the electricity price, or how to apply discount policies, etc. Different energy types use different calculation rules, so it is necessary to construct corresponding energy calculation rules. The energy policies in different regions are different, and the energy calculation rules involved will also be different, so they also need to be marked in the candidate information template.
[0122] In step S504 of some embodiments, finally, a series of candidate information templates are preset according to the previously established noun conversion rules and energy calculation rules. These templates will be used in subsequent steps to determine the most matching target information template and input into the pre-trained large language model to obtain accurate target analysis information.
[0123] Through steps S501 to S504, by investigating the difference information of different electricity settlement bills in advance, corresponding noun conversion rules are constructed based on regional attribute information and energy attribute information, so that different terms of the same concept can be converted into a standard format, so that the information can be consistently understood and applied in subsequent processing, avoiding misunderstandings during large language model analysis and processing. Corresponding energy calculation rules are constructed based on regional attribute information and energy attribute information, and energy discount policies in different regions and calculation rules for different energies are recorded in the candidate information template, so that various energy data can be analyzed based on reasonable and accurate calculation rules during large language model analysis and processing.
[0124] See also Figure 6 In some embodiments, the step S105 also includes pre-training the large language model, which may include but is not limited to steps S601 to S604:
[0125] Step S601, obtaining a training data set; wherein the training data set includes a plurality of training samples, each training sample corresponds to the settlement bill text data obtained by processing the power settlement bill, wherein the settlement bill text data is configured with a corresponding target information template, and each training sample is configured with a corresponding data analysis result;
[0126] Step S602, inputting the training sample into the original large language model for data analysis training to obtain original analysis information;
[0127] Step S603, comparing the original analysis information corresponding to the training sample with the data analysis result to obtain comparison deviation data;
[0128] Step S604, based on the comparison deviation data, the model parameters of the large language model are updated, and the execution returns to input the training samples into the large language model for data analysis training until the large language model meets the preset training termination condition, thereby obtaining a pre-trained large language model.
[0129] In step S601 of some embodiments, although the large language model has strong generalization ability and can complete new tasks without additional training, in order to avoid some rare noun names in the electricity settlement bill being misunderstood or not finding corresponding items during data processing, the large language model should be fine-tuned or learned with a few samples so that the large language model can better understand the content of the electricity settlement bill.
[0130] In some embodiments, in steps S602 to S604, the training samples are input into the original large language model for data analysis training to obtain original analysis information, with the purpose of allowing the large language model to learn how to correctly parse and analyze the text data of the settlement form, thereby generating preliminary original analysis information. The original analysis information corresponding to the training samples is compared with the data analysis results to obtain comparison deviation data, which is the data related to the loss function. The model parameters of the large language model are updated based on the comparison deviation data, and the training samples are input into the large language model for data analysis training until the large language model meets the preset training termination conditions, that is, the original analysis information obtained by the large language model is similar to the data analysis results corresponding to the training sample configuration. Finally, a pre-trained large language model is obtained.
[0131] Through steps S601 to S604, the model is continuously iterated and optimized through the training data set, so that the large language model can more accurately extract and analyze key information from the electricity settlement bill, thereby obtaining target analysis information with high accuracy.
[0132] See also Figure 7 In some embodiments, step S105 may include but is not limited to steps S701 to S703:
[0133] Step S701, exporting the analysis process of obtaining target analysis information based on the target information template and the settlement form text data input into the large language model for analysis, and obtaining analysis process data;
[0134] Step S702, performing verification processing according to the analysis process data to obtain verification data;
[0135] Step S703: adjusting the model parameters of the large language model based on the verification data to obtain an adjusted large language model.
[0136] In step S701 of some embodiments, a calculation process based on inputting a target information template and settlement form text data into a large language model to obtain target analysis information is exported to obtain analysis process data.
[0137] In step S702 of some embodiments, the analysis process data is used to perform verification processing to verify whether the output of the large language model is accurate. This involves comparing the intermediate results generated by the large language model with the known correct results to ensure that the processing of the large language model is correct.
[0138] In step S703 of some embodiments, if any inaccurate or erroneous results are found during the verification process, the model parameters of the large language model need to be adjusted according to the verification data to improve the performance of the large language model. After the adjustment, the large language model will run again to generate new target analysis information. This process may require multiple iterations until the output of the model is stable and accurate, and the adjusted large language model is obtained.
[0139] The embodiment of the present application obtains the electricity settlement bill, performs character recognition processing on the electricity settlement bill, and obtains the text data of the settlement bill. This reduces the workload of manual entry, improves efficiency, and reduces the possibility of human error. Then, attribute analysis is performed based on the settlement bill text data to obtain form attribute information, and the matching target information template is determined from multiple preset candidate information templates based on the form attribute information, thereby ensuring the accuracy of information extraction in subsequent processing, and the use of the matching target information template can ensure the correct extraction and standardization of data. Finally, the target information template and the settlement bill text data are input into the pre-trained large language model for data analysis and processing to obtain target analysis information, so as to use the powerful text understanding and analysis capabilities of the large language model to accurately analyze the information in the electricity settlement bill and dig out deeper information in the electricity settlement bill. It can be seen that the present application determines the matching target information template from multiple preset candidate information templates through form attribute information, ensures the accuracy of information extraction, and performs data analysis and processing through the large language model to obtain accurate and deeper target analysis information.
[0140] See also Figure 8 The present application also provides an electric power settlement data analysis device, which can implement the above-mentioned electric power settlement data analysis method, and the device includes:
[0141] A data acquisition module, used to obtain electricity settlement bills;
[0142] A text recognition module is used to perform character recognition processing on the power settlement sheet to obtain the text data of the settlement sheet;
[0143] The text analysis module is used to perform attribute analysis based on the text of the settlement form to obtain form attribute information;
[0144] A template matching module, used to determine a matching target information template from a plurality of preset candidate information templates based on form attribute information;
[0145] The data analysis module is used to input the target information template and the settlement form text data into a pre-trained large language model for data analysis and processing to obtain target analysis information.
[0146] The specific implementation of the power settlement data analysis device is basically the same as the specific implementation of the above-mentioned power settlement data analysis method, and will not be repeated here.
[0147] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned power settlement data analysis method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0148] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0149] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0150] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the power settlement data analysis method of the embodiment of this application;
[0151] Input / output interface 903, used to implement information input and output;
[0152] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
[0153] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0154] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0155] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned electricity settlement data analysis method is implemented.
[0156] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0157] The power settlement data analysis method, device, electronic device and storage medium provided in the embodiment of the present application obtain the power settlement bill, perform character recognition processing on the power settlement bill, and obtain the text data of the settlement bill. This reduces the workload of manual entry, improves efficiency, and reduces the possibility of human error. Then, attribute analysis is performed based on the text data of the settlement bill to obtain form attribute information, and the matching target information template is determined from multiple preset candidate information templates based on the form attribute information, thereby ensuring the accuracy of information extraction in subsequent processing, and using the matching target information template can ensure the correct extraction and standardization of data. Finally, the target information template and the text data of the settlement bill are input into the pre-trained large language model for data analysis and processing to obtain target analysis information, so as to use the powerful text understanding and analysis capabilities of the large language model to accurately analyze the information in the power settlement bill and dig out deeper information in the power settlement bill. It can be seen that the present application determines the matching target information template from multiple preset candidate information templates through form attribute information, ensures the accuracy of information extraction, and performs data analysis and processing through the large language model to obtain accurate and deeper target analysis information.
[0158] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0159] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0160] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0162] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0163] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0164] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0165] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0168] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for analyzing power settlement data, characterized in that: The method comprises: Get electricity bills; Performing character recognition processing on the electricity settlement sheet to obtain settlement sheet text data; Perform attribute analysis based on the settlement form text to obtain form attribute information; Determine a matching target information template from a plurality of preset candidate information templates based on the form attribute information; The target information template and the settlement form text data are input into a pre-trained large language model for data analysis and processing to obtain target analysis information.
2. The method according to claim 1, characterized in that The form attribute information includes regional attribute information and energy attribute information. The attribute analysis based on the settlement form text is performed to obtain the form attribute information, including: Performing regional analysis based on the settlement form text data to obtain the regional attribute information; Performing energy type analysis based on the text data of the settlement sheet to obtain the energy attribute information; The determining a matching target information template from a plurality of preset candidate information templates based on the form attribute information includes: Based on the regional attribute information and the energy attribute information, a matching target information template is determined from a plurality of preset candidate information templates.
3. The method according to claim 2, characterized in that Before determining the matching target information template from a plurality of preset candidate information templates based on the regional attribute information and the energy attribute information, the method further includes presetting a plurality of the candidate information templates, specifically including: Obtaining the electricity settlement bill, and obtaining the regional attribute information and the energy attribute information of the electricity settlement bill; Based on the regional attribute information and the energy attribute information, construct corresponding noun conversion rules; Based on the regional attribute information and the energy attribute information, construct a corresponding energy calculation rule; The candidate information template is preset based on the noun conversion rule and the energy calculation rule.
4. The method according to claim 1, characterized in that The target information template and the settlement form text data are input into a pre-trained large language model for data processing, and before obtaining the target analysis information, the large language model is pre-trained, specifically including: Acquire a training data set; wherein the training data set includes a plurality of training samples, each of the training samples corresponds to the settlement sheet text data obtained by processing the electricity settlement sheet, wherein the settlement sheet text data is configured with the corresponding target information template, and each of the training samples is configured with a corresponding data analysis result; Inputting the training sample into the original large language model for data analysis training to obtain original analysis information; Comparing the original analysis information corresponding to the training sample with the data analysis result to obtain comparison deviation data; The model parameters of the large language model are updated based on the comparison deviation data, and the process of inputting the training samples into the large language model for data analysis training is returned to the large language model until the large language model meets a preset training termination condition, thereby obtaining the pre-trained large language model.
5. The method according to claim 1, characterized in that After the character recognition processing is performed on the electricity settlement sheet to obtain the settlement sheet text data, the method further includes preprocessing the settlement sheet text data, specifically including: Inputting the settlement form text data into the large language model for confidence screening to obtain data to be corrected; Correcting the data to be corrected by using the large language model to obtain credible text data; The trusted text data is subjected to data reduction processing to obtain pre-processed text data.
6. The method according to claim 1, characterized in that The settlement sheet text data includes text content data and corresponding text coordinate data. The character recognition processing is performed on the power settlement sheet to obtain the settlement sheet text data, including: Performing character recognition processing on the electricity settlement form to obtain the text content data and the corresponding text coordinate data; The attribute analysis based on the settlement form text is performed to obtain form attribute information, including: The position of the form attribute information is determined by the text coordinate data, and the corresponding text content data is determined as the form attribute information by the text coordinate data.
7. The method according to claim 1, characterized in that The target information template and the settlement form text data are input into a pre-trained large language model for data processing to obtain target analysis information, specifically including: The analysis process of obtaining the target analysis information based on the target information template and the settlement form text data is exported to obtain analysis process data; Perform verification processing according to the analysis process data to obtain verification data; The model parameters of the large language model are adjusted based on the verification data to obtain an adjusted large language model.
8. An electric power settlement data analysis device, characterized in that: The device comprises: A data acquisition module, used to obtain electricity settlement bills; A character recognition module, used to perform character recognition processing on the electricity settlement sheet to obtain settlement sheet text data; The text analysis module is used to perform attribute analysis based on the text of the settlement form to obtain form attribute information; A template matching module, used to determine a matching target information template from a plurality of preset candidate information templates based on the form attribute information; The data analysis module is used to input the target information template and the settlement form text data into a pre-trained large language model for data analysis and processing to obtain target analysis information.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the electricity settlement data analysis method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the power settlement data analysis method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Settlement bill data analysis method and system based on power transaction platform
CN116627907A
OCR key information extraction method and model for medical bills
CN117831043A
Certificate identification method and device, storage medium and electronic equipment
CN118247797A
