CN103699699B - One browses decoding CDR file method - Google Patents

One browses decoding CDR file method Download PDF

Info

Publication number
CN103699699B
CN103699699B CN201410020836.8A CN201410020836A CN103699699B CN 103699699 B CN103699699 B CN 103699699B CN 201410020836 A CN201410020836 A CN 201410020836A CN 103699699 B CN103699699 B CN 103699699B
Authority
CN
China
Prior art keywords
client
page
ticket
file
service end
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
CN201410020836.8A
Other languages
Chinese (zh)
Other versions
CN103699699A (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.)
Jiashan Linhu Xincheng Industrial Co.,Ltd.
Original Assignee
Changzhou Institute of Technology
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 Changzhou Institute of Technology filed Critical Changzhou Institute of Technology
Priority to CN201410020836.8A priority Critical patent/CN103699699B/en
Publication of CN103699699A publication Critical patent/CN103699699A/en
Application granted granted Critical
Publication of CN103699699B publication Critical patent/CN103699699B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor

Abstract

The invention discloses one and browse decoding CDR file method, client is sent to service end CDR file list to be decoded according to client and service end communications protocol format, service end resolves client decoding request, obtain decoding listed files and decoding interrogation condition, call phone bill decoding storehouse the CDR file of request is decoded, decoded result is stored in the temporary file of service end, service end returns the ticket of decoded result for the first time and receives decoded result return for the first time to client custom end, the ticket calculating current decoding needs the total page number of display, and show the ticket of page 1;Service end is when returning to the homepage information to client simultaneously, odd number if showing according to client every page, and decoded result temporary file is set up index.Setting up index by client separately request with decoded result temporary file, in the case of browsing a large amount of CDR file, systematic function obtains the raising of geometry level.

Description

One browses decoding CDR file method
Technical field
The present invention relates to Computers and Communication field, particularly one and browse decoding CDR file side Method.
Background technology
In communication charge system, to analyze and check charge information, need CDR file is solved Code, the decoded file content of original bill files is more than 8 times of original words list, communicates simultaneously Data traffic in system is big, and a prefecture-level city is in the busy stage that communicates, and system hour produces CDR file reaches tens G bytes, after the CDR file decoding of hour, it will reach several Hundred G bytes, the ticket information of this hundreds of G byte decoded, service end is directly transmitted to client End, client carries out loaded and displayed, it will following two serious problems occur:
1. the time that service end transmits decoded result to client is the longest, takies the network bandwidth Greatly;
2. the data volume that the ticket time of client loading decoded result is the longest, the biggest, leads Cause, in client loading procedure, directly to die;
Based on above reason, general solution is that service end carries out cutting, so decoding file Afterwards result being sent in batches client, decoded result is separately loaded by client, this Although scheme solves client and loads the problem that decoded result is died, but performance is the lowest, leads Cause the most unavailable at the ticket query function of big ticket and big data quantity.
Summary of the invention
For problems of the prior art, the purpose of the present invention is to propose to a kind of client and divide Decoded result is set up index and according to client demand paging to client by the request of opening, service end Transmit decoded result, charge system can be solved and browse big file and browse large-data documents A difficult problem, charge system is when checking the CDR file of big data quantity simultaneously, also has the highest Performance, what system stability was high browses decoding CDR file method.
In order to achieve the above object, the present invention is by the following technical solutions: one browses decoding words Monofile method, step includes:
1) client receives the condition needing to decode CDR file, and condition according to protocol format It is organized into syllable sequence, sends inquiry request command and assist to service end, CDR inquiry request View form is binary sequence, and condition is separated by two bytes of 0x070x07, it Rear execution step 2);
2) service end receives inquiry request, resolves request command, obtains inquiry request Condition, then selects the ticket literary composition of the time that meets according to the time conditions in inquiry request Part, is decoded file, obtains ticket, user's input that client receives Condition, when ticket meets the condition of inquiry request, then enters interim literary composition ticket by row write Part, performs step 3 afterwards), the most directly perform step 3);
3) at the end of decoding, then step 4 is performed), otherwise perform step 2);
4) temporary file being set up index, service end reads client every page display ticket bar number Configuration, obtains value N of client every page display ticket number;Set up page number sequence number In PageIndex temporary file corresponding with the page number, the mapping of ticket position CDRPos is delayed Deposit district CacheM, perform according to following logical relation:
A) CDR file is carried out pre-read, to CDR file line number Row read and N Delivery;
B) it is 0 when the value of mould, then sets up page number sequence number PageIndex and ticket institute The map example of position CDRPos, puts into this example hereof In CacheM, page number sequence number PageIndex adds 1 simultaneously, is pre-read by this The mode taken, presses page and sets up index, then ticket decoded result temporary file Continue to read temporary file, it is judged that whether temporary file has read, and has read Cheng Hou, performs step 5), complete without reading, continue a);
C) when mould is not equal to 0, continue to read temporary file, it is judged that whether temporary file Reading completes, and after having read, performs step 5), continue a);
5) phone bill decoding result temporary file is set up after index completes by page, please to client query Seeking return Query Result, the protocol format returning result is: the total line number of ticket Odd number if CDRTotalRows0x070x07 every page display PageCDRRows0x070x07 one page ticket writing data, client is passed through CDRTotalRows and PageCDRRows calculates the visitor that current inquiry request obtains The total page number that family end display ticket needs, at client initialization Pagination Display interface also Display page 1 ticket, performs step 6 afterwards);
6), after needing during user clicks on client to show the page number that ticket is corresponding, client sends bag Message containing page number information asks the call bill data of this page, request protocol lattice to service end Formula is: the command code 0x070x07 page number number;Service end receives solicited message, resolves Request data obtains the page number number, is obtained from CacheM region of memory by the page number number The mapping of this page CDR file corresponding with page number Data Position in temporary file, By mapping the physical location obtaining this page of CDR file in temporary file IndexPos, service end process is opened temporary file, is moved document location and arrive IndexPos, reads PageCDRRows jargon forms data, and the data read are returned To client, call bill data that client is analyzed and acquired by also shows.
After using technique scheme, the method have the advantages that the client of the present invention Decoded result is set up index and according to client demand paging to visitor by end separately request, service end Family end transmits the method for decoded result, not only solves charge system and browses big file and browse A difficult problem for large-data documents, charge system is when checking the CDR file of big data quantity simultaneously, Also there is the highest performance, and system stability is high.
Accompanying drawing explanation
Fig. 1 phone bill decoding sets up index and paging query flow chart.
Detailed description of the invention
Below according to Figure of description and specific embodiment, the present invention is further explained.
As it is shown in figure 1, one browses decoding CDR file method, step includes:
1) client receives the condition needing to decode CDR file, and condition according to agreement lattice Formula is organized into syllable sequence, sends inquiry request command and asks to service end, CDR inquiry Seeking protocol format is binary sequence, and condition is separated by two bytes of 0x070x07, Perform step 2 afterwards);
2) service end receives inquiry request, resolves request command, and decoded result is write In the temporary file of service end, every ticket writes a line, faces decoded result Time file set up index, obtain inquiry request condition, then according in inquiry request Time conditions select to meet the CDR file of time, file is decoded, obtains Ticket, the condition of user's input that client receives, ask when ticket meets inquiry The condition asked, then enter temporary file ticket by row write, performs step 3 afterwards), The most directly perform step 3);
3) at the end of decoding, then step 4 is performed), otherwise perform step 2);
4) temporary file being set up index, service end reads client every page display ticket bar number Configuration, obtain client every page display ticket number value N;Decoded result has M Bar ticket, client every page display N bar ticket, index segment record number is: X=M/N; Service end internal memory is set up one and is preserved in index segment and every page of ticket place temporary file The mapping relations Map sequence of position, position meter in every page of ticket place temporary file Calculation mode is: read temporary file by row, and record reads every jargon singly at interim literary composition Position in part, sets up page number sequence number PageIndex temporary file corresponding with the page number The mapped cache district CacheM of middle ticket position CDRPos, according to following logical relation Perform:
A) CDR file is carried out pre-read, to CDR file line number Row read and N Delivery;
B) it is 0 when the value of mould, then sets up page number sequence number PageIndex and ticket institute The map example of position CDRPos, puts into this example hereof In CacheM, page number sequence number PageIndex adds 1 simultaneously, is pre-read by this The mode taken, presses page and sets up index, then ticket decoded result temporary file Continue to read temporary file, it is judged that whether temporary file has read, and has read Cheng Hou, performs step 5), complete without reading, continue a);
C) when mould is not equal to 0, continue to read temporary file, it is judged that whether temporary file Reading completes, and after having read, performs step 5), continue a);
5) phone bill decoding result temporary file is set up after index completes by page, to client query Request returns Query Result, and the protocol format returning result is: the total line number of ticket Odd number if CDRTotalRows0x070x07 every page display PageCDRRows0x070x07 one page ticket writing data, client is passed through CDRTotalRows and PageCDRRows calculates the visitor that current inquiry request obtains The total page number that family end display ticket needs, at client initialization Pagination Display interface And show page 1 ticket, perform step 6 afterwards);
6), after needing during user clicks on client to show the page number that ticket is corresponding, client sends The message comprising page number information asks the call bill data of this page, request association to service end View form is: the command code 0x070x07 page number number;Service end receives solicited message, The analysis request data acquisition page number number, by the page number number from CacheM region of memory Obtain this page CDR file corresponding with page number Data Position in temporary file Map, by mapping the physical location obtaining this page of CDR file in temporary file IndexPos, service end process is opened temporary file, is moved document location and arrive IndexPos, reads PageCDRRows jargon forms data, and the data read are returned Returning to client, call bill data that client is analyzed and acquired by also shows.

Claims (1)

1. one kind browses decoding CDR file method, it is characterised in that step includes:
1) client receives the condition needing to decode CDR file, and condition is organized into word according to protocol format Joint sequence, sending inquiry request command is binary system sequence to service end, CDR inquiry request protocol form Row, condition by two bytes of 0x070x07 separately, performs step 2 afterwards);
2) service end receives inquiry request, resolves request command, obtains inquiry request condition, so Select the CDR file of the time that meets afterwards according to the time conditions in inquiry request, file is solved Code, obtains ticket, and the condition of user's input that client receives, when ticket meets inquiry request Condition, then ticket is entered temporary file by row write, afterwards perform step 3), the most directly perform Step 3);
3) at the end of decoding, then step 4 is performed), otherwise perform step 2);
4) temporary file being set up index, service end reads the configuration of client every page display ticket bar number, Value N to client every page display ticket number;Set up page number sequence number PageIndex corresponding with the page number In temporary file, the mapped cache district CacheM of ticket position CDRPos, closes according to following logic System performs:
A) CDR file is carried out pre-read, to CDR file line number Row read and N delivery;
B) it is 0 when the value of mould, then sets up page number sequence number PageIndex and ticket institute position hereof Put the map example of CDRPos, this example is put in CacheM, simultaneously the page number Sequence number PageIndex adds 1, by the way of this pre-read, interim to ticket decoded result File is pressed page and is set up index, then proceedes to read temporary file, it is judged that whether temporary file is read Take into, after having read, perform step 5), complete without reading, continue a);
C) when mould is not equal to 0, continue to read temporary file, it is judged that whether temporary file has read, After reading completes, perform step 5), continue a);
5) phone bill decoding result temporary file is set up after index completes by page, looks into client query request return Asking result, the protocol format returning result is: total line number CDRTotalRows0x070x07 of ticket Odd number PageCDRRows0x070x07 one page ticket writing data if every page of display, client The client that current inquiry request obtains is calculated by CDRTotalRows and PageCDRRows The total page number that end display ticket needs, at client initialization Pagination Display interface and show page 1 Ticket, performs step 6 afterwards);
6), after needing during user clicks on client to show the page number that ticket is corresponding, client sends and comprises page number letter The message of breath asks the call bill data of this page to service end, and request protocol form is: command code The 0x070x07 page number number;Service end receives solicited message, the analysis request data acquisition page number number, leads to Cross the page number number and from CacheM region of memory, obtain this page CDR file corresponding with the page number temporarily The mapping of the Data Position in file, obtains this page of CDR file in temporary file by mapping Physical location IndexPos, service end process opens temporary file, mobile document location to IndexPos, Read PageCDRRows jargon forms data, the data read are returned to client, client The call bill data that is analyzed and acquired by also shows.
CN201410020836.8A 2014-01-16 2014-01-16 One browses decoding CDR file method Active CN103699699B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410020836.8A CN103699699B (en) 2014-01-16 2014-01-16 One browses decoding CDR file method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410020836.8A CN103699699B (en) 2014-01-16 2014-01-16 One browses decoding CDR file method

Publications (2)

Publication Number Publication Date
CN103699699A CN103699699A (en) 2014-04-02
CN103699699B true CN103699699B (en) 2016-09-28

Family

ID=50361227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410020836.8A Active CN103699699B (en) 2014-01-16 2014-01-16 One browses decoding CDR file method

Country Status (1)

Country Link
CN (1) CN103699699B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105357453A (en) * 2015-11-24 2016-02-24 长春乙天科技有限公司 Communication group sending and group receiving control method based on multi-detector imaging camera
CN105843958A (en) * 2016-04-15 2016-08-10 北京思特奇信息技术股份有限公司 Cache-based server paging method and system
CN110245114B (en) * 2019-06-24 2021-10-15 北京润科通用技术有限公司 Data processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9909139D0 (en) * 1998-04-27 1999-06-16 Sun Microsystems Inc High performance message store
US6192376B1 (en) * 1998-11-13 2001-02-20 International Business Machines Corporation Method and apparatus for shadowing a hierarchical file system index structure to enable error recovery
CN101996194A (en) * 2009-08-14 2011-03-30 北京大学 On-line browsing method and system of electronic file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9909139D0 (en) * 1998-04-27 1999-06-16 Sun Microsystems Inc High performance message store
US6192376B1 (en) * 1998-11-13 2001-02-20 International Business Machines Corporation Method and apparatus for shadowing a hierarchical file system index structure to enable error recovery
CN101996194A (en) * 2009-08-14 2011-03-30 北京大学 On-line browsing method and system of electronic file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
移动软交换话单分拣软件的设计;史雪魁等;《中国期刊全文数据库 邢台职业技术学院学报》;20080630;第25卷(第6期);全文 *

Also Published As

Publication number Publication date
CN103699699A (en) 2014-04-02

Similar Documents

Publication Publication Date Title
US10043220B2 (en) Method, device and storage medium for data processing
US20160335243A1 (en) Webpage template generating method and server
WO2019072103A1 (en) Method and apparatus for obtaining target data
CN101599151A (en) A kind of system and method for self-adaptively selecting bank card for payment
CN108984553B (en) Caching method and device
CN103500204B (en) A kind of web page browsing backing method, web page server and client
CN101526963A (en) Method for identifying web page coding, device and terminal equipment
CN106503111B (en) Webpage code-transferring method, device and client terminal
CN106101169A (en) A kind of terminal and data reporting method
CN103699699B (en) One browses decoding CDR file method
CN103020271B (en) The method of contact associated information is obtained in a kind of mobile terminal
WO2014067376A1 (en) Method, device and system for pushing network data
US20130013647A1 (en) Method and device for importing backup data for a mobile terminal
CN112307369A (en) Short link processing method, device, terminal and storage medium
CN104391961A (en) Tens of millions of small file data read and write solution strategy
CN109933595B (en) Internet of things equipment information sharing system and device and terminal equipment
CN104978325B (en) A kind of web page processing method, device and user terminal
CN106909596B (en) Service processing method, device and system
US20130036343A1 (en) Systems and methods for a wireless web browser for use in handheld wireless devices
CN101815086A (en) Browser font optimization method for mobile communication equipment terminals
CN103532920A (en) Cookie update method and cookie update system
CN110334333B (en) Information modification method and related device
CN104394518A (en) Short message sending method and short message platform
CN110992116A (en) Electronic invoice generation method, device, equipment and storage medium based on ETC system
CN200950255Y (en) Large-capacity SIM card

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
TR01 Transfer of patent right

Effective date of registration: 20201223

Address after: Room 204, No. 158, Yaozhuang Avenue, Yaozhuang Town, Jiashan County, Jiaxing City, Zhejiang Province

Patentee after: Jiashan Linhu Xincheng Industrial Co.,Ltd.

Address before: 213022 Wushan Road, Xinbei District, Changzhou, Jiangsu Province, No. 1

Patentee before: CHANGZHOU INSTITUTE OF TECHNOLOGY

TR01 Transfer of patent right
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20140402

Assignee: Jiashan County Yaozhuang Business Management Co.,Ltd.

Assignor: Jiashan Linhu Xincheng Industrial Co.,Ltd.

Contract record no.: X2023330000545

Denomination of invention: A Method for Browsing and Decoding Call Order Files

Granted publication date: 20160928

License type: Common License

Record date: 20230822

EE01 Entry into force of recordation of patent licensing contract