CN102402551B - The method and apparatus producing chronological file - Google Patents

The method and apparatus producing chronological file Download PDF

Info

Publication number
CN102402551B
CN102402551B CN201010285790.4A CN201010285790A CN102402551B CN 102402551 B CN102402551 B CN 102402551B CN 201010285790 A CN201010285790 A CN 201010285790A CN 102402551 B CN102402551 B CN 102402551B
Authority
CN
China
Prior art keywords
role
transaction record
transaction
file
record
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.)
Active
Application number
CN201010285790.4A
Other languages
Chinese (zh)
Other versions
CN102402551A (en
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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201010285790.4A priority Critical patent/CN102402551B/en
Publication of CN102402551A publication Critical patent/CN102402551A/en
Application granted granted Critical
Publication of CN102402551B publication Critical patent/CN102402551B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The present invention provides a kind of method and apparatus producing chronological file based on transaction data.Wherein for each transaction record, first the first role corresponding to the first mechanism and first role's chronological file according to this first role creation the first mechanism are processed, then the second role corresponding to the second mechanism is processed, and second role's chronological file according to this second role creation the second mechanism, the like, until generating the mechanism's chronological file corresponding to all roles involved by All Activity record.

Description

The method and apparatus producing chronological file
Technical field
The present invention relates to the chronological file in transaction process, and particularly relate to based on transaction The method and apparatus producing chronological file of data.
Background technology
At finance service and member mechanism, the financial transaction of each related side that concludes the business or clearance knot In calculation activity, each side that participates in business needs clearance object information is transmitted and is processed, these Information is to ensure that and checks the transaction the most important medium of relevant party account.The load of this medium Body is transaction journal file, also referred to as transaction details file.
Along with finance is increasing with transaction class of business, transaction content gradually enriches, and hands over The needs of transaction details quantity of information are continuously increased by easy each related side.Therefore, conclude the business each related side All propose the requirement obtaining chronological file to common finance service, which results in finance Chronological file increasing number handled by service organization's systematic difference program, financial services system Disposal ability be increasingly difficult in adapt to present situation.
Fig. 1 is role's distribution schematic diagram of mechanism of exchange in transaction data.As it is shown in figure 1, hand over Easily data are generally made up of multiple transaction records, each transaction record transaction sequence labelled notation, hand over Easily record is about information involved in once transaction, generally includes and participates in this time transaction Mechanism (such as, mechanism A, B), this mechanism institute's role 1,2...N in transaction (such as, card sending mechanism, accepting institution, service organization etc.) and other Transaction Information.Figure 2 show the structural representation of chronological file produced by the mechanism A in Fig. 1, such as figure institute Showing, the chronological file required for member mechanism A is by the flowing water of this institute of member mechanism role File forms.Member mechanism includes again multiple dissimilar as the chronological file of each role Chronological file, such as when the role of card sending mechanism plays the part of in member mechanism, its role's chronological file General chronological file, card issuer's mistake chronological file etc. can be included.Each class chronological file includes Relevant Transaction Information.
In the prior art, it is common that according to transaction data, role one by one generates chronological file. Such as, during first round traversal All Activity data, the mechanism A all friendships as role 1 are found out Easily, and for mechanism A role 1 chronological file is generated;Find out mechanism B owning as role 1 Transaction, and generate role 1 chronological file for mechanism B;The like, generate for all mechanisms This mechanism is as all roles 1 chronological file of role 1.Second takes turns traversal All Activity data Time, find out the mechanism A All Activity as role 2, and generate role 2 flowing water for mechanism A File;Find out the mechanism B All Activity as role 2, and flow for mechanism B generation role 2 Hydrology part;The like, generate this mechanism all roles 2 as role 2 for all mechanisms Chronological file;Successively, third round ergodic data, generate role 3 file of all mechanisms.As This, often obtain a class character file and will travel through a transaction data.
Therefore, often increasing a member mechanism, system is accomplished by the number of deals after all clearances According to once traveling through reading, choose the Transaction Information of this mechanism newly increased;Often increase by a class Chronological file, system for settling account is accomplished by that the transaction data after all clearances carries out n times traversal and reads Taking (N is mechanism's number), mechanism chooses such chronological file pair newly increased that it is affiliated one by one The Transaction Information answered.
The processing mode of prior art supports member mechanism number and chronological file kind in theory The infinite expanding of class, but often increase a member mechanism or often increase by a class chronological file, Googol will be brought according to traveling through the time-consuming of reading to system, seriously reduce systematic function.
Summary of the invention
For meeting chronological file mechanical expansion and the demand of kind of document autgmentability, the present invention drapes over one's shoulders Dew one traversal reads All Activity data, can generate all streams of all member mechanisms The method and apparatus of hydrology part.
One aspect of the present invention provides the method producing chronological file based on transaction record, its In, transaction record includes conclude the business sequence number, at least two mechanism participated in business, at least two machine Structure at least two role belonging in transaction record, the method comprises the steps:
Read transaction record;
According to the first role in transaction record, transaction record is civilian according to the flowing water of the first role Part form is changed,
Transaction record after format transformation is write the of first mechanism corresponding with the first role One role's chronological file;
According to the second role in transaction record, transaction record is civilian according to the flowing water of the second role Part form is changed,
Transaction record after format transformation is write the of second mechanism corresponding with the second role Two role's chronological files.
Another aspect of the present invention provides the method producing chronological file based on transaction data, Wherein transaction data includes that multiple transaction record, each in multiple transaction records include transaction Sequence number, at least two mechanism participated in business, at least two mechanism in transaction record belonging to At least two role, the method comprises the steps:
Multiple transaction records are divided into multiple pieces,
Multiple pieces of parallel processing,
Wherein, for each transaction record in each piece:
Read transaction record;
According to the first role in transaction record, transaction record is civilian according to the flowing water of the first role Part form is changed,
Transaction record after format transformation is write the of first mechanism corresponding with the first role One role's chronological file;
According to the second role in transaction record, transaction record is civilian according to the flowing water of the second role Part form is changed,
Transaction record after format transformation is write the of second mechanism corresponding with the second role Two role's chronological files.
Preferably, in the above-mentioned methods, the chronological file type for role distributes file format mark Know symbol, determine the chronological file form of role according to file format identifier.
Preferably, in the above-mentioned methods, follow for each transaction record in multiple transaction records Multiple transaction records are divided into multiple pieces by ring distribution piecemeal identifier, and identify according to piecemeal Each block of multiple pieces of parallel processing of symbol.
Preferably, in the above-mentioned methods, the transaction record of at least two mechanism is dynamically recorded Quantity, and distribute weights according to this Number dynamics at least two mechanism;
Based on weights, by role's chronological file of the transaction record written agency after format transformation.
An additional aspect of the present invention provides the device producing chronological file based on transaction data, Wherein transaction data includes that multiple transaction record, each in multiple transaction records include transaction Sequence number, the mechanism of at least two of participating in business, at least two mechanism in transaction record belonging to At least two role, this device includes data segmentation module, blocks of data processing module, parametrization File format changing module, wherein,
Data segmentation module is configured to multiple transaction records are divided into multiple pieces;
Blocks of data processing module is configured to multiple pieces of parallel processing,
Wherein, for each transaction record in each piece:
Read transaction record;
To hand over according to first role's call parameters file format changing module in transaction record Easily record is changed according to the chronological file form of the first role,
Transaction record after format transformation is write the of first mechanism corresponding with the first role One role's chronological file;
To hand over according to second role's call parameters file format changing module in transaction record Easily record is changed according to the chronological file form of the second role,
Transaction record after format transformation is write the of second mechanism corresponding with the second role Two role's chronological files.
Preferably, parametrization file format changing module is further configured to the flowing water into role File type distribution file format identifier, determines the flowing water of role according to file format identifier File format.
Preferably, each transaction record circulation during data segmentation module is multiple transaction record Distribution piecemeal identifier multiple transaction records are divided into multiple pieces, blocks of data processing module according to Each block of multiple pieces of piecemeal identifier parallel processing.
Preferably, said apparatus farther includes to manage module, and management module is configured to dynamically The quantity of transaction record of ground record at least two mechanism, and according to this Number dynamics be to Shao Liangge mechanism distribution weights;
Preferably, the transaction record after format transformation, based on weights, is write by blocks of data processing module Enter role's chronological file of mechanism.
Assembly of the invention has mechanism's quantity autgmentability, flowing water kind autgmentability, data process Time-consuming constant advantage.
Accompanying drawing explanation
After the detailed description of the invention having read the present invention referring to the drawings, it will more clearly Solve various aspects of the invention.Wherein,
Fig. 1 is role's distribution schematic diagram of mechanism of exchange in transaction data;
Fig. 2 shows the structural representation of chronological file produced by the mechanism A in Fig. 1;
Fig. 3 is the schematic diagram producing chronological file according to embodiments of the present invention;
Fig. 4 is the method step schematic diagram producing chronological file according to Fig. 3;
Fig. 5 shows the transaction data after piecemeal processes according to embodiments of the present invention Structural representation;
Fig. 6 is the device schematic diagram producing chronological file according to embodiments of the present invention.
Detailed description of the invention
With reference to the accompanying drawings, the detailed description of the invention of the present invention is described in further detail.
Owing to the feature of transaction data is that transaction data amount is huge, the time-consuming of ergodic data is system Main time-consuming.Fig. 1 is role's distribution schematic diagram of mechanism of exchange in transaction data.As schemed Showing, same member mechanism, in difference is concluded the business, can exist as difference transaction role.With During one member mechanism concludes the business at one, it is also possible to as difference, transaction role exists, such as, In a money transfer transactions, credit card issuer not only does but also do receipts single file in a bank.
Fig. 2 is the structural representation of the chronological file of the mechanism A in Fig. 1.Wherein it is desired to be Member mechanism A produce its as each transaction role corresponding to file, such as role 1 flowing water File, contains this member mechanism All Activity record information as role 1 in this document, These Transaction Informations should be written in different types of chronological file.Additionally, in once concluding the business, When same member mechanism occurs as different role, it is also desirable to this transaction record is write this mechanism In affiliated different files.
Below with reference to Fig. 3, it is the schematic diagram producing chronological file according to embodiments of the present invention,. As it is shown on figure 3, system produces chronological file according to the transaction record of transaction serial number 1.Wherein, At least two mechanism A and B, the structure A that described transaction record includes transaction sequence number, participates in business With B difference figure 1 and 2 in transaction 1.For transaction 1, first processing mechanism A Corresponding role 1 and role 1 chronological file according to this role 1 generating mechanism A, so Role 2 corresponding to post processing mechanism B, and according to the role 2 of this role creation mechanism B Chronological file, the like, until generating the transaction machine corresponding to all roles involved by 1 Structure chronological file.
Fig. 4 is the method step schematic diagram producing chronological file according to Fig. 3, in step 401 Middle reading transaction record, i.e. concludes the business 1.In step 402, according in described transaction record Transaction record is changed by role 1 according to the chronological file form of described first role.In step In rapid 403, the transaction record after format transformation is write the angle of the mechanism A corresponding with role 1 Color 1 chronological file.In step 404, according to the role 2 in transaction record by transaction record Change according to the chronological file form of described role 2.In step 405, lattice will be changed Transaction record after formula writes role 2 chronological file of the mechanism B corresponding with role 2.According to This order, processes one by one transaction record until generating all of chronological file.Therefore, according to this The technical scheme of invention produces chronological file only need to travel through a transaction data, is increasing new machine Also need only to when structure or new file type read and process newly-generated transaction record.
In another embodiment of the present invention, be further role chronological file type distribution File format identifier, therefore, can be easily according to being distributed when convert file formats File format identifier determines the chronological file form of role.This avoid according to file content Carry out judging file type, saved system resource and improve the speed that chronological file generates.
Additionally, when in the face of the transaction record of magnanimity, system can be distributed multiple thread and be come parallel Process these transaction records, thus be possible not only to once travel through generation chronological file and significantly subtract Lack system processing time.As example, it can be the transaction record circulation point in transaction data Multiple transaction records are divided into multiple pieces by partition block identifier, and identify according to described piecemeal Each block of the plurality of piece of parallel processing of symbol.Fig. 5 shows according to embodiments of the present invention The structural representation of transaction data after piecemeal processes.As it can be seen, the total piecemeal of system Identifier can be system parameter settings value 32 pieces, the piecemeal of the most front 32 transaction records in advance Identifier is respectively 1-32, and the piecemeal identifier of the 33rd article to the 64th article transaction record is respectively For 1-32, successively circular treatment.As a result, every transaction record is all assigned to a piecemeal mark Know symbol, and identifier be these 32 numerals of 1-32 one of them.Each thread of system According to the piecemeal corresponding piecemeal of identifier parallel processing.It will be appreciated by those skilled in the art that It is, it is also possible to use other technological means to realize the parallel processing to transaction record.
For reasonable distribution system resource, improving system process performance further, the present invention is separately One embodiment achieves the distribution of the priority to member mechanism.Specific operation process is as follows, During traveling through whole transaction data sources, dynamically calculate the friendship that Mei Jia mechanism currently occurs Easy quantity, and calculate dynamic weights.According to mechanism's Dynamic Weights to literary composition belonging to member mechanism Part handle carries out open and close process.Such as, the number of transaction that mechanism B participates in is less, then be it Calculate weights the least, then when system handle resources deficiency, prioritizing selection closing organ B's File handle discharges resource.On the contrary, if the number of transaction that mechanism A participates in is more, then distribute Bigger weights, therefore the file handle of mechanism A keeps the probability persistently opened bigger.By right Centralized file management with member's associated therewith, it is possible to achieve in the case of system resource allows, The fewest opening and closing operations carrying out file, improves system I/O efficiency.
Fig. 6 is the device schematic diagram producing chronological file according to embodiments of the present invention, such as figure institute Showing, this device includes data segmentation module 601, blocks of data processing module 602, parametrization literary composition Part format converting module 603, manages module 604.Wherein, data segmentation module 601 is used for Multiple transaction records are divided into multiple pieces.
Blocks of data processing module 602 is for the plurality of piece of parallel processing, and realizes above-mentioned The method of invention, concrete operation is as follows, reads each transaction record in each piece, root According to the role's call parameters file format changing module 603 in transaction record by this transaction record Change according to the chronological file form of this role.
Parametrization file format changing module 603 can be the chronological file type distribution literary composition of role Part format identifier, and the chronological file form of role is determined according to file format identifier.
Management module 604 can the quantity of the dynamically transaction record of recording mechanism, and according to This Number dynamics ground distributes weights for mechanism.Blocks of data processing module 603 can based on these weights, Role's chronological file by the transaction record written agency after format transformation.
It is understood that the modules in the said apparatus of the present invention can be by comprising meter Software and/or the hardware of calculation machine program realize.
Those skilled in the art it is also understood that method and apparatus proposed by the invention can be fitted For other by the water system of detail record to magnanimity chronological file pattern.
The detailed description of the invention of the present invention is described above with reference to accompanying drawing.But general in this area Lead to and skilled artisan will appreciate that, in the case of without departing from the spirit and scope of the present invention, also may be used Various change and replacement is made with the detailed description of the invention to the present invention.These changes and replacement all fall In claims of the present invention limited range.

Claims (7)

1. the method producing chronological file based on transaction record, wherein, described transaction note Record includes concluding the business sequence number, at least two mechanism participated in business, described at least two mechanism in friendship At least two role belonging to easily in record, the method comprises the steps:
Read described transaction record;
According to the first role in described transaction record by described transaction record according to described first The chronological file form of role is changed,
Transaction record after format transformation is write first mechanism corresponding with described first role First role's chronological file;
According to the second role in described transaction record by described transaction record according to described second The chronological file form of role is changed,
Transaction record after format transformation is write second mechanism corresponding with described second role Second role's chronological file,
Wherein, further comprising the steps of:
Dynamically record the quantity of the transaction record of described at least two mechanism, and according to this number Amount is dynamically that described at least two mechanism distributes weights;
Based on described weights, by role's flowing water literary composition of the transaction record written agency after format transformation Part.
2. the method producing chronological file based on transaction data, wherein said transaction data Including multiple transaction records, each in the plurality of transaction record includes conclude the business sequence number, ginseng With transaction at least two mechanism, described at least two mechanism in transaction record belonging at least Two roles, the method comprises the steps:
The plurality of transaction record is divided into multiple pieces,
The plurality of piece of parallel processing,
Wherein, for each transaction record in each piece:
Read described transaction record;
According to the first role in described transaction record by described transaction record according to described first The chronological file form of role is changed,
Transaction record after format transformation is write first mechanism corresponding with described first role First role's chronological file;
According to the second role in described transaction record by described transaction record according to described second The chronological file form of role is changed,
Transaction record after format transformation is write second mechanism corresponding with described second role Second role's chronological file, wherein, further comprising the steps of:
Dynamically record the quantity of the transaction record of described at least two mechanism, and according to this number Amount is dynamically that described at least two mechanism distributes weights;
Based on described weights, by role's flowing water literary composition of the transaction record written agency after format transformation Part.
3. method as claimed in claim 1 or 2, it is characterised in that for the flowing water of role File type distribution file format identifier, determines role's according to described file format identifier Chronological file form.
4. method as claimed in claim 2, it is characterised in that for the plurality of transaction note Each transaction record cycle assignment piecemeal identifier in record is by the plurality of transaction record It is divided into multiple pieces, and according to each of the plurality of piece of described piecemeal identifier parallel processing Block.
5. a device for chronological file, wherein said transaction data is produced based on transaction data Including multiple transaction records, each in the plurality of transaction record includes conclude the business sequence number, ginseng With transaction the mechanism of at least two, described at least two mechanism in transaction record belonging at least Two roles, this device includes data segmentation module, blocks of data processing module, parametrization file Format converting module, wherein,
Described data segmentation module is configured to the plurality of transaction record is divided into multiple pieces;
Described blocks of data processing module is configured to the plurality of piece of parallel processing,
Wherein, for each transaction record in each piece:
Read described transaction record;
The conversion of described parametrization file format is called according to the first role in described transaction record Described transaction record is changed by module according to the chronological file form of described first role,
Transaction record after format transformation is write first mechanism corresponding with described first role First role's chronological file;
The conversion of described parametrization file format is called according to the second role in described transaction record Described transaction record is changed by module according to the chronological file form of described second role,
Transaction record after format transformation is write second mechanism corresponding with described second role Second role's chronological file,
Farther include to manage module, described management module be configured to dynamically to record described in extremely The quantity of the transaction record of Shao Liangge mechanism, and according to this Number dynamics for described at least two Individual mechanism distribution weights;
Transaction record after format transformation, based on described weights, is write by described blocks of data processing module Enter role's chronological file of mechanism.
6. device as claimed in claim 5, it is characterised in that described parametrization tray Formula modular converter is further configured to distribute file format mark into the chronological file type of role Know symbol, determine the chronological file form of role according to described file format identifier.
7. device as claimed in claim 5, it is characterised in that described data segmentation module For each the transaction record cycle assignment piecemeal identifier in the plurality of transaction record by The plurality of transaction record is divided into multiple pieces, and described blocks of data processing module is according to described piecemeal mark Know each block of the plurality of piece of parallel processing of symbol.
CN201010285790.4A 2010-09-17 2010-09-17 The method and apparatus producing chronological file Active CN102402551B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010285790.4A CN102402551B (en) 2010-09-17 2010-09-17 The method and apparatus producing chronological file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010285790.4A CN102402551B (en) 2010-09-17 2010-09-17 The method and apparatus producing chronological file

Publications (2)

Publication Number Publication Date
CN102402551A CN102402551A (en) 2012-04-04
CN102402551B true CN102402551B (en) 2016-08-17

Family

ID=45884764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010285790.4A Active CN102402551B (en) 2010-09-17 2010-09-17 The method and apparatus producing chronological file

Country Status (1)

Country Link
CN (1) CN102402551B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679530A (en) * 2012-09-07 2014-03-26 中国银联股份有限公司 Intelligent service database generation system and method as well as service processing system and method
CN107145565B (en) * 2017-05-04 2019-10-22 深圳乐信软件技术有限公司 A kind of generation method of pipelined data, apparatus and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744128A (en) * 2004-08-31 2006-03-08 中国银联股份有限公司 Bank card transaction exchange system
CN101211345A (en) * 2006-12-27 2008-07-02 中国银联股份有限公司 Historical trading enquiry method, device and error processing platform
CN101706936A (en) * 2009-12-01 2010-05-12 中国建设银行股份有限公司 Domestic and foreign ledger-combining processing method and processing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744128A (en) * 2004-08-31 2006-03-08 中国银联股份有限公司 Bank card transaction exchange system
CN101211345A (en) * 2006-12-27 2008-07-02 中国银联股份有限公司 Historical trading enquiry method, device and error processing platform
CN101706936A (en) * 2009-12-01 2010-05-12 中国建设银行股份有限公司 Domestic and foreign ledger-combining processing method and processing system

Also Published As

Publication number Publication date
CN102402551A (en) 2012-04-04

Similar Documents

Publication Publication Date Title
Gkypali et al. Science parks and regional innovation performance in fiscal austerity era: Less is more?
CN109039713A (en) A kind of block chain common recognition device and algorithm
CN107391611A (en) A kind of process model generation method of the General ETL Tool based on workflow
Sonobe et al. Changing roles of innovation and imitation in industrial development: The case of the machine tool industry in Taiwan
Wren-Lewis Regulatory capture: Risks and solutions
CN102402551B (en) The method and apparatus producing chronological file
AlAstal Emerging technological innovation in Gaza Strip municipalities: an entrepreneurial approach
CN114186989A (en) Capital allocation decision method, device, server and storage medium
Mallick et al. Association between management capacity and profitability of scheduled urban co-operative banks in India
Naveed et al. Drivers of public enterprise reforms in Pakistan: The perspective of new institutionalism
CN114896285A (en) Bank flow calculation service real-time index system based on multi-dimensional intermediate state aggregation
CN101122991A (en) The fourth generation finance core business system systematic structure and intelligent financial accounting method
CN111797099B (en) Data processing method and device based on subjects and auxiliary attributes
Kyewaalabye et al. The Growth Effects of Electronic Banking: Evidence from Eastern Africa
Samson et al. Nigeria’s Foreign Trade Policy And Economic Relations With China Under President Buhari’s Administration, 2015-2020
Su [Retracted] Blockchain Empowers Chain Enterprises in the Digital Economy to Strengthen Risk Management Research
CN111429251A (en) Method and device for processing data under multiple modes
Sepashvili Digital technologies and e-banking: the future of global economy
Liu How State-Owned Enterprises Drag on Economic Growth
Gerritsen et al. The future of the Chinese miracle: Will neo-statist SOEs presist in China's development model?
Samaan et al. 3 Global productivity trends: Reviving growth through the digital economy?
Becker et al. The future of CIS and CEE countries
Li Digital Transformation: New Development Pattern of Social Security Administration Services
Adžić et al. Geo-Economics and Reindustrialization–Challenges for Croatia and Serbia
WO2014050248A1 (en) Data analysis support device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant