CN105303437A - Processing method and device for account checking - Google Patents
Processing method and device for account checking Download PDFInfo
- Publication number
- CN105303437A CN105303437A CN201510666151.5A CN201510666151A CN105303437A CN 105303437 A CN105303437 A CN 105303437A CN 201510666151 A CN201510666151 A CN 201510666151A CN 105303437 A CN105303437 A CN 105303437A
- Authority
- CN
- China
- Prior art keywords
- transaction record
- reconciliation
- transaction
- major key
- file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 28
- 230000008878 coupling Effects 0.000 claims 1
- 238000010168 coupling process Methods 0.000 claims 1
- 238000005859 coupling reaction Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 10
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供一种对账的处理方法及装置,包括:接收对账请求,对账请求中包括交易系统的标识;根据对账请求,获取交易系统的标识对应的交易系统中的对账文件,以及本地数据库中保存的交易信息;获取与对账文件对应的第一交易记录组,以及与交易信息对应的第二交易记录组;根据第一主键,按照第一预设排列顺序,对第一交易记录组中的第一交易记录进行排序处理,并根据第二主键,按照第一预设排列顺序,对第二交易组中的第二交易记录进行排序处理;在排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,并根据获取的对账结果进行相应的处理,本发明提供的对账的处理方法及装置,提高了对账的效率。
The present invention provides a processing method and device for account reconciliation, comprising: receiving an account reconciliation request, the account reconciliation request including the identification of the transaction system; according to the account reconciliation request, obtaining the account reconciliation file in the transaction system corresponding to the identification of the transaction system, and the transaction information stored in the local database; obtain the first transaction record group corresponding to the reconciliation file, and the second transaction record group corresponding to the transaction information; according to the first primary key, according to the first preset order, the first The first transaction records in the transaction record group are sorted, and the second transaction records in the second transaction group are sorted according to the first preset order according to the second primary key; the sorted first transaction records In the group and the second transaction record group, compare whether the first transaction record is consistent with the second transaction record with the same corresponding order, and perform corresponding processing according to the obtained reconciliation result. The method and device for processing reconciliation provided by the present invention, Improve the efficiency of reconciliation.
Description
技术领域technical field
本发明涉及通信技术领域,尤其涉及一种对账的处理方法及装置。The present invention relates to the technical field of communications, in particular to a method and device for processing account reconciliation.
背景技术Background technique
对账是金融系统中最常见的一个场景,比如各个银行需要与银联进行对账,支付宝需要与各个银行进行对账,而支付宝的各个商户可能还需要对支付宝进行对账,通常,交易系统在对交易进行资金处理时,需调用支付系统进行支付,支付系统负责资金的清算。Reconciliation is the most common scenario in the financial system. For example, each bank needs to reconcile with UnionPay, Alipay needs to reconcile with each bank, and each merchant of Alipay may also need to reconcile Alipay. Usually, the transaction system is in When processing funds for transactions, it is necessary to call the payment system for payment, and the payment system is responsible for the liquidation of funds.
现有技术中,为了保证资金的准确无误,支付系统一般会为交易系统提供对账文件,在进行资金清算前,根据对账文件的每一条记录的主键逐条查询交易系统的本地的数据库中的每一条记录,如果在交易系统的本地数据库中没有查找到与对账文件中相对应的记录,则将对账文件中相应的记录标记为异常数据,如果在交易系统的本地数据库中查找到与对账文件中相对应的记录,则对比记录中的每一个字段,并将交易系统的本地数据库中的该条记录标记为已检查,如果发现有不同的地方,则将该记录标记为异常数据。In the prior art, in order to ensure the accuracy of funds, the payment system generally provides reconciliation files for the transaction system, and before liquidating the funds, query the local database of the transaction system one by one according to the primary key of each record in the reconciliation file. For each record, if the corresponding record in the reconciliation file is not found in the local database of the transaction system, the corresponding record in the reconciliation file will be marked as abnormal data. For the corresponding record in the reconciliation file, compare each field in the record, and mark the record in the local database of the transaction system as checked. If any difference is found, mark the record as abnormal data .
但是采用现有技术,由于针对对账文件中的每一条记录均需要访问交易系统的本地的数据库进行查询记录和对比记录的操作,从而降低了对账的效率。However, with the prior art, since each record in the reconciliation file needs to visit the local database of the transaction system to query and compare records, the efficiency of reconciliation is reduced.
发明内容Contents of the invention
本发明提供一种对账的处理方法及装置,用于解决现有技术中对账效率低的问题。The invention provides a processing method and device for account reconciliation, which are used to solve the problem of low account reconciliation efficiency in the prior art.
本发明第一方面提供一种对账的处理方法,包括:The first aspect of the present invention provides a processing method for reconciliation, including:
接收对账请求,所述对账请求中包括交易系统的标识;Receive a reconciliation request, the reconciliation request includes the identification of the transaction system;
根据所述对账请求,获取所述交易系统的标识对应的交易系统中的对账文件,以及本地数据库中保存的交易信息;According to the reconciliation request, obtain the reconciliation file in the transaction system corresponding to the identifier of the transaction system, and the transaction information stored in the local database;
获取与所述对账文件对应的第一交易记录组,以及与所述交易信息对应的第二交易记录组,其中,所述第一交易记录组中包括多个第一交易记录,每个第一交易记录均包括第一主键和对应的对账字段;所述第二交易记录组中包括多个第二交易记录,每个第二交易记录中包括第二主键和对应的对账字段;Obtain a first transaction record group corresponding to the reconciliation file, and a second transaction record group corresponding to the transaction information, wherein the first transaction record group includes a plurality of first transaction records, each Each transaction record includes a first primary key and a corresponding reconciliation field; the second transaction record group includes a plurality of second transaction records, and each second transaction record includes a second primary key and a corresponding reconciliation field;
根据第一主键,按照第一预设排列顺序,对所述第一交易记录组中的第一交易记录进行排序处理,并根据第二主键,按照所述第一预设排列顺序,对第二交易组中的第二交易记录进行排序处理;According to the first primary key, the first transaction records in the first transaction record group are sorted according to the first preset sequence, and according to the second primary key, according to the first preset sequence, the second The second transaction records in the transaction group are sorted;
在排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,并根据获取的对账结果进行相应的处理。In the sorted first transaction record group and the second transaction record group, compare whether the first transaction record is consistent with the corresponding second transaction record with the same sort, and perform corresponding processing according to the obtained reconciliation result.
本发明第二方面提供一种对账的处理装置,包括:The second aspect of the present invention provides a processing device for reconciliation, including:
接收模块,用于接收对账请求,所述对账请求中包括交易系统的标识;A receiving module, configured to receive an account reconciliation request, wherein the account reconciliation request includes the identification of the transaction system;
获取模块,用于根据所述对账请求,获取所述交易系统的标识对应的交易系统中的对账文件,以及本地数据库中保存的交易信息;An acquisition module, configured to acquire, according to the account reconciliation request, the account reconciliation file in the transaction system corresponding to the identifier of the transaction system, and the transaction information stored in the local database;
所述获取模块还用于获取与所述对账文件对应的第一交易记录组,以及与所述交易信息对应的第二交易记录组,其中,所述第一交易记录组中包括多个第一交易记录,每个第一交易记录均包括第一主键和对应的对账字段;所述第二交易记录组中包括多个第二交易记录,每个第二交易记录中包括第二主键和对应的对账字段;The obtaining module is also used to obtain a first transaction record group corresponding to the reconciliation file, and a second transaction record group corresponding to the transaction information, wherein the first transaction record group includes a plurality of A transaction record, each first transaction record includes a first primary key and a corresponding reconciliation field; the second transaction record group includes a plurality of second transaction records, and each second transaction record includes a second primary key and Corresponding reconciliation fields;
排序模块,用于根据第一主键,按照第一预设排列顺序,对所述第一交易记录组中的第一交易记录进行排序处理,并根据第二主键,按照所述第一预设排列顺序,对第二交易组中的第二交易记录进行排序处理;A sorting module, configured to sort the first transaction records in the first transaction record group according to the first preset order according to the first primary key, and sort according to the first preset sequence according to the second primary key order, sorting the second transaction records in the second transaction group;
比较处理模块,用于在排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,并根据获取的对账结果进行相应的处理。The comparison processing module is used to compare whether the first transaction record is consistent with the second transaction record corresponding to the same sort in the sorted first transaction record group and the second transaction record group, and perform corresponding corresponding reconciliation results according to the obtained reconciliation results. deal with.
本发明提供一种对账的处理方法及装置,包括,接收对账请求,对账请求中包括交易系统的标识;根据对账请求,获取交易系统的标识对应的交易系统中的对账文件,以及本地数据库中保存的交易信息;获取与对账文件对应的第一交易记录组,以及与交易信息对应的第二交易记录组,并根据第一交易记录组中每个第一交易记录中的第一主键,按照第一预设排列顺序,对第一交易记录组中的第一交易记录进行排序处理,再根据第二交易记录组中的第二交易记录中的第二主键,按照第一预设排列顺序,对第二交易组中的第二交易记录进行排序处理;在排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,并根据获取的对账结果进行相应的处理,由于可以先根据对账文件所对应的第一交易记录组,按照第一主键和第一预设排列顺序,对第一交易记录组中的第一交易记录进行排序,根据本地数据库中保存的交易信息所对应的第二交易记录组,按照第二主键和第一预设排列顺序,对第二交易记录组中的第二交易记录进行排序,再对排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,相较于现有技术中需要针对对账文件中的每一个交易记录,分别要查询本地数据库中的保存的交易信息,获取与之匹配的交易记录进行比较而言,本实施例有效地提高了对账的处理效率。The present invention provides a processing method and device for account reconciliation, comprising: receiving an account reconciliation request, the account reconciliation request including the identification of the transaction system; according to the account reconciliation request, obtaining the account reconciliation file in the transaction system corresponding to the identification of the transaction system, and the transaction information stored in the local database; obtain the first transaction record group corresponding to the account reconciliation file, and the second transaction record group corresponding to the transaction information, and according to each first transaction record in the first transaction record group The first primary key, according to the first preset order, sorts the first transaction records in the first transaction record group, and then according to the second primary key in the second transaction records in the second transaction record group, according to the first Preset sort order, sort the second transaction records in the second transaction group; in the sorted first transaction record group and second transaction record group, compare the first transaction record with the corresponding second transaction with the same sort Whether the records are consistent, and perform corresponding processing according to the obtained reconciliation results. Since the first transaction record group corresponding to the reconciliation file can be firstly processed according to the first primary key and the first preset order, the first transaction record group According to the second transaction record group corresponding to the transaction information saved in the local database, according to the second primary key and the first preset order, the second transaction record in the second transaction record group Sorting, and then comparing the first transaction record group and the second transaction record group after sorting to see if the first transaction record is consistent with the second transaction record with the same sorting. For each transaction record in the database, the stored transaction information in the local database should be queried separately to obtain matching transaction records for comparison. This embodiment effectively improves the processing efficiency of account reconciliation.
附图说明Description of drawings
图1为本发明提供的对账的处理方法实施例一的流程示意图;Fig. 1 is a schematic flow chart of Embodiment 1 of the processing method for reconciliation provided by the present invention;
图2为本发明提供的对账的处理方法实施例二的流程示意图;FIG. 2 is a schematic flow diagram of Embodiment 2 of the processing method for reconciliation provided by the present invention;
图3为本发明提供的对账的处理方法实施例三的流程示意图;Fig. 3 is a schematic flow chart of Embodiment 3 of the processing method for reconciliation provided by the present invention;
图4为本发明提供的对账的处理方法实施例四的流程示意图;FIG. 4 is a schematic flow diagram of Embodiment 4 of the processing method for reconciliation provided by the present invention;
图5为本发明提供的对账的处理装置实施例一的结构示意图;FIG. 5 is a schematic structural diagram of Embodiment 1 of the processing device for reconciliation provided by the present invention;
图6为本发明提供的对账的处理装置实施例二的结构示意图;FIG. 6 is a schematic structural diagram of Embodiment 2 of the processing device for reconciliation provided by the present invention;
图7为本发明提供的对账的处理装置实施例三的结构示意图;FIG. 7 is a schematic structural diagram of Embodiment 3 of the processing device for reconciliation provided by the present invention;
图8为本发明提供的对账的处理装置实施例四的结构示意图。FIG. 8 is a schematic structural diagram of Embodiment 4 of the processing device for reconciliation provided by the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
图1为本发明提供的对账的处理方法实施例一的流程示意图,如图1所示,该方法包括:Fig. 1 is a schematic flow chart of Embodiment 1 of the processing method for reconciliation provided by the present invention. As shown in Fig. 1, the method includes:
步骤101、接收对账请求,对账请求中包括交易系统的标识。Step 101. Receive an account reconciliation request, where the account reconciliation request includes the identification of the transaction system.
在本实施例中,该方法的执行主体是对账的处理装置,另外,每一个交易系统具有唯一的标识。In this embodiment, the subject of execution of the method is the account reconciliation processing device. In addition, each transaction system has a unique identifier.
步骤102、根据对账请求,获取交易系统的标识对应的交易系统中的对账文件,以及本地数据库中保存的交易信息。Step 102, according to the reconciliation request, obtain the reconciliation file in the transaction system corresponding to the identifier of the transaction system, and the transaction information stored in the local database.
步骤103、获取与对账文件对应的第一交易记录组,以及与交易信息对应的第二交易记录组。Step 103, acquiring the first transaction record group corresponding to the reconciliation file, and the second transaction record group corresponding to the transaction information.
其中,第一交易记录组中包括多个第一交易记录,每个第一交易记录均包括第一主键和对应的对账字段;第二交易记录组中包括多个第二交易记录,每个第二交易记录中包括第二主键和对应的对账字段。Wherein, the first transaction record group includes a plurality of first transaction records, each first transaction record includes a first primary key and a corresponding reconciliation field; the second transaction record group includes a plurality of second transaction records, each The second transaction record includes a second primary key and a corresponding reconciliation field.
在本实施例中,举例来说,第一交易记录中的第一主键可以是流水号,其对应的对账字段包括但不限于金额,订单号,手续费,日期,收款账号和付款账号等;第二交易记录中的第二主键可以是流水号,其对应的对账字段包括但不限于金额,订单号,手续费,日期,收款账号和付款账号等。In this embodiment, for example, the first primary key in the first transaction record may be a serial number, and its corresponding reconciliation fields include but not limited to amount, order number, handling fee, date, receiving account number and payment account number etc.; the second primary key in the second transaction record may be a serial number, and its corresponding reconciliation fields include but not limited to amount, order number, handling fee, date, receiving account number and payment account number, etc.
步骤104、根据第一主键,按照第一预设排列顺序,对第一交易记录组中的第一交易记录进行排序处理,并根据第二主键,按照第一预设排列顺序,对第二交易组中的第二交易记录进行排序处理。Step 104: sort the first transaction records in the first transaction record group according to the first preset order according to the first primary key, and sort the second transaction records according to the first preset order according to the second primary key The second transactions in the group are sorted.
在本实施例中,若第一主键和第二主键是流水号或者订单号时,则第一预设排列顺序可以是从大到小的顺序,也可以是从小到大的顺序。In this embodiment, if the first primary key and the second primary key are serial numbers or order numbers, the first preset arrangement sequence may be from large to small, or may be from small to large.
步骤105、在排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,并根据获取的对账结果进行相应的处理。Step 105. In the sorted first transaction record group and the second transaction record group, compare whether the first transaction record is consistent with the corresponding second transaction record with the same sort, and perform corresponding processing according to the obtained reconciliation result.
在本实施例中,举例来说,排序后的第一交易记录组中的第一交易记录的数量为N条,排序后的第二交易记录组中的第二交易记录的数量为N条,则可以将排序为i的第一交易记录与排序为i的第二交易记录进行比较,若均相同,则生成对账正确的对账结果;若至少有一个不相同,则可以将两个不相同的第一交易记录和第二交易记录提取出来,以形成对账报表,从而生成携带有该对账报表的对账结果。In this embodiment, for example, the number of first transaction records in the sorted first transaction record group is N, and the number of second transaction records in the sorted second transaction record group is N, Then the first transaction record sorted by i can be compared with the second transaction record sorted by i, and if they are all the same, a correct reconciliation result will be generated; if at least one of them is different, the two different transaction records can be compared. The same first transaction record and second transaction record are extracted to form a reconciliation report, so as to generate a reconciliation result carrying the reconciliation report.
在本实施例中,接收对账请求,对账请求中包括交易系统的标识;根据对账请求,获取交易系统的标识对应的交易系统中的对账文件,以及本地数据库中保存的交易信息;获取与对账文件对应的第一交易记录组,以及与交易信息对应的第二交易记录组,并根据第一交易记录组中每个第一交易记录中的第一主键,按照第一预设排列顺序,对第一交易记录组中的第一交易记录进行排序处理,再根据第二交易记录组中的第二交易记录中的第二主键,按照第一预设排列顺序,对第二交易组中的第二交易记录进行排序处理;在排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,并根据获取的对账结果进行相应的处理,由于可以先根据对账文件所对应的第一交易记录组,按照第一主键和第一预设排列顺序,对第一交易记录组中的第一交易记录进行排序,根据本地数据库中保存的交易信息所对应的第二交易记录组,按照第二主键和第一预设排列顺序,对第二交易记录组中的第二交易记录进行排序,再对排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,相较于现有技术中需要针对对账文件中的每一个交易记录,分别要查询本地数据库中的保存的交易信息,获取与之匹配的交易记录进行比较而言,本实施例有效地提高了对账的处理效率。In this embodiment, the reconciliation request is received, and the reconciliation request includes the identification of the transaction system; according to the reconciliation request, the reconciliation file in the transaction system corresponding to the identification of the transaction system and the transaction information stored in the local database are obtained; Obtain the first transaction record group corresponding to the reconciliation file, and the second transaction record group corresponding to the transaction information, and according to the first primary key in each first transaction record in the first transaction record group, according to the first preset Sorting order: sort the first transaction records in the first transaction record group, and then sort the second transaction records according to the second primary key in the second transaction records in the second transaction record group according to the first preset The second transaction records in the group are sorted; in the sorted first transaction record group and the second transaction record group, compare whether the first transaction record is consistent with the corresponding second transaction record in the same order, and according to the obtained pair According to the first transaction record group corresponding to the reconciliation file, the first transaction records in the first transaction record group can be sorted according to the first primary key and the first preset order, According to the second transaction record group corresponding to the transaction information stored in the local database, sort the second transaction records in the second transaction record group according to the second primary key and the first preset order, and then sort the sorted first In the first transaction record group and the second transaction record group, compare whether the first transaction record is consistent with the second transaction record with the same corresponding order. Compared with the prior art, each transaction record in the reconciliation file needs to be In terms of querying the stored transaction information in the local database and obtaining matching transaction records for comparison, this embodiment effectively improves the processing efficiency of account reconciliation.
图2为本发明提供的对账的处理方法实施例二的流程示意图,如图2所示,该方法包括:Fig. 2 is a schematic flow chart of Embodiment 2 of the processing method for reconciliation provided by the present invention. As shown in Fig. 2, the method includes:
步骤201、接收对账请求,对账请求中包括交易系统的标识。Step 201. Receive an account reconciliation request, which includes the identification of the transaction system.
步骤202、根据对账请求,获取交易系统的标识对应的交易系统中的对账文件,以及本地数据库中保存的交易信息。Step 202, according to the reconciliation request, obtain the reconciliation file in the transaction system corresponding to the identifier of the transaction system, and the transaction information stored in the local database.
步骤203、采用sed工具,去掉对账文件中的文件头和文件尾,以获取处理后的对账文件。Step 203, using the sed tool to remove the file header and the file footer in the reconciliation file, so as to obtain the processed reconciliation file.
在本实施例中,对账文件中的文件头和文件尾不包括对账字段信息。In this embodiment, the file header and the file footer in the reconciliation file do not include reconciliation field information.
步骤204、采用awk工具,从处理后的对账文件中,获取第一交易记录组,其中,第一交易记录组中包括多个第一交易记录,每个第一交易记录均包括第一主键和对应的对账字段。Step 204, using the awk tool to obtain a first transaction record group from the processed reconciliation file, wherein the first transaction record group includes a plurality of first transaction records, and each first transaction record includes a first primary key and the corresponding reconciliation fields.
在本实施例中,采用awk工具,可以获取处理后的对账文件中的每一个对账字段信息。In this embodiment, the awk tool can be used to obtain the information of each reconciliation field in the processed reconciliation file.
步骤205、获取与交易信息对应的第二交易记录组,其中,第二交易记录组中包括多个第二交易记录,每个第二交易记录中包括第二主键和对应的对账字段。Step 205: Obtain a second transaction record group corresponding to the transaction information, wherein the second transaction record group includes a plurality of second transaction records, and each second transaction record includes a second primary key and a corresponding reconciliation field.
步骤206、根据第一主键,按照第一预设排列顺序,对第一交易记录组中的第一交易记录进行排序处理,并根据第二主键,按照第一预设排列顺序,对第二交易组中的第二交易记录进行排序处理。Step 206: sort the first transaction records in the first transaction record group according to the first preset order according to the first primary key, and sort the second transaction records according to the first preset order according to the second primary key The second transactions in the group are sorted.
步骤207、在排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,并根据获取的对账结果进行相应的处理。Step 207: In the sorted first transaction record group and the second transaction record group, compare whether the first transaction record is consistent with the corresponding second transaction record with the same sort, and perform corresponding processing according to the obtained reconciliation result.
在本实施例中,采用sed工具,去掉对账文件中的文件头和文件尾,以获取处理后的对账文件,采用awk工具,从处理后的对账文件中,获取第一交易记录组,这样可以从对账文件中获取每一个的对账字段信息,便于后续对对账文件中的每一个对账字段进行处理。In this embodiment, the sed tool is used to remove the file header and the file tail in the reconciliation file to obtain the processed reconciliation file, and the awk tool is used to obtain the first transaction record group from the processed reconciliation file , so that the information of each reconciliation field can be obtained from the reconciliation file, so as to facilitate subsequent processing of each reconciliation field in the reconciliation file.
图3为本发明提供的对账的处理方法实施例三的流程示意图,在上述图2所述实施例的基础上,如图3所示,本发明提供的对账的处理方法实施例三中,步骤204中采用awk工具,从处理后的对账文件中,获取第一交易记录组,包括:Fig. 3 is a schematic flow chart of the third embodiment of the processing method for reconciliation provided by the present invention. On the basis of the embodiment described in Fig. 2 above, as shown in Fig. 3, the third embodiment of the processing method for reconciliation provided by the present invention In step 204, the awk tool is used to obtain the first transaction record group from the processed reconciliation file, including:
步骤301、采用awk工具,从处理后的对账文件中,根据预设字段信息,获取初始第一交易记录,其中,每个初始第一交易记录中的字段信息均与预设字段信息匹配。Step 301, using the awk tool to obtain initial first transaction records from the processed reconciliation file according to preset field information, wherein the field information in each initial first transaction record matches the preset field information.
在本实施例中,预设字段信息可以根据对账的具体需要从对账文件的所有对账字段中进行选取。In this embodiment, the preset field information can be selected from all reconciliation fields of the reconciliation file according to the specific needs of reconciliation.
步骤302、分别从每个初始第一交易记录中的字段信息中确定第一主键,并将除第一主键之外的其他字段信息按照第二排列顺序进行排序后作为第一主键对应的对账字段,以获取第一交易记录。Step 302: Determine the first primary key from the field information in each initial first transaction record, and sort the field information other than the first primary key according to the second sorting order as the reconciliation corresponding to the first primary key field to get the first transaction record.
在本实施例中,采用awk工具,从处理后的对账文件中,根据预设字段信息,获取初始第一交易记录,其中,每个初始第一交易记录中的字段信息均与预设字段信息匹配,分别从每个初始第一交易记录中的字段信息中确定第一主键,并将除第一主键之外的其他字段信息按照第二排列顺序进行排序后作为第一主键对应的对账字,以获取第一交易记录,这样可以根据对账需求自适应地选取预设字段信息,从而获取相应的第一交易记录,从而减小了第一交易记录的数据量。In this embodiment, the awk tool is used to obtain the initial first transaction record from the processed reconciliation file according to the preset field information, wherein the field information in each initial first transaction record is the same as the preset field information Information matching, respectively determine the first primary key from the field information in each initial first transaction record, and sort the field information other than the first primary key according to the second sorting order as the reconciliation corresponding to the first primary key words to obtain the first transaction record, so that the preset field information can be adaptively selected according to the reconciliation requirements, so as to obtain the corresponding first transaction record, thereby reducing the data volume of the first transaction record.
图4为本发明提供的对账的处理方法实施例四的流程示意图,在上述图2所述实施例的基础上,如图4所示,本发明提供的对账的处理方法实施例四中,步骤206中获取与交易信息对应的第二交易记录组,包括:Fig. 4 is a schematic flow chart of Embodiment 4 of the processing method for reconciliation provided by the present invention. On the basis of the embodiment described in Fig. 2 above, as shown in Fig. 4 , in Embodiment 4 of the processing method for reconciliation provided by the present invention , in step 206, the second transaction record group corresponding to the transaction information is obtained, including:
步骤401、从交易信息中,根据预设字段信息,获取初始第二交易记录;其中,每个初始第二交易记录中的字段信息均与预设字段信息匹配。Step 401. Obtain an initial second transaction record from the transaction information according to preset field information; wherein, the field information in each initial second transaction record matches the preset field information.
步骤402、分别从每个初始第二交易记录中的字段信息中确定第二主键,并将除第二主键之外的其他字段信息按照第二排列顺序进行排序后作为第二主键对应的对账字段,以获取第二交易记录。Step 402, respectively determine the second primary key from the field information in each initial second transaction record, and sort the field information except the second primary key according to the second arrangement order as the reconciliation corresponding to the second primary key field to get the second transaction record.
在本实施例中,从交易信息中,根据预设字段信息,获取初始第二交易记录;其中,每个初始第二交易记录中的字段信息均与预设字段信息匹配,分别从每个初始第二交易记录中的字段信息中确定第二主键,并将除第二主键之外的其他字段信息按照第二排列顺序进行排序后作为第二主键对应的对账字段,以获取第二交易记录,这样第一交易记录和第二交易记录的每个字段的排序相同,从而提高了对账的效率。In this embodiment, the initial second transaction record is obtained from the transaction information according to the preset field information; wherein, the field information in each initial second transaction record matches the preset field information, and each initial Determine the second primary key in the field information in the second transaction record, and sort the field information except the second primary key according to the second arrangement order as the reconciliation field corresponding to the second primary key to obtain the second transaction record , so that the order of each field of the first transaction record and the second transaction record is the same, thereby improving the efficiency of reconciliation.
进一步地,在上述任一实施例的基础上,本发明提供的对账的处理方法实施例五中,第一主键和第二主键包括流水号、或者流水号和订单号。Further, on the basis of any of the above embodiments, in Embodiment 5 of the method for processing accounts reconciliation provided by the present invention, the first primary key and the second primary key include a serial number, or a serial number and an order number.
图5为本发明提供的对账的处理装置实施例一的结构示意图,如图5所示,包括:接收模块10、获取模11、排序模块12和比较处理模块13。FIG. 5 is a schematic structural diagram of Embodiment 1 of an account reconciliation processing device provided by the present invention. As shown in FIG.
接收模块10,用于接收对账请求,对账请求中包括交易系统的标识。The receiving module 10 is configured to receive an account reconciliation request, and the account reconciliation request includes the identification of the transaction system.
获取模块11,用于根据对账请求,获取交易系统的标识对应的交易系统中的对账文件,以及本地数据库中保存的交易信息。The acquiring module 11 is configured to acquire the account reconciliation file in the transaction system corresponding to the identifier of the transaction system and the transaction information stored in the local database according to the account reconciliation request.
获取模块11还用于获取与对账文件对应的第一交易记录组,以及与交易信息对应的第二交易记录组,其中,第一交易记录组中包括多个第一交易记录,每个第一交易记录均包括第一主键和对应的对账字段;第二交易记录组中包括多个第二交易记录,每个第二交易记录中包括第二主键和对应的对账字段。The obtaining module 11 is also used to obtain the first transaction record group corresponding to the reconciliation file, and the second transaction record group corresponding to the transaction information, wherein the first transaction record group includes a plurality of first transaction records, each Each transaction record includes a first primary key and a corresponding reconciliation field; the second transaction record group includes a plurality of second transaction records, and each second transaction record includes a second primary key and a corresponding reconciliation field.
排序模块12,用于根据第一主键,按照第一预设排列顺序,对第一交易记录组中的第一交易记录进行排序处理,并根据第二主键,按照第一预设排列顺序,对第二交易组中的第二交易记录进行排序处理。The sorting module 12 is configured to sort the first transaction records in the first transaction record group according to the first preset order according to the first primary key, and sort the first transaction records in the first transaction record group according to the first preset sequence according to the second primary key. The second transaction records in the second transaction group are sorted.
比较处理模块13,用于在排序后的第一交易记录组和第二交易记录组中,比较第一交易记录与对应排序相同的第二交易记录是否一致,并根据获取的对账结果进行相应的处理。The comparison processing module 13 is used to compare whether the first transaction record is consistent with the second transaction record corresponding to the same sort in the sorted first transaction record group and the second transaction record group, and perform corresponding transaction according to the obtained reconciliation result. processing.
本实施例中的对账的处理装置可以执行图1所示方法实施例的技术方案,其实现原理和有益效果相类似,此处不再赘述。The processing device for reconciliation in this embodiment can execute the technical solution of the method embodiment shown in FIG. 1 , and its implementation principle and beneficial effects are similar, and will not be repeated here.
图6为本发明提供的对账的处理装置实施例二的结构示意图,图6所示,在上述实施例一的基础上,获取模块11包括:第一获取单元110和第二获取单元111。FIG. 6 is a schematic structural diagram of Embodiment 2 of an account reconciliation processing device provided by the present invention. As shown in FIG. 6 , on the basis of Embodiment 1 above, the acquisition module 11 includes: a first acquisition unit 110 and a second acquisition unit 111 .
第一获取单元110,用于采用sed工具,去掉对账文件中的文件头和文件尾,以获取处理后的对账文件。The first obtaining unit 110 is configured to use the sed tool to remove the file header and file trailer in the reconciliation file, so as to obtain the processed reconciliation file.
第二获取单元111,用于采用awk工具,从处理后的对账文件中,获取第一交易记录组。The second obtaining unit 111 is configured to use the awk tool to obtain the first transaction record group from the processed reconciliation file.
本实施例中的对账的处理装置可以执行图2所示方法实施例的技术方案,其实现原理和有益效果相类似,此处不再赘述。The processing device for account reconciliation in this embodiment can implement the technical solution of the method embodiment shown in FIG. 2 , and its implementation principles and beneficial effects are similar, and will not be repeated here.
图7为本发明提供的对账的处理装置实施例三的结构示意图,如图7所示,在上述实施例的基础上,第二获取单元111包括:FIG. 7 is a schematic structural diagram of Embodiment 3 of the processing device for reconciliation provided by the present invention. As shown in FIG. 7 , on the basis of the above embodiments, the second acquisition unit 111 includes:
匹配子单元1110,用于采用awk工具,从处理后的对账文件中,根据预设字段信息,获取初始第一交易记录;其中,每个初始第一交易记录中的字段信息均与预设字段信息匹配。The matching subunit 1110 is used to use the awk tool to obtain the initial first transaction record from the processed reconciliation file according to the preset field information; wherein, the field information in each initial first transaction record is consistent with the preset The field information matches.
交易记录获取子单元1111,用于分别从每个初始第一交易记录中的字段信息中确定第一主键,并将除第一主键之外的其他字段信息按照第二排列顺序进行排序后作为第一主键对应的对账字,以获取第一交易记录。The transaction record acquisition subunit 1111 is configured to determine the first primary key from the field information in each initial first transaction record, and sort the field information except the first primary key according to the second arrangement order as the first primary key. A reconciliation word corresponding to a primary key to obtain the first transaction record.
本实施例中的对账的处理装置可以执行图3所示方法实施例的技术方案,其实现原理和有益效果相类似,此处不再赘述。The processing device for account reconciliation in this embodiment can execute the technical solution of the method embodiment shown in FIG. 3 , and its implementation principles and beneficial effects are similar, and will not be repeated here.
图8为本发明提供的对账的处理装置实施例四的结构示意图,如图8所示,在上述实施例三的基础上,获取模块11还包括:FIG. 8 is a schematic structural diagram of Embodiment 4 of the reconciliation processing device provided by the present invention. As shown in FIG. 8 , on the basis of the above-mentioned Embodiment 3, the acquisition module 11 further includes:
第三获取单元112,用于从交易信息中,根据预设字段信息,获取初始第二交易记录;并分别从每个初始第二交易记录中的字段信息中确定第二主键,再将除第二主键之外的其他字段信息按照第二排列顺序进行排序后作为第二主键对应的对账字段,以获取第二交易记录。The third obtaining unit 112 is used to obtain the initial second transaction record from the transaction information according to the preset field information; and determine the second primary key from the field information in each initial second transaction record, and then divide the first The field information other than the second primary key is sorted according to the second sorting order and used as the reconciliation field corresponding to the second primary key to obtain the second transaction record.
其中,每个初始第二交易记录中的字段信息均与预设字段信息匹配。Wherein, the field information in each initial second transaction record matches the preset field information.
本实施例中的对账的处理装置可以执行图4所示方法实施例的技术方案,其实现原理和有益效果相类似,此处不再赘述。The device for processing account reconciliation in this embodiment can implement the technical solution of the method embodiment shown in FIG. 4 , and its implementation principles and beneficial effects are similar, and will not be repeated here.
进一步地,在上述任一实施例的基础上,本发明提供的对账的处理装置实施例五中,第一主键和第二主键包括流水号、或者流水号和订单号。Furthermore, on the basis of any of the above embodiments, in Embodiment 5 of the processing device for reconciliation provided by the present invention, the first primary key and the second primary key include a serial number, or a serial number and an order number.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510666151.5A CN105303437A (en) | 2015-10-15 | 2015-10-15 | Processing method and device for account checking |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510666151.5A CN105303437A (en) | 2015-10-15 | 2015-10-15 | Processing method and device for account checking |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN105303437A true CN105303437A (en) | 2016-02-03 |
Family
ID=55200667
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510666151.5A Pending CN105303437A (en) | 2015-10-15 | 2015-10-15 | Processing method and device for account checking |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105303437A (en) |
Cited By (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105761139A (en) * | 2016-02-04 | 2016-07-13 | 上海携程商务有限公司 | Account checking system and method |
| CN106651554A (en) * | 2016-08-31 | 2017-05-10 | 江苏鸿信系统集成有限公司 | Account checking statement generation method and system thereof |
| CN107301511A (en) * | 2017-06-26 | 2017-10-27 | 北京小度信息科技有限公司 | Method for managing resource, server and computer-readable recording medium |
| CN107766458A (en) * | 2017-09-27 | 2018-03-06 | 中国银行股份有限公司 | File crashes method, apparatus, computer equipment and computer-readable recording medium |
| CN107944996A (en) * | 2017-10-17 | 2018-04-20 | 九派天下支付有限公司 | A kind of fund account checking method and system |
| CN108694674A (en) * | 2018-06-11 | 2018-10-23 | 中国平安人寿保险股份有限公司 | Reconciliation processing method, device, computer equipment and storage medium |
| CN109325055A (en) * | 2018-08-02 | 2019-02-12 | 阿里巴巴集团控股有限公司 | The screening of business association tables of data and checking method, device, electronic equipment |
| CN110390586A (en) * | 2019-07-23 | 2019-10-29 | 中国工商银行股份有限公司 | Account checking method, device and server |
| CN112258191A (en) * | 2020-12-22 | 2021-01-22 | 深圳市深圳通有限公司 | Data reconciliation method, device, equipment and storage medium |
| CN112581277A (en) * | 2020-12-24 | 2021-03-30 | 中国银联股份有限公司 | Data processing method and device |
| CN113902536A (en) * | 2021-10-18 | 2022-01-07 | 中国银行股份有限公司 | Account checking processing method and device |
| CN114064584A (en) * | 2021-11-24 | 2022-02-18 | 中国工商银行股份有限公司 | Data comparison method, device, computer equipment and storage medium |
| CN114218110A (en) * | 2021-12-17 | 2022-03-22 | 平安养老保险股份有限公司 | Reconciliation test method, device, computer equipment and storage medium for financial data |
| CN114529379A (en) * | 2022-02-14 | 2022-05-24 | 平安证券股份有限公司 | Account checking processing method and device, computer equipment and storage medium |
| CN114971822A (en) * | 2022-04-21 | 2022-08-30 | 上海华瑞银行股份有限公司 | Account checking method, account checking system and electronic equipment |
| CN115936909A (en) * | 2022-12-06 | 2023-04-07 | 平安健康保险股份有限公司 | Data processing method and device, computer equipment and storage medium |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080189195A1 (en) * | 2007-02-02 | 2008-08-07 | Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. | System and method for account reconciliation |
| CN103577571A (en) * | 2013-10-31 | 2014-02-12 | 北京奇虎科技有限公司 | Data processing method and device |
-
2015
- 2015-10-15 CN CN201510666151.5A patent/CN105303437A/en active Pending
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080189195A1 (en) * | 2007-02-02 | 2008-08-07 | Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. | System and method for account reconciliation |
| CN103577571A (en) * | 2013-10-31 | 2014-02-12 | 北京奇虎科技有限公司 | Data processing method and device |
Cited By (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105761139A (en) * | 2016-02-04 | 2016-07-13 | 上海携程商务有限公司 | Account checking system and method |
| CN106651554A (en) * | 2016-08-31 | 2017-05-10 | 江苏鸿信系统集成有限公司 | Account checking statement generation method and system thereof |
| CN107301511A (en) * | 2017-06-26 | 2017-10-27 | 北京小度信息科技有限公司 | Method for managing resource, server and computer-readable recording medium |
| CN107766458A (en) * | 2017-09-27 | 2018-03-06 | 中国银行股份有限公司 | File crashes method, apparatus, computer equipment and computer-readable recording medium |
| CN107944996A (en) * | 2017-10-17 | 2018-04-20 | 九派天下支付有限公司 | A kind of fund account checking method and system |
| CN108694674A (en) * | 2018-06-11 | 2018-10-23 | 中国平安人寿保险股份有限公司 | Reconciliation processing method, device, computer equipment and storage medium |
| CN109325055A (en) * | 2018-08-02 | 2019-02-12 | 阿里巴巴集团控股有限公司 | The screening of business association tables of data and checking method, device, electronic equipment |
| CN110390586A (en) * | 2019-07-23 | 2019-10-29 | 中国工商银行股份有限公司 | Account checking method, device and server |
| CN112258191A (en) * | 2020-12-22 | 2021-01-22 | 深圳市深圳通有限公司 | Data reconciliation method, device, equipment and storage medium |
| CN112581277A (en) * | 2020-12-24 | 2021-03-30 | 中国银联股份有限公司 | Data processing method and device |
| CN113902536A (en) * | 2021-10-18 | 2022-01-07 | 中国银行股份有限公司 | Account checking processing method and device |
| CN114064584A (en) * | 2021-11-24 | 2022-02-18 | 中国工商银行股份有限公司 | Data comparison method, device, computer equipment and storage medium |
| CN114218110A (en) * | 2021-12-17 | 2022-03-22 | 平安养老保险股份有限公司 | Reconciliation test method, device, computer equipment and storage medium for financial data |
| CN114529379A (en) * | 2022-02-14 | 2022-05-24 | 平安证券股份有限公司 | Account checking processing method and device, computer equipment and storage medium |
| CN114971822A (en) * | 2022-04-21 | 2022-08-30 | 上海华瑞银行股份有限公司 | Account checking method, account checking system and electronic equipment |
| CN115936909A (en) * | 2022-12-06 | 2023-04-07 | 平安健康保险股份有限公司 | Data processing method and device, computer equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105303437A (en) | Processing method and device for account checking | |
| CN111951101B (en) | Data checking method and device | |
| US10346620B2 (en) | Systems and methods for authentication of access based on multi-data source information | |
| CN111985930B (en) | Client number generation method and device | |
| CN107256479B (en) | Transaction mode classification execution method and device | |
| CN107633016A (en) | Data processing method and device and electronic equipment | |
| CN107133233B (en) | A method and device for processing configuration data query | |
| CN112801767B (en) | Accounting data processing method and device for newly added channel | |
| CN110427375B (en) | Method and device for identifying field type | |
| CN110634223A (en) | Bill verification method and device | |
| CN113947397A (en) | Reconciliation method, system, storage medium and terminal for unified mobile payment platform | |
| CN111339151B (en) | Online examination method, device, equipment and computer storage medium | |
| CN107885788A (en) | A kind of business datum check method | |
| CN110033348A (en) | Storage, checking method and the device of business datum | |
| CN110956166A (en) | Bill labeling method and device | |
| CN113129150A (en) | Transaction data processing method and device, terminal device and readable storage medium | |
| CN110716961A (en) | Data processing method and device | |
| CN114416852A (en) | Data processing method, device, equipment and medium | |
| CN110909212B (en) | Bank identification code matching method and equipment | |
| CN110738184B (en) | Early warning information generation method and device for paper certificates | |
| CN107016613B (en) | Method and apparatus for data modification | |
| CN112508387B (en) | Case final book examination method, device and equipment | |
| CN112488562B (en) | Service realization method and device | |
| CN112597192A (en) | Data query method, device, server and medium | |
| CN106803202B (en) | Method and device for extracting transaction records to be tested |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160203 |
|
| RJ01 | Rejection of invention patent application after publication |