CN109816481A - Billing processing method, apparatus and computer-readable storage medium - Google Patents

Billing processing method, apparatus and computer-readable storage medium Download PDF

Info

Publication number
CN109816481A
CN109816481A CN201910007213.XA CN201910007213A CN109816481A CN 109816481 A CN109816481 A CN 109816481A CN 201910007213 A CN201910007213 A CN 201910007213A CN 109816481 A CN109816481 A CN 109816481A
Authority
CN
China
Prior art keywords
transaction data
order system
channel side
channel
transaction
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
Application number
CN201910007213.XA
Other languages
Chinese (zh)
Inventor
彭川宇
安栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910007213.XA priority Critical patent/CN109816481A/en
Publication of CN109816481A publication Critical patent/CN109816481A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种账单处理方法,该方法包括:获取订单系统的交易请求,将订单系统的交易请求相关的交易数据存储于订单系统的数据库中,从渠道方的文件服务器上读取渠道方的交易数据,将渠道方的交易数据存储于订单系统的NAS盘上,调用订单系统的交易数据及渠道方的交易数据,将订单系统的交易数据及渠道方的交易数据进行比对,当订单系统的交易数据及渠道方的交易数据进行比对成功时,将订单系统的NAS盘中的文件上传到渠道方的文件服务器中。本发明还提出一种账单处理装置以及一种计算机可读存储介质。本发明实现了对账性能稳定,随着交易的数据量越来越大,对账和导出文件性能不会有明显的下降,可扩展性强。

The invention discloses a bill processing method. The method includes: acquiring a transaction request of an order system, storing transaction data related to the transaction request of the order system in a database of the order system, and reading the channel party's file server from the channel party's file server. store the transaction data of the channel side on the NAS disk of the order system, call the transaction data of the order system and the transaction data of the channel side, compare the transaction data of the order system and the transaction data of the channel side, when the order When the transaction data of the system and the transaction data of the channel side are compared successfully, the files in the NAS disk of the order system are uploaded to the file server of the channel side. The present invention also provides a bill processing apparatus and a computer-readable storage medium. The invention realizes the stable performance of account reconciliation, and as the amount of transaction data becomes larger and larger, the performance of account reconciliation and export files will not be significantly decreased, and the expansibility is strong.

Description

Bill processing method, device and computer readable storage medium
Technical field
The present invention relates to field of computer technology more particularly to a kind of bill processing method, device and computer-readable deposit Storage media.
Background technique
There are two transaction systems currently on the market, and one is ordering system, one be channel side system, the two are The reconciliation of system is then done in the database to the data of the two by landing the reconciliation file of channel side into database Reconciliation operation and export, however it is very big if necessary to the data volume of reconciliation, and history account data amount is very big, this reconciliation Mode will be very slow, and as the increasing this reconciliation performance of data volume can be worse and worse.
Summary of the invention
The present invention provides a kind of bill processing method, device and computer readable storage medium, main purpose and is reality Show reconciliation performance to stablize, as the data volume of transaction is increasing, reconciliation and export performance will not significantly decrease; Scalability is strong.
To achieve the above object, the present invention also provides a kind of bill processing methods, which comprises
The transaction request for obtaining ordering system, is stored in order system for the relevant transaction data of the transaction request of ordering system In the database of system;
The transaction data that channel side is read from the file server of channel side, is stored in order for the transaction data of channel side On the network attached storage NAS disk of system;
The transaction data of ordering system and the transaction data of channel side are called, by the transaction data and channel side of ordering system Transaction data be compared;
When the transaction data of the transaction data of ordering system and channel side is compared successfully, by the NAS of ordering system File in disk uploads in the file server of channel side.
Optionally, the relevant transaction data of the transaction request by ordering system is stored in the database of ordering system Include:
According to sliding window strategy, start timed task in each time window, by the ordering system in time window Transaction data fragment batch write-in Hadoop distributed file system, according to order application odd numbers Hash codes hashcode into Row fragment.
Optionally, the transaction data for calling ordering system and the transaction data of channel side include:
Ordering system calls the Driver of Spark cluster, starts Spark task schedule, each task task of Spark from The transaction data of channel side is read in Spark node on NAS disk, wherein the transaction data of channel side includes channel source mark Know;
And based on channel source identification, according in the transaction data of channel side order application odd numbers Hash codes Hashcode carries out repartition processing, and Spark node reads in ordering system from Hadoop distributed file system after having handled Transaction data, read the corresponding fragment of task task number ID of Spark respectively.
Optionally, described when the transaction data of the transaction data of ordering system and channel side is compared successfully, it will order File in the NAS disk of single system uploads in the file server of channel side, comprising: when the transaction data and canal of ordering system When the transaction data of road side is compared successfully, the Map object of ordering system is changed into String object and is written to HDFS by Spark System;
After the completion of all fragment write-ins, the API of Hadoop distributed file system is called, the file of each distribution is closed And and upload to the NAS disk of ordering system, the file under the NAS disk is uploaded to the sftp server of channel side by ordering system On.
Optionally, when the transaction data of the transaction data of ordering system and channel side is compared unsuccessful, reception pair The processing of problem data, and re-start reconciliation.
Optionally, the Hadoop distributed file system be configured with fault-tolerant architecture, wherein fault-tolerant architecture by metadata with Timestamp composition, same order number, the big person of timestamp are valid data.
To achieve the above object, the present invention also provides a kind of bill processing unit, described device includes memory and processing Device is stored with the bill processing routine that can be run on the processor on the memory, and the bill processing routine is by institute It states when processor executes and realizes following steps:
The transaction request for obtaining ordering system, is stored in order system for the relevant transaction data of the transaction request of ordering system In the database of system;
The transaction data that channel side is read from the file server of channel side, is stored in order for the transaction data of channel side On the network attached storage NAS disk of system;
The transaction data of ordering system and the transaction data of channel side are called, by the transaction data and channel side of ordering system Transaction data be compared;
When the transaction data of the transaction data of ordering system and channel side is compared successfully, by the NAS of ordering system File in disk upload in the file server of channel side when the transaction data of ordering system and the transaction data of channel side into When row is compared successfully, the file in the NAS disk of ordering system is uploaded in the file server of channel side.
Optionally, the bill processing routine can also be executed by the processor, also realization following steps:
According to sliding window strategy, start timed task in each time window, by the ordering system in time window Transaction data fragment batch write-in Hadoop distributed file system (HDFS) distributed file system, according to the request slip of order Number Hash codes hashcode carry out fragment.
Optionally, the bill processing routine can also be executed by the processor, realize following steps:
Ordering system calls the Driver of Spark cluster, starts Spark task schedule, each task task of Spark from The transaction data of channel side is read in Spark node on NAS disk, wherein the transaction data of channel side includes channel source mark Know;
And based on channel source identification, according in the transaction data of channel side order application odd numbers Hash codes Hashcode carries out repartition processing, and Spark node reads in ordering system from Hadoop distributed file system after having handled Transaction data, read the corresponding fragment of task task number ID of Spark respectively.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium Bill processing routine is stored on storage medium, the bill processing routine can be executed by one or more processor, with reality Now the step of bill processing method as described above.
The present invention obtains the transaction request of ordering system, and the relevant transaction data of the transaction request of ordering system is stored in In the database of ordering system, the transaction data of channel side is read from the file server of channel side, by the number of deals of channel side According on the NAS disk for being stored in ordering system, the transaction data of ordering system and the transaction data of channel side are called, by ordering system Transaction data and the transaction data of channel side be compared, when ordering system transaction data and channel side transaction data into When row is compared successfully, the file in the NAS disk of ordering system is uploaded in the file server of channel side.Reconciliation of the present invention It can stablize, as the data volume of transaction is increasing, reconciliation and export performance will not significantly decrease;Scalability It is strong: performance can be improved by way of increasing machine node;Reduce system pressure: thought handled using class sliding window formula, Reduce reconciliation and the processing of the export pressure caused by database;Business is fault-tolerant: being directed to Hadoop distributed file system Only newly-increased and additional feature designs fault-tolerant architecture, avoids data modification that big performance is brought to be lost.
Detailed description of the invention
Fig. 1 is the flow diagram for the bill processing method that one embodiment of the invention provides;
Fig. 2 is the schematic diagram of internal structure for the bill processing unit that one embodiment of the invention provides;
The module diagram of bill processing routine in the bill processing unit that Fig. 3 provides for one embodiment of the invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of bill processing method.Shown in referring to Fig.1, handled for the bill that one embodiment of the invention provides The flow diagram of method.This method can be executed by a device, which can be by software and or hardware realization.
In the present embodiment, bill processing method includes:
S10, the transaction request for obtaining ordering system, the relevant transaction data of the transaction request of ordering system is stored in and is ordered In the database of single system.
In the present embodiment, channel side sends real-time deal request and is given to ordering system, and ordering system in real time asks transaction Relevant transaction data is asked to be stored in database.
Preferably, the relevant transaction data of the transaction request by ordering system is stored in the database of ordering system Include:
According to sliding window strategy, start timed task in each time window, by the ordering system in time window Transaction data fragment batch write-in Hadoop distributed file system (HDFS), according to the Hash codes of the application odd numbers of order Hashcode carries out fragment.Such as filename starts with 0, step-length 1 is incremented by.
S20, the transaction data that channel side is read from the file server of channel side, the transaction data of channel side is stored In on the NAS disk of ordering system.
In the present embodiment, periodically (such as daily) number of deals for reading channel side from the file server of channel side According to the transaction data of channel side is stored on the network attached storage NAS disk of ordering system.The temporal frequency periodically read can With configured in advance.
Wherein, fragment is carried out according to the Hash codes hashcode of the application odd numbers of the order of channel side.Such as filename is with 0 Start, step-length 1, is incremented by.
The transaction data of S30, the transaction data for calling ordering system and channel side, by the transaction data and canal of ordering system The transaction data of road side is compared.
Wherein with the transaction data of the architectural form management ordering system of cluster and the transaction data of channel side.Spark is answered It, with the operation of independent process collection, is adjusted on cluster with SparkContext object in main program (referred to as driver) Section.Particularly, in order to run on cluster, SparkContext can be with cluster manager dual system (Spark itself list of several types Only cluster manager dual system or Mesos/YARN) it is connected, these cluster manager dual systems can distribute resource between application.Once even Connect, Spark needs thread pool child node on cluster, that is, those execute calculate and storage using data work into Journey.Then, it will send your application code (with JAR or the Python file defined and being transmitted to SparkContext) To thread pool.Thread pool is allowed to run finally, SparkContext sends task.
Each application has the thread pool process of oneself, can keep in the operational process entirely applied and in multiple threads Operation task.The advantage of doing so is that application is mutually isolated, both in scheduling aspect (task of each driving scheduling own) Also in terms of execution (task of different application is run on different JVM).
For potential cluster manager dual system, Spark is unknowable.As long as it need thread pool process and they Between communication, even when be run on the cluster manager dual system (for example, Mesos/YARN) for also supporting other application it is also opposite Simply.
Because of driving scheduler task on cluster, it should run and be close to working node, in identical local area network more It is good.
Preferably, the transaction data for calling ordering system and the transaction data of channel side include:
Ordering system calls the Driver of Spark cluster, starts Spark task schedule, each task task of Spark from The transaction data of channel side is read in Spark node on NAS disk, wherein the transaction data of channel side includes channel source mark Know;And based on channel source identification, according in the transaction data of channel side order application odd numbers Hash codes hashcode into Row repartition step process, Spark node reads in the transaction data of ordering system from HDFS system after having handled, and reads respectively To the corresponding fragment of task task number ID of Spark.
Preferably, after by processing step above, there is the transaction of ordering system in each fragment in Spark The transaction data of data and channel side, each task task start to compare the transaction of the transaction data and channel side to ordering system Data processing.
S40, when the transaction data of the transaction data of ordering system and channel side is compared successfully, by ordering system File in NAS disk uploads in the file server of channel side.
Preferably, it when the transaction data of the transaction data of ordering system and channel side is compared successfully, that is, orders When the transaction data of single system and the completely the same transaction data of channel side, Spark changes into the Map object of ordering system String object is written to HDFS system;After the completion of all fragment write-ins, the API of HDFS system is called, by the text of each distribution Part merges, and uploads to the NAS disk of ordering system, and ordering system takes the sftp that the file under the NAS disk uploads to channel side It is engaged on device.
When the transaction data of the transaction data of ordering system and channel side is compared unsuccessful, that is to say, that reconciliation has Problem then needs artificial treatment data, after the completion of data processing, repeats above step reconciliation again secondary.
It is therefore preferred that being connect when the transaction data of the transaction data of ordering system and channel side is compared unsuccessful The processing to problem data is received, and re-starts reconciliation.
Preferably, the HDFS system configuration has fault-tolerant architecture, and wherein fault-tolerant architecture is made of metadata and timestamp.Phase With order number, the big person of timestamp is valid data.Because may be modified for data on HDFS, while HDFS does not support to repair The problem of changing is related to a fault-tolerant architecture, avoids importing database data again because of data modification.Fault-tolerant architecture is by metadata It is formed with timestamp, same order number, the big person of timestamp is valid data.
The present invention obtains the transaction request of ordering system, and the relevant transaction data of the transaction request of ordering system is stored in In the database of ordering system, the transaction data of channel side is read from the file server of channel side, by the transaction of channel side Data are stored on the NAS disk of ordering system, call the transaction data of ordering system and the transaction data of channel side, by order system The transaction data of system and the transaction data of channel side are compared, when the transaction data of ordering system and the transaction data of channel side When being compared successfully, the file in the NAS disk of ordering system is uploaded in the file server of channel side.Reconciliation of the present invention Performance is stablized, and as the data volume of transaction is increasing, reconciliation and export performance will not significantly decrease;Scalability It is strong: performance can be improved by way of increasing machine node;Reduce system pressure: thought handled using class sliding window formula, Reduce reconciliation and the processing of the export pressure caused by database;Business is fault-tolerant: only newly-increased and additional for HDFS Feature designs fault-tolerant architecture, avoids data modification that big performance is brought to be lost.
The present invention also provides a kind of bill processing units.At the bill shown in Fig. 2, provided for one embodiment of the invention Manage the schematic diagram of internal structure of device.
In the present embodiment, bill processing unit 1 can be PC (Personal Computer, PC), can also be with It is the terminal devices such as smart phone, tablet computer, portable computer.The bill processing unit 1 includes at least memory 11, processing Device 12, communication bus 13 and network interface 14.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory, Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 It can be the internal storage unit of bill processing unit 1, such as the hard disk of the bill processing unit 1 in some embodiments.It deposits Reservoir 11 is also possible in further embodiments on the External memory equipment of bill processing unit 1, such as bill processing unit 1 The plug-in type hard disk of outfit, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) Card, flash card (Flash Card) etc..Further, memory 11 can also both include the storage inside of bill processing unit 1 Unit also includes External memory equipment.Memory 11 can be not only used for the application software that storage is installed on bill processing unit 1 And Various types of data, such as the code of bill processing routine 01 etc., it can be also used for temporarily storing and exported or will be defeated Data out.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, such as execute bill processing routine 01 etc..
Communication bus 13 is for realizing the connection communication between these components.
Network interface 14 optionally may include standard wireline interface and wireless interface (such as WI-FI interface), be commonly used in Communication connection is established between the device 1 and other electronic equipments.
Optionally, which can also include user interface, and user interface may include display (Display), input Unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It is optional Ground, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriate Referred to as display screen or display unit, for being shown in the information handled in bill processing unit 1 and for showing visually User interface.
Fig. 2 illustrates only the bill processing unit 1 with component 11-14 and bill processing routine 01, art technology Personnel may include than illustrating more it is understood that structure shown in fig. 1 does not constitute the restriction of reconciliation processing apparatus 1 Perhaps more component perhaps combines certain components or different component layouts less.
In 1 embodiment of device shown in Fig. 2, bill processing routine 01 is stored in memory 11;Processor 12 executes Following steps are realized when the bill processing routine 01 stored in memory 11:
The transaction request for obtaining ordering system, is stored in order system for the relevant transaction data of the transaction request of ordering system In the database of system.
In the present embodiment, channel side sends real-time deal request and is given to ordering system, and ordering system in real time asks transaction Relevant transaction data is asked to be stored in database.
Further, in another embodiment of apparatus of the present invention, bill processing routine can also be called by processor, with reality Existing following steps:
According to sliding window strategy, start timed task in each time window, by the ordering system in time window Transaction data fragment batch write-in Hadoop distributed file system (HDFS), according to the Hash codes of the application odd numbers of order Hashcode carries out fragment.Such as filename starts with 0, step-length 1 is incremented by.
The transaction data that channel side is read from the file server of channel side, the transaction data of channel side is stored in and is ordered On the NAS disk of single system.
In the present embodiment, periodically (such as daily) number of deals for reading channel side from the file server of channel side According to the transaction data of channel side is stored on the network attached storage NAS disk of ordering system.The temporal frequency periodically read can With configured in advance.
Wherein, fragment is carried out according to the Hash codes hashcode of the application odd numbers of the order of channel side.Such as filename is with 0 Start, step-length 1, is incremented by.
The transaction data of ordering system and the transaction data of channel side are called, by the transaction data and channel side of ordering system Transaction data be compared.
Wherein with the transaction data of the architectural form management ordering system of cluster and the transaction data of channel side.Spark is answered It, with the operation of independent process collection, is adjusted on cluster with SparkContext object in main program (referred to as driver) Section.Particularly, in order to run on cluster, SparkContext can be with cluster manager dual system (Spark itself list of several types Only cluster manager dual system or Mesos/YARN) it is connected, these cluster manager dual systems can distribute resource between application.Once even Connect, Spark needs thread pool child node on cluster, that is, those execute calculate and storage using data work into Journey.Then, it will send your application code (with JAR or the Python file defined and being transmitted to SparkContext) To thread pool.Thread pool is allowed to run finally, SparkContext sends task.
Each application has the thread pool process of oneself, can keep in the operational process entirely applied and in multiple threads Operation task.The advantage of doing so is that application is mutually isolated, both in scheduling aspect (task of each driving scheduling own) Also in terms of execution (task of different application is run on different JVM).
For potential cluster manager dual system, Spark is unknowable.As long as it need thread pool process and they Between communication, even when be run on the cluster manager dual system (for example, Mesos/YARN) for also supporting other application it is also opposite Simply.
Because of driving scheduler task on cluster, it should run and be close to working node, in identical local area network more It is good.
Preferably, bill processing routine can also be called by processor, to realize that following steps include:
Ordering system calls the Driver of Spark cluster, starts Spark task schedule, each task task of Spark from The transaction data of channel side is read in Spark node on NAS disk, wherein the transaction data of channel side includes channel source mark Know;And based on channel source identification, according in the transaction data of channel side order application odd numbers Hash codes hashcode into Row repartition step process, Spark node reads in the transaction data of ordering system from HDFS system after having handled, and reads respectively To the corresponding fragment of task task number ID of Spark.
Preferably, after by processing step above, there is the transaction of ordering system in each fragment in Spark The transaction data of data and channel side, each task task start to compare the transaction of the transaction data and channel side to ordering system Data processing.
When the transaction data of the transaction data of ordering system and channel side is compared successfully, by the NAS of ordering system File in disk uploads in the file server of channel side.
Preferably, it when the transaction data of the transaction data of ordering system and channel side is compared successfully, that is, orders When the transaction data of single system and the completely the same transaction data of channel side, Spark changes into the Map object of ordering system String object is written to HDFS system;After the completion of all fragment write-ins, the API of HDFS system is called, by the text of each distribution Part merges, and uploads to the NAS disk of ordering system, and ordering system takes the sftp that the file under the NAS disk uploads to channel side It is engaged on device.
When the transaction data of the transaction data of ordering system and channel side is compared unsuccessful, that is to say, that reconciliation has Problem then needs artificial treatment data, after the completion of data processing, repeats above step reconciliation again secondary.
It is therefore preferred that being connect when the transaction data of the transaction data of ordering system and channel side is compared unsuccessful The processing to problem data is received, and re-starts reconciliation.
Preferably, the HDFS system configuration has fault-tolerant architecture, and wherein fault-tolerant architecture is made of metadata and timestamp.Phase With order number, the big person of timestamp is valid data.Because may be modified for data on HDFS, while HDFS does not support to repair The problem of changing is related to a fault-tolerant architecture, avoids importing database data again because of data modification.Fault-tolerant architecture is by metadata It is formed with timestamp, same order number, the big person of timestamp is valid data.
The present invention obtains the transaction request of ordering system, and the relevant transaction data of the transaction request of ordering system is stored in In the database of ordering system, the transaction data of channel side is read from the file server of channel side, by the transaction of channel side Data are stored on the NAS disk of ordering system, call the transaction data of ordering system and the transaction data of channel side, by order system The transaction data of system and the transaction data of channel side are compared, when the transaction data of ordering system and the transaction data of channel side When being compared successfully, the file in the NAS disk of ordering system is uploaded in the file server of channel side.Reconciliation of the present invention Performance is stablized, and as the data volume of transaction is increasing, reconciliation and export performance will not significantly decrease;Scalability It is strong: performance can be improved by way of increasing machine node;Reduce system pressure: thought handled using class sliding window formula, Reduce reconciliation and the processing of the export pressure caused by database;Business is fault-tolerant: only newly-increased and additional for HDFS Feature designs fault-tolerant architecture, avoids data modification that big performance is brought to be lost.
Optionally, in other embodiments, bill processing routine can also be divided into one or more module, and one Or multiple modules are stored in memory 11, and performed by one or more processors (the present embodiment is processor 12) To complete the present invention, the so-called module of the present invention is the series of computation machine program instruction section for referring to complete specific function, is used In implementation procedure of the description bill processing routine in bill processing unit.
It is the program mould of the bill processing routine in one embodiment of bill processing unit of the present invention for example, referring to shown in Fig. 3 Block schematic diagram, in the embodiment, bill processing routine can be divided into plate and obtain module 10, memory module 20, compare mould Block 30 and sending module 40, illustratively:
It obtains module 10 to be used for: the transaction request of ordering system is obtained, by the relevant transaction of the transaction request of ordering system Data are stored in the database of ordering system;
Memory module 20 is used for: the transaction data of channel side is read from the file server of channel side, by channel side Transaction data is stored on the network attached storage NAS disk of ordering system;
Comparison module 30 is used for: the transaction data of ordering system and the transaction data of channel side is called, by ordering system Transaction data and the transaction data of channel side are compared;
Sending module 40 is used for: when the transaction data of the transaction data of ordering system and channel side is compared successfully, File in the NAS disk of ordering system is uploaded in the file server of channel side.
The program modules such as above-mentioned acquisition module 10, memory module 20, comparison module 30 and sending module 40 are performed institute Functions or operations step and above-described embodiment of realization are substantially the same, and details are not described herein.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with bill processing routine, the bill processing routine can be executed by one or more processors, to realize following operation:
The transaction request for obtaining ordering system, is stored in order system for the relevant transaction data of the transaction request of ordering system In the database of system;
The transaction data that channel side is read from the file server of channel side, the transaction data of channel side is stored in and is ordered On the network attached storage NAS disk of single system;
The transaction data of ordering system and the transaction data of channel side are called, by the transaction data and channel side of ordering system Transaction data be compared;
When the transaction data of the transaction data of ordering system and channel side is compared successfully, by the NAS of ordering system File in disk uploads in the file server of channel side.
Computer readable storage medium specific embodiment of the present invention and above-mentioned bill processing unit and each embodiment of method It is essentially identical, do not make tired state herein.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element Or there is also other identical elements in method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1.一种账单处理方法,其特征在于,所述方法包括:1. A bill processing method, characterized in that the method comprises: 获取订单系统的交易请求,将订单系统的交易请求相关的交易数据存储于订单系统的数据库中;Obtain the transaction request of the order system, and store the transaction data related to the transaction request of the order system in the database of the order system; 从渠道方的文件服务器读取渠道方的交易数据,将渠道方的交易数据存储于订单系统的网络附属存储NAS盘上;Read the channel party's transaction data from the channel party's file server, and store the channel party's transaction data on the network-attached storage NAS disk of the order system; 调用订单系统的交易数据及渠道方的交易数据,将订单系统的交易数据及渠道方的交易数据进行比对;Call the transaction data of the order system and the transaction data of the channel side, and compare the transaction data of the order system with the transaction data of the channel side; 当订单系统的交易数据及渠道方的交易数据进行比对成功时,将订单系统的NAS盘中的文件上传到渠道方的文件服务器中。When the transaction data of the order system and the transaction data of the channel side are successfully compared, upload the files in the NAS disk of the order system to the file server of the channel side. 2.如权利要求1所述的账单处理方法,其特征在于,所述将订单系统的交易请求相关的交易数据存储于订单系统的数据库中包括:2. The bill processing method according to claim 1, wherein the storing the transaction data related to the transaction request of the order system in the database of the order system comprises: 按照滑动窗口策略,在每个时间窗口启动定时任务,将时间窗口内的订单系统的交易数据分片批量写入Hadoop分布式文件系统,按照订单的申请单号的哈希码hashcode进行分片。According to the sliding window strategy, the scheduled task is started in each time window, and the transaction data shards of the order system within the time window are written into the Hadoop distributed file system in batches, and the shards are performed according to the hashcode of the order application number. 3.如权利要求1所述的账单处理方法,其特征在于,所述调用订单系统的交易数据及渠道方的交易数据包括:3. The bill processing method according to claim 1, wherein the transaction data of the invoking order system and the transaction data of the channel party comprise: 订单系统调用Spark集群的Driver,启动Spark任务调度,Spark的各个任务Task从NAS盘上将渠道方的交易数据读取到Spark节点中,其中渠道方的交易数据包括渠道来源标识;The order system calls the Driver of the Spark cluster to start Spark task scheduling. Each task of Spark reads the transaction data of the channel side from the NAS disk to the Spark node, where the transaction data of the channel side includes the channel source identifier; 并基于渠道来源标识、根据渠道方的交易数据中订单的申请单号的哈希码hashcode进行重分区处理,处理完后Spark节点从Hadoop分布式文件系统中读入订单系统的交易数据,分别读取到Spark的任务Task编号ID对应的分片。And based on the channel source identifier and the hash code of the order application number in the channel party's transaction data, re-partition processing is performed. After processing, the Spark node reads the transaction data of the order system from the Hadoop distributed file system, and reads the transaction data separately. Get the shard corresponding to the task ID of the Spark task. 4.如权利要求1所述的账单处理方法,其特征在于,所述当订单系统的交易数据及渠道方的交易数据进行比对成功时,将订单系统的NAS盘中的文件上传到渠道方的文件服务器中,包括:4. The bill processing method according to claim 1, wherein when the transaction data of the order system and the transaction data of the channel party are compared successfully, the files in the NAS disk of the order system are uploaded to the channel party of file servers, including: 当订单系统的交易数据及渠道方的交易数据进行比对成功时,Spark将订单系统的Map对象转成String对象写入到Hadoop分布式文件系统;When the transaction data of the order system and the transaction data of the channel side are successfully compared, Spark converts the Map object of the order system into a String object and writes it to the Hadoop distributed file system; 所有分片写入完成后,调用Hadoop分布式文件系统的API,将每个分配的文件合并,并上传到订单系统的NAS盘,订单系统将该NAS盘下的文件上传到渠道方的sftp服务器上。After all the shards are written, the API of the Hadoop distributed file system is called to merge each allocated file and upload it to the NAS disk of the order system, and the order system uploads the files under the NAS disk to the sftp server of the channel side superior. 5.如权利要求1所述的账单处理方法,其特征在于,当订单系统的交易数据及渠道方的交易数据进行比对不成功时,接收对问题数据的处理,并重新进行对账。5 . The bill processing method according to claim 1 , wherein when the comparison between the transaction data of the order system and the transaction data of the channel party is unsuccessful, the processing of the problem data is received, and the account is reconciled. 6 . 6.如权利要求2至4任一项所述的账单处理方法,其特征在于,所述Hadoop分布式文件系统配置有容错结构,其中容错结构由元数据与时间戳组成,相同订单号数据,时间戳大者为有效数据。6. The bill processing method according to any one of claims 2 to 4, wherein the Hadoop distributed file system is configured with a fault-tolerant structure, wherein the fault-tolerant structure is composed of metadata and timestamps, the same order number data, The larger timestamp is valid data. 7.一种账单处理装置,其特征在于,所述装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的账单处理程序,所述账单处理程序被所述处理器执行时实现如下步骤:7. A billing processing device, characterized in that the device comprises a memory and a processor, the memory stores a billing processing program that can run on the processor, and the billing processing program is executed by the processor The following steps are implemented when executing: 获取订单系统的交易请求,将订单系统的交易请求相关的交易数据存储于订单系统的数据库中;Obtain the transaction request of the order system, and store the transaction data related to the transaction request of the order system in the database of the order system; 从渠道方的文件服务器读取渠道方的交易数据,将渠道方的交易数据存储于订单系统的网络附属存储NAS盘上;Read the channel party's transaction data from the channel party's file server, and store the channel party's transaction data on the network-attached storage NAS disk of the order system; 调用订单系统的交易数据及渠道方的交易数据,将订单系统的交易数据及渠道方的交易数据进行比对;Call the transaction data of the order system and the transaction data of the channel side, and compare the transaction data of the order system with the transaction data of the channel side; 当订单系统的交易数据及渠道方的交易数据进行比对成功时,将订单系统的NAS盘中的文件上传到渠道方的文件服务器中。When the transaction data of the order system and the transaction data of the channel side are successfully compared, upload the files in the NAS disk of the order system to the file server of the channel side. 8.如权利要求7所述的账单处理装置,其特征在于,所述账单处理程序还可被所述处理器执行,还实现如下步骤:8. The bill processing apparatus according to claim 7, wherein the bill processing program can also be executed by the processor, and further implements the following steps: 按照滑动窗口策略,在每个时间窗口启动定时任务,将时间窗口内的订单系统的交易数据分片批量写入Hadoop分布式文件系统,按照订单的申请单号的哈希码hashcode进行分片。According to the sliding window strategy, the scheduled task is started in each time window, and the transaction data shards of the order system within the time window are written into the Hadoop distributed file system in batches, and the shards are performed according to the hashcode of the order application number. 9.如权利要求7所述的账单处理装置,其特征在于,所述账单处理程序还可被所述处理器执行,实现如下步骤:9. The bill processing apparatus according to claim 7, wherein the bill processing program can also be executed by the processor, and implements the following steps: 订单系统调用Spark集群的Driver,启动Spark任务调度,Spark的各个任务Task从NAS盘上将渠道方的交易数据读取到Spark节点中,其中渠道方的交易数据包括渠道来源标识;The order system calls the Driver of the Spark cluster to start Spark task scheduling. Each task of Spark reads the transaction data of the channel side from the NAS disk to the Spark node, where the transaction data of the channel side includes the channel source identifier; 并基于渠道来源标识、根据渠道方的交易数据中订单的申请单号的哈希码hashcode进行重分区处理,处理完后Spark节点从Hadoop分布式文件系统中读入订单系统的交易数据,分别读取到Spark的任务Task编号ID对应的分片。And based on the channel source identifier and the hash code of the order application number in the channel party's transaction data, re-partition processing is performed. After processing, the Spark node reads the transaction data of the order system from the Hadoop distributed file system, and reads the transaction data separately. Get the shard corresponding to the task ID of the Spark task. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有账单处理程序,所述账单处理程序可被一个或者多个处理器执行,以实现如权利要求1至6中任一项所述的账单处理方法的步骤。10. A computer-readable storage medium, characterized in that a billing processing program is stored on the computer-readable storage medium, and the billing processing program can be executed by one or more processors, so as to realize the steps of claims 1 to 10. Steps of the bill processing method described in any one of 6.
CN201910007213.XA 2019-01-04 2019-01-04 Billing processing method, apparatus and computer-readable storage medium Pending CN109816481A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910007213.XA CN109816481A (en) 2019-01-04 2019-01-04 Billing processing method, apparatus and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910007213.XA CN109816481A (en) 2019-01-04 2019-01-04 Billing processing method, apparatus and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN109816481A true CN109816481A (en) 2019-05-28

Family

ID=66603944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910007213.XA Pending CN109816481A (en) 2019-01-04 2019-01-04 Billing processing method, apparatus and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN109816481A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110544080A (en) * 2019-07-03 2019-12-06 威富通科技有限公司 payment reconciliation method and server
CN111143401A (en) * 2019-12-27 2020-05-12 中国银行股份有限公司 Query information processing method and device
CN111899011A (en) * 2020-07-29 2020-11-06 广州海鹚网络科技有限公司 Medical bill reconciliation system, computer equipment and storage medium
CN112052141A (en) * 2020-09-02 2020-12-08 平安科技(深圳)有限公司 Data fragment verification method and device, computer equipment and readable storage medium
CN112258191A (en) * 2020-12-22 2021-01-22 深圳市深圳通有限公司 Data reconciliation method, device, equipment and storage medium
CN113177400A (en) * 2021-04-28 2021-07-27 中国工商银行股份有限公司 Keyword comparison method and device based on large-data-volume file
CN115082229A (en) * 2021-03-16 2022-09-20 网联清算有限公司 Distributed account checking method, server, device and system
EP4213037A4 (en) * 2020-09-09 2024-10-09 The People's Bank of China National Clearing Center DATA STORAGE AND RECONCILIATION PROCEDURES AND SYSTEM

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989462A (en) * 2015-02-02 2016-10-05 卓望数码技术(深圳)有限公司 Settlement method capable of supporting different payment channels and settlement system
CN107665460A (en) * 2016-07-24 2018-02-06 平安科技(深圳)有限公司 Accounting method and device based on real-time deal
CN107993151A (en) * 2018-01-17 2018-05-04 平安科技(深圳)有限公司 Fund exchange settlement method, apparatus, equipment and computer-readable recording medium
CN109034993A (en) * 2018-09-29 2018-12-18 深圳前海微众银行股份有限公司 Account checking method, equipment, system and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989462A (en) * 2015-02-02 2016-10-05 卓望数码技术(深圳)有限公司 Settlement method capable of supporting different payment channels and settlement system
CN107665460A (en) * 2016-07-24 2018-02-06 平安科技(深圳)有限公司 Accounting method and device based on real-time deal
CN107993151A (en) * 2018-01-17 2018-05-04 平安科技(深圳)有限公司 Fund exchange settlement method, apparatus, equipment and computer-readable recording medium
CN109034993A (en) * 2018-09-29 2018-12-18 深圳前海微众银行股份有限公司 Account checking method, equipment, system and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘辉: "大数据时代的互联网架构设计", 28 February 2018, 浙江大学出版社, pages: 9 - 19 *
袁景凌: "《Spark案例与实验教程》", 30 April 2017, 武汉大学出版社, pages: 136 - 137 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110544080A (en) * 2019-07-03 2019-12-06 威富通科技有限公司 payment reconciliation method and server
CN111143401A (en) * 2019-12-27 2020-05-12 中国银行股份有限公司 Query information processing method and device
CN111899011A (en) * 2020-07-29 2020-11-06 广州海鹚网络科技有限公司 Medical bill reconciliation system, computer equipment and storage medium
CN112052141A (en) * 2020-09-02 2020-12-08 平安科技(深圳)有限公司 Data fragment verification method and device, computer equipment and readable storage medium
EP4213037A4 (en) * 2020-09-09 2024-10-09 The People's Bank of China National Clearing Center DATA STORAGE AND RECONCILIATION PROCEDURES AND SYSTEM
CN112258191A (en) * 2020-12-22 2021-01-22 深圳市深圳通有限公司 Data reconciliation method, device, equipment and storage medium
CN115082229A (en) * 2021-03-16 2022-09-20 网联清算有限公司 Distributed account checking method, server, device and system
CN113177400A (en) * 2021-04-28 2021-07-27 中国工商银行股份有限公司 Keyword comparison method and device based on large-data-volume file

Similar Documents

Publication Publication Date Title
CN109816481A (en) Billing processing method, apparatus and computer-readable storage medium
US11146502B2 (en) Method and apparatus for allocating resource
CN107908472A (en) Data synchronization unit, method and computer-readable recording medium
WO2019075842A1 (en) Task allocation method and apparatus, storage medium and computer device
CN107515933A (en) Change method, server, system and the storage medium of source data database table structure
CN109726334A (en) The method for pushing and device of e-book
CN110489313A (en) Operation log recording method, device and storage medium based on block chain
CN109254808A (en) Interface call method, device and computer readable storage medium
KR20150130039A (en) CRM based data migration system and method
CN105204927A (en) Application arrangement device and method for terminal equipment
WO2022156087A1 (en) Data blood relationship establishing method and apparatus, computer device, and storage medium
CN110457311A (en) Automatically generate method, server and the storage medium of reconciliation file
CN103631869B (en) A kind of method and apparatus for alleviating server-side database access pressure
CN110347693A (en) Method of data synchronization, device and storage medium
US10055474B1 (en) Method and system for connecting a content repository to a file sharing service
US20160232307A1 (en) Server in visiting service management support system, control method thereof, and control program thereof
CN105354090B (en) Management method and device of virtual equipment
CN114201297A (en) Data processing method and device, electronic equipment and storage medium
CN108073698B (en) Real-time animation display methods, device, electric terminal and readable storage medium storing program for executing
CN109639801A (en) Back end distribution and data capture method and system
US9104742B1 (en) Method and system for optimized parallel queuing
CN106933873A (en) A kind of cross-platform data querying method and equipment
CN109241727B (en) Permission setting method and device
CN103268264B (en) A kind of multi event synchronization RFID middleware system of low coupling and its implementation
CN109658043A (en) Collection data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190528