Electricity charge income reconciliation method, system and program product based on industry and finance data linkage

CN122928534APending Publication Date: 2026-10-16YUANGUANG ENERGY INTERNET IND DEV (HENGQIN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611353452.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

1、数据孤岛壁垒:营销系统与财务系统采用独立数据库,数据同步依赖批量接口,实时性不足

Benefits of technology

[0018] Beneficial Effects: This invention enables efficient near-real-time comparison of marketing and financial data through automated time-series alignment. Compared to traditional manual reconciliation methods, it can reduce the processing time for the same amount of data to the minute level, supporting concurrent processing of tens of millions of data points and improving reconciliation efficiency. A three-level detection mode is designed specifically for the characteristics of the power industry, accurately distinguishing complex anomaly types such as one-sided accounts, time-difference accounts, and amount-difference accounts, achieving a dual breakthrough in the accuracy and depth of anomaly identification, avoiding false alarms and significant financial losses. The closed-loop cycle from anomaly identification to automatic triggering of business instructions can be compressed from the traditional several weeks to the hour level, achieving full automation of the business closed loop. Through real-time anomaly detection, the financial risk exposure of electricity revenue is shortened from the traditional half-month cycle of post-audit to the intraday level, particularly suitable for preventing scenarios such as delayed settlement by electricity bill collection agencies and payment channel failures, upgrading the power grid company's financial security management from delayed management to real-time control, and improving financial risk management capabilities. By internalizing the unique business semantics of the power industry into anomaly judgment rule design, it can be deeply adapted to power-specific scenarios, possessing core differentiated advantages compared to existing general reconciliation technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928534A_ABST
    Figure CN122928534A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of data analysis, and specifically discloses a power charge income reconciliation method, system and program product based on industry and financial data linkage, which can realize efficient near-time comparison of marketing data and financial data through automatic time sequence alignment, and improve reconciliation efficiency; a three-level detection mode is designed according to the characteristics of the power industry, which can accurately distinguish complex abnormal types of unilateral account, time difference account and amount difference account, realize the dual breakthrough of abnormal identification accuracy and depth, avoid false reports and significant financial losses; the closed-loop cycle from abnormal identification to automatic triggering of business instructions can be compressed from the traditional several weeks to hours, realizing the full automation of business closed loop; through real-time abnormal detection, the fund safety management of power grid enterprises is upgraded from lag management to real-time control, improving the fund risk control capability; by internalizing the specific business semantics of the power industry into abnormal judgment rule design, the power exclusive scene can be deeply adapted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data analysis technology, specifically relating to a method, system, and program product for electricity revenue reconciliation based on the linkage of business and financial data. Background Technology

[0002] Currently, electricity revenue management in power grid companies exhibits a typical dual-track system: a "business" system and a "financial" system. The marketing system manages business-related data such as electricity bill issuance, user payment records, and detailed electricity bill accounts, while the finance system manages financial data such as bank account fund collection, accounting voucher generation, and cash flow records. The two systems have long suffered from data inconsistencies due to the following reasons: 1. Data silos: The marketing system and the financial system use independent databases, and data synchronization relies on batch interfaces, which is not real-time enough.

[0003] 2. Fundamental difference in scope: The marketing side uses "user electricity purchase behavior" as the recording unit (including details such as prepayment, actual receipt, and late payment penalties), while the finance side uses "bank account receipts" as the recording unit (only reflecting the total amount of funds received). There is a natural mismatch in granularity between the two.

[0004] 3. Time difference: When users pay through aggregated payment channels such as Alipay, WeChat, and ePay, there is a delay of 3-72 hours between the settlement cycle of the payment institution and the accounting confirmation time of the marketing system.

[0005] 4. Delayed anomaly detection: Traditional reconciliation relies on finance personnel manually exporting Excel spreadsheets for VLOOKUP matching, which can only identify amount differences and cannot identify complex patterns such as one-sided accounts (one-sided accounting) and time difference accounts (cross-period accounts). The anomaly detection cycle averages 15 working days.

[0006] Therefore, in order to address the problems of low reconciliation efficiency and delayed anomaly identification caused by differences in data standards and time sequence between the marketing system and the financial system in the existing electricity revenue management model, there is an urgent need for a more efficient and accurate electricity revenue reconciliation method. Summary of the Invention

[0007] The purpose of this invention is to provide a method, system, and program product for electricity revenue reconciliation based on business and financial data linkage, in order to solve the above-mentioned problems existing in the prior art.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, it provides a method for reconciling electricity revenue based on the linkage of business and financial data, including: The system collects marketing revenue records from the marketing system and financial receipt records from the financial system in real time at a set sampling frequency, and compiles the marketing revenue records into a marketing data topic queue and the financial receipt records into a financial data topic queue. The marketing revenue records in the marketing data theme queue and the financial receipt records in the financial data theme queue are aligned in time sequence. The first sliding time window and the first matching key of each marketing revenue record in the marketing data theme queue are constructed, and the second sliding time window and the second matching key of each financial receipt record in the financial data theme queue are constructed. Based on the first sliding time window and the first matching key of each marketing revenue record, and the second sliding time window and the second matching key of each financial receipt record, dynamic planning and matching are performed on each marketing revenue record and each financial receipt record to determine the matching score between each marketing revenue record and each financial receipt record. Determine the marketing transaction number, payment time, and amount receivable for each marketing revenue record; determine the financial transaction number, arrival time, and amount received for each financial receipt record; calculate the time difference between each marketing revenue record and each financial receipt record based on the payment time and arrival time of each marketing revenue record; and calculate the amount difference between each marketing revenue record and each financial receipt record based on the amount receivable and the amount received for each marketing revenue record. A mapping matrix is ​​constructed using the marketing transaction number of each marketing revenue record, the financial transaction number of each financial receipt record, the matching score between each marketing revenue record and each financial receipt record, the time difference between each marketing revenue record and each financial receipt record, and the amount difference between each marketing revenue record and each financial receipt record. Based on the mapping relationship matrix, unilateral account detection, time difference account detection, and amount difference account detection are performed on each marketing revenue record and each financial receipt record to obtain the corresponding detection results. Based on the detection results, generate the corresponding type of automatic compensation instruction, and send the automatic compensation instruction to the marketing system or financial system in encryption according to the type of automatic compensation instruction.

[0009] In one possible design, the marketing revenue record includes a marketing transaction number, user number, issuance date, electricity bill month and year, amount due, payment time, and payment channel code, while the financial receipt record includes a financial transaction number, bank account number, receipt time, receipt amount, payment institution code, summary information, and handling fee amount.

[0010] In one possible design, the construction of a first sliding time window and a first matching key for each marketing revenue record in the marketing data topic queue, and the construction of a second sliding time window and a second matching key for each financial receipt record in the financial data topic queue, include: Starting from the payment time of each marketing revenue record in the marketing data topic queue, a 72-hour forward search window [T1, T1+72h] is constructed for each marketing revenue record, where T1 represents the payment time. The 72-hour forward search window [T1, T1+72h] for each marketing revenue record is used as the first sliding time window for each marketing revenue record. At the same time, a marketing triplet matching key is constructed for each marketing revenue record. The marketing triplet matching key contains the amount receivable, user number, and payment channel code arranged in sequence. The marketing triplet matching key for each marketing revenue record is used as the first matching key for each marketing revenue record. Starting from the arrival time of each financial receipt record in the financial data topic queue, a 24-hour backward search window [T2-24h, T2] is constructed for each financial receipt record, where T2 represents the arrival time. The 24-hour backward search window [T2-24h, T2] is used as the second sliding time window for each financial receipt record. At the same time, the corresponding customer number is queried based on the bank account of each financial receipt record, and a financial triplet matching key is constructed for each financial receipt record. The financial triplet matching key contains the arrival amount, customer number, and payment institution code arranged in sequence. The financial triplet matching key is used as the second matching key for each financial receipt record.

[0011] In one possible design, the dynamic programming matching of each marketing revenue record and each financial receipt record, based on a first sliding time window and a first matching key for each marketing revenue record and a second sliding time window and a second matching key for each financial receipt record, determines the matching score between each marketing revenue record and each financial receipt record, including: The first matching key of each marketing revenue record is matched with the second matching key of each financial receipt record within its first sliding time window to obtain a matching score for each marketing revenue record and each financial receipt record within its first sliding time window. Simultaneously, the second matching key of each financial receipt record is matched with the first matching key of each marketing revenue record within its second sliding time window to obtain a matching score for each financial receipt record and each marketing revenue record within its second sliding time window. The scoring rules for the matching score include: a maximum score of 3 points; if the first matching key and the second matching key are completely identical, the matching score is 3 points; if the first matching key is a user... If the customer ID of the first matching key matches the customer ID of the second matching key, and the payment channel code of the first matching key matches the payment institution code of the second matching key, but there is a difference between the amount receivable of the first matching key and the amount received by the second matching key, and this difference is within the set amount tolerance range, then the matching score is 2 points; if the user ID of the first matching key matches the customer ID of the second matching key, and the payment channel code of the first matching key matches the payment institution code of the second matching key, but there is a difference between the amount receivable of the first matching key and the amount received by the second matching key, and this difference is not within the set amount tolerance range, then the matching score is 1 point; otherwise, the matching score is 0 points. The matching scores of each marketing revenue record and each financial receipt record within the first sliding time window are dynamically planned and matched with the matching scores of each financial receipt record and each marketing revenue record within the second sliding time window to determine the final matching score between each marketing revenue record and each financial receipt record.

[0012] In one possible design, the mapping matrix contains several mapping rows of pairs of marketing revenue records and financial receipt records. Each mapping row contains the marketing transaction number of the marketing revenue record, the financial transaction number of the financial receipt record, the matching score between the marketing revenue record and the financial receipt record, the time difference between the marketing revenue record and the financial receipt record, and the amount difference between the marketing revenue record and the financial receipt record.

[0013] In one possible design, the method of performing one-sided account checks, time difference account checks, and amount difference account checks on each marketing receipt record and each financial receipt record based on the mapping relationship matrix, and obtaining the corresponding detection results, including: Construct a marketing record table containing all marketing revenue records in the marketing data theme queue and a financial record table containing all financial receipt records in the financial data theme queue; If the matching score between the corresponding marketing revenue record and any financial receipt record in the mapping matrix is ​​full, then the marketing revenue record is removed from the marketing record table. If the matching score between the corresponding financial receipt record and any marketing revenue record in the mapping matrix is ​​full, then the financial receipt record is removed from the financial record table. Mark the remaining marketing revenue records in the marketing record table with the specified channel code as pending confirmation one-sided account records, and mark the remaining marketing revenue records in the marketing record table with the non-specified channel code as confirmed one-sided account records; For a pending unilateral account record, if its matching score with a certain financial receipt record in the mapping relationship matrix is ​​greater than or equal to the set score threshold, but the time difference with the financial receipt record exceeds the set duration threshold of the corresponding payment channel code, then the corresponding time difference, payment channel code, and receivable amount are imported into the preset grey relational model for analysis to obtain the correlation coefficient between the pending unilateral account record and the financial receipt record. If the correlation coefficient is greater than or equal to the set correlation threshold, and the time difference conforms to the preset settlement cycle of the corresponding payment channel code, then the pending unilateral account record and the financial receipt record are marked as acceptable time difference account records; otherwise, the pending unilateral account record and the financial receipt record are marked as abnormal time difference account records. For a pending unilateral account record, if its matching score with a certain financial receipt record in the mapping relationship matrix is ​​greater than or equal to a set score threshold, and the amount difference with that financial receipt record is not 0, then the amount difference rate between the pending unilateral account record and the financial receipt record is calculated. The amount difference rate = |Amount receivable - Amount received| / Amount receivable × 100%. If the amount difference rate is less than or equal to the set difference rate threshold, and the amount difference is equal to the handling fee amount of the financial receipt record, then the pending unilateral account record and the financial receipt record are marked as handling fee type amount difference account records. Otherwise, the pending unilateral account record and the financial receipt record are marked as abnormal amount difference account records.

[0014] In one possible design, the automatic compensation instructions include account suspension instructions, inter-period accrual instructions, and difference allocation recalculation instructions. The step of generating corresponding types of automatic compensation instructions based on the detection results, and encrypting and sending the automatic compensation instructions to the marketing or financial system according to their type, includes: For confirmed unilateral account records, a corresponding account suspension instruction is generated, the account suspension instruction is encrypted, and a digital signature of the account suspension instruction is generated by combining it with a real-time dynamic token. The encrypted account suspension instruction and its digital signature are sent to the marketing system together. For acceptable time difference account records, generate corresponding inter-period accrual instructions, encrypt the inter-period accrual instructions, and generate a digital signature for the inter-period accrual instructions by combining them with a real-time dynamic token. Send the encrypted inter-period accrual instructions and their digital signatures to the financial system. For discrepancies in handling fee amounts, a corresponding recalculation instruction for the difference allocation is generated. This instruction is then encrypted, and a digital signature is generated by combining it with a real-time dynamic token. The encrypted recalculation instruction and its digital signature are then sent to the marketing system together.

[0015] Secondly, it provides an electricity revenue reconciliation system based on the linkage of business and financial data, including a data acquisition unit, a time-series alignment unit, a dynamic matching unit, a parameter integration unit, a matrix construction unit, a hierarchical detection unit, and an instruction triggering unit, wherein: The data acquisition unit is used to collect marketing revenue records from the marketing system and financial receipt records from the financial system in real time at a set sampling frequency, and to compile the marketing revenue records into the marketing data topic queue and the financial receipt records into the financial data topic queue. The time-series alignment unit is used to perform time-series alignment processing on each marketing revenue record in the marketing data theme queue and each financial receipt record in the financial data theme queue, constructing a first sliding time window and a first matching key for each marketing revenue record in the marketing data theme queue, and constructing a second sliding time window and a second matching key for each financial receipt record in the financial data theme queue. The dynamic matching unit is used to dynamically plan and match each marketing revenue record with each financial receipt record based on the first sliding time window and the first matching key of each marketing revenue record and the second sliding time window and the second matching key of each financial receipt record, and to determine the matching score between each marketing revenue record and each financial receipt record. The parameter integration unit is used to determine the marketing transaction number, payment time and amount due for each marketing revenue record, determine the financial transaction number, arrival time and amount due for each financial receipt record, calculate the time difference between each marketing revenue record and each financial receipt record based on the payment time of each marketing revenue record and the arrival time of each financial receipt record, and calculate the amount difference between each marketing revenue record and each financial receipt record based on the amount due for each marketing revenue record and the amount due for each financial receipt record. The matrix construction unit is used to construct a mapping relationship matrix by using the marketing transaction number of each marketing revenue record, the financial transaction number of each financial receipt record, the matching score between each marketing revenue record and each financial receipt record, the time difference between each marketing revenue record and each financial receipt record, and the amount difference between each marketing revenue record and each financial receipt record. The hierarchical detection unit is used to perform unilateral account detection, time difference account detection, and amount difference account detection on each marketing receipt record and each financial receipt record based on the mapping relationship matrix, and obtain the corresponding detection results. The instruction triggering unit is used to generate corresponding automatic compensation instructions based on the detection results, and to encrypt and send the automatic compensation instructions to the marketing system or financial system according to the type of automatic compensation instructions.

[0016] Thirdly, it provides an electricity revenue reconciliation system based on the linkage of business and financial data, including: Memory, used to store instructions; A processor is configured to read instructions stored in the memory and execute the method described in any one of the first aspects above, according to the instructions.

[0017] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored on the computer-readable storage medium, and when the instructions are executed on a computer, the computer performs any one of the methods described in the first aspect. A computer program product is also provided, which, when executed on a computer, performs any one of the methods described in the first aspect.

[0018] Beneficial Effects: This invention enables efficient near-real-time comparison of marketing and financial data through automated time-series alignment. Compared to traditional manual reconciliation methods, it can reduce the processing time for the same amount of data to the minute level, supporting concurrent processing of tens of millions of data points and improving reconciliation efficiency. A three-level detection mode is designed specifically for the characteristics of the power industry, accurately distinguishing complex anomaly types such as one-sided accounts, time-difference accounts, and amount-difference accounts, achieving a dual breakthrough in the accuracy and depth of anomaly identification, avoiding false alarms and significant financial losses. The closed-loop cycle from anomaly identification to automatic triggering of business instructions can be compressed from the traditional several weeks to the hour level, achieving full automation of the business closed loop. Through real-time anomaly detection, the financial risk exposure of electricity revenue is shortened from the traditional half-month cycle of post-audit to the intraday level, particularly suitable for preventing scenarios such as delayed settlement by electricity bill collection agencies and payment channel failures, upgrading the power grid company's financial security management from delayed management to real-time control, and improving financial risk management capabilities. By internalizing the unique business semantics of the power industry into anomaly judgment rule design, it can be deeply adapted to power-specific scenarios, possessing core differentiated advantages compared to existing general reconciliation technologies. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the steps in the method of Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the system configuration in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the system configuration in Embodiment 3 of the present invention. Detailed Implementation

[0021] It should be noted that the descriptions of these embodiments are for the purpose of aiding understanding the present invention, but do not constitute a limitation thereof. The specific structural and functional details disclosed herein are only for describing exemplary embodiments of the invention. However, the invention may be embodied in many alternative forms and should not be construed as being limited to the embodiments described herein.

[0022] It should be understood that, unless otherwise explicitly specified and limited, the corresponding terms should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in the embodiments according to the specific circumstances.

[0023] Specific details are provided in the following description to provide a complete understanding of the exemplary embodiments. However, those skilled in the art will understand that the exemplary embodiments can be implemented without these specific details. For example, apparatus may be shown in block diagrams to avoid obscuring the examples with unnecessary details. In other embodiments, well-known processes, structures, and techniques may be omitted with non-essential details to avoid obscuring the embodiments.

[0024] Example 1: This embodiment provides a method for electricity revenue reconciliation based on business and financial data linkage. This method can be applied to a corresponding data service system, which can adopt a distributed architecture and be deployed between the marketing and financial systems. It establishes connections with the databases of both systems through pre-built adapters, requiring no modification to the original system architecture. Only read-only data permissions and command receiving interfaces need to be opened, providing good compatibility and scalability. Figure 1 As shown, the method includes the following steps: S1. Collect marketing revenue records from the marketing system and financial receipt records from the financial system in real time at a set sampling frequency, and compile the marketing revenue records into the marketing data topic queue and the financial receipt records into the financial data topic queue.

[0025] In practical implementation, the data service system can use a corresponding adapter (such as a JDBC adapter) to query the tb_electric_fee_issue (electricity fee issuance table) and tb_payment_record (actual revenue record table) of the marketing system (such as SG186) database in real time at a set sampling frequency (such as 15 minutes / time) to extract marketing revenue records. These records may include marketing transaction number, user number, issuance date, electricity fee month / year, amount due, payment time, and payment channel code. Similarly, the system can use a corresponding adapter (such as a WebService adapter) to query the financial system (such as SAP) in real time at a set sampling frequency (such as 15 minutes / time) to extract financial receipt records. These records may include financial transaction number, bank account number, receipt time, amount received, payment institution code, summary information, and transaction fee amount.

[0026] After the relevant raw data is collected, data preprocessing can be performed on the collected raw data, including data cleaning, such as removing null values ​​and data with incorrect format (such as illegal timestamps and negative amounts), and standardizing the encoding of key fields such as user ID, payment channel code, and payment institution code (such as uniformly converting them to 64-bit strings) to avoid subsequent matching failures due to differences in encoding format.

[0027] The preprocessed marketing revenue records and financial receipt records can be encapsulated into corresponding Kafka messages and compiled into the marketing data topic queue (topic_marketing_data) and the financial data topic queue (topic_financial_data), respectively. Subsequent processing can decouple data collection and processing by subscribing to topic consumption data, thereby improving the system's concurrent processing capabilities.

[0028] S2. Perform time-series alignment processing on each marketing revenue record in the marketing data theme queue and each financial receipt record in the financial data theme queue, construct a first sliding time window and a first matching key for each marketing revenue record in the marketing data theme queue, and construct a second sliding time window and a second matching key for each financial receipt record in the financial data theme queue.

[0029] In practical implementation, the data service system can perform time-series alignment processing on each marketing revenue record in the marketing data theme queue and each financial receipt record in the financial data theme queue, including: Starting from the payment time of each marketing revenue record in the marketing data topic queue, a 72-hour forward search window [T1, T1+72h] is constructed for each marketing revenue record, where T1 represents the payment time. The 72-hour forward search window [T1, T1+72h] is used as the first sliding time window for each marketing revenue record. At the same time, a marketing triplet matching key is constructed for each marketing revenue record. The marketing triplet matching key contains the amount due (which can retain 2 decimal places), user number, and payment channel code arranged in sequence. The marketing triplet matching key is used as the first matching key for each marketing revenue record.

[0030] Starting with the arrival time of each financial receipt record in the financial data topic queue, a 24-hour backward search window [T2-24h, T2] is constructed for each financial receipt record, where T2 represents the arrival time. The 24-hour backward search window [T2-24h, T2] is used as the second sliding time window for each financial receipt record. Simultaneously, the corresponding customer number is queried based on the bank account of each financial receipt record, and a financial triplet matching key is constructed for each financial receipt record. The financial triplet matching key contains the arrival amount (which can retain 2 decimal places), the customer number, and the payment institution code arranged in sequence. The financial triplet matching key for each financial receipt record is used as the second matching key for each financial receipt record.

[0031] S3. Based on the first sliding time window and the first matching key of each marketing revenue record and the second sliding time window and the second matching key of each financial receipt record, perform dynamic planning matching on each marketing revenue record and each financial receipt record to determine the matching score between each marketing revenue record and each financial receipt record.

[0032] In practice, the data service system matches the first matching key of each marketing revenue record with the second matching key of each financial receipt record within its first sliding time window to obtain a matching score for each marketing revenue record and each financial receipt record within its first sliding time window. Simultaneously, it matches the second matching key of each financial receipt record with the first matching key of each marketing revenue record within its second sliding time window to obtain a matching score for each financial receipt record and each marketing revenue record within its second sliding time window. Then, it performs dynamic programming matching on the matching scores of each marketing revenue record and each financial receipt record within its first sliding time window, and the matching scores of each financial receipt record and each marketing revenue record within its second sliding time window, to determine the final matching score between each marketing revenue record and each financial receipt record.

[0033] The scoring rules for matching scores are as follows: A maximum score of 3 points is awarded if the first matching key and the second matching key are completely identical (a tolerance of ±0.01 yuan is allowed for the amount portion to accommodate minor differences caused by rounding; for example, if the marketing side's receivable amount is 100.01 yuan, and the finance side's received amount is 100.00 yuan or 100.02 yuan, both are considered identical matching keys), then the matching score is 3 points. If the user ID of the first matching key matches the customer ID of the second matching key, and the payment channel code of the first matching key matches the payment institution code of the second matching key... If the codes match, but there is a difference between the amount due for the first matching key and the amount received for the second matching key, and this difference is within the set amount tolerance range, then the matching score is 2 points; if the user ID of the first matching key matches the customer ID of the second matching key, and the payment channel code of the first matching key matches the payment institution code of the second matching key, but there is a difference between the amount due for the first matching key and the amount received for the second matching key, and this difference is not within the set amount tolerance range, then the matching score is 1 point; otherwise, the matching score is 0 points.

[0034] S4. Determine the marketing transaction number, payment time, and amount receivable for each marketing revenue record; determine the financial transaction number, arrival time, and amount received for each financial receipt record; calculate the time difference between each marketing revenue record and each financial receipt record based on the payment time of each marketing revenue record and the arrival time of each financial receipt record; and calculate the amount difference between each marketing revenue record and each financial receipt record based on the amount receivable of each marketing revenue record and the amount received of each financial receipt record.

[0035] In practice, the data service system can extract the marketing transaction number, payment time, and amount receivable from each marketing revenue record, and the financial transaction number, arrival time, and amount received from each financial receipt record. Then, it calculates the time difference between each marketing revenue record and each financial receipt record using the payment time of each marketing revenue record and the arrival time of each financial receipt record, and calculates the amount difference between each marketing revenue record and each financial receipt record using the amount receivable from each marketing revenue record and the amount received from each financial receipt record.

[0036] S5. Construct a mapping matrix using the marketing transaction number of each marketing revenue record, the financial transaction number of each financial receipt record, the matching score between each marketing revenue record and each financial receipt record, the time difference between each marketing revenue record and each financial receipt record, and the amount difference between each marketing revenue record and each financial receipt record.

[0037] In practice, after integrating the marketing transaction number of each marketing revenue record, the financial transaction number of each financial receipt record, the matching score between each marketing revenue record and each financial receipt record, the time difference between each marketing revenue record and each financial receipt record, and the amount difference between each marketing revenue record and each financial receipt record, the data service system can construct a mapping relationship matrix based on the integrated data.

[0038] The mapping relationship matrix contains several pairs of mapping relationship rows between marketing revenue records and financial receipt records. Each mapping relationship row contains the marketing transaction number of the marketing revenue record, the financial transaction number of the financial receipt record, the matching score between the marketing revenue record and the financial receipt record, the time difference between the marketing revenue record and the financial receipt record, and the amount difference between the marketing revenue record and the financial receipt record.

[0039] S6. Based on the mapping relationship matrix, perform one-sided account detection, time difference account detection, and amount difference account detection on each marketing receipt record and each financial receipt record to obtain the corresponding detection results.

[0040] In practical implementation, when the data service system performs anomaly identification, a three-level mode judgment engine can be used to identify different types of anomalies layer by layer. The specific process includes: Construct a marketing record table (such as a hash table of marketing records, with the key being the marketing transaction number) for all marketing revenue records in the marketing data topic queue, and a financial record table (such as a hash table of financial records, with the key being the financial transaction number) for all financial receipt records in the financial data topic queue. Then, the matching relationships in the mapping relationship matrix are retrieved. If the matching score between the corresponding marketing receipt record and any financial receipt record in the mapping relationship matrix is ​​full (3 points), the marketing receipt record is removed from the marketing record table. If the matching score between the corresponding financial receipt record and any marketing receipt record in the mapping relationship matrix is ​​full, the financial receipt record is removed from the financial record table. Mark the remaining marketing revenue records in the marketing record table with the specified channel code as pending confirmation one-sided account records, and mark the remaining marketing revenue records in the marketing record table with the non-specified channel code as confirmed one-sided account records; For a pending unilateral account record, if its matching score with a certain financial receipt record in the mapping matrix is ​​greater than or equal to a set score threshold (≥2 points), but the time difference with that financial receipt record exceeds the set duration threshold (e.g., 4 hours) of the corresponding payment channel code, then the corresponding time difference, payment channel code, and amount receivable are imported into a pre-set grey relational model (the core parameters of the grey relational model include the discrimination coefficient ξ (value 0-1) and the weight vector ω. By training on 100,000 historical matching data, ξ=0.5 (balancing discrimination ability and stability) can be determined, and the weight... The analysis is performed using the weight vector ω = [0.4, 0.3, 0.3], where the time difference weight is 0.4, the payment channel code weight is 0.3, and the receivable amount weight is 0.3. The correlation coefficient between the pending unilateral account record and the financial receipt record is obtained. If the correlation coefficient is greater than or equal to the set correlation threshold (≥0.8) and the time difference meets the preset settlement cycle of the corresponding payment channel code, then the pending unilateral account record and the financial receipt record are marked as acceptable time difference account records. Otherwise, the pending unilateral account record and the financial receipt record are marked as abnormal time difference account records. For a pending unilateral account record, if its matching score with a certain financial receipt record in the mapping relationship matrix is ​​greater than or equal to a set score threshold (≥2 points), and the amount difference with that financial receipt record is not 0, then the amount difference rate between the pending unilateral account record and the financial receipt record is calculated. The amount difference rate = |Amount receivable - Amount received| / Amount receivable × 100%. If the amount difference rate is less than or equal to a set difference rate threshold (≤0.5%), and the amount difference is equal to the handling fee amount of the financial receipt record, then the pending unilateral account record and the financial receipt record are marked as handling fee type amount difference account records. Otherwise, the pending unilateral account record and the financial receipt record are marked as abnormal amount difference account records.

[0041] S7. Generate the corresponding type of automatic compensation instruction based on the detection results, and encrypt and send the automatic compensation instruction to the marketing system or financial system according to the type of automatic compensation instruction.

[0042] In practice, for confirmed unilateral accounting records, the data service system can generate an accounting suspension instruction in XML format, including fields such as: transaction number, suspension reason (e.g., "financial funds not received"), and suspension duration (default 72 hours, configurable). The accounting suspension instruction is then encrypted using a system key (e.g., MD5 encryption) and combined with a real-time dynamic token (updated every 30 seconds) to generate a digital signature. The encrypted accounting suspension instruction and its digital signature are then sent to the marketing system.

[0043] For accounts with acceptable time differences, the data service system can generate inter-period accrual instructions in JSON format, including fields such as: arrival date, accrual amount, and accrual accounting subject (e.g., "Accounts Receivable - Inter-period Electricity Charges"). The inter-period accrual instructions are then encrypted, and a digital signature is generated by combining it with a real-time dynamic token. The encrypted inter-period accrual instructions and their digital signature are then sent to the financial system.

[0044] For discrepancies in transaction fee amounts, the data service system can generate a Protobuf-formatted recalculation instruction for fee allocation, containing fields such as: marketing transaction number, financial transaction number, difference value, and allocation rule (e.g., "deduct from user's pre-deposit"). The recalculation instruction is then encrypted and combined with a real-time dynamic token to generate a digital signature. This encrypted recalculation instruction, along with its digital signature, is then sent to the marketing system.

[0045] When sending instructions, the data service system can send the instructions to the designated interface of the target system via the HTTPS protocol (e.g., marketing system interface: / api / marketing / command, financial system interface: / api / financial / command). After receiving the instructions, the target system first verifies the validity of the digital signature. If the verification is successful, the corresponding instructions are executed. After execution, feedback information including the execution result (success / failure), execution time, and operation log ID is returned. After receiving the feedback, the data service system stores the relevant information in the log table, forming a business closed loop. If the execution fails, a retry mechanism is triggered (each retry is 5 minutes apart, with a maximum of 3 attempts). If it still fails, a manual alert is pushed.

[0046] This method enables efficient near-real-time comparison of marketing and financial data through automated time-series alignment. Compared to traditional manual reconciliation, it can reduce the processing time for the same amount of data to the minute level, supporting concurrent processing of tens of millions of data points and improving reconciliation efficiency. A three-level detection mode is designed specifically for the characteristics of the power industry, accurately distinguishing complex anomaly types such as one-sided accounts, time-difference accounts, and amount-difference accounts. This achieves a breakthrough in both the accuracy and depth of anomaly identification, avoiding false alarms and significant financial losses. The closed-loop cycle from anomaly identification to automatic triggering of business instructions can be compressed from the traditional several weeks to the hour level, achieving full automation of the business closed loop. Through real-time anomaly detection, the financial risk exposure of electricity revenue is shortened from the traditional half-month cycle of post-audit to the intraday level. This is particularly suitable for preventing scenarios such as delayed settlement by electricity bill collection agencies and payment channel failures, upgrading the power grid company's financial security management from delayed management to real-time control and improving financial risk management capabilities. By internalizing the unique business semantics of the power industry into anomaly judgment rule design, it can be deeply adapted to power-specific scenarios, possessing core differentiated advantages compared to existing general reconciliation technologies.

[0047] Example 2: This embodiment provides an electricity revenue reconciliation system based on the linkage of business and financial data, such as... Figure 2 As shown, it includes a data acquisition unit, a timing alignment unit, a dynamic matching unit, a parameter integration unit, a matrix construction unit, a hierarchical detection unit, and an instruction triggering unit, wherein: The data acquisition unit is used to collect marketing revenue records from the marketing system and financial receipt records from the financial system in real time at a set sampling frequency, and to compile the marketing revenue records into the marketing data topic queue and the financial receipt records into the financial data topic queue. The time-series alignment unit is used to perform time-series alignment processing on each marketing revenue record in the marketing data theme queue and each financial receipt record in the financial data theme queue, constructing a first sliding time window and a first matching key for each marketing revenue record in the marketing data theme queue, and constructing a second sliding time window and a second matching key for each financial receipt record in the financial data theme queue. The dynamic matching unit is used to dynamically plan and match each marketing revenue record with each financial receipt record based on the first sliding time window and the first matching key of each marketing revenue record and the second sliding time window and the second matching key of each financial receipt record, and to determine the matching score between each marketing revenue record and each financial receipt record. The parameter integration unit is used to determine the marketing transaction number, payment time and amount due for each marketing revenue record, determine the financial transaction number, arrival time and amount due for each financial receipt record, calculate the time difference between each marketing revenue record and each financial receipt record based on the payment time of each marketing revenue record and the arrival time of each financial receipt record, and calculate the amount difference between each marketing revenue record and each financial receipt record based on the amount due for each marketing revenue record and the amount due for each financial receipt record. The matrix construction unit is used to construct a mapping relationship matrix by using the marketing transaction number of each marketing revenue record, the financial transaction number of each financial receipt record, the matching score between each marketing revenue record and each financial receipt record, the time difference between each marketing revenue record and each financial receipt record, and the amount difference between each marketing revenue record and each financial receipt record. The hierarchical detection unit is used to perform unilateral account detection, time difference account detection, and amount difference account detection on each marketing receipt record and each financial receipt record based on the mapping relationship matrix, and obtain the corresponding detection results. The instruction triggering unit is used to generate corresponding automatic compensation instructions based on the detection results, and to encrypt and send the automatic compensation instructions to the marketing system or financial system according to the type of automatic compensation instructions.

[0048] Example 3: This embodiment provides an electricity revenue reconciliation system based on the linkage of business and financial data, such as... Figure 3 As shown, at the hardware level, it includes: The data interface is used to establish data connection between the processor and the marketing and financial systems; Memory, used to store instructions; The processor is used to read the instructions stored in the memory and execute the electricity revenue reconciliation method based on business and financial data linkage in Embodiment 1 according to the instructions.

[0049] Optionally, the system also includes an internal bus, through which the processor, memory, and data interface can be interconnected. This internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0050] The memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory. The processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0051] Example 4: This embodiment provides a computer-readable storage medium storing instructions. When these instructions are executed on a computer, the computer performs the electricity revenue reconciliation method based on business and financial data linkage as described in Embodiment 1. The computer-readable storage medium refers to a data storage medium, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or Memory Sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0052] This embodiment also provides a computer program product that, when run on a computer, executes the electricity revenue reconciliation method based on business and financial data linkage described in Embodiment 1. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0053] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for reconciling electricity revenue based on the linkage of business and financial data, characterized in that: include: The system collects marketing revenue records from the marketing system and financial receipt records from the financial system in real time at a set sampling frequency, and compiles the marketing revenue records into a marketing data topic queue and the financial receipt records into a financial data topic queue. The marketing revenue records in the marketing data theme queue and the financial receipt records in the financial data theme queue are aligned in time sequence. The first sliding time window and the first matching key of each marketing revenue record in the marketing data theme queue are constructed, and the second sliding time window and the second matching key of each financial receipt record in the financial data theme queue are constructed. Based on the first sliding time window and the first matching key of each marketing revenue record, and the second sliding time window and the second matching key of each financial receipt record, dynamic planning and matching are performed on each marketing revenue record and each financial receipt record to determine the matching score between each marketing revenue record and each financial receipt record. Determine the marketing transaction number, payment time, and amount receivable for each marketing revenue record; determine the financial transaction number, arrival time, and amount received for each financial receipt record; calculate the time difference between each marketing revenue record and each financial receipt record based on the payment time and arrival time of each marketing revenue record; and calculate the amount difference between each marketing revenue record and each financial receipt record based on the amount receivable and the amount received for each marketing revenue record. A mapping matrix is ​​constructed using the marketing transaction number of each marketing revenue record, the financial transaction number of each financial receipt record, the matching score between each marketing revenue record and each financial receipt record, the time difference between each marketing revenue record and each financial receipt record, and the amount difference between each marketing revenue record and each financial receipt record. Based on the mapping relationship matrix, unilateral account detection, time difference account detection, and amount difference account detection are performed on each marketing revenue record and each financial receipt record to obtain the corresponding detection results. Based on the detection results, generate the corresponding type of automatic compensation instruction, and send the automatic compensation instruction to the marketing system or financial system in encryption according to the type of automatic compensation instruction.

2. The electricity revenue reconciliation method based on business and financial data linkage according to claim 1, characterized in that, The marketing revenue record includes marketing transaction number, user number, issuance date, electricity bill month and year, amount due, payment time and payment channel code. The financial receipt record includes financial transaction number, bank account number, receipt time and amount received, payment institution code, summary information and handling fee amount.

3. The electricity revenue reconciliation method based on business and financial data linkage according to claim 2, characterized in that, The construction of a first sliding time window and a first matching key for each marketing revenue record in the marketing data theme queue, and a second sliding time window and a second matching key for each financial receipt record in the financial data theme queue, includes: Starting from the payment time of each marketing revenue record in the marketing data topic queue, a 72-hour forward search window [T1, T1+72h] is constructed for each marketing revenue record, where T1 represents the payment time. The 72-hour forward search window [T1, T1+72h] for each marketing revenue record is used as the first sliding time window for each marketing revenue record. At the same time, a marketing triplet matching key is constructed for each marketing revenue record. The marketing triplet matching key contains the amount receivable, user number, and payment channel code arranged in sequence. The marketing triplet matching key for each marketing revenue record is used as the first matching key for each marketing revenue record. Starting from the arrival time of each financial receipt record in the financial data topic queue, a 24-hour backward search window [T2-24h, T2] is constructed for each financial receipt record, where T2 represents the arrival time. The 24-hour backward search window [T2-24h, T2] is used as the second sliding time window for each financial receipt record. At the same time, the corresponding customer number is queried based on the bank account of each financial receipt record, and a financial triplet matching key is constructed for each financial receipt record. The financial triplet matching key contains the arrival amount, customer number, and payment institution code arranged in sequence. The financial triplet matching key is used as the second matching key for each financial receipt record.

4. The electricity revenue reconciliation method based on business and financial data linkage according to claim 3, characterized in that, The method involves dynamically planning and matching each marketing revenue record with each financial receipt record based on a first sliding time window and a first matching key, and a second sliding time window and a second matching key, to determine the matching score between each marketing revenue record and each financial receipt record. This includes: The first matching key of each marketing revenue record is matched with the second matching key of each financial receipt record within its first sliding time window to obtain a matching score for each marketing revenue record and each financial receipt record within its first sliding time window. Simultaneously, the second matching key of each financial receipt record is matched with the first matching key of each marketing revenue record within its second sliding time window to obtain a matching score for each financial receipt record and each marketing revenue record within its second sliding time window. The scoring rules for the matching score include: a maximum score of 3 points; if the first matching key and the second matching key are completely identical, the matching score is 3 points; if the first matching key is a user... If the customer ID of the first matching key matches the customer ID of the second matching key, and the payment channel code of the first matching key matches the payment institution code of the second matching key, but there is a difference between the amount receivable of the first matching key and the amount received by the second matching key, and this difference is within the set amount tolerance range, then the matching score is 2 points; if the user ID of the first matching key matches the customer ID of the second matching key, and the payment channel code of the first matching key matches the payment institution code of the second matching key, but there is a difference between the amount receivable of the first matching key and the amount received by the second matching key, and this difference is not within the set amount tolerance range, then the matching score is 1 point; otherwise, the matching score is 0 points. The matching scores of each marketing revenue record and each financial receipt record within the first sliding time window are dynamically planned and matched with the matching scores of each financial receipt record and each marketing revenue record within the second sliding time window to determine the final matching score between each marketing revenue record and each financial receipt record.

5. The electricity revenue reconciliation method based on business and financial data linkage according to claim 2, characterized in that, The mapping relationship matrix contains several pairs of mapping relationship rows between marketing revenue records and financial receipt records. Each mapping relationship row contains the marketing transaction number of the marketing revenue record, the financial transaction number of the financial receipt record, the matching score between the marketing revenue record and the financial receipt record, the time difference between the marketing revenue record and the financial receipt record, and the amount difference between the marketing revenue record and the financial receipt record.

6. The electricity revenue reconciliation method based on business and financial data linkage according to claim 5, characterized in that, The method involves performing one-sided account checks, time difference account checks, and amount difference checks on each marketing revenue record and each financial receipt record based on the mapping relationship matrix, and obtaining the corresponding detection results, including: Construct a marketing record table containing all marketing revenue records in the marketing data theme queue and a financial record table containing all financial receipt records in the financial data theme queue; If the matching score between the corresponding marketing revenue record and any financial receipt record in the mapping matrix is ​​full, then the marketing revenue record is removed from the marketing record table. If the matching score between the corresponding financial receipt record and any marketing revenue record in the mapping matrix is ​​full, then the financial receipt record is removed from the financial record table. Mark the remaining marketing revenue records in the marketing record table with the specified channel code as pending confirmation one-sided account records, and mark the remaining marketing revenue records in the marketing record table with the non-specified channel code as confirmed one-sided account records; For a pending unilateral account record, if its matching score with a certain financial receipt record in the mapping relationship matrix is ​​greater than or equal to the set score threshold, but the time difference with the financial receipt record exceeds the set duration threshold of the corresponding payment channel code, then the corresponding time difference, payment channel code, and receivable amount are imported into the preset grey relational model for analysis to obtain the correlation coefficient between the pending unilateral account record and the financial receipt record. If the correlation coefficient is greater than or equal to the set correlation threshold, and the time difference conforms to the preset settlement cycle of the corresponding payment channel code, then the pending unilateral account record and the financial receipt record are marked as acceptable time difference account records; otherwise, the pending unilateral account record and the financial receipt record are marked as abnormal time difference account records. For a pending unilateral account record, if its matching score with a certain financial receipt record in the mapping relationship matrix is ​​greater than or equal to a set score threshold, and the amount difference with that financial receipt record is not 0, then the amount difference rate between the pending unilateral account record and the financial receipt record is calculated. The amount difference rate = |Amount receivable - Amount received| / Amount receivable × 100%. If the amount difference rate is less than or equal to the set difference rate threshold, and the amount difference is equal to the handling fee amount of the financial receipt record, then the pending unilateral account record and the financial receipt record are marked as handling fee type amount difference account records. Otherwise, the pending unilateral account record and the financial receipt record are marked as abnormal amount difference account records.

7. The electricity revenue reconciliation method based on business and financial data linkage according to claim 6, characterized in that, The automatic compensation instructions include account suspension instructions, inter-period accrual instructions, and difference allocation recalculation instructions. The process of generating corresponding automatic compensation instructions based on the detection results, and encrypting and sending the automatic compensation instructions to the marketing or financial system according to their type, includes: For confirmed unilateral account records, a corresponding account suspension instruction is generated, the account suspension instruction is encrypted, and a digital signature of the account suspension instruction is generated by combining it with a real-time dynamic token. The encrypted account suspension instruction and its digital signature are sent to the marketing system together. For acceptable time difference account records, generate corresponding inter-period accrual instructions, encrypt the inter-period accrual instructions, and generate a digital signature for the inter-period accrual instructions by combining them with a real-time dynamic token. Send the encrypted inter-period accrual instructions and their digital signatures to the financial system. For discrepancies in handling fee amounts, a corresponding recalculation instruction for the difference allocation is generated. This instruction is then encrypted, and a digital signature is generated by combining it with a real-time dynamic token. The encrypted recalculation instruction and its digital signature are then sent to the marketing system together.

8. An electricity revenue reconciliation system based on business and financial data linkage, used to implement the electricity revenue reconciliation method based on business and financial data linkage as described in any one of claims 1-7, characterized in that, It includes a data acquisition unit, a timing alignment unit, a dynamic matching unit, a parameter integration unit, a matrix construction unit, a hierarchical detection unit, and an instruction triggering unit, wherein: The data acquisition unit is used to collect marketing revenue records from the marketing system and financial receipt records from the financial system in real time at a set sampling frequency, and to compile the marketing revenue records into the marketing data topic queue and the financial receipt records into the financial data topic queue. The time-series alignment unit is used to perform time-series alignment processing on each marketing revenue record in the marketing data theme queue and each financial receipt record in the financial data theme queue, constructing a first sliding time window and a first matching key for each marketing revenue record in the marketing data theme queue, and constructing a second sliding time window and a second matching key for each financial receipt record in the financial data theme queue. The dynamic matching unit is used to dynamically plan and match each marketing revenue record with each financial receipt record based on the first sliding time window and the first matching key of each marketing revenue record and the second sliding time window and the second matching key of each financial receipt record, and to determine the matching score between each marketing revenue record and each financial receipt record. The parameter integration unit is used to determine the marketing transaction number, payment time and amount due for each marketing revenue record, determine the financial transaction number, arrival time and amount due for each financial receipt record, calculate the time difference between each marketing revenue record and each financial receipt record based on the payment time of each marketing revenue record and the arrival time of each financial receipt record, and calculate the amount difference between each marketing revenue record and each financial receipt record based on the amount due for each marketing revenue record and the amount due for each financial receipt record. The matrix construction unit is used to construct a mapping relationship matrix by using the marketing transaction number of each marketing revenue record, the financial transaction number of each financial receipt record, the matching score between each marketing revenue record and each financial receipt record, the time difference between each marketing revenue record and each financial receipt record, and the amount difference between each marketing revenue record and each financial receipt record. The hierarchical detection unit is used to perform unilateral account detection, time difference account detection, and amount difference account detection on each marketing receipt record and each financial receipt record based on the mapping relationship matrix, and obtain the corresponding detection results. The instruction triggering unit is used to generate corresponding automatic compensation instructions based on the detection results, and to encrypt and send the automatic compensation instructions to the marketing system or financial system according to the type of automatic compensation instructions.

9. An electricity revenue reconciliation system based on business and financial data linkage, characterized in that: include: Memory, used to store instructions; A processor is configured to read instructions stored in the memory and execute the electricity revenue reconciliation method based on business and financial data linkage as described in any one of claims 1-7 according to the instructions.

10. A computer program product, characterized in that, When the computer program product is run on a computer, it executes the electricity revenue reconciliation method based on the linkage of business and financial data as described in any one of claims 1-7.