A Method and System for Automatic Reconciliation of Logistics Waybills Based on Multi-Source Heterogeneous Data
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]在大型物流企业中,每日产生的运单量可达数万至数十万单,数据来源涵盖运输管理系统(TMS)、全球定位系统(GPS)、财务系统(FMS)和电子回单系统等多个异构数据源,各系统的数据格式、时间粒度和主键标识各不相同,导致对账工作长期依赖人工操作
[0016]本发明的有益效果为:通过多键值交叉关联实现了异构数据源的可靠关联。以运单号、车牌号和时间段三级主键的组合进行模糊匹配,在单一主键缺失时的匹配成功率大幅上升。通过孤立森林和梯度提升决策树堆叠的集成模型实现了高精度的对账差异自动检测。将差异数据行按所述差异类型及其严重程度生成对账差异报告并推送至对应的处理终端,同时将经人工确认后的处理结果反馈至对账知识库,以增量方式更新所述异常检测模型的判定边界,通过反馈学习机制实现了对账精度的持续提升。
Smart Images

Figure CN122573101A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics information technology, and in particular to a method and system for automatic reconciliation of logistics waybills based on multi-source heterogeneous data. Background Technology
[0002] Logistics companies reconcile accounts by matching and verifying actual transportation data (waybill, track, return receipt) with financial data (accounts receivable, accounts payable, and payments made) item by item after the completion of transportation business. It is a key link to ensure accurate settlement of freight charges and compliance of fund flow.
[0003] In large logistics companies, the number of waybills generated daily can reach tens of thousands to hundreds of thousands. The data sources cover multiple heterogeneous data sources such as Transportation Management System (TMS), Global Positioning System (GPS), Financial Management System (FMS) and Electronic Receipt System. The data formats, time granularity and primary key identifiers of each system are different, which leads to the long-term reliance on manual operation for reconciliation work.
[0004] The information disclosed in this background section is intended only to enhance the understanding of the general background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0005] This invention provides an automatic reconciliation method and system for logistics waybills based on multi-source heterogeneous data, thereby effectively solving the problems in the background technology.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: a method and system for automatic reconciliation of logistics waybills based on multi-source heterogeneous data, comprising the following steps: Collect waybill data, trajectory data, cost data, and return receipt data. Each data source is reported independently with different time granularity, data format, and primary key identifier. Using the waybill number as the first association primary key, the license plate number as the second association primary key, and the time period as the third association primary key, multi-key cross-association is performed on the waybill data, the trajectory data, the cost data, and the return receipt data. The associated data rows are aligned to a unified time axis and a standardized reconciliation wide table is generated. Each row in the standardized reconciliation wide table is input into a pre-trained anomaly detection model, which outputs the anomaly probability of that row. The anomaly detection model is an ensemble model of stacked isolated forest and gradient boosting decision tree. Rows with anomaly probabilities exceeding a preset threshold are taken as discrepancy data rows, and the discrepancy data rows are automatically classified according to the discrepancy type. Generate a reconciliation difference report for the difference data rows according to the difference type and its severity, and push it to the corresponding processing terminal. At the same time, feedback the processing results after manual confirmation to the reconciliation knowledge base to update the decision boundary of the anomaly detection model incrementally.
[0007] Further, before performing multi-key value cross-association on the waybill data, the trajectory data, the expense data, and the return receipt data, it further includes: Perform format unification conversion on the time field in the waybill data; Perform inverse geocoding on the GPS coordinates in the trajectory data and map them to administrative divisions and road segment codes; Perform currency unified conversion on the amount field in the expense data; Perform fuzzy matching on the data rows missing the primary key. The fuzzy matching is based on the combined similarity of the three fields of the shipper name, the consignee name, and the freight amount. The rows with a similarity higher than the preset threshold are regarded as the same waybill; The standardized reconciliation wide table includes the following dimensional fields: waybill number, license plate number, shipping time, arrival time, driving mileage, receivable freight, payable freight, paid freight, cargo damage amount, return receipt status, and return receipt signing time; Each row in the standardized reconciliation wide table corresponds to a transportation task, and the field values come from the results after association and alignment of different original data sources.
[0008] Further, the anomaly detection model uses Isolation Forest as the first-level detector to calculate the initial anomaly score for each row in the standardized reconciliation wide table, and uses the vector after splicing the initial anomaly score and the original features as the input of the Gradient Boosting Decision Tree. The Gradient Boosting Decision Tree uses the historically labeled reconciliation difference data as the training label and outputs the final anomaly probability.
[0009] Further, the automatic classification of the difference data rows according to the difference type is executed by a rule engine, and the rule engine includes the following decision rules: If |receivable freight - payable freight| / receivable freight > T1, it is classified as an expense difference; If the number of GPS trajectory points / the number of standard trajectory points < T2, it is classified as a missing trajectory; If the return receipt signing time - the waybill completion time > T3, it is classified as a return receipt overdue; If the waybill status is inconsistent in the logistics transportation management system and the financial management system, it is classified as an inconsistent waybill status; Where T1 is the expense difference threshold, T2 is the trajectory integrity threshold, and T3 is the return receipt overdue days threshold.
[0010] Further, the generation method of the reconciliation difference report is: All differential data rows under the same waybill number are aggregated into a single differential record. The differential record includes the waybill number, a list of differential types, a summary of differential amounts, and a recommended processing solution. The recommended processing scheme is generated by knowledge graph reasoning. The nodes of the knowledge graph include waybill, expense item, responsible party and processing action, and the edges are causal relationship and disposal relationship.
[0011] Furthermore, the incremental updating of the decision boundary of the anomaly detection model includes: The manually verified processing results are used as newly labeled samples. The N most recent labeled samples are selected in a sliding window manner to incrementally train the gradient boosting decision tree, updating the weights of the leaf nodes of the tree structure without changing the tree structure.
[0012] Furthermore, the method also includes: The system analyzes the distribution of the number of each type of discrepancy in the most recent M reconciliation periods. If the number of a certain type of discrepancy shows a monotonically increasing trend for K consecutive periods, the system automatically shortens the data source collection period corresponding to that type of discrepancy to improve the timeliness of reconciliation.
[0013] The present invention also includes an automatic reconciliation system for logistics waybills based on multi-source heterogeneous data, using the method described above, wherein the system includes: The data collection unit is used to collect waybill data, trajectory data, cost data, and return receipt data. Each data source reports independently with different time granularity, data format, and primary key identifier. The association unit is used to perform multi-key cross-association of the waybill data, the trajectory data, the cost data and the return receipt data with the waybill number as the first association primary key, the license plate number as the second association primary key and the time period as the third association primary key, align the associated data rows to a unified time axis and generate a standardized reconciliation wide table. An anomaly detection unit is used to input each row of the standardized reconciliation wide table into a pre-trained anomaly detection model and output the anomaly probability of that row. The anomaly detection model is an ensemble model of stacked isolated forest and gradient boosting decision tree. Rows with anomaly probabilities exceeding a preset threshold are taken as differential data rows, and the differential data rows are automatically classified according to the type of difference. The report feedback unit is used to generate a reconciliation discrepancy report for the discrepancy data rows according to the discrepancy type and its severity, and push it to the corresponding processing terminal. At the same time, it feeds back the processing results after manual confirmation to the reconciliation knowledge base to update the judgment boundary of the anomaly detection model in an incremental manner.
[0014] The present invention also includes a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described above.
[0015] The present invention also includes a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described above.
[0016] The beneficial effects of this invention are as follows: Reliable association of heterogeneous data sources is achieved through multi-key value cross-association. Fuzzy matching using a combination of waybill number, license plate number, and time period as primary keys significantly increases the matching success rate when a single primary key is missing. High-precision automatic detection of reconciliation discrepancies is achieved through an ensemble model of isolated forests and gradient boosting decision trees. Reconciliation discrepancy reports are generated based on the discrepancy type and severity and pushed to the corresponding processing terminal. Simultaneously, the processing results, after manual verification, are fed back to the reconciliation knowledge base, incrementally updating the judgment boundary of the anomaly detection model. This feedback learning mechanism continuously improves reconciliation accuracy. Attached Figure Description
[0017] 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 recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the system structure in Embodiment 1 of the present invention; Figure 3 This is a comparison chart of precision / recall rates of the present invention and different methods in Embodiment 2 of the present invention; Figure 4 This is a comparison chart of the ROC curves of the present invention and different methods in Embodiment 2 of the present invention; Figure 5 This is a feedback learning effect curve in Embodiment 2 of the present invention; Figure 6 This is a schematic diagram of the computer device in Embodiment 3 of the present invention. Detailed Implementation
[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Example 1
[0020] like Figure 1 The following is an example of an automatic reconciliation method for logistics waybills based on multi-source heterogeneous data, comprising the following steps: Collect waybill data, trajectory data, cost data, and return receipt data. Each data source is reported independently with different time granularity, data format, and primary key identifier. Using the waybill number as the first associated primary key, the license plate number as the second associated primary key, and the time period as the third associated primary key, multi-key cross-association is performed on waybill data, trajectory data, cost data, and return receipt data. The associated data rows are then aligned to a unified time axis and a standardized reconciliation wide table is generated. Each row in the standardized reconciliation wide table is input into a pre-trained anomaly detection model, which outputs the anomaly probability of that row. The anomaly detection model is an ensemble model of stacked isolated forest and gradient boosting decision tree. Rows with anomaly probabilities exceeding a preset threshold are taken as discrepancy data rows, and the discrepancy data rows are automatically classified according to the discrepancy type. For rows of discrepancies, a reconciliation discrepancy report is generated based on the discrepancy type and its severity and pushed to the corresponding processing terminal. At the same time, the processing results after manual confirmation are fed back to the reconciliation knowledge base to update the judgment boundary of the anomaly detection model in an incremental manner.
[0021] Reliable association of heterogeneous data sources was achieved through multi-key cross-association. Fuzzy matching using combinations of three-level primary keys—waybill number, license plate number, and time period—significantly increased the matching success rate when a single primary key was missing. A high-precision automatic detection of reconciliation discrepancies was achieved through an ensemble model of isolated forests and gradient boosting decision trees. Reconciliation discrepancy reports were generated based on the discrepancy type and severity and pushed to the corresponding processing terminals. Simultaneously, the processing results, after manual verification, were fed back to the reconciliation knowledge base, incrementally updating the judgment boundaries of the anomaly detection model. This feedback learning mechanism enabled continuous improvement in reconciliation accuracy.
[0022] In this embodiment, before performing multi-key-value cross-association on waybill data, trajectory data, cost data, and return receipt data, the following steps are also included: Perform a format standardization conversion on the time field in the waybill data; Perform reverse geocoding on the GPS coordinates in the trajectory data to map them to administrative divisions and road segment codes; Perform a unified currency conversion on the amount field in the expense data; Perform fuzzy matching on data rows with missing primary keys. Fuzzy matching is based on the similarity of the combination of three fields: shipper name, consignee name, and freight amount. Rows with similarity higher than a preset threshold are considered to be the same waybill. The standardized reconciliation wide table contains the following dimensional fields: waybill number, vehicle license number, shipping time, arrival time, driving mileage, receivable freight, payable freight, paid freight, cargo damage amount, receipt status, and receipt signing time; Each row in the standardized reconciliation wide table corresponds to a transportation task, and the field values are the results after association and alignment from different original data sources.
[0023] Among them, the anomaly detection model uses the isolation forest as the first-level detector to calculate the initial anomaly score for each row in the standardized reconciliation wide table, uses the vector spliced by the initial anomaly score and the original features as the input of the gradient boosting decision tree, and the gradient boosting decision tree uses the historically labeled reconciliation difference data as the training label to output the final anomaly probability.
[0024] As a preference of the above embodiment, the automatic classification of the difference data rows by the difference type is executed by a rule engine, and the rule engine includes the following determination rules: If |receivable freight - payable freight| / receivable freight > T1, it is classified as a cost difference; If the number of GPS track points / the number of standard track points < T2, it is classified as a missing track; If the receipt signing time - the waybill completion time > T3, it is classified as an overdue receipt; If the waybill status is inconsistent in the logistics transportation management system and the financial management system, it is classified as an inconsistent waybill status; Among them, T1 is the cost difference threshold, T2 is the track integrity threshold, and T3 is the overdue receipt days threshold.
[0025] Among them, the generation method of the reconciliation difference report is as follows: Aggregate all the difference data rows under the same waybill number into a difference record, and the difference record includes the waybill number, the list of difference types, the summary of difference amounts, and the recommended handling solutions; The recommended handling solutions are generated by knowledge graph reasoning. The nodes of the knowledge graph include waybills, expense items, responsible parties, and handling actions, and the edges are causal relationships and disposal relationships.
[0026] In this embodiment, updating the decision boundary of the anomaly detection model in an incremental manner includes: Use the processed results confirmed by humans as new labeled samples, and select the nearest N labeled samples in a sliding window manner to perform incremental training on the gradient boosting decision tree, update the leaf node weights of the tree structure, and do not change the tree structure.
[0027] As a preference of the above embodiment, the method further includes: The system analyzes the distribution of the number of each type of discrepancy in the most recent M reconciliation periods. If the number of a certain type of discrepancy shows a monotonically increasing trend for K consecutive periods, the system automatically shortens the data source collection period corresponding to that type of discrepancy to improve the timeliness of reconciliation.
[0028] like Figure 2 As shown, this embodiment also includes an automatic reconciliation system for logistics waybills based on multi-source heterogeneous data. Using the method described above, the system includes: The data collection unit is used to collect waybill data, trajectory data, cost data, and return receipt data. Each data source reports independently with different time granularity, data format, and primary key identifier. The association unit is used to perform multi-key cross-association of waybill data, trajectory data, cost data and return receipt data with waybill number as the first association primary key, license plate number as the second association primary key and time period as the third association primary key, and align the associated data rows to a unified time axis and generate a standardized reconciliation wide table. The anomaly detection unit is used to input each row of the standardized reconciliation wide table into the pre-trained anomaly detection model and output the anomaly probability of that row. The anomaly detection model is an ensemble model of stacked isolated forest and gradient boosting decision tree. Rows with anomaly probabilities exceeding a preset threshold are taken as differential data rows, and the differential data rows are automatically classified according to the type of difference. The report feedback unit is used to generate reconciliation discrepancy reports based on the discrepancy type and severity of the discrepancy data rows and push them to the corresponding processing terminals. At the same time, the processing results after manual confirmation are fed back to the reconciliation knowledge base to update the judgment boundary of the anomaly detection model in an incremental manner. Example 2
[0029] I. Application Scenarios and Data Sources This implementation was deployed in a large logistics company that processes approximately 8,000 to 12,000 waybills daily, with a monthly average of about 300,000 waybills. The system connects to four data sources: a Transportation Management System (TMS, a MySQL database recording waybill numbers, shipping information, carrier information, waybill status, etc.), a GPS tracking platform (API interface, storing vehicle trajectory point data by license plate number), a Financial Management System (an Oracle database recording accounts receivable and payable and actual receipt and payment information), and an Electronic Receipt System (a file server storing receipt images and signature records). The data update cycles for each system differ: TMS writes data in real-time, GPS reports location points every 5 minutes, the Financial System imports data in batches on a T+1 basis, and the Electronic Receipt System uploads data within 24 hours of receipt.
[0030] II. Data Preprocessing and Multi-Key Value Association Data preprocessing workflow: The time field of TMS waybills is uniformly formatted as "yyyy-MM-dd HH:mm:ss"; GPS coordinates are parsed using reverse geocoding to obtain provincial-municipal-district / county level administrative region and road segment codes; financial amounts are uniformly converted to RMB. For data rows with missing waybill numbers (mainly from the GPS platform and financial system), fuzzy matching is performed based on the combined similarity (weighted cosine similarity, with weights of 0.3, 0.3, and 0.4) of the three fields: shipper name, consignee name, and freight amount, with a similarity threshold set at 0.85.
[0031] Multi-key value association uses the waybill number as the primary key for exact matching. Data rows that do not match proceed to the second association process, using the license plate number plus a time period (one day before and after the shipping date). If no match is found, a third association process is initiated, using fuzzy matching of the shipper, consignee, and freight amount fields. In the association test of 87,205 monthly waybill records, the first-level association was successful for 83,512 records (95.8%), the second-level association for 2,281 records (2.6%), the third-level association for 1,173 records (1.3%), and the final association failed for 239 records (0.3%).
[0032] III. Construction of Standardized Wide Reconciliation Statement A standardized reconciliation wide table was constructed for the successfully linked data rows, containing the following dimension fields: Waybill Number, License Plate Number, Shipper, Consignee, Shipment Time, Arrival Time, Mileage, Standard Mileage, Freight Receivable, Freight Payable, Freight Paid, Amount of Cargo Damage, Return Receipt Status, Return Receipt Signature Time, Waybill Status (TMS), and Waybill Status (Financial). A total of 86,966 rows of data were generated, with each row corresponding to one transportation task.
[0033] IV. Anomaly Detection Model An anomaly detection model was trained using 6 months of labeled reconciliation data (120,000 records in total, including 8,400 discrepancies, a discrepancy rate of 7.0%). The first level was an isolated forest with 200 trees, a subsampling ratio of 0.5, and an automatic anomaly threshold (based on the percentile of the anomaly score distribution). The second level was a gradient boosting decision tree with 300 trees, a maximum depth of 6, and a learning rate of 0.1. The input consisted of the initial anomaly scores from the isolated forest and the concatenated 17-dimensional feature vector (18-dimensional vector). Figure 3 As shown, the performance evaluation results on 15,000 test sets are as follows:
[0034] V. Difference Classification and Report Generation The rule engine uses four judgment rule parameters: T1=3% (|Accounts Receivable - Accounts Payable| / Accounts Receivable > 3% is judged as a cost difference), T2=0.6 (Actual GPS Points / Standard Points < 0.6 is judged as a missing track), T3=7 days (Return receipt signed - Waybill completed > 7 days is judged as a returned receipt overdue), and inconsistencies in the waybill status between TMS and FMS are judged as status inconsistencies. Difference reports are aggregated by waybill number. Last month, a total of 2,847 difference records were detected, including 1,286 cost differences (45.2%), 683 missing tracks (24.0%), 476 overdue returned receipts (16.7%), and 402 status inconsistencies (14.1%). In the recommended processing solutions generated by knowledge graph reasoning, the adoption rate by finance personnel was 91.3%.
[0035] VI. Feedback and Learning For the 2,847 discrepancy records, finance personnel confirmed each one and then fed the processing results back to the system. The system used a sliding window (window size N=2,000 records) to select the most recently labeled samples for incremental training of the gradient boosting decision tree (only updating the weights of the leaf nodes, without changing the tree structure). During 6 months of continuous operation, the model's precision increased from an initial 0.823 to 0.908 month by month, and the recall increased from 0.811 to 0.883.
[0036] VII. Self-adaptive adjustment of reconciliation cycle Based on the above scheme, an adaptive reconciliation cycle mechanism was introduced. The distribution of the number of different types of discrepancies over the most recent 12 reconciliation cycles was statistically analyzed: approximately 320 discrepancies per week on average, approximately 170 missing records, approximately 120 overdue receipts, and approximately 100 inconsistent statuses. From week 5 onwards, the number of overdue receipts increased continuously (week 5: 112 → week 6: 128 → week 7: 145 → week 8: 163), showing a monotonically increasing trend for four consecutive weeks. The system automatically shortened the data collection cycle of the electronic receipt system from 24 hours to 4 hours, advancing the time when receipt data enters the reconciliation process by approximately 20 hours. After implementing the shortened cycle, the number of overdue receipts decreased to 135 in week 9 (a 17.2% decrease compared to week 8), verifying the effectiveness of the adaptive adjustment.
[0037] This embodiment has the following beneficial effects: First, reliable association of heterogeneous data sources was achieved through multi-key-value cross-association. Fuzzy matching using a combination of three primary keys—waybill number, license plate number, and time period—increased the matching success rate from 67% for single-key matching to 94% when a single primary key was missing. In actual deployment testing, out of 87,000 waybill records, 1,248 records (1.43%) had missing waybill numbers. Single-key matching failed completely, while multi-key-value cross-association successfully associated 1,173 records (a success rate of 94.0%).
[0038] Second, such as Figure 4 As shown, an ensemble model combining isolated forests and gradient boosting decision trees achieves high-precision automatic detection of reconciliation discrepancies. On a test set containing 15,000 labeled samples, the ensemble model achieves an AUC of 0.937, precision of 0.892, and recall of 0.876, representing improvements of 5.8%, 6.1%, and 7.3% respectively compared to a single gradient boosting decision tree model. Compared to fixed threshold rule methods, the false positive rate is reduced by approximately 62%.
[0039] Third, the accuracy of reconciliation has been continuously improved through a feedback learning mechanism. For example... Figure 5 As shown, after introducing incremental learning, the precision of the anomaly detection model increased from 0.823 to 0.908 month by month over six consecutive months of operation, and the recall increased from 0.811 to 0.883. After accumulating 2,000 manually verified feedback samples, the model's F1-score stabilized above 0.89. Example 3
[0040] Please see Figure 6 The diagram shows a structural schematic of a computer device provided in an embodiment of this application. An embodiment of this application provides a computer device 400, including a processor 410 and a memory 420. The memory 420 stores a computer program executable by the processor 410. When the computer program is executed by the processor 410, it performs the method described above.
[0041] This application embodiment also provides a storage medium 430, on which a computer program is stored, and the computer program is executed by a processor 410 to perform the above method.
[0042] The storage medium 430 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0043] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.
[0044] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0045] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0046] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0047] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0048] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0049] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0050] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for automatic reconciliation of logistics waybills based on multi-source heterogeneous data, characterized in that, It includes the following steps: Collect waybill data, trajectory data, expense data, and receipt data. Each data source reports independently with different time granularities, data formats, and primary key identifiers; Using the waybill number as the first associated primary key, the license plate number as the second associated primary key, and the time period as the third associated primary key, perform multi-key cross-association on the waybill data, the trajectory data, the expense data, and the receipt data. Align the associated data rows to a unified time axis and generate a standardized reconciliation wide table; Input each row in the standardized reconciliation wide table into a pre-trained anomaly detection model to output the anomaly probability of this row. The anomaly detection model is an integrated model stacked by Isolation Forest and Gradient Boosting Decision Tree; Use the rows with the anomaly probability exceeding the preset threshold as differential data rows, and automatically classify the differential data rows according to the difference type; Generate a reconciliation difference report for the differential data rows according to the difference type and its severity and push it to the corresponding processing terminal. At the same time, feedback the processed result after manual confirmation to the reconciliation knowledge base to incrementally update the decision boundary of the anomaly detection model.
2. The method according to claim 1, characterized in that, Before performing multi-key cross-association on the waybill data, the trajectory data, the expense data, and the receipt data, it further includes: Perform format unification conversion on the time field in the waybill data; Perform inverse geocoding on the GPS coordinates in the trajectory data and map them to administrative division and road section codes; Perform currency unified conversion on the amount field in the expense data; Perform fuzzy matching on the data rows with missing primary keys. The fuzzy matching uses the combined similarity of the three fields of the shipper name, the consignee name, and the freight amount as the matching basis. The rows with similarity higher than the preset threshold are regarded as the same waybill; The standardized reconciliation wide table contains the following dimension fields: waybill number, license plate number, shipping time, arrival time, driving mileage, receivable freight, payable freight, paid freight, cargo damage amount, receipt status, and receipt signing time; 3. The method according to claim 1, characterized in that, Each row in the standardized reconciliation wide table corresponds to a transportation task, and the field values come from the results after association and alignment of different original data sources.
4. The method according to claim 3, characterized in that, The anomaly detection model uses Isolation Forest as the first-level detector to calculate the initial anomaly score for each row in the standardized reconciliation wide table. Use the vector after splicing the initial anomaly score and the original features as the input of the Gradient Boosting Decision Tree. The Gradient Boosting Decision Tree uses the historically labeled reconciliation difference data as the training label and outputs the final anomaly probability. The automatic classification of the differential data rows according to the difference type is executed by a rule engine. The rule engine contains the following decision rules: If |receivable freight - payable freight| / receivable freight > T1, it is classified as an expense difference; If the number of GPS trajectory points / the number of standard trajectory points < T2, it is classified as a trajectory missing; If the receipt signing time - the waybill completion time > T3, it is classified as a receipt overdue; If the waybill status is inconsistent in the logistics transportation management system and the financial management system, it is classified as a waybill status inconsistency; 5. The method according to claim 1, characterized in that, Where T1 is the expense difference threshold, T2 is the trajectory integrity threshold, and T3 is the receipt overdue days threshold. The generation method of the reconciliation difference report is: All differential data rows under the same waybill number are aggregated into a single differential record. The differential record includes the waybill number, a list of differential types, a summary of differential amounts, and a recommended processing solution. The recommended processing scheme is generated by knowledge graph reasoning. The nodes of the knowledge graph include waybill, expense item, responsible party and processing action, and the edges are causal relationship and disposal relationship.
6. The method according to claim 1, characterized in that, The incremental updating of the decision boundary of the anomaly detection model includes: The manually verified processing results are used as newly labeled samples. The N most recent labeled samples are selected in a sliding window manner to incrementally train the gradient boosting decision tree, updating the weights of the leaf nodes of the tree structure without changing the tree structure.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: The system analyzes the distribution of the number of each type of discrepancy in the most recent M reconciliation periods. If the number of a certain type of discrepancy shows a monotonically increasing trend for K consecutive periods, the system automatically shortens the data source collection period corresponding to that type of discrepancy to improve the timeliness of reconciliation.
8. An automatic reconciliation system for logistics waybills based on multi-source heterogeneous data, characterized in that, Using the method of any one of claims 1 to 7, the system comprises: The data collection unit is used to collect waybill data, trajectory data, cost data, and return receipt data. Each data source reports independently with different time granularity, data format, and primary key identifier. The association unit is used to perform multi-key cross-association of the waybill data, the trajectory data, the cost data and the return receipt data with the waybill number as the first association primary key, the license plate number as the second association primary key and the time period as the third association primary key, align the associated data rows to a unified time axis and generate a standardized reconciliation wide table. An anomaly detection unit is used to input each row of the standardized reconciliation wide table into a pre-trained anomaly detection model and output the anomaly probability of that row. The anomaly detection model is an ensemble model of stacked isolated forest and gradient boosting decision tree. Rows with anomaly probabilities exceeding a preset threshold are taken as differential data rows, and the differential data rows are automatically classified according to the type of difference. The report feedback unit is used to generate a reconciliation discrepancy report for the discrepancy data rows according to the discrepancy type and its severity, and push it to the corresponding processing terminal. At the same time, it feeds back the processing results after manual confirmation to the reconciliation knowledge base to update the judgment boundary of the anomaly detection model in an incremental manner.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-7.